fix: fix form,transition,build bug

This commit is contained in:
陈文彬
2020-10-01 00:24:14 +08:00
parent 351f60a8af
commit 2f268ca8f4
20 changed files with 7315 additions and 227 deletions

View File

@@ -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 }

View File

@@ -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>
);