diff --git a/apps/web-antd/src/components/Dict/index.ts b/apps/web-antd/src/components/Dict/index.ts deleted file mode 100644 index 9dd84d24..00000000 --- a/apps/web-antd/src/components/Dict/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { withInstall } from '#/utils'; - -import dictTag from './src/index.vue'; - -export const DictTag = withInstall(dictTag); diff --git a/apps/web-antd/src/components/Dict/src/data.tsx b/apps/web-antd/src/components/Dict/src/data.tsx deleted file mode 100644 index 68395f8a..00000000 --- a/apps/web-antd/src/components/Dict/src/data.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { type VNode } from 'vue'; - -import { Tag } from 'ant-design-vue'; - -interface TagType { - [key: string]: { color: string; label: string }; -} - -export const tagTypes: TagType = { - cyan: { color: 'cyan', label: 'cyan' }, - danger: { color: 'error', label: '危险(danger)' }, - /** 由于和elementUI不同 用于替换颜色 */ - default: { color: 'default', label: '默认(default)' }, - green: { color: 'green', label: 'green' }, - info: { color: 'default', label: '信息(info)' }, - orange: { color: 'orange', label: 'orange' }, - /** 自定义预设 color可以为16进制颜色 */ - pink: { color: 'pink', label: 'pink' }, - primary: { color: 'processing', label: '主要(primary)' }, - purple: { color: 'purple', label: 'purple' }, - red: { color: 'red', label: 'red' }, - success: { color: 'success', label: '成功(success)' }, - warning: { color: 'warning', label: '警告(warning)' }, -}; - -// 字典选择使用 { label: string; value: string }[] -interface Options { - label: string | VNode; - value: string; -} - -export function tagSelectOptions() { - const selectArray: Options[] = []; - Object.keys(tagTypes).forEach((key) => { - if (!tagTypes[key]) return; - const label = tagTypes[key].label; - const color = tagTypes[key].color; - selectArray.push({ - label: {label}, - value: key, - }); - }); - return selectArray; -} diff --git a/apps/web-antd/src/components/Dict/src/index.vue b/apps/web-antd/src/components/Dict/src/index.vue deleted file mode 100644 index 2505d19b..00000000 --- a/apps/web-antd/src/components/Dict/src/index.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - diff --git a/apps/web-antd/src/components/Tinymce/index.ts b/apps/web-antd/src/components/Tinymce/index.ts deleted file mode 100644 index bc00d6b2..00000000 --- a/apps/web-antd/src/components/Tinymce/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { withInstall } from '#/utils'; - -import tinymce from './src/editor.vue'; - -export const Tinymce = withInstall(tinymce); diff --git a/apps/web-antd/src/components/Tinymce/src/helper.ts b/apps/web-antd/src/components/Tinymce/src/helper.ts deleted file mode 100644 index e169f501..00000000 --- a/apps/web-antd/src/components/Tinymce/src/helper.ts +++ /dev/null @@ -1,85 +0,0 @@ -const validEvents = new Set([ - 'onActivate', - 'onAddUndo', - 'onBeforeAddUndo', - 'onBeforeExecCommand', - 'onBeforeGetContent', - 'onBeforeRenderUI', - 'onBeforeSetContent', - 'onBeforePaste', - 'onBlur', - 'onChange', - 'onClearUndos', - 'onClick', - 'onContextMenu', - 'onCopy', - 'onCut', - 'onDblclick', - 'onDeactivate', - 'onDirty', - 'onDrag', - 'onDragDrop', - 'onDragEnd', - 'onDragGesture', - 'onDragOver', - 'onDrop', - 'onExecCommand', - 'onFocus', - 'onFocusIn', - 'onFocusOut', - 'onGetContent', - 'onHide', - 'onInit', - 'onKeyDown', - 'onKeyPress', - 'onKeyUp', - 'onLoadContent', - 'onMouseDown', - 'onMouseEnter', - 'onMouseLeave', - 'onMouseMove', - 'onMouseOut', - 'onMouseOver', - 'onMouseUp', - 'onNodeChange', - 'onObjectResizeStart', - 'onObjectResized', - 'onObjectSelected', - 'onPaste', - 'onPostProcess', - 'onPostRender', - 'onPreProcess', - 'onProgressState', - 'onRedo', - 'onRemove', - 'onReset', - 'onSaveContent', - 'onSelectionChange', - 'onSetAttrib', - 'onSetContent', - 'onShow', - 'onSubmit', - 'onUndo', - 'onVisualAid', -]); - -const isValidKey = (key: string) => validEvents.has(key); - -export const bindHandlers = ( - initEvent: Event, - listeners: any, - editor: any, -): void => { - Object.keys(listeners) - .filter((element) => isValidKey(element)) - .forEach((key: string) => { - const handler = listeners[key]; - if (typeof handler === 'function') { - if (key === 'onInit') { - handler(initEvent, editor); - } else { - editor.on(key.slice(2), (e: any) => handler(e, editor)); - } - } - }); -}; diff --git a/apps/web-antd/src/components/Tinymce/src/img-upload.vue b/apps/web-antd/src/components/Tinymce/src/img-upload.vue deleted file mode 100644 index 441b9fee..00000000 --- a/apps/web-antd/src/components/Tinymce/src/img-upload.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - - diff --git a/apps/web-antd/src/components/Tinymce/src/tinymce.ts b/apps/web-antd/src/components/Tinymce/src/tinymce.ts deleted file mode 100644 index eb3964a6..00000000 --- a/apps/web-antd/src/components/Tinymce/src/tinymce.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Any plugins you want to setting has to be imported -// Detail plugins list see https://www.tinymce.com/docs/plugins/ -// Custom builds see https://www.tinymce.com/download/custom-builds/ -// colorpicker/contextmenu/textcolor plugin is now built in to the core editor, please remove it from your editor configuration - -// quickbars 快捷栏 -export const plugins = - 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap emoticons accordion'; - -export const toolbar = - 'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl'; diff --git a/apps/web-antd/src/components/dict/index.ts b/apps/web-antd/src/components/dict/index.ts deleted file mode 100644 index 9dd84d24..00000000 --- a/apps/web-antd/src/components/dict/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { withInstall } from '#/utils'; - -import dictTag from './src/index.vue'; - -export const DictTag = withInstall(dictTag); diff --git a/apps/web-antd/src/components/dict/src/data.tsx b/apps/web-antd/src/components/dict/src/data.tsx deleted file mode 100644 index 68395f8a..00000000 --- a/apps/web-antd/src/components/dict/src/data.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { type VNode } from 'vue'; - -import { Tag } from 'ant-design-vue'; - -interface TagType { - [key: string]: { color: string; label: string }; -} - -export const tagTypes: TagType = { - cyan: { color: 'cyan', label: 'cyan' }, - danger: { color: 'error', label: '危险(danger)' }, - /** 由于和elementUI不同 用于替换颜色 */ - default: { color: 'default', label: '默认(default)' }, - green: { color: 'green', label: 'green' }, - info: { color: 'default', label: '信息(info)' }, - orange: { color: 'orange', label: 'orange' }, - /** 自定义预设 color可以为16进制颜色 */ - pink: { color: 'pink', label: 'pink' }, - primary: { color: 'processing', label: '主要(primary)' }, - purple: { color: 'purple', label: 'purple' }, - red: { color: 'red', label: 'red' }, - success: { color: 'success', label: '成功(success)' }, - warning: { color: 'warning', label: '警告(warning)' }, -}; - -// 字典选择使用 { label: string; value: string }[] -interface Options { - label: string | VNode; - value: string; -} - -export function tagSelectOptions() { - const selectArray: Options[] = []; - Object.keys(tagTypes).forEach((key) => { - if (!tagTypes[key]) return; - const label = tagTypes[key].label; - const color = tagTypes[key].color; - selectArray.push({ - label: {label}, - value: key, - }); - }); - return selectArray; -} diff --git a/apps/web-antd/src/components/dict/src/index.vue b/apps/web-antd/src/components/dict/src/index.vue deleted file mode 100644 index 2505d19b..00000000 --- a/apps/web-antd/src/components/dict/src/index.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - diff --git a/apps/web-antd/src/components/tinymce/index.ts b/apps/web-antd/src/components/tinymce/index.ts deleted file mode 100644 index bc00d6b2..00000000 --- a/apps/web-antd/src/components/tinymce/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { withInstall } from '#/utils'; - -import tinymce from './src/editor.vue'; - -export const Tinymce = withInstall(tinymce); diff --git a/apps/web-antd/src/components/tinymce/src/editor.vue b/apps/web-antd/src/components/tinymce/src/editor.vue deleted file mode 100644 index e4a8e2dd..00000000 --- a/apps/web-antd/src/components/tinymce/src/editor.vue +++ /dev/null @@ -1,370 +0,0 @@ - - - - - diff --git a/apps/web-antd/src/components/tinymce/src/helper.ts b/apps/web-antd/src/components/tinymce/src/helper.ts deleted file mode 100644 index e169f501..00000000 --- a/apps/web-antd/src/components/tinymce/src/helper.ts +++ /dev/null @@ -1,85 +0,0 @@ -const validEvents = new Set([ - 'onActivate', - 'onAddUndo', - 'onBeforeAddUndo', - 'onBeforeExecCommand', - 'onBeforeGetContent', - 'onBeforeRenderUI', - 'onBeforeSetContent', - 'onBeforePaste', - 'onBlur', - 'onChange', - 'onClearUndos', - 'onClick', - 'onContextMenu', - 'onCopy', - 'onCut', - 'onDblclick', - 'onDeactivate', - 'onDirty', - 'onDrag', - 'onDragDrop', - 'onDragEnd', - 'onDragGesture', - 'onDragOver', - 'onDrop', - 'onExecCommand', - 'onFocus', - 'onFocusIn', - 'onFocusOut', - 'onGetContent', - 'onHide', - 'onInit', - 'onKeyDown', - 'onKeyPress', - 'onKeyUp', - 'onLoadContent', - 'onMouseDown', - 'onMouseEnter', - 'onMouseLeave', - 'onMouseMove', - 'onMouseOut', - 'onMouseOver', - 'onMouseUp', - 'onNodeChange', - 'onObjectResizeStart', - 'onObjectResized', - 'onObjectSelected', - 'onPaste', - 'onPostProcess', - 'onPostRender', - 'onPreProcess', - 'onProgressState', - 'onRedo', - 'onRemove', - 'onReset', - 'onSaveContent', - 'onSelectionChange', - 'onSetAttrib', - 'onSetContent', - 'onShow', - 'onSubmit', - 'onUndo', - 'onVisualAid', -]); - -const isValidKey = (key: string) => validEvents.has(key); - -export const bindHandlers = ( - initEvent: Event, - listeners: any, - editor: any, -): void => { - Object.keys(listeners) - .filter((element) => isValidKey(element)) - .forEach((key: string) => { - const handler = listeners[key]; - if (typeof handler === 'function') { - if (key === 'onInit') { - handler(initEvent, editor); - } else { - editor.on(key.slice(2), (e: any) => handler(e, editor)); - } - } - }); -}; diff --git a/apps/web-antd/src/components/tinymce/src/img-upload.vue b/apps/web-antd/src/components/tinymce/src/img-upload.vue deleted file mode 100644 index 441b9fee..00000000 --- a/apps/web-antd/src/components/tinymce/src/img-upload.vue +++ /dev/null @@ -1,115 +0,0 @@ - - - - diff --git a/apps/web-antd/src/components/tinymce/src/tinymce.ts b/apps/web-antd/src/components/tinymce/src/tinymce.ts deleted file mode 100644 index eb3964a6..00000000 --- a/apps/web-antd/src/components/tinymce/src/tinymce.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Any plugins you want to setting has to be imported -// Detail plugins list see https://www.tinymce.com/docs/plugins/ -// Custom builds see https://www.tinymce.com/download/custom-builds/ -// colorpicker/contextmenu/textcolor plugin is now built in to the core editor, please remove it from your editor configuration - -// quickbars 快捷栏 -export const plugins = - 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap emoticons accordion'; - -export const toolbar = - 'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap emoticons | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl';