diff --git a/examples/routers/select.vue b/examples/routers/select.vue index cad3a966..0bb9ab67 100644 --- a/examples/routers/select.vue +++ b/examples/routers/select.vue @@ -1,9 +1,8 @@ @@ -11,10 +10,26 @@ export default { data () { return { - fields: { - pid: 0 - } + model: 1, + options: [ + + ] } + }, + mounted () { + this.options = [{ + label: '全部', + value: 0 + },{ + label: '苹果', + value: 1 + },{ + label: '香蕉', + value: 2 + },{ + label: '西瓜', + value: 3 + }]; } } \ No newline at end of file diff --git a/src/components/select/select.vue b/src/components/select/select.vue index ee27eb72..8fac8749 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -536,11 +536,17 @@ this.$on('append', () => { this.modelToQuery(); + this.$nextTick(() => { + this.broadcastQuery(''); + }); this.slotChange(); this.updateOptions(true, true); }); this.$on('remove', () => { this.modelToQuery(); + this.$nextTick(() => { + this.broadcastQuery(''); + }); this.slotChange(); this.updateOptions(true, true); });