imeik-bizui 2.4.6 → 2.4.7

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.
@@ -37,7 +37,7 @@
37
37
  ></CommonRegionCascader>
38
38
  -->
39
39
  <template>
40
- <el-cascader v-if="!isView" v-model="myValue" :props="props" :options="options" :placeholder="placeholder" clearable filterable v-bind="$attrs" popper-class="common-region-cascader-popper" @change="handleChange"></el-cascader>
40
+ <el-cascader v-if="!isView" ref="cascaderRef" v-model="myValue" :props="props" :options="options" :placeholder="placeholder" clearable filterable v-bind="$attrs" popper-class="common-region-cascader-popper" @change="handleChange"></el-cascader>
41
41
  <div v-else>{{ myLabel || '-' }}</div>
42
42
  </template>
43
43
 
@@ -250,8 +250,13 @@ export default {
250
250
  return null
251
251
  },
252
252
  handleChange() {
253
- this.$emit('input', this.myValue)
254
- this.$emit('change', this.myValue)
253
+ let pathNodes = []
254
+ const checkedNodes = this.$refs.cascaderRef?.getCheckedNodes()
255
+ if (checkedNodes && checkedNodes.length > 0) {
256
+ pathNodes = checkedNodes[0].pathNodes || []
257
+ }
258
+ this.$emit('input', this.myValue, pathNodes)
259
+ this.$emit('change', this.myValue, pathNodes)
255
260
  }
256
261
  }
257
262
  }