mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 19:29:04 +08:00
fix: fix form,transition,build bug
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
import { isArray, isBoolean, isFunction, isNumber, isObject, isString } from '/@/utils/is';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
import { useBreakpoint } from '/@/hooks/event/useBreakpoint';
|
||||
import { useThrottle } from '/@/hooks/core/useThrottle';
|
||||
// import { useThrottle } from '/@/hooks/core/useThrottle';
|
||||
import { useFormValues } from './hooks/useFormValues';
|
||||
import type { ColEx } from './types';
|
||||
import { NamePath } from 'ant-design-vue/types/form/form-item';
|
||||
@@ -163,13 +163,13 @@
|
||||
});
|
||||
|
||||
const { realWidthRef, screenEnum, screenRef } = useBreakpoint();
|
||||
const [throttleUpdateAdvanced] = useThrottle(updateAdvanced, 30, { immediate: true });
|
||||
// const [throttleUpdateAdvanced] = useThrottle(updateAdvanced, 30, { immediate: true });
|
||||
watch(
|
||||
[() => unref(getSchema), () => advanceState.isAdvanced, () => unref(realWidthRef)],
|
||||
() => {
|
||||
const { showAdvancedButton } = unref(getProps);
|
||||
if (showAdvancedButton) {
|
||||
throttleUpdateAdvanced();
|
||||
updateAdvanced();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
|
@@ -189,14 +189,13 @@ export default defineComponent({
|
||||
const bindValue = {
|
||||
[isCheck ? 'checked' : 'value']: (props.formModel as any)[field],
|
||||
};
|
||||
if (!renderComponentContent) {
|
||||
return <Comp {...propsData} {...on} {...bindValue} />;
|
||||
}
|
||||
return (
|
||||
<Comp {...propsData} {...on} {...bindValue}>
|
||||
{{
|
||||
...(renderComponentContent
|
||||
? renderComponentContent(unref(getValuesRef))
|
||||
: {
|
||||
default: () => '',
|
||||
}),
|
||||
...renderComponentContent(unref(getValuesRef)),
|
||||
}}
|
||||
</Comp>
|
||||
);
|
||||
|
@@ -161,6 +161,7 @@ export default defineComponent({
|
||||
const treeData: any = cloneDeep(unref(treeDataRef));
|
||||
if (!parentKey) {
|
||||
treeData[push](node);
|
||||
treeDataRef.value = treeData;
|
||||
return;
|
||||
}
|
||||
const { key: keyField, children: childrenField } = unref(getReplaceFields);
|
||||
|
Reference in New Issue
Block a user