vue elementUI現在の設定で選択したスタイルをクリックすると、他のスタイルが正常に表示されます.
3154 ワード
vue elementUI現在の設定で選択したスタイルをクリックすると、他のスタイルが正常に表示されます.
Button
{{tag.label}}
+ New Tag
var app = new Vue({
el: '#app',
data: function() {
return {
dialogVisible: false,
items: [
{ label: ' ' },
{ label: ' '},
{ label: ' '},
],
inputVisible: false,
inputValue: '',
showWhite:-1,
showClose:false,
};
},
methods: {
setChange:function(){
this.showClose = true;
},
handleClose:function(tag) {
if(this.showClose){
this.items.splice(this.items.indexOf(tag), 1);
}
},
handleClick:function(tag) {
this.showWhite = tag.label;
},
showInput:function() {
this.inputVisible = true;
this.$nextTick(_ => {
this.$refs.saveTagInput.$refs.input.focus();
});
},
handleInputConfirm:function() {
let inputValue = this.inputValue;
if (inputValue) {
this.items.push({label:inputValue});
}
this.inputVisible = false;
this.inputValue = '';
}
}
})