| | |
| | | <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view> |
| | | </view> |
| | | </view> |
| | | <view v-if="false" |
| | | style="margin-left:40rpx;margin-right:40rpx;; border-bottom:1px solid #eee;padding-bottom:20rpx;display:flex"> |
| | | <input v-model="search" style="height:60rpx;line-height:60rpx;color:#000" placeholder="请输入搜索内容"></input> |
| | | <button @click="()=>{search='';updateSearch()}" |
| | | style="height:60rpx;line-height:60rpx;margin-left:auto;margin-right:0rpx">清空</button> |
| | | <button @click="updateSearch" |
| | | style="height:60rpx;line-height:60rpx;margin-left:auto;margin-right:0rpx">搜索</button> |
| | | </view> |
| | | <data-picker-view class="picker-view" ref="pickerView" v-model="dataValue" :localdata="localdata" |
| | | :preload="preload" :collection="collection" :field="field" :orderby="orderby" :where="where" |
| | | :step-searh="stepSearh" :self-field="selfField" :parent-field="parentField" :managed-mode="true" :map="map" |
| | | :ellipsis="ellipsis" @change="onchange" @datachange="ondatachange" @nodeclick="onnodeclick"> |
| | | :key="showpicker" |
| | | :step-searh="stepSearh" :self-field="selfField" :parent-field="parentField" :managed-mode="true" |
| | | :map="map" :ellipsis="ellipsis" @change="onchange" @datachange="ondatachange" @nodeclick="onnodeclick"> |
| | | </data-picker-view> |
| | | </view> |
| | | </view> |
| | |
| | | data() { |
| | | return { |
| | | isOpened: false, |
| | | inputSelected: [] |
| | | inputSelected: [], |
| | | search: '', |
| | | showpicker:(new Date().getTime()), |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | watch: { |
| | | localdata: { |
| | | handler() { |
| | | console.log('localdata update') |
| | | this.load() |
| | | }, |
| | | deep: true |
| | | }, |
| | | // search() { |
| | | // handler() {}, |
| | | // } |
| | | }, |
| | | methods: { |
| | | async updateSearch() { |
| | | //todo 递归搜索下面的数据,,并标记为可展示的 |
| | | console.log('updateSearch',this.localdata) |
| | | await this.$emit('search',this.search) |
| | | // console.log('updateSearch',this.localdata) |
| | | setTimeout(() => { |
| | | console.log('updateSearch2',this.localdata) |
| | | this.showpicker = new Date().getTime() |
| | | // this.load() |
| | | this.$refs.pickerView.updateData({ |
| | | treeData: this.localdata, |
| | | selected: [], |
| | | selectedIndex: this.selectedIndex |
| | | }) |
| | | }, 200) |
| | | // this.$nextTick(()=>{ |
| | | // // this.showpicker = true |
| | | // this.showpicker = new Date().getTime() |
| | | // this._treeData = []; |
| | | // this.selectedIndex = 0; |
| | | |
| | | // this.load(); |
| | | // }) |
| | | }, |
| | | clear() { |
| | | this._dispatchEvent([]); |
| | | }, |