|
|
@ -1,6 +1,15 @@ |
|
|
import type { ColEx } from '../types'; |
|
|
import type { ColEx } from '../types'; |
|
|
import type { AdvanceState } from '../types/hooks'; |
|
|
import type { AdvanceState } from '../types/hooks'; |
|
|
import { ComputedRef, getCurrentInstance, Ref, shallowReactive, computed, unref, watch } from 'vue'; |
|
|
import { |
|
|
|
|
|
ComputedRef, |
|
|
|
|
|
getCurrentInstance, |
|
|
|
|
|
Ref, |
|
|
|
|
|
shallowReactive, |
|
|
|
|
|
computed, |
|
|
|
|
|
unref, |
|
|
|
|
|
watch, |
|
|
|
|
|
nextTick, |
|
|
|
|
|
} from 'vue'; |
|
|
import type { FormProps, FormSchemaInner as FormSchema } from '../types/form'; |
|
|
import type { FormProps, FormSchemaInner as FormSchema } from '../types/form'; |
|
|
import { isBoolean, isFunction, isNumber, isObject } from '@/utils/is'; |
|
|
import { isBoolean, isFunction, isNumber, isObject } from '@/utils/is'; |
|
|
import { useBreakpoint } from '@/hooks/event/useBreakpoint'; |
|
|
import { useBreakpoint } from '@/hooks/event/useBreakpoint'; |
|
|
@ -49,14 +58,17 @@ export default function ({ |
|
|
return 0; |
|
|
return 0; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const debounceUpdateAdvanced = useDebounceFn(updateAdvanced, 30); |
|
|
// const debounceUpdateAdvanced = useDebounceFn(updateAdvanced, 30);
|
|
|
|
|
|
|
|
|
watch( |
|
|
watch( |
|
|
[() => unref(getSchema), () => advanceState.isAdvanced, () => unref(realWidthRef)], |
|
|
[() => unref(getSchema), () => advanceState.isAdvanced, () => unref(realWidthRef)], |
|
|
() => { |
|
|
() => { |
|
|
const { showAdvancedButton } = unref(getProps); |
|
|
const { showAdvancedButton } = unref(getProps); |
|
|
if (showAdvancedButton) { |
|
|
if (showAdvancedButton) { |
|
|
debounceUpdateAdvanced(); |
|
|
// debounceUpdateAdvanced();
|
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
updateAdvanced(); |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ immediate: true }, |
|
|
{ immediate: true }, |
|
|
|