作者:美丽女人一起来_381 | 来源:互联网 | 2023-10-16 18:04
底层源码:handleClearClick(event){this.deleteSelected(event);},deleteSelected(event){event.stop
底层源码:
handleClearClick(event) {
this.deleteSelected(event);
},
deleteSelected(event) {
event.stopPropagation();
const value = this.multiple ? [] : '';
this.$emit('input', value);
this.emitChange(value);
this.visible = false;
this.$emit('clear');
},
删除
v-model="data"
clearable
placeholder="请选择"
size="small"
@clear="remove(tagNumber)"
@change="">
v-for="option in list"
:key="option.id"
:label="option.name"
:value="option.id">
{
{ option.name }}
方法:
remove(tagNumber) {
// console.log(event)
// 业务逻辑
}