1.0.2 • Published 3 years ago

fanxiaopang-wx-miniprogram v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

fanxiaopang-wx-miniprogram

使用

开发

  1. 安装依赖:
cnpm i fanxiaopang-wx-miniprogram -S

2.使用组件 xxx.json

{ "usingComponents": { "qf-btn": "taocuicui-miniprogram/button/button", "qf-dashboard": "taocuicui-miniprogram/dashboard/dashboard", "qf-popup": "taocuicui-miniprogram/popup/popup" } }

xxx.wxml

<qf-dashboard min="0" max="100" val="{{val}}" width="750" height="400" colors="{{myColors}}"

>

点击显示弹出层

xxx.js

Page({ handleClick() { console.log('handleClick') },

handleRandom() { const max = 100 const min = 0 this.setData({ val: Math.floor(Math.random() * (max - min + 1) - 1) }) },

handlePopup() { this.popup.showPopup() },

onReady() { // 获得 popup 组件 this.popup = this.selectComponent('#popup') },

// 取消事件 _error() { console.log('你点击了取消') this.popup.hidePopup() }, // 确认事件 _success() { console.log('你点击了确定') this.popup.hidePopup() },

data: { val: 30, myColors: { percent: 50, color: '#67C23A' }, { percent: 80, color: '#E6A23C' }, { percent: 100, color: '#F56C6C' } }, })

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago