@xuekl/cli-components 1.9.152 → 1.9.154

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.
Files changed (2) hide show
  1. package/XklForm.vue +14 -4
  2. package/package.json +1 -1
package/XklForm.vue CHANGED
@@ -550,12 +550,22 @@ onMounted(() => {
550
550
  })
551
551
 
552
552
  onBeforeUnmount(() => {
553
+ // 还原原始clear
553
554
  form.clear = clear
554
- form.submit = null
555
- form.getRef = null
556
- form._isAlive = false
555
+ // 全部置空,切断闭包引用
556
+ // form.submit = null
557
557
  // form.getBinds = null
558
- // sourceFormList.length = 0
558
+ // form.getRef = null
559
+ // form._isAlive = false
560
+ if (form.onUnmount) {
561
+ form.onUnmount()
562
+ }
563
+ // 清空字段缓存,释放自定义组件配置
564
+ sourceFormList.length = 0
565
+ formList.value = []
566
+ // 清空缓存字段数据
567
+ Object.keys(modeFields).forEach(key => delete modeFields[key])
568
+ conditionItemList = []
559
569
  })
560
570
 
561
571
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuekl/cli-components",
3
- "version": "1.9.152",
3
+ "version": "1.9.154",
4
4
  "description": "element-plus 组件二次封装",
5
5
  "main": "index.ts",
6
6
  "scripts": {