Giter Club home page Giter Club logo

Comments (8)

xiongchenxu avatar xiongchenxu commented on May 23, 2024

要修改源码,将PieLabel注册进去,然后npm重新打包,这样项目才能使用。
image

from wx-f2.

GzhiYi avatar GzhiYi commented on May 23, 2024

试试替换这个js文件 -> 代码

from wx-f2.

xiongchenxu avatar xiongchenxu commented on May 23, 2024

from wx-f2.

xiongchenxu avatar xiongchenxu commented on May 23, 2024

from wx-f2.

lh147258 avatar lh147258 commented on May 23, 2024

我想问一下,替换那个文件的js代码呢

from wx-f2.

xiongchenxu avatar xiongchenxu commented on May 23, 2024

from wx-f2.

lh147258 avatar lh147258 commented on May 23, 2024

@xiongchenxu 可以给我说一下是替换那个文件里的么。或者把文件发给我一份谢谢啦

from wx-f2.

xiongchenxu avatar xiongchenxu commented on May 23, 2024

@xiongchenxu 可以给我说一下是替换那个文件里的么。或者把文件发给我一份谢谢啦

自己编译,重新构建就好了。
1.关闭微信小程序,进入 node_modules/@antv/wx-f2/src/index.js 注入代码:
const PieLabel = require('@antv/f2/lib/plugin/pie-label');
F2.Chart.plugins.register(PieLabel);
2.node_modules@antv\wx-f2路径下,执行 npm install、npm run build,完成后删除node_modules@antv\wx-f2\node_modules
3.重新打开微信小程序,开启npm使用功能,构建npm包。
此时PieLabel已经被注册到F2中了,无需引入,直接使用。其实还可以等F2 4.x,新的F2组件更好,不过官方更新的慢了点,主要是ScrollBar在F2 3.x的小程序中引入有BUG,F2 4.x解决了,等待官方更新新版本后,直接用新的吧。

from wx-f2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.