fix(@vben/common-ui): 修复 JsonViewer 在 Vite 下因 CJS 默认导出未解包导致的渲染失败 (#7728)

* fix: lint

* fix(@vben/common-ui): 修复 JsonViewer 在 Vite 下因 CJS 默认导出未解包导致的渲染失败
This commit is contained in:
过冬
2026-03-25 14:54:14 +08:00
committed by GitHub
parent 65287cf4b7
commit 7fbdf3d914
4 changed files with 16 additions and 10 deletions

View File

@@ -177,15 +177,15 @@ const computedProps = computed(() => {
// 自定义帮助信息
const computedHelp = computed(() => {
return help ? onHelpFunc : undefined;
});
const onHelpFunc = () => {
if (!help) {
const helpContent = help;
if (!helpContent) {
return undefined;
}
return isFunction(help) ? help(values.value, formApi!) : help;
};
return () =>
isFunction(helpContent)
? helpContent(values.value, getFormApi())
: helpContent;
});
watch(
() => computedProps.value?.autofocus,