I am using Vue Element UI, how can i change the 'disable' attribute of a inputbox from true to false when clicking the 'edit' button?
var Main = {
data() {
return {
input1: 'type something here',
}
},
method: {
editvalue() {
this.$set('disable',false)
}
},
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
@import url("//unpkg.com/element-ui@1.3.5/lib/theme-default/index.css");
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@1.3.5/lib/index.js"></script>
<div id="app">
<el-input placeholder="Please input" v-model="input1" :disabled="true">
</el-input>
<el-button size="mini" @click.native="editvalue()">
Edit</el-button>
</div>