parent
fae238f5b5
commit
1363abdcf9
2 changed files with 13 additions and 17 deletions
|
@ -447,7 +447,7 @@
|
|||
if (model !== '') {
|
||||
this.findChild((child) => {
|
||||
if (child.value === model) {
|
||||
this.query = child.searchLabel;
|
||||
this.query = child.label === undefined ? child.searchLabel : child.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -574,7 +574,7 @@
|
|||
if (this.filterable) {
|
||||
this.findChild((child) => {
|
||||
if (child.value === value) {
|
||||
this.query = child.searchLabel;
|
||||
this.query = child.label === undefined ? child.searchLabel : child.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<Row>
|
||||
<i-col span="12" style="padding-right:10px">
|
||||
<i-select :model.sync="model11" filterable>
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
<i-option v-for="item in cityList" :value="item.value" :label="item.label"><span>{{ item.label }}</span><span>{{ item.des }}</span></i-option>
|
||||
</i-select>
|
||||
</i-col>
|
||||
<i-col span="12">
|
||||
<i-select :model.sync="model12" filterable multiple>
|
||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||
<i-option v-for="item in cityList" :value="item.value" :label="item.label"><span>{{ item.label }}</span><span>{{ item.des }}</span></i-option>
|
||||
</i-select>
|
||||
</i-col>
|
||||
</Row>
|
||||
|
@ -19,30 +19,26 @@
|
|||
cityList: [
|
||||
{
|
||||
value: 'beijing',
|
||||
label: '北京市'
|
||||
label: '北京市',
|
||||
des: '帝都'
|
||||
},
|
||||
{
|
||||
value: 'shanghai',
|
||||
label: '上海市'
|
||||
label: '上海市',
|
||||
des: '魔都'
|
||||
},
|
||||
{
|
||||
value: 'shenzhen',
|
||||
label: '深圳市'
|
||||
},
|
||||
{
|
||||
value: 'hangzhou',
|
||||
label: '杭州市'
|
||||
},
|
||||
{
|
||||
value: 'nanjing',
|
||||
label: '南京市'
|
||||
label: '深圳市',
|
||||
des: '渔村'
|
||||
},
|
||||
{
|
||||
value: 'chongqing',
|
||||
label: '重庆市'
|
||||
label: '重庆市',
|
||||
des: '山城'
|
||||
}
|
||||
],
|
||||
model11: 'beijing',
|
||||
model11: '',
|
||||
model12: ['beijing', 'shanghai']
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue