Code Monkey home page Code Monkey logo

weapp-plugin-dashboard's Introduction

weapp-plugin-dashboard

npm license

微信小程序仪表盘组件

安装与使用

  1. 在小程序根目录(project.config.json中miniprogramRoot配置的目录)中依次执行
npm init
npm i weapp-plugin-dashboard -S --production
  1. 微信开发者工具,项目配置开启使用npm模块,并执行“工具-构建npm”
  2. 在小程序页面json文件中配置
"usingComponents": {
    "weapp-plugin-dashboard": "weapp-plugin-dashboard"
}
  1. 在小程序页面中使用组件
<weapp-plugin-dashboard />

配置参数

完整的配置项及默认值如下:

<weapp-plugin-dashboard 
    min="0"                 // 最小值
    max="100"               // 最大值
    val="50"                // 当前值
    width="750"             // 组件宽度,单位rpx
    height="400"            // 组件高度,单位rpx
    colors="{{myColors}}"   // 仪表盘颜色分布
    >
</weapp-plugin-dashboard>
...
data: {
    myColors: [{
        percent: 50,
        color: '#67C23A'
    }, {
        percent: 80,
        color: '#E6A23C'
    }, {
        percent: 100,
        color: '#F56C6C'
    }]
}
...

关于作者

前端路上

weapp-plugin-dashboard's People

Contributors

tower1229 avatar

Watchers

James Cloos avatar

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.