parent
e8ee1423e7
commit
2f0b086d60
2 changed files with 25 additions and 5 deletions
|
@ -459,6 +459,10 @@
|
||||||
slotChange () {
|
slotChange () {
|
||||||
this.options = [];
|
this.options = [];
|
||||||
this.optionInstances = [];
|
this.optionInstances = [];
|
||||||
|
},
|
||||||
|
setQuery (query) {
|
||||||
|
if (!this.filterable) return;
|
||||||
|
this.query = query;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ready () {
|
ready () {
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
<template>
|
<template>
|
||||||
<i-button @click="model8 = ''">clear</i-button>
|
<i-button @click="clear">clear</i-button>
|
||||||
<i-select :model.sync="model8" clearable style="width:200px">
|
<Row>
|
||||||
|
<i-col span="12" style="padding-right:10px">
|
||||||
|
<i-select :model.sync="model11" filterable v-ref:select clearable>
|
||||||
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||||
</i-select>
|
</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-select>
|
||||||
|
</i-col>
|
||||||
|
</Row>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
@ -34,7 +43,14 @@
|
||||||
label: '重庆市'
|
label: '重庆市'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
model8: ''
|
model11: '',
|
||||||
|
model12: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
clear () {
|
||||||
|
// this.$refs.select.setQuery('');
|
||||||
|
this.$refs.select.clearSingleSelect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue