From 35db123cbf81f486c11aafeb037a383b0786cde9 Mon Sep 17 00:00:00 2001 From: 1ncounter <1ncounter.100@gmail.com> Date: Sun, 14 Apr 2024 21:10:12 +0800 Subject: [PATCH] fix: remove some deprecated apis --- packages/designer/src/designer/designer.ts | 1 - .../src/designer/drag-ghost/index.tsx | 14 +++--- .../src/designer/setting/setting-field.ts | 6 --- .../designer/setting/setting-prop-entry.ts | 12 +---- packages/designer/src/document/node/node.ts | 34 ++++---------- .../designer/src/document/node/props/props.ts | 13 ++++-- packages/editor-core/src/di/setter.ts | 30 +----------- packages/editor-core/src/utils/obx.ts | 6 +-- .../editor-core/src/widgets/title/index.tsx | 2 +- .../src/components/field/index.ts | 6 ++- .../src/components/settings/settings-pane.tsx | 46 ++++++++++++++----- .../settings/settings-primary-pane.tsx | 3 +- packages/engine/src/engine-core.ts | 17 +++---- .../engine/src/shell/model/setting-field.ts | 4 +- packages/plugin-outline-pane/package.json | 2 + .../src/views/tree-branches.tsx | 3 +- .../src/views/tree-title.tsx | 22 +++------ packages/plugin-outline-pane/vite.config.ts | 2 +- packages/types/src/shell/api/setters.ts | 2 - packages/types/src/shell/model/node.ts | 3 +- .../utils/src/check-types/is-custom-view.ts | 2 +- packages/utils/tsconfig.json | 3 -- tsconfig.json | 2 +- 23 files changed, 96 insertions(+), 139 deletions(-) diff --git a/packages/designer/src/designer/designer.ts b/packages/designer/src/designer/designer.ts index bd4254e1f..3459ce76f 100644 --- a/packages/designer/src/designer/designer.ts +++ b/packages/designer/src/designer/designer.ts @@ -7,7 +7,6 @@ import { IPublicTypeNpmInfo, IPublicModelEditor, IPublicTypePropsList, - IPublicTypeNodeSchema, IPublicTypePropsTransducer, IShellModelFactory, IPublicModelDragObject, diff --git a/packages/designer/src/designer/drag-ghost/index.tsx b/packages/designer/src/designer/drag-ghost/index.tsx index eb98849a0..aa42565ea 100644 --- a/packages/designer/src/designer/drag-ghost/index.tsx +++ b/packages/designer/src/designer/drag-ghost/index.tsx @@ -1,5 +1,5 @@ import { Component, ReactElement } from 'react'; -import { observer, observable, Title, makeObservable } from '@alilc/lowcode-editor-core'; +import { observer, observable, Title, makeObservable, action } from '@alilc/lowcode-editor-core'; import { Designer } from '../designer'; import { isSimulatorHost } from '../../simulator'; import './ghost.less'; @@ -30,15 +30,15 @@ export default class DragGhost extends Component<{ designer: Designer }> { super(props); makeObservable(this); this.dispose = [ - this.dragon.onDragstart((e) => { + this.dragon.onDragstart(action((e) => { if (e.originalEvent.type.slice(0, 4) === 'drag') { return; } this.titles = this.getTitles(e.dragObject!) as any; this.x = e.globalX; this.y = e.globalY; - }), - this.dragon.onDrag((e) => { + })), + this.dragon.onDrag(action((e) => { this.x = e.globalX; this.y = e.globalY; if (isSimulatorHost(e.sensor)) { @@ -49,12 +49,12 @@ export default class DragGhost extends Component<{ designer: Designer }> { } } this.isAbsoluteLayoutContainer = false; - }), - this.dragon.onDragend(() => { + })), + this.dragon.onDragend(action(() => { this.titles = null; this.x = 0; this.y = 0; - }), + })), ]; } diff --git a/packages/designer/src/designer/setting/setting-field.ts b/packages/designer/src/designer/setting/setting-field.ts index 9db992e73..375286110 100644 --- a/packages/designer/src/designer/setting/setting-field.ts +++ b/packages/designer/src/designer/setting/setting-field.ts @@ -71,8 +71,6 @@ export interface ISettingField clearValue(): void; - valueChange(options: IPublicTypeSetValueOptions): void; - createField(config: IPublicTypeFieldConfig): ISettingField; onEffect(action: () => void): IPublicTypeDisposable; @@ -258,8 +256,6 @@ export class SettingField extends SettingPropEntry implements ISettingField { if (Array.isArray(data) && data[0] && data[0].__sid__) { return; } - - this.valueChange(); } @action @@ -304,8 +300,6 @@ export class SettingField extends SettingPropEntry implements ISettingField { if (Array.isArray(data) && data[0] && data[0].__sid__) { return; } - - this.valueChange(options); } onEffect(action: () => void): IPublicTypeDisposable { diff --git a/packages/designer/src/designer/setting/setting-prop-entry.ts b/packages/designer/src/designer/setting/setting-prop-entry.ts index 3c59b7f74..4657b9ddb 100644 --- a/packages/designer/src/designer/setting/setting-prop-entry.ts +++ b/packages/designer/src/designer/setting/setting-prop-entry.ts @@ -14,7 +14,7 @@ import { IPublicTypeFieldExtraProps, IPublicTypeSetValueOptions, } from '@alilc/lowcode-types'; -import { uniqueId, isJSExpression, isSettingField } from '@alilc/lowcode-utils'; +import { uniqueId, isJSExpression } from '@alilc/lowcode-utils'; import { ISettingEntry } from './setting-entry-type'; import { INode } from '../../document'; import type { IComponentMeta } from '../../component-meta'; @@ -29,8 +29,6 @@ export interface ISettingPropEntry extends ISettingEntry { get name(): string | number | undefined; - valueChange(options: IPublicTypeSetValueOptions): void; - getKey(): string | number | undefined; setKey(key: string | number): void; @@ -49,8 +47,6 @@ export interface ISettingPropEntry extends ISettingEntry { setValue( val: any, - isHotValue?: boolean, - force?: boolean, extraOptions?: IPublicTypeSetValueOptions, ): void; @@ -231,8 +227,6 @@ export class SettingPropEntry implements ISettingPropEntry { */ setValue( val: any, - isHotValue?: boolean, - force?: boolean, extraOptions?: IPublicTypeSetValueOptions, ) { const oldValue = this.getValue(); @@ -250,10 +244,6 @@ export class SettingPropEntry implements ISettingPropEntry { } } this.notifyValueChange(oldValue, val); - // 如果 fromSetHotValue,那么在 setHotValue 中已经调用过 valueChange 了 - if (!extraOptions?.fromSetHotValue) { - this.valueChange(extraOptions); - } } /** diff --git a/packages/designer/src/document/node/node.ts b/packages/designer/src/document/node/node.ts index ad11ac400..43886f7c0 100644 --- a/packages/designer/src/document/node/node.ts +++ b/packages/designer/src/document/node/node.ts @@ -2,7 +2,6 @@ import { ReactElement } from 'react'; import { observable, computed, - autorun, makeObservable, runInAction, wrapWithEventSwitch, @@ -295,7 +294,6 @@ implements this._children = new NodeChildren(this as INode, this.initialChildren(children)); this._children.internalInitParent(); this.props.merge(this.upgradeProps(this.initProps(props || {})), this.upgradeProps(extras)); - this.setupAutoruns(); } this.initBuiltinProps(); @@ -343,18 +341,6 @@ implements return this.document.designer.transformProps(props, this, IPublicEnumTransformStage.Upgrade); } - private setupAutoruns() { - const { autoruns } = this.componentMeta.advanced; - if (!autoruns || autoruns.length < 1) { - return; - } - this.autoruns = autoruns.map((item) => { - return autorun(() => { - item.autorun(this.props.getNode().settingEntry.get(item.name)?.internalToShellField()); - }); - }); - } - private initialChildren( children: IPublicTypeNodeData | IPublicTypeNodeData[] | undefined, ): IPublicTypeNodeData[] { @@ -840,7 +826,7 @@ implements } import(data: Schema, checkId = false) { - const { componentName, id, children, props, ...extras } = data; + const { children, props, ...extras } = data; if (this.isSlot()) { foreachReverse( this.children!, @@ -894,17 +880,6 @@ implements const _extras_: { [key: string]: any } = { ...extras, }; - /* istanbul ignore next */ - Object.keys(this._addons).forEach((key) => { - const addon = this._addons[key]; - if (addon) { - if (addon.isProp) { - (props as any)[getConvertedExtraKey(key)] = addon.exportData(); - } else { - _extras_[key] = addon.exportData(); - } - } - }); const schema: any = { ...baseSchema, @@ -1146,6 +1121,13 @@ implements this.emitter.removeListener('propChange', wrappedFunc); }; } + + /** + * todo: fixed types + */ + getDOMNode(): HTMLElement { + return document.body; + } } function ensureNode(node: any, document: IDocumentModel): INode { diff --git a/packages/designer/src/document/node/props/props.ts b/packages/designer/src/document/node/props/props.ts index 2b79755eb..8b67adb56 100644 --- a/packages/designer/src/document/node/props/props.ts +++ b/packages/designer/src/document/node/props/props.ts @@ -75,7 +75,11 @@ export class Props implements Omit, | 'getExtraProp' | 'g private purged = false; - constructor(owner: INode, value?: IPublicTypePropsMap | IPublicTypePropsList | null, extras?: ExtrasObject) { + constructor( + owner: INode, + value?: IPublicTypePropsMap | IPublicTypePropsList | null, + extras?: ExtrasObject + ) { makeObservable(this); this.owner = owner; if (Array.isArray(value)) { @@ -166,10 +170,9 @@ export class Props implements Omit, | 'getExtraProp' | 'g allProps[name] = value; } }); - // compatible vision - const transformedProps = this.transformToStatic(allProps); - Object.keys(transformedProps).forEach((name) => { - const value = transformedProps[name]; + + Object.keys(allProps).forEach((name) => { + const value = allProps[name]; if (typeof name === 'string' && name.startsWith(EXTRA_KEY_PREFIX)) { name = getOriginalExtraKey(name); extras[name] = value; diff --git a/packages/editor-core/src/di/setter.ts b/packages/editor-core/src/di/setter.ts index 08152beb0..32eb7ddb6 100644 --- a/packages/editor-core/src/di/setter.ts +++ b/packages/editor-core/src/di/setter.ts @@ -1,6 +1,5 @@ -import { ReactNode } from 'react'; import { IPublicApiSetters, IPublicModelSettingField, IPublicTypeCustomView, IPublicTypeRegisteredSetter } from '@alilc/lowcode-types'; -import { createContent, isCustomView } from '@alilc/lowcode-utils'; +import { isCustomView } from '@alilc/lowcode-utils'; const settersMap = new Map(); @@ -91,27 +88,4 @@ export class Setters implements ISetters { getSettersMap = () => { return this.settersMap; }; - - createSetterContent = (setter: any, props: Record): ReactNode => { - if (typeof setter === 'string') { - setter = this.getSetter(setter); - if (!setter) { - return null; - } - if (setter.defaultProps) { - props = { - ...setter.defaultProps, - ...props, - }; - } - setter = setter.component; - } - - // Fusion 的表单组件都是通过 'value' in props 来判断是否使用 defaultValue - if ('value' in props && typeof props.value === 'undefined') { - delete props.value; - } - - return createContent(setter, props); - }; } diff --git a/packages/editor-core/src/utils/obx.ts b/packages/editor-core/src/utils/obx.ts index 81c1a1e1d..e9ec63a52 100644 --- a/packages/editor-core/src/utils/obx.ts +++ b/packages/editor-core/src/utils/obx.ts @@ -1,7 +1,7 @@ import { observer } from 'mobx-react'; -import { configure } from 'mobx'; +import * as mobx from 'mobx'; -configure({ enforceActions: 'never' }); +mobx.configure({ enforceActions: 'never' }); export { observable, @@ -18,4 +18,4 @@ export { } from 'mobx'; export type { IReactionDisposer, IReactionPublic, IReactionOptions } from 'mobx'; -export { observer }; +export { observer, mobx }; diff --git a/packages/editor-core/src/widgets/title/index.tsx b/packages/editor-core/src/widgets/title/index.tsx index de19e6265..48ca30c1b 100644 --- a/packages/editor-core/src/widgets/title/index.tsx +++ b/packages/editor-core/src/widgets/title/index.tsx @@ -65,7 +65,7 @@ export class Title extends Component { return null; } - const intlLabel = intl(String(label)); + const intlLabel = intl(label as IPublicTypeI18nData); if (typeof intlLabel !== 'string') { return {intlLabel}; diff --git a/packages/editor-skeleton/src/components/field/index.ts b/packages/editor-skeleton/src/components/field/index.ts index defe151cf..6d7128634 100644 --- a/packages/editor-skeleton/src/components/field/index.ts +++ b/packages/editor-skeleton/src/components/field/index.ts @@ -14,7 +14,11 @@ export interface FieldProps { [extra: string]: any; } -export function createField(props: FieldProps, children: ReactNode, type?: 'accordion' | 'inline' | 'block' | 'plain' | 'popup' | 'entry'): ReactNode { +export function createField( + props: FieldProps, + children:ReactNode, + type?: 'accordion' | 'inline' | 'block' | 'plain' | 'popup' | 'entry' +): ReactNode { if (type === 'popup') { return createElement(PopupField, props, children); } diff --git a/packages/editor-skeleton/src/components/settings/settings-pane.tsx b/packages/editor-skeleton/src/components/settings/settings-pane.tsx index 37b4c4998..60d67620c 100644 --- a/packages/editor-skeleton/src/components/settings/settings-pane.tsx +++ b/packages/editor-skeleton/src/components/settings/settings-pane.tsx @@ -1,10 +1,11 @@ import { Component, MouseEvent, Fragment, ReactNode } from 'react'; -import { shallowIntl, observer, observable, engineConfig, runInAction } from '@alilc/lowcode-editor-core'; +import { observer, observable, engineConfig, runInAction, shallowIntl } from '@alilc/lowcode-editor-core'; import { createContent, isJSSlot, isSetterConfig, shouldUseVariableSetter, + isSettingField } from '@alilc/lowcode-utils'; import { Skeleton } from '../../skeleton'; import { Stage } from '../../widget/stage'; @@ -17,7 +18,6 @@ import { ISettingEntry, IComponentMeta, ISettingField, - isSettingField, ISettingTopEntry, } from '@alilc/lowcode-designer'; import { createField } from '../field'; @@ -41,7 +41,7 @@ function isStandardComponent(componentMeta: IComponentMeta | null) { function isInitialValueNotEmpty(initialValue: any) { if (isJSSlot(initialValue)) { return ( - // @ts-ignore visible 为 false 代表默认不展示 + // @ts-expect-error visible 为 false 代表默认不展示 initialValue.visible !== false && Array.isArray(initialValue.value) && initialValue.value.length > 0 @@ -247,12 +247,37 @@ class SettingFieldView extends Component): ReactNode => { + if (typeof setter === 'string') { + setter = this.setters?.getSetter(setter); + if (!setter) { + return null; + } + if (setter.defaultProps) { + props = { + ...setter.defaultProps, + ...props, + }; + } + setter = setter.component; + } + + // Fusion 的表单组件都是通过 'value' in props 来判断是否使用 defaultValue + if ('value' in props && typeof props.value === 'undefined') { + delete props.value; + } + + return createContent(setter, props); + }; return createField( { @@ -268,8 +293,7 @@ class SettingFieldView extends Component { this.setState({ fromOnChange: true, - // eslint-disable-next-line react/no-unused-state value, }); field.setValue(value, true); @@ -298,7 +321,6 @@ class SettingFieldView extends Component { if (skeleton) { return ( - // @ts-ignore diff --git a/packages/engine/src/engine-core.ts b/packages/engine/src/engine-core.ts index 22a089a43..b1a95297b 100644 --- a/packages/engine/src/engine-core.ts +++ b/packages/engine/src/engine-core.ts @@ -123,26 +123,27 @@ const designer = new Designer({ editor, shellModelFactory }); editor.set('designer', designer); const { project: innerProject } = designer; +const project = new Project(innerProject); +editor.set('project', project); const innerHotkey = new InnerHotkey(); const hotkey = new Hotkey(innerHotkey); -const project = new Project(innerProject); +editor.set('innerHotkey', innerHotkey); + const skeleton = new Skeleton(innerSkeleton, 'any', false); const innerSetters = new InnerSetters(); const setters = new Setters(innerSetters); +editor.set('setters', setters); + +const material = new Material(editor); +editor.set('material', material); + const innerCommand = new InnerCommand(); const command = new Command( innerCommand, engineContext as IPublicModelPluginContext ); -const material = new Material(editor); const commonUI = new CommonUI(editor); - -editor.set('project', project); -editor.set('setters', setters); -editor.set('material', material); -editor.set('innerHotkey', innerHotkey); - const config = new Config(engineConfig); const event = new Event(commonEvent, { prefix: 'common' }); const logger = new Logger({ level: 'warn', bizName: 'common' }); diff --git a/packages/engine/src/shell/model/setting-field.ts b/packages/engine/src/shell/model/setting-field.ts index 156112eb2..0293b592e 100644 --- a/packages/engine/src/shell/model/setting-field.ts +++ b/packages/engine/src/shell/model/setting-field.ts @@ -1,4 +1,4 @@ -import { ISettingField, isSettingField } from '@alilc/lowcode-designer'; +import { ISettingField } from '@alilc/lowcode-designer'; import { IPublicTypeCompositeValue, IPublicTypeFieldConfig, @@ -16,7 +16,7 @@ import { settingFieldSymbol } from '../symbols'; import { Node as ShellNode } from './node'; import { SettingTopEntry, SettingTopEntry as ShellSettingTopEntry } from './setting-top-entry'; import { ComponentMeta as ShellComponentMeta } from './component-meta'; -import { isCustomView } from '@alilc/lowcode-utils'; +import { isCustomView, isSettingField } from '@alilc/lowcode-utils'; export class SettingField implements IPublicModelSettingField { private readonly [settingFieldSymbol]: ISettingField; diff --git a/packages/plugin-outline-pane/package.json b/packages/plugin-outline-pane/package.json index a63ed195c..c2a96e38f 100644 --- a/packages/plugin-outline-pane/package.json +++ b/packages/plugin-outline-pane/package.json @@ -30,6 +30,7 @@ }, "dependencies": { "@alifd/next": "^1.27.8", + "@alilc/lowcode-editor-core": "workspace:*", "@alilc/lowcode-types": "workspace:*", "@alilc/lowcode-utils": "workspace:*", "classnames": "^2.5.1", @@ -44,6 +45,7 @@ }, "peerDependencies": { "@alifd/next": "^1.27.8", + "@alilc/lowcode-editor-core": "workspace:*", "@alilc/lowcode-types": "workspace:*", "@alilc/lowcode-utils": "workspace:*", "react": "^18.2.0", diff --git a/packages/plugin-outline-pane/src/views/tree-branches.tsx b/packages/plugin-outline-pane/src/views/tree-branches.tsx index d1f648e4e..8b8b5e6b8 100644 --- a/packages/plugin-outline-pane/src/views/tree-branches.tsx +++ b/packages/plugin-outline-pane/src/views/tree-branches.tsx @@ -1,5 +1,6 @@ import { PureComponent } from 'react'; import classNames from 'classnames'; +import { Title } from '@alilc/lowcode-editor-core'; import TreeNode from '../controllers/tree-node'; import TreeNodeView from './tree-node'; import { IPublicModelExclusiveGroup, IPublicTypeDisposable, IPublicTypeLocationChildrenDetail } from '@alilc/lowcode-types'; @@ -119,7 +120,6 @@ class TreeNodeChildren extends PureComponent<{ let groupContents: any[] = []; let currentGrp: IPublicModelExclusiveGroup; const { filterWorking, matchSelf, keywords } = this.state; - const Title = this.props.treeNode.pluginContext.common.editorCabin.Title; const endGroup = () => { if (groupContents.length > 0) { @@ -194,7 +194,6 @@ class TreeNodeSlots extends PureComponent<{ if (!treeNode.hasSlots()) { return null; } - const Title = this.props.treeNode.pluginContext.common.editorCabin.Title; return (
) : ( - {/* @ts-ignore */} {/* todo: click redirect to prop */} - {/* @ts-ignore */} <Tip>{intlNode('Slot for {prop}', { prop: node.slotFor.key })}</Tip> </a> )} @@ -253,7 +251,6 @@ export default class TreeTitle extends PureComponent<{ <a className="tree-node-tag loop"> {/* todo: click todo something */} <IconLoop /> - {/* @ts-ignore */} <Tip>{intlNode('Loop')}</Tip> </a> )} @@ -261,7 +258,6 @@ export default class TreeTitle extends PureComponent<{ <a className="tree-node-tag cond"> {/* todo: click todo something */} <IconCond /> - {/* @ts-ignore */} <Tip>{intlNode('Conditional')}</Tip> </a> )} @@ -282,12 +278,10 @@ class DeleteBtn extends PureComponent<{ onClick: () => void; }> { render() { - const { intl, common } = this.props.treeNode.pluginContext; - const { Tip } = common.editorCabin; + const { intl } = this.props.treeNode.pluginContext; return ( <div className="tree-node-delete-btn" onClick={this.props.onClick}> <IconDelete /> - {/* @ts-ignore */} <Tip>{intl('Delete')}</Tip> </div> ); @@ -299,12 +293,10 @@ class RenameBtn extends PureComponent<{ onClick: (e: any) => void; }> { render() { - const { intl, common } = this.props.treeNode.pluginContext; - const { Tip } = common.editorCabin; + const { intl } = this.props.treeNode.pluginContext; return ( <div className="tree-node-rename-btn" onClick={this.props.onClick}> <IconSetting /> - {/* @ts-ignore */} <Tip>{intl('Rename')}</Tip> </div> ); @@ -317,8 +309,7 @@ class LockBtn extends PureComponent<{ }> { render() { const { treeNode, locked } = this.props; - const { intl, common } = this.props.treeNode.pluginContext; - const { Tip } = common.editorCabin; + const { intl } = this.props.treeNode.pluginContext; return ( <div className="tree-node-lock-btn" @@ -346,8 +337,7 @@ class HideBtn extends PureComponent< > { render() { const { treeNode, hidden } = this.props; - const { intl, common } = treeNode.pluginContext; - const { Tip } = common.editorCabin; + const { intl } = treeNode.pluginContext; return ( <div className="tree-node-hide-btn" diff --git a/packages/plugin-outline-pane/vite.config.ts b/packages/plugin-outline-pane/vite.config.ts index 36c79542e..ae1df800f 100644 --- a/packages/plugin-outline-pane/vite.config.ts +++ b/packages/plugin-outline-pane/vite.config.ts @@ -5,6 +5,6 @@ export default defineConfig(async () => { return baseConfigFn({ name: 'LowCodePluginOutlinePane', defaultFormats: ['es', 'cjs'], - entry: 'src/index.tsx' + entry: 'src/index.tsx', }) }); diff --git a/packages/types/src/shell/api/setters.ts b/packages/types/src/shell/api/setters.ts index 3afbe41c7..9ff2e8eda 100644 --- a/packages/types/src/shell/api/setters.ts +++ b/packages/types/src/shell/api/setters.ts @@ -1,5 +1,3 @@ -import { ReactNode } from 'react'; - import { IPublicTypeRegisteredSetter, IPublicTypeCustomView } from '../type'; export interface IPublicApiSetters { diff --git a/packages/types/src/shell/model/node.ts b/packages/types/src/shell/model/node.ts index bf07d54a9..0347099fc 100644 --- a/packages/types/src/shell/model/node.ts +++ b/packages/types/src/shell/model/node.ts @@ -447,4 +447,5 @@ export interface IBaseModelNode< }; } -export interface IPublicModelNode extends IBaseModelNode<IPublicModelDocumentModel, IPublicModelNode> {} +export interface IPublicModelNode extends + IBaseModelNode<IPublicModelDocumentModel, IPublicModelNode> {} diff --git a/packages/utils/src/check-types/is-custom-view.ts b/packages/utils/src/check-types/is-custom-view.ts index 4cf921d9c..aa7633386 100644 --- a/packages/utils/src/check-types/is-custom-view.ts +++ b/packages/utils/src/check-types/is-custom-view.ts @@ -1,6 +1,6 @@ import { isValidElement } from 'react'; -import { isReactComponent } from '../is-react'; import { IPublicTypeCustomView } from '@alilc/lowcode-types'; +import { isReactComponent } from '../is-react'; export function isCustomView(obj: any): obj is IPublicTypeCustomView { if (!obj) { diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index f6366069d..2ba069036 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -2,9 +2,6 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "dist", - "paths": { - "@alilc/lowcode-*": ["packages/*"] - } }, "include": ["src"] } diff --git a/tsconfig.json b/tsconfig.json index 6854e940c..2173f6981 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -37,7 +37,7 @@ "paths": { "@alilc/lowcode-*": ["packages/*/src"] }, - "types": ["vitest/globals", "node"] + "types": ["vite/client", "vitest/globals", "node"] }, "exclude": ["**/dist", "node_modules"] }