uni-app 表单组件-button demo

官网详解

主要使用 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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值