更新记录
v1.0.1(2023-08-01) 下载此版本
v1.0.1 更新md说明文件
v1.0.0(2023-08-01) 下载此版本
无
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | - | - | - | - | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
√ | - | - | - | - | - | - | - | - | - | - |
cui-calculator计算器
弹窗计算器组件,调用decimal.js进行计算。依赖了uni-popup、uni-row组件(已集成在插件中,如果项目已经依赖可删除以节省空间)。
代码演示
基本用法
<view>
<cui-button class="item" @click="tapOpenCalculator">简易计算器</cui-button>
<cui-calculator ref="calculator" size="normal"></cui-calculator>
</view>
export default {
data() {
return {
}
},
methods: {
tapOpenCalculator(){
this.$refs["calculator"].open();
}
}
}
插件标签
- 默认 cui-calculator 为 component
API
Props
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
size | 尺寸normal、small | String | normal |
常见问题
- 依赖 uni-popup、uni-row组件,为了方便使用打包进组件包里了,如果项目已经依赖了uni-popup、uni-row组件,可以删掉以节约空间