update Select max-tag-placeholder type to Function, #5568
This commit is contained in:
parent
7435abb004
commit
38b5b76051
4 changed files with 10 additions and 5 deletions
|
@ -24,7 +24,7 @@
|
||||||
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
<Select v-model="model10" :max-tag-count="3" max-tag-placeholder="more" multiple style="width:400px" prefix="ios-albums">
|
<Select v-model="model10" :max-tag-count="3" :max-tag-placeholder="more" multiple style="width:400px" prefix="ios-albums">
|
||||||
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
|
||||||
</Select>
|
</Select>
|
||||||
|
|
||||||
|
@ -82,6 +82,11 @@
|
||||||
model1: '',
|
model1: '',
|
||||||
model10: []
|
model10: []
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
more (num) {
|
||||||
|
return 'more' + num;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iview",
|
"name": "iview",
|
||||||
"version": "3.3.3",
|
"version": "3.4.0-rc.2",
|
||||||
"title": "iView",
|
"title": "iView",
|
||||||
"description": "A high quality UI components Library with Vue.js",
|
"description": "A high quality UI components Library with Vue.js",
|
||||||
"homepage": "http://www.iviewui.com",
|
"homepage": "http://www.iviewui.com",
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<Icon type="ios-close" @click.native.stop="removeTag(item)"></Icon>
|
<Icon type="ios-close" @click.native.stop="removeTag(item)"></Icon>
|
||||||
</div><div class="ivu-tag ivu-tag-checked" v-if="maxTagCount !== undefined && selectedMultiple.length > maxTagCount">
|
</div><div class="ivu-tag ivu-tag-checked" v-if="maxTagCount !== undefined && selectedMultiple.length > maxTagCount">
|
||||||
<span class="ivu-tag-text ivu-select-max-tag">
|
<span class="ivu-tag-text ivu-select-max-tag">
|
||||||
<template v-if="maxTagPlaceholder">{{ maxTagPlaceholder }}</template>
|
<template v-if="maxTagPlaceholder">{{ maxTagPlaceholder(selectedMultiple.length - maxTagCount) }}</template>
|
||||||
<template v-else>+ {{ selectedMultiple.length - maxTagCount }}...</template>
|
<template v-else>+ {{ selectedMultiple.length - maxTagCount }}...</template>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
},
|
},
|
||||||
// 3.4.0
|
// 3.4.0
|
||||||
maxTagPlaceholder: {
|
maxTagPlaceholder: {
|
||||||
type: String
|
type: Function
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
|
|
@ -251,7 +251,7 @@
|
||||||
},
|
},
|
||||||
// 3.4.0
|
// 3.4.0
|
||||||
maxTagPlaceholder: {
|
maxTagPlaceholder: {
|
||||||
type: String
|
type: Function
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
|
Loading…
Add table
Reference in a new issue