Merge branch 'main' into chore/plugins

This commit is contained in:
Jin Mao
2026-03-25 15:19:21 +08:00
committed by GitHub
6 changed files with 18 additions and 11 deletions

View File

@@ -12,7 +12,7 @@ import type {
import { computed, useAttrs } from 'vue';
// @ts-expect-error - vue-json-viewer does not expose compatible typings for this import path
import VueJsonViewer from 'vue-json-viewer';
import VueJsonViewerImport from 'vue-json-viewer';
import { $t } from '@vben/locales';
@@ -42,6 +42,11 @@ const emit = defineEmits<{
valueClick: [value: JsonViewerValue];
}>();
/** CJS/UMD 在 Vite 下解析为 { default: Component },需解包否则会出现 missing template or render */
const VueJsonViewer =
(VueJsonViewerImport as { default?: typeof VueJsonViewerImport }).default ??
VueJsonViewerImport;
const attrs: SetupContext['attrs'] = useAttrs();
function handleClick(event: MouseEvent) {