主要使用 loding 等待 plain镂空 disabled 禁用 三种方式
包括微信小程序open-type开放能力 (博客内后续更新)
<template>
<view>
<view class="uni-padding-wrap uni-common-mt">
<button type="primary" @tap="changetype" >切换状态</button>
<button type="default" :loading="load" > 带Loading后禁用</button>
<button type="primary" :plain="plain" :disabled="disabled" >禁用 镂空</button>
<button type="warn" hover-start-time=3000>点击3秒后出现状态</button>
<button type="warn" hover-stay-time=3000 >点击3秒后保持3秒状态</button>
<button class='' open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">开始</button>
<button class="mini-btn" type="primary" size="mini">按钮</button>
<button class="mini-btn" type="default" size="mini">按钮</button>
<button class="mini-btn" type="warn" size="mini">按钮</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load:false,//名称前是否带 loading 图标
disabled:false,//是否禁用
plain:false,//按钮是否镂空,背景色透明
}
},methods: {//函数方法
changetype(){
this.load=!this.load,
this.disabled=!this.disabled,
this.plain=!this.plain
}
}
}
</script>
<style>
</style>
2151

被折叠的 条评论
为什么被折叠?



