fixed #805
This commit is contained in:
parent
bb1f58e203
commit
f4c38b4604
2 changed files with 28 additions and 7 deletions
|
@ -1,9 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="width: 200px;margin: 100px;">
|
<div style="width: 200px;margin: 100px;">
|
||||||
<Select v-model="fields.pid" filterable placement="top">
|
<i-select v-model="model" filterable clearable style="width:200px">
|
||||||
<Option :value="0" label="一级菜单"></Option>
|
<i-option :value="option.value" v-for="option in options" :key="option">{{option.label}}</i-option>
|
||||||
<Option :value="1" label="二级菜单"></Option>
|
</i-select>
|
||||||
</Select>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -11,10 +10,26 @@
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
fields: {
|
model: 1,
|
||||||
pid: 0
|
options: [
|
||||||
}
|
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.options = [{
|
||||||
|
label: '全部',
|
||||||
|
value: 0
|
||||||
|
},{
|
||||||
|
label: '苹果',
|
||||||
|
value: 1
|
||||||
|
},{
|
||||||
|
label: '香蕉',
|
||||||
|
value: 2
|
||||||
|
},{
|
||||||
|
label: '西瓜',
|
||||||
|
value: 3
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -536,11 +536,17 @@
|
||||||
|
|
||||||
this.$on('append', () => {
|
this.$on('append', () => {
|
||||||
this.modelToQuery();
|
this.modelToQuery();
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.broadcastQuery('');
|
||||||
|
});
|
||||||
this.slotChange();
|
this.slotChange();
|
||||||
this.updateOptions(true, true);
|
this.updateOptions(true, true);
|
||||||
});
|
});
|
||||||
this.$on('remove', () => {
|
this.$on('remove', () => {
|
||||||
this.modelToQuery();
|
this.modelToQuery();
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.broadcastQuery('');
|
||||||
|
});
|
||||||
this.slotChange();
|
this.slotChange();
|
||||||
this.updateOptions(true, true);
|
this.updateOptions(true, true);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue