动态控制按钮的禁用和启用

<template>
<div id="Tx2">
<p>{{msg}}</p>
<el-button-group>
<el-button type="primary" icon="el-icon-edit" :disabled="disabledEdit"></el-button>
<el-button type="primary" icon="el-icon-share" :disabled="disabledShare"></el-button>
<el-button type="primary" icon="el-icon-delete"
@click="disabledShare=!disabledShare;disabledEdit=!disabledEdit"></el-button>
</el-button-group>
</div>
</template>

<script>
import Qs from 'qs'
export default {
name: 'Tx2',
data(){
return{
msg:"测试",
disabledEdit:true,
disabledShare:false
}
}
}

</script>

<style scoped>

</style>


猜你喜欢

转载自www.cnblogs.com/java-ty/p/12143382.html
今日推荐