更新记录
1.0.1(2021-03-23) 下载此版本
修复点击事件不触发的问题
1.0.0(2021-03-21) 下载此版本
首次提交
平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
- | - | - | - | - | √ | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
× | × | × | × | - | - | - | × | - | × | × |
1、引入插件,并在components中注册
复制代码import AbsorbButton from "./components/adsorb-button.nvue"
components:{
AbsorbButton
}
2、在插槽中写入自己的内容
复制代码 <absorb-button :marginX="30" :marginY="35" @clickButton="clickButton" >
<div class="ball">
<text class="text">按钮</text>
</div>
</absorb-button>
3、可传参数
复制代码props:{
marginY:{ // 纵向边距
type:Number,
default:40
},
marginX:{ //横向边距
type:Number,
default:20
}
}
4、抛出事件
当被点击时会触发@clickButton事件