@zscreate/zhxy-app-component 1.0.266 → 1.0.268

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -315,7 +315,10 @@
315
315
  {{ widget.name }}
316
316
  </view>
317
317
  <view class="evan-form-item-container__main" :style="mContentStyle" >
318
- <classify-select :dataModelShow.sync="dataModelShow" :widget="widget" v-model="dataModel"/>
318
+ <view class="form-input" style="display: flex">
319
+ <classify-select :dataModelShow.sync="dataModelShow" :widget="widget" v-model="dataModel"/>
320
+ <uni-icons style="margin-left: auto; margin-right: 20rpx; height: 60rpx; line-height: 60rpx" @click.native.stop="handleClear" v-if="!widget.options.disabled && dataModelShow" type="clear" color="#e1e1e1" size="14"></uni-icons>
321
+ </view>
319
322
  </view>
320
323
  </view>
321
324
 
@@ -412,7 +415,10 @@
412
415
  {{ widget.name }}
413
416
  </view>
414
417
  <view class="evan-form-item-container__main" :style="mContentStyle" @click="handleSeclet(widget.options.multiple)">
415
- <div class="option-font-size">{{ dataModelShow ? dataModelShow : widget.options.placeholder }}</div>
418
+ <view class="form-input" style="display: flex">
419
+ <view class="option-font-size">{{ dataModelShow ? dataModelShow : widget.options.placeholder }}</view>
420
+ <uni-icons style="margin-left: auto; margin-right: 20rpx; height: 60rpx; line-height: 60rpx" @click.native.stop="handleClear" v-if="!widget.options.disabled && dataModelShow" type="clear" color="#e1e1e1" size="14"></uni-icons>
421
+ </view>
416
422
  </view>
417
423
  <!-- <icon type="clear" size="14" v-if="widget.options.canView" />-->
418
424
  </view>
@@ -828,6 +834,16 @@ export default {
828
834
  handleClear() {
829
835
  this.dataModel = []
830
836
  this.dataModelShow = ''
837
+ if (this.widget.type === 'select') {
838
+ this.clearAllLinkageSelect(this.widget.options?.linkage)
839
+ }
840
+ },
841
+ clearAllLinkageSelect(linkage) {
842
+ linkage?.forEach(link_model => {
843
+ uni.$emit(link_model)
844
+ const link_widget = this.dataObj().list.find(item => item.model === link_model)
845
+ if (link_widget) this.clearAllLinkageSelect(link_widget.options?.linkage)
846
+ })
831
847
  },
832
848
  correctOldValue(oldValue) {
833
849
  const type = this.widget.type
@@ -1626,15 +1642,7 @@ export default {
1626
1642
  var PubsubSign = String(Math.random()).split('.')[1];
1627
1643
  Pubsub.subscribe(PubsubSign, (msg, data) => {
1628
1644
  console.log(data)
1629
- this.widget.options?.linkage?.forEach(link_model => {
1630
- uni.$emit(link_model)
1631
- const link_widget = this.dataObj().list.find(item => item.model === link_model)
1632
- if (link_widget) {
1633
- link_widget.options?.linkage?.forEach(link_model => {
1634
- uni.$emit(link_model)
1635
- })
1636
- }
1637
- })
1645
+ this.clearAllLinkageSelect(this.widget.options?.linkage)
1638
1646
  this.isClickByUser = true
1639
1647
  // this.dataModel = data.map(item => item.value)
1640
1648
  const value = data.map(item => item.value) || []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.266",
3
+ "version": "1.0.268",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",