fixed #1547
This commit is contained in:
parent
6c912a7b14
commit
f8098275ca
2 changed files with 17 additions and 44 deletions
|
@ -1,16 +1,22 @@
|
|||
<template>
|
||||
<i-select transfer multiple v-model="m1">
|
||||
<i-option v-for="item in options" :value="item.value" :key="item.value">{{ item.label }}</i-option>
|
||||
</i-select>
|
||||
<Row>
|
||||
<Col span="12" style="padding-right:10px">
|
||||
<Select v-model="model11" :disabled="false" filterable>
|
||||
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||
</Select>
|
||||
</Col>
|
||||
<Col span="12">
|
||||
<Select v-model="model12" filterable :disabled="true" multiple>
|
||||
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||
</Select>
|
||||
</Col>
|
||||
</Row>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
m1: [],
|
||||
showModal: false,
|
||||
showModal2: false,
|
||||
options: [
|
||||
cityList: [
|
||||
{
|
||||
value: 'beijing',
|
||||
label: '北京市'
|
||||
|
@ -35,43 +41,9 @@
|
|||
value: 'chongqing',
|
||||
label: '重庆市'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remoteMethod1 (query) {
|
||||
if (query !== '') {
|
||||
this.loading1 = true;
|
||||
setTimeout(() => {
|
||||
this.loading1 = false;
|
||||
const list = this.list.map(item => {
|
||||
return {
|
||||
value: item,
|
||||
label: item
|
||||
};
|
||||
});
|
||||
this.options1 = list.filter(item => item.label.toLowerCase().indexOf(query.toLowerCase()) > -1);
|
||||
}, 200);
|
||||
} else {
|
||||
this.options1 = [];
|
||||
}
|
||||
},
|
||||
remoteMethod2 (query) {
|
||||
if (query !== '') {
|
||||
this.loading2 = true;
|
||||
setTimeout(() => {
|
||||
this.loading2 = false;
|
||||
const list = this.list.map(item => {
|
||||
return {
|
||||
value: item,
|
||||
label: item
|
||||
};
|
||||
});
|
||||
this.options2 = list.filter(item => item.label.toLowerCase().indexOf(query.toLowerCase()) > -1);
|
||||
}, 200);
|
||||
} else {
|
||||
this.options2 = [];
|
||||
}
|
||||
],
|
||||
model11: '',
|
||||
model12: []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
type="text"
|
||||
v-if="filterable"
|
||||
v-model="query"
|
||||
:disabled="disabled"
|
||||
:class="[prefixCls + '-input']"
|
||||
:placeholder="showPlaceholder ? localePlaceholder : ''"
|
||||
:style="inputStyle"
|
||||
|
|
Loading…
Add table
Reference in a new issue