1.JDate添加YYYY-DD,YYYY格式(待完善)

2.j-select-multiple的搜索功能优化
3.j-tree-select已改为由title搜索,搜索全部树的数据需完善目前只能搜索第一级
This commit is contained in:
yaoyanan
2021-03-17 18:38:25 +08:00
parent d5166e711b
commit 3f8f9a679f
4 changed files with 99 additions and 33 deletions
@@ -4,8 +4,7 @@
:placeholder="placeholder"
:value="arrayValue"
@change="onChange"
@search="search"
:filterOption="false"
option-filter-prop="children"
>
<a-select-option
v-for="(item,index) in newOptions"
@@ -75,22 +74,25 @@
this.newOptions = this.options
},
methods:{
search(val){
let newArr = []
this.newOptions = this.options
if (this.options && this.options.length > 0){
this.options.forEach((item,index)=>{
if (item.text.indexOf(val) != -1){
newArr.push(item)
}
})
this.$nextTick(()=>{
this.newOptions = newArr
})
}else {
this.newOptions = this.options
}
},
// search(val){
// let newArr = []
// this.newOptions = this.options
// if (this.options && this.options.length > 0){
// this.options.forEach((item,index)=>{
// if (item.text.indexOf(val) != -1){
// newArr.push(item)
// }
// })
// this.$nextTick(()=>{
// this.newOptions = newArr
// })
// }else {
// this.newOptions = this.options
// }
// },
// blur(){
// this.newOptions = this.options
// },
onChange (selectedValue) {
this.newOptions = this.options
if(this.triggerChange){