diff --git a/examples/routers/select.vue b/examples/routers/select.vue index 6beda00..cc34197 100644 --- a/examples/routers/select.vue +++ b/examples/routers/select.vue @@ -671,16 +671,16 @@ @@ -165,6 +165,9 @@ if (this.filterable && e.target === this.$el){ this.$refs.input.focus(); } + }, + onClear(){ + this.$emit('on-clear'); } }, watch: { diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 6ca51b3..709115c 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -42,6 +42,7 @@ @on-query-change="onQueryChange" @on-input-focus="isFocused = true" @on-input-blur="isFocused = false" + @on-clear="clearSingleSelect" /> @@ -382,6 +383,7 @@ } }, clearSingleSelect(){ // PUBLIC API + this.$emit('on-clear'); if (this.clearable) this.values = []; }, getOptionData(value){ -- libgit2 0.21.4