Vue el-select 组件设置 clearable

底层源码:

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');
      },

删除

{{ option.name }}

方法:

remove(tagNumber) { 
      // console.log(event)
      // 业务逻辑
      
    }

 

你可能感兴趣的:(vue)