parent
fa0241a535
commit
d94d98c464
2 changed files with 42 additions and 16 deletions
|
@ -55,7 +55,8 @@
|
||||||
this.isFocus = false;
|
this.isFocus = false;
|
||||||
},
|
},
|
||||||
queryChange (val) {
|
queryChange (val) {
|
||||||
this.hidden = !new RegExp(val, 'i').test(this.searchLabel);
|
const parsedQuery = val.replace(/(\^|\(|\)|\[|\]|\$|\*|\+|\.|\?|\\|\{|\}|\|)/g, '\\$1');
|
||||||
|
this.hidden = !new RegExp(parsedQuery, 'i').test(this.searchLabel);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
compiled () {
|
compiled () {
|
||||||
|
|
|
@ -1,24 +1,49 @@
|
||||||
<template>
|
<template>
|
||||||
<i-select :model.sync="model9" style="width:200px">
|
<Row>
|
||||||
<i-option value="beijing" label="北京市">
|
<i-col span="12" style="padding-right:10px">
|
||||||
<span>北京</span>
|
<i-select :model.sync="model11" filterable>
|
||||||
<span style="float:right;color:#ccc">Beiing</span>
|
<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
|
||||||
</i-option>
|
|
||||||
<i-option value="shanghai" label="上海市">
|
|
||||||
<span>上海</span>
|
|
||||||
<span style="float:right;color:#ccc">ShangHai</span>
|
|
||||||
</i-option>
|
|
||||||
<i-option value="shenzhen" label="深圳市">
|
|
||||||
<span>深圳</span>
|
|
||||||
<span style="float:right;color:#ccc">ShenZhen</span>
|
|
||||||
</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 {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
model9: 'shanghai'
|
cityList: [
|
||||||
|
{
|
||||||
|
value: 'beijing',
|
||||||
|
label: '北京市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'shanghai',
|
||||||
|
label: '上海市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'shenzhen',
|
||||||
|
label: '深圳市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'hangzhou',
|
||||||
|
label: '杭州市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'nanjing',
|
||||||
|
label: '南京市'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'chongqing',
|
||||||
|
label: '重庆市'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
model11: '',
|
||||||
|
model12: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue