Replace TinyMCE with WangEditor and update dependencies

This commit is contained in:
wangqiao
2025-08-28 17:41:36 +08:00
parent 3f1431f972
commit fadab4eacb
6 changed files with 478 additions and 188 deletions

44
types/global.d.ts vendored
View File

@ -1,38 +1,44 @@
/// <reference types="vite/client" />
interface IResponse<T = any> {
statusCode: string;
code: number | string;
data: T;
message: string;
msg: string;
statusCode: string
code: number | string
data: T
message: string
msg: string
}
interface Window {
/**
* 当前APP运行环境
* */
APP_RUN_ENV: "local" | "dev" | "test" | "prod" | "pre";
APP_RUN_ENV: 'local' | 'dev' | 'test' | 'prod' | 'pre'
// 是否存在无界
__POWERED_BY_WUJIE__?: boolean;
__POWERED_BY_WUJIE__?: boolean
// 子应用公共加载路径
__WUJIE_PUBLIC_PATH__: string;
__WUJIE_PUBLIC_PATH__: string
// 原生的querySelector
__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__: typeof Document.prototype.querySelector;
__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__: typeof Document.prototype.querySelector
// 原生的querySelectorAll
__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR_ALL__: typeof Document.prototype.querySelectorAll;
__WUJIE_RAW_DOCUMENT_QUERY_SELECTOR_ALL__: typeof Document.prototype.querySelectorAll
// 原生的window对象
__WUJIE_RAW_WINDOW__: Window;
__WUJIE_RAW_WINDOW__: Window
// 子应用沙盒实例
__WUJIE: WuJie;
__WUJIE: WuJie
// 子应用mount函数
__WUJIE_MOUNT: () => void;
__WUJIE_MOUNT: () => void
// 子应用unmount函数
__WUJIE_UNMOUNT: () => void;
__WUJIE_UNMOUNT: () => void
// 注入对象
$wujie: {
bus: EventBus;
shadowRoot?: ShadowRoot;
props?: { [key: string]: any };
location?: object;
};
bus: EventBus
shadowRoot?: ShadowRoot
props?: { [key: string]: any }
location?: object
}
}
declare module '@wangeditor/editor-for-vue' {
import { DefineComponent } from 'vue'
export const Editor: DefineComponent<any, any, any>
export const Toolbar: DefineComponent<any, any, any>
}