diff --git a/apps/web-antd/package.json b/apps/web-antd/package.json index 1e518e99..acb384ca 100644 --- a/apps/web-antd/package.json +++ b/apps/web-antd/package.json @@ -27,6 +27,7 @@ }, "dependencies": { "@ant-design/icons-vue": "^7.0.1", + "@fortawesome/fontawesome-free": "^6.7.2", "@vben/access": "workspace:*", "@vben/common-ui": "workspace:*", "@vben/constants": "workspace:*", @@ -41,27 +42,26 @@ "@vben/styles": "workspace:*", "@vben/types": "workspace:*", "@vben/utils": "workspace:*", + "@vueup/vue-quill": "^1.2.0", "@vueuse/core": "catalog:", "ant-design-vue": "catalog:", + "axios": "^1.10.0", "dayjs": "catalog:", "exceljs": "^4.4.0", - "markdown-it": "^14.1.0", - "pinia": "catalog:", - "sortablejs": "catalog:", - "vue": "catalog:", - "vue-router": "catalog:", - "xlsx": "^0.18.5" - }, - "devDependencies": { - "@types/sortablejs": "catalog:", - "@fortawesome/fontawesome-free": "^6.7.2", - "@vueup/vue-quill": "^1.2.0", - "axios": "^1.10.0", "html2canvas": "^1.4.1", "js-base64": "^3.7.7", "lodash-es": "^4.17.21", "lucide-vue-next": "^0.487.0", + "markdown-it": "^14.1.0", "md-editor-v3": "^5.4.5", - "xgplayer": "^3.0.24" + "pinia": "catalog:", + "sortablejs": "catalog:", + "vue": "catalog:", + "vue-router": "catalog:", + "xgplayer": "^3.0.24", + "xlsx": "^0.18.5" + }, + "devDependencies": { + "@types/sortablejs": "catalog:" } } diff --git a/apps/web-antd/src/adapter/component/index.ts b/apps/web-antd/src/adapter/component/index.ts index add1f8d0..e8f94298 100644 --- a/apps/web-antd/src/adapter/component/index.ts +++ b/apps/web-antd/src/adapter/component/index.ts @@ -68,6 +68,8 @@ import { isEmpty } from '@vben/utils'; import { message, Modal, notification } from 'ant-design-vue'; +import { registerComponent } from '#/components/form/component-map'; + type AdapterUploadProps = UploadProps & { aspectRatio?: string; crop?: boolean; @@ -620,6 +622,8 @@ export type ComponentType = | 'DatePicker' | 'DefaultButton' | 'Divider' + /** OA 场景表单的图片/文件素材选择(透传 acceptTypes 过滤类型) */ + | 'GalleryPickLink' | 'IconPicker' | 'Input' | 'InputNumber' @@ -637,6 +641,10 @@ export type ComponentType = | 'TimePicker' | 'TreeSelect' | 'Upload' + | 'UploadImage' + | 'UploadImageSortable' + | 'UploadOssFile' + | 'UploadDraggerPaste' | BaseFormComponentType; /** @@ -737,6 +745,8 @@ async function initComponentAdapter() { Upload: withPreviewUpload(), }; + // 自动注册 components/form 与 views/**/components/form 下的业务表单组件(如 Editor、Avatar) + registerComponent(components); // 将组件注册到全局共享状态中 globalShareState.setComponents(components); diff --git a/apps/web-antd/src/components/canvas-spreadsheet/commands/SetCellValueCommand.ts b/apps/web-antd/src/components/canvas-spreadsheet/commands/SetCellValueCommand.ts index c7b5c89d..7034cfb2 100644 --- a/apps/web-antd/src/components/canvas-spreadsheet/commands/SetCellValueCommand.ts +++ b/apps/web-antd/src/components/canvas-spreadsheet/commands/SetCellValueCommand.ts @@ -1,12 +1,12 @@ -import type { SpreadsheetCommand } from '../types'; - -export function createSetCellValueCommand( - undo: () => void | Promise, - redo: () => void | Promise, -): SpreadsheetCommand { - return { - label: 'setCellValue', - undo, - redo, - }; -} +import type { SpreadsheetCommand } from '../types'; + +export function createSetCellValueCommand( + undo: () => void | Promise, + redo: () => void | Promise, +): SpreadsheetCommand { + return { + label: 'setCellValue', + undo, + redo, + }; +} diff --git a/apps/web-antd/src/components/form/component-map.ts b/apps/web-antd/src/components/form/component-map.ts index 8f7353c6..b4af6e68 100644 --- a/apps/web-antd/src/components/form/component-map.ts +++ b/apps/web-antd/src/components/form/component-map.ts @@ -1,7 +1,7 @@ -import type { CustomComponentType } from './types'; - import type { Component } from 'vue'; +import type { CustomComponentType } from './types'; + import { getFileNameWithoutExtension, toPascalCase } from '#/util/tool'; const componentMap = new Map(); diff --git a/apps/web-antd/src/components/form/components/api-log-user-picker.vue b/apps/web-antd/src/components/form/components/api-log-user-picker.vue index 35e2a87d..1dab28d8 100644 --- a/apps/web-antd/src/components/form/components/api-log-user-picker.vue +++ b/apps/web-antd/src/components/form/components/api-log-user-picker.vue @@ -1,346 +1,346 @@ - - - - - - - - \ No newline at end of file + + + + + + + + diff --git a/apps/web-antd/src/components/form/components/editor.vue b/apps/web-antd/src/components/form/components/editor.vue index d928227c..93debba7 100644 --- a/apps/web-antd/src/components/form/components/editor.vue +++ b/apps/web-antd/src/components/form/components/editor.vue @@ -1,9 +1,9 @@ - - - - + + + + + diff --git a/apps/web-antd/src/views/system/region/config/table.ts b/apps/web-antd/src/views/system/region/config/table.ts index ec503085..a7ea65a4 100644 --- a/apps/web-antd/src/views/system/region/config/table.ts +++ b/apps/web-antd/src/views/system/region/config/table.ts @@ -54,7 +54,7 @@ export const gridOptions: VxeGridProps = { // custom: true, // 自定义列 zoom: true, // 最大化最小化 slots: { - buttons: 'toolbar-buttons', + buttons: 'toolbar-actions', }, custom: { // 自定义列-图标 diff --git a/apps/web-antd/src/views/system/role-quick-nav/config/table.ts b/apps/web-antd/src/views/system/role-quick-nav/config/table.ts index b69e8f2b..266c7744 100644 --- a/apps/web-antd/src/views/system/role-quick-nav/config/table.ts +++ b/apps/web-antd/src/views/system/role-quick-nav/config/table.ts @@ -69,7 +69,7 @@ export const gridOptions: VxeGridProps = { // custom: true, // 自定义列 zoom: true, // 最大化最小化 slots: { - buttons: 'toolbar-buttons', + buttons: 'toolbar-actions', }, custom: { // 自定义列-图标 diff --git a/apps/web-antd/src/views/system/role-quick-nav/index.vue b/apps/web-antd/src/views/system/role-quick-nav/index.vue index 666ec507..fea102fe 100644 --- a/apps/web-antd/src/views/system/role-quick-nav/index.vue +++ b/apps/web-antd/src/views/system/role-quick-nav/index.vue @@ -69,7 +69,7 @@ const deleteApi = (row: any) => { -