This commit is contained in:
梁灏 2017-04-28 11:16:40 +08:00
parent bb1f58e203
commit f4c38b4604
2 changed files with 28 additions and 7 deletions

View file

@ -1,9 +1,8 @@
<template>
<div style="width: 200px;margin: 100px;">
<Select v-model="fields.pid" filterable placement="top">
<Option :value="0" label="一级菜单"></Option>
<Option :value="1" label="二级菜单"></Option>
</Select>
<i-select v-model="model" filterable clearable style="width:200px">
<i-option :value="option.value" v-for="option in options" :key="option">{{option.label}}</i-option>
</i-select>
</div>
</template>
@ -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
}];
}
}
</script>

View file

@ -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);
});