el-plus-crud 0.1.11 → 0.1.13
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.
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
}
|
|
46
46
|
</script>
|
|
47
47
|
<script lang="ts" setup>
|
|
48
|
-
import { ref, computed, useAttrs, nextTick, onMounted, watch, inject, Ref } from 'vue'
|
|
48
|
+
import { ref, computed, useAttrs, nextTick, onMounted, watch, inject, Ref, useSlots } from 'vue'
|
|
49
49
|
import { castArray, isMobile, time, isPromiseLike } from '../../util'
|
|
50
50
|
import { cloneDeep, debounce } from 'lodash'
|
|
51
51
|
import * as validates from './util/validate'
|
|
@@ -188,6 +188,8 @@ const innerIsLoading = ref(false)
|
|
|
188
188
|
|
|
189
189
|
let oldFormData = null as any
|
|
190
190
|
|
|
191
|
+
const indexList = ref([] as number[])
|
|
192
|
+
|
|
191
193
|
const size = computed(() => props.size || defaultConf.size)
|
|
192
194
|
// 组件名称列表
|
|
193
195
|
const compTypeList = [...typeList, ...(defaultConf.form?.comList || [])]
|
|
@@ -817,14 +819,15 @@ watch(
|
|
|
817
819
|
watch(
|
|
818
820
|
() => props.modelValue,
|
|
819
821
|
(data) => {
|
|
820
|
-
|
|
822
|
+
// && JSON.stringify(data) !== JSON.stringify(oldFormData)
|
|
823
|
+
if (!oldFormData || (isOpenListen.value && data)) {
|
|
821
824
|
// 检查联动
|
|
822
|
-
if (JSON.stringify(data) !== JSON.stringify(oldFormData)) {
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
}
|
|
826
|
-
initFormAttrs()
|
|
825
|
+
// if (JSON.stringify(data) !== JSON.stringify(oldFormData)) {
|
|
826
|
+
if (!oldFormData) {
|
|
827
|
+
oldFormData = cloneDeep(data)
|
|
827
828
|
}
|
|
829
|
+
initFormAttrs()
|
|
830
|
+
// }
|
|
828
831
|
}
|
|
829
832
|
},
|
|
830
833
|
{ deep: true }
|