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