| | |
| | | import type { ColEx } from '../types'; |
| | | import type { AdvanceState } from '../types/hooks'; |
| | | import { ComputedRef, getCurrentInstance, Ref } from 'vue'; |
| | | import { ComputedRef, getCurrentInstance, Ref, shallowReactive } from 'vue'; |
| | | import type { FormProps, FormSchema } from '../types/form'; |
| | | import { computed, unref, watch } from 'vue'; |
| | | import { isBoolean, isFunction, isNumber, isObject } from '/@/utils/is'; |
| | |
| | | } |
| | | } |
| | | |
| | | const fieldsIsAdvancedMap = shallowReactive({}); |
| | | |
| | | function updateAdvanced() { |
| | | let itemColSum = 0; |
| | | let realItemColSum = 0; |
| | |
| | | if (isAdvanced) { |
| | | realItemColSum = itemColSum; |
| | | } |
| | | schema.isAdvanced = isAdvanced; |
| | | fieldsIsAdvancedMap[schema.field] = isAdvanced; |
| | | } |
| | | } |
| | | |
| | |
| | | advanceState.isAdvanced = !advanceState.isAdvanced; |
| | | } |
| | | |
| | | return { handleToggleAdvanced }; |
| | | return { handleToggleAdvanced, fieldsIsAdvancedMap }; |
| | | } |