From 80d4f18e8b133ebcf1b6eafb7529362569c80ffd Mon Sep 17 00:00:00 2001 From: zhangtao <9480807882@qq.com> Date: Mon, 11 May 2026 15:46:18 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8D=87=E7=BA=A7Vue=20SFC?= =?UTF-8?q?=E6=B7=B1=E5=BA=A6=E9=80=89=E6=8B=A9=E5=99=A8=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E4=B8=BA::v-deep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 本次提交将项目中所有使用`::deep`的CSS深度选择器统一替换为Vue 3官方推荐的`::v-deep`语法,修复了旧版语法在新版本Vue生态中的兼容性问题,同时修正了部分组件的响应式表单定义方式,将`reactive`配合`Object.assign`的写法调整为更符合Vue 3组合式API规范的`ref`响应式状态写法,整体优化了代码的可维护性和兼容性。 --- frontend/web/eslint.config.mjs | 256 +++++++++--------- .../layouts/fa-global-search/index.vue | 16 +- .../layouts/fa-header-bar/index.vue | 16 +- .../fa-header-bar/widget/FaUserMenu.vue | 2 +- .../fa-menus/fa-horizontal-menu/index.vue | 6 +- .../widget/HorizontalSubmenu.vue | 2 +- .../layouts/fa-menus/fa-mixed-menu/index.vue | 6 +- .../fa-menus/fa-sidebar-menu/style.scss | 6 +- .../layouts/fa-screen-lock/index.vue | 9 +- .../layouts/fa-settings-panel/style.scss | 2 +- .../web/src/components/layouts/style.scss | 6 +- .../components/media/fa-cutter-img/index.vue | 22 +- .../src/components/modal/fa-dialog/index.vue | 2 +- .../src/components/modal/fa-drawer/index.vue | 2 +- .../components/others/fa-calendar/index.vue | 18 +- .../others/fa-icon-select/index.vue | 4 +- .../others/fa-markdown-renderer/index.vue | 18 +- .../components/others/fa-menu-right/index.vue | 2 +- .../others/fa-table-select/index.vue | 6 +- .../src/components/others/fa-upload/index.vue | 2 +- .../src/components/tables/fa-table/style.scss | 10 +- .../components/theme/fa-theme-svg/index.vue | 2 +- .../components/views/fa-login/AuthTopBar.vue | 8 +- frontend/web/src/views/current/profile.vue | 2 +- .../components/ArticleDetailDrawer.vue | 10 +- .../dashboard/console/modules/new-user.vue | 2 +- frontend/web/src/views/dashboard/index.vue | 14 +- .../src/views/dashboard/tutorial/index.vue | 2 +- .../module_ai/chat/components/ChatInput.vue | 4 +- .../module_ai/chat/components/ChatNavbar.vue | 4 +- .../module_ai/chat/components/MessageItem.vue | 22 +- .../module_ai/chat/components/Sidebar.vue | 4 +- .../web/src/views/module_ai/memory/index.vue | 12 +- .../views/module_application/portal/index.vue | 16 +- .../src/views/module_example/demo/index.vue | 18 +- .../src/views/module_example/demo01/index.vue | 20 +- .../gencode/components/CreateTableDialog.vue | 10 +- .../gencode/components/GenBasicStep.vue | 14 +- .../gencode/components/GencodeHelpPanel.vue | 8 +- .../views/module_generator/gencode/index.vue | 8 +- .../src/views/module_monitor/cache/index.vue | 4 +- .../views/module_monitor/resource/index.vue | 4 +- .../login/components/LoginAuthLinkRow.vue | 4 +- .../login/components/LoginMobilePanel.vue | 4 +- .../auth/login/components/LoginQrPanel.vue | 2 +- .../views/module_system/auth/login/index.vue | 30 +- .../src/views/module_system/dept/index.vue | 20 +- .../dict/components/DataDrawer.vue | 26 +- .../src/views/module_system/dict/index.vue | 20 +- .../web/src/views/module_system/log/index.vue | 4 +- .../src/views/module_system/menu/index.vue | 34 +-- .../src/views/module_system/notice/index.vue | 36 +-- .../src/views/module_system/param/index.vue | 16 +- .../views/module_system/position/index.vue | 18 +- .../src/views/module_system/role/index.vue | 18 +- .../src/views/module_system/tenant/index.vue | 28 +- .../user/components/UserTableSelect.vue | 4 +- .../src/views/module_system/user/index.vue | 20 +- .../views/module_task/cronjob/job/index.vue | 4 +- .../views/module_task/cronjob/node/index.vue | 48 ++-- .../workflow/components/EdgeConfigPanel.vue | 6 +- .../workflow/components/NodeConfigPanel.vue | 10 +- .../components/WorkflowDesignDrawer.vue | 22 +- .../module_task/workflow/node-type/index.vue | 36 +-- 64 files changed, 510 insertions(+), 501 deletions(-) diff --git a/frontend/web/eslint.config.mjs b/frontend/web/eslint.config.mjs index 87c36094..a626bdbf 100644 --- a/frontend/web/eslint.config.mjs +++ b/frontend/web/eslint.config.mjs @@ -1,99 +1,99 @@ // ESLint 配置文件 -import fs from 'fs' -import path, { dirname } from 'path' -import { fileURLToPath } from 'url' +import fs from "fs" +import path, { dirname } from "path" +import { fileURLToPath } from "url" -import pluginJs from '@eslint/js' -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' -import pluginVue from 'eslint-plugin-vue' -import globals from 'globals' -import tseslint from 'typescript-eslint' +import pluginJs from "@eslint/js" +import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended" +import pluginVue from "eslint-plugin-vue" +import globals from "globals" +import tseslint from "typescript-eslint" const __filename = fileURLToPath(import.meta.url) const __dirname = dirname(__filename) const autoImportConfig = JSON.parse( - fs.readFileSync(path.resolve(__dirname, '.auto-import.json'), 'utf-8') + fs.readFileSync(path.resolve(__dirname, ".auto-import.json"), "utf-8") ) // Element Plus 组件全局配置 const elementPlusComponents = { - ElInput: 'readonly', - ElSelect: 'readonly', - ElSwitch: 'readonly', - ElCascader: 'readonly', - ElInputNumber: 'readonly', - ElTimePicker: 'readonly', - ElTimeSelect: 'readonly', - ElDatePicker: 'readonly', - ElTreeSelect: 'readonly', - ElText: 'readonly', - ElRadioGroup: 'readonly', - ElCheckboxGroup: 'readonly', - ElOption: 'readonly', - ElRadio: 'readonly', - ElCheckbox: 'readonly', - ElInputTag: 'readonly', - ElForm: 'readonly', - ElFormItem: 'readonly', - ElTable: 'readonly', - ElTableColumn: 'readonly', - ElButton: 'readonly', - ElDialog: 'readonly', - ElPagination: 'readonly', - ElMessage: 'readonly', - ElMessageBox: 'readonly', - ElNotification: 'readonly', - ElTree: 'readonly', - ElDropdown: 'readonly', - ElDropdownMenu: 'readonly', - ElDropdownItem: 'readonly', - ElAvatar: 'readonly', - ElBadge: 'readonly', - ElCard: 'readonly', - ElCol: 'readonly', - ElRow: 'readonly', - ElContainer: 'readonly', - ElHeader: 'readonly', - ElAside: 'readonly', - ElMain: 'readonly', - ElFooter: 'readonly', - ElLink: 'readonly', - ElDivider: 'readonly', - ElImage: 'readonly', - ElProgress: 'readonly', - ElSkeleton: 'readonly', - ElSlider: 'readonly', - ElSwitch: 'readonly', - ElTag: 'readonly', - ElTooltip: 'readonly', - ElPopover: 'readonly', - ElPopconfirm: 'readonly', - ElDrawer: 'readonly', - ElAlert: 'readonly', - ElLoading: 'readonly', + ElInput: "readonly", + ElSelect: "readonly", + ElSwitch: "readonly", + ElCascader: "readonly", + ElInputNumber: "readonly", + ElTimePicker: "readonly", + ElTimeSelect: "readonly", + ElDatePicker: "readonly", + ElTreeSelect: "readonly", + ElText: "readonly", + ElRadioGroup: "readonly", + ElCheckboxGroup: "readonly", + ElOption: "readonly", + ElRadio: "readonly", + ElCheckbox: "readonly", + ElInputTag: "readonly", + ElForm: "readonly", + ElFormItem: "readonly", + ElTable: "readonly", + ElTableColumn: "readonly", + ElButton: "readonly", + ElDialog: "readonly", + ElPagination: "readonly", + ElMessage: "readonly", + ElMessageBox: "readonly", + ElNotification: "readonly", + ElTree: "readonly", + ElDropdown: "readonly", + ElDropdownMenu: "readonly", + ElDropdownItem: "readonly", + ElAvatar: "readonly", + ElBadge: "readonly", + ElCard: "readonly", + ElCol: "readonly", + ElRow: "readonly", + ElContainer: "readonly", + ElHeader: "readonly", + ElAside: "readonly", + ElMain: "readonly", + ElFooter: "readonly", + ElLink: "readonly", + ElDivider: "readonly", + ElImage: "readonly", + ElProgress: "readonly", + ElSkeleton: "readonly", + ElSlider: "readonly", + ElSwitch: "readonly", + ElTag: "readonly", + ElTooltip: "readonly", + ElPopover: "readonly", + ElPopconfirm: "readonly", + ElDrawer: "readonly", + ElAlert: "readonly", + ElLoading: "readonly", } export default [ // 忽略文件配置 { ignores: [ - 'node_modules', - 'dist', - 'public', - '.vscode/**', - 'src/assets/**', - 'src/utils/console.ts', - '**/*.min.*', - '**/auto-imports.d.ts', - '**/components.d.ts', - '**/types/**/*.d.ts', + "node_modules", + "dist", + "public", + ".vscode/**", + "src/assets/**", + "src/utils/console.ts", + "**/*.min.*", + "**/auto-imports.d.ts", + "**/components.d.ts", + "**/types/**/*.d.ts", ], }, // 基础配置 { - files: ['**/*.{js,mjs,cjs,ts,tsx,vue}'], + files: ["**/*.{js,mjs,cjs,ts,tsx,vue}"], }, { languageOptions: { @@ -106,85 +106,85 @@ export default [ }, pluginJs.configs.recommended, ...tseslint.configs.recommended, - ...pluginVue.configs['flat/essential'], + ...pluginVue.configs["flat/essential"], // 全局配置 { - files: ['**/*.{js,mjs,cjs,ts,tsx,vue}'], + files: ["**/*.{js,mjs,cjs,ts,tsx,vue}"], languageOptions: { globals: { ...autoImportConfig.globals, - Api: 'readonly', + Api: "readonly", ...elementPlusComponents, // 全局类型定义 - PageQuery: 'readonly', - PageResult: 'readonly', - UserListItem: 'readonly', - UserSearchParams: 'readonly', - RoleListItem: 'readonly', - RoleSearchParams: 'readonly', - OptionType: 'readonly', - ApiResponse: 'readonly', - ExcelResult: 'readonly', - CommonType: 'readonly', - updatorType: 'readonly', - creatorType: 'readonly', - AppSettings: 'readonly', - __APP_INFO__: 'readonly', - UploadFilePath: 'readonly', + PageQuery: "readonly", + PageResult: "readonly", + UserListItem: "readonly", + UserSearchParams: "readonly", + RoleListItem: "readonly", + RoleSearchParams: "readonly", + OptionType: "readonly", + ApiResponse: "readonly", + ExcelResult: "readonly", + CommonType: "readonly", + updatorType: "readonly", + creatorType: "readonly", + AppSettings: "readonly", + __APP_INFO__: "readonly", + UploadFilePath: "readonly", }, }, rules: { // 代码风格 - quotes: ['error', 'single'], - semi: ['error', 'never'], - 'no-var': 'error', - 'prefer-const': 'error', - 'object-shorthand': 'error', + quotes: ["error", "single"], + semi: ["error", "never"], + "no-var": "error", + "prefer-const": "error", + "object-shorthand": "error", // 最佳实践 - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'eqeqeq': 'off', - 'no-multi-spaces': 'error', - 'no-multiple-empty-lines': ['warn', { max: 1 }], - 'no-unexpected-multiline': 'error', + "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", + "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", + "eqeqeq": "off", + "no-multi-spaces": "error", + "no-multiple-empty-lines": ["warn", { max: 1 }], + "no-unexpected-multiline": "error", // TypeScript 规则 - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-empty-object-type': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-unused-vars': 'warn', + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-unused-vars": "warn", // Vue 规则 - 'vue/multi-word-component-names': 'off', - 'vue/no-v-html': 'off', - 'vue/require-default-prop': 'off', - 'vue/require-explicit-emits': 'error', - 'vue/no-unused-vars': 'error', - 'vue/no-mutating-props': 'off', - 'vue/valid-v-for': 'warn', - 'vue/no-template-shadow': 'warn', - 'vue/return-in-computed-property': 'warn', - 'vue/block-order': ['error', { order: ['template', 'script', 'style'] }], - 'vue/html-self-closing': [ - 'error', + "vue/multi-word-component-names": "off", + "vue/no-v-html": "off", + "vue/require-default-prop": "off", + "vue/require-explicit-emits": "error", + "vue/no-unused-vars": "error", + "vue/no-mutating-props": "off", + "vue/valid-v-for": "warn", + "vue/no-template-shadow": "warn", + "vue/return-in-computed-property": "warn", + "vue/block-order": ["error", { order: ["template", "script", "style"] }], + "vue/html-self-closing": [ + "error", { - html: { void: 'always', normal: 'never', component: 'always' }, - svg: 'always', - math: 'always', + html: { void: "always", normal: "never", component: "always" }, + svg: "always", + math: "always", }, ], - 'vue/component-name-in-template-casing': ['error', 'PascalCase'], + "vue/component-name-in-template-casing": ["error", "PascalCase"], }, }, // Pin TypeScript project root so @typescript-eslint/parser resolves tsconfig consistently. { - files: ['**/*.{ts,tsx,mts,cts}'], + files: ["**/*.{ts,tsx,mts,cts}"], languageOptions: { parserOptions: { tsconfigRootDir: __dirname, @@ -194,7 +194,7 @@ export default [ // Vue 文件特定配置 { - files: ['**/*.vue'], + files: ["**/*.vue"], languageOptions: { parserOptions: { parser: tseslint.parser, @@ -205,4 +205,4 @@ export default [ // prettier 配置 eslintPluginPrettierRecommended, -] +]; diff --git a/frontend/web/src/components/layouts/fa-global-search/index.vue b/frontend/web/src/components/layouts/fa-global-search/index.vue index 876c514d..c1181258 100644 --- a/frontend/web/src/components/layouts/fa-global-search/index.vue +++ b/frontend/web/src/components/layouts/fa-global-search/index.vue @@ -367,27 +367,27 @@ const highlightOnHoverHistory = (index: number) => { diff --git a/frontend/web/src/components/layouts/fa-menus/fa-mixed-menu/index.vue b/frontend/web/src/components/layouts/fa-menus/fa-mixed-menu/index.vue index 9092a096..5d6588ee 100644 --- a/frontend/web/src/components/layouts/fa-menus/fa-mixed-menu/index.vue +++ b/frontend/web/src/components/layouts/fa-menus/fa-mixed-menu/index.vue @@ -248,13 +248,13 @@ onMounted(initScrollState); diff --git a/frontend/web/src/components/others/fa-icon-select/index.vue b/frontend/web/src/components/others/fa-icon-select/index.vue index 8ab9aea0..a27f94dd 100644 --- a/frontend/web/src/components/others/fa-icon-select/index.vue +++ b/frontend/web/src/components/others/fa-icon-select/index.vue @@ -181,8 +181,8 @@ onMounted(() => { diff --git a/frontend/web/src/components/others/fa-upload/index.vue b/frontend/web/src/components/others/fa-upload/index.vue index 108ddcf7..34991428 100644 --- a/frontend/web/src/components/others/fa-upload/index.vue +++ b/frontend/web/src/components/others/fa-upload/index.vue @@ -464,7 +464,7 @@ const onError = (error: any) => { } } -::deep(.el-upload--picture-card) { +::v-deep(.el-upload--picture-card) { position: relative; width: v-bind("props.style.width ?? '150px'"); height: v-bind("props.style.height ?? '150px'"); diff --git a/frontend/web/src/components/tables/fa-table/style.scss b/frontend/web/src/components/tables/fa-table/style.scss index 00b6daff..c8062ef0 100644 --- a/frontend/web/src/components/tables/fa-table/style.scss +++ b/frontend/web/src/components/tables/fa-table/style.scss @@ -7,7 +7,7 @@ margin-top: 10px; } - ::deep(.el-loading-mask) { + :deep(.el-loading-mask) { z-index: 100; background-color: var(--default-box-color) !important; } @@ -23,7 +23,7 @@ // 空状态垂直居中 &.is-empty { - ::deep(.el-scrollbar__wrap) { + :deep(.el-scrollbar__wrap) { display: flex; } } @@ -32,7 +32,7 @@ display: flex; margin-top: 13px; - ::deep(.el-select) { + :deep(.el-select) { width: 102px !important; } @@ -51,7 +51,7 @@ // 自定义分页组件样式 &.custom-pagination { - ::deep(.el-pagination) { + :deep(.el-pagination) { .btn-prev, .btn-next { background-color: transparent; @@ -89,7 +89,7 @@ // 移动端分页 @media (width <= 640px) { - ::deep(.el-pagination) { + :deep(.el-pagination) { display: flex; flex-wrap: wrap; gap: 15px 0; diff --git a/frontend/web/src/components/theme/fa-theme-svg/index.vue b/frontend/web/src/components/theme/fa-theme-svg/index.vue index 8561eafe..83cab0f0 100644 --- a/frontend/web/src/components/theme/fa-theme-svg/index.vue +++ b/frontend/web/src/components/theme/fa-theme-svg/index.vue @@ -88,7 +88,7 @@ watchEffect(() => { width: 100%; height: 100%; - ::deep(svg) { + ::v-deep(svg) { width: 100%; height: 100%; } diff --git a/frontend/web/src/components/views/fa-login/AuthTopBar.vue b/frontend/web/src/components/views/fa-login/AuthTopBar.vue index 9ff3445f..b40dd0f1 100644 --- a/frontend/web/src/components/views/fa-login/AuthTopBar.vue +++ b/frontend/web/src/components/views/fa-login/AuthTopBar.vue @@ -256,7 +256,7 @@ const changeThemeColor = (color: string) => { transform: translateY(-2px); } -.auth-top-bar__action:hover ::deep(.fa-svg-icon) { +.auth-top-bar__action:hover ::v-deep(.fa-svg-icon) { color: var(--el-color-primary); } @@ -314,15 +314,15 @@ const changeThemeColor = (color: string) => { } /* 调色盘:图标颜色与当前主题主色一致(含单独悬浮、整块调色区悬浮) */ -.palette-btn ::deep(.fa-svg-icon) { +.palette-btn ::v-deep(.fa-svg-icon) { color: v-bind("themeColorForCss"); } -.auth-top-bar__action.palette-btn:hover ::deep(.fa-svg-icon) { +.auth-top-bar__action.palette-btn:hover ::v-deep(.fa-svg-icon) { color: v-bind("themeColorForCss"); } -.color-picker-expandable:hover .palette-btn ::deep(.fa-svg-icon) { +.color-picker-expandable:hover .palette-btn ::v-deep(.fa-svg-icon) { color: v-bind("themeColorForCss"); } diff --git a/frontend/web/src/views/current/profile.vue b/frontend/web/src/views/current/profile.vue index 45093b9b..030c02b2 100644 --- a/frontend/web/src/views/current/profile.vue +++ b/frontend/web/src/views/current/profile.vue @@ -609,7 +609,7 @@ onMounted(async () => { bottom: 0; z-index: 2; - ::deep(.el-upload) { + ::v-deep(.el-upload) { display: inline-flex; } diff --git a/frontend/web/src/views/dashboard/article/components/ArticleDetailDrawer.vue b/frontend/web/src/views/dashboard/article/components/ArticleDetailDrawer.vue index af423121..618fe8a1 100644 --- a/frontend/web/src/views/dashboard/article/components/ArticleDetailDrawer.vue +++ b/frontend/web/src/views/dashboard/article/components/ArticleDetailDrawer.vue @@ -127,12 +127,12 @@ watch( .article-detail-markdown { margin-top: 8px; - ::deep(img) { + ::v-deep(img) { width: 100%; border: 1px solid var(--fa-gray-200); } - ::deep(pre) { + ::v-deep(pre) { position: relative; &:hover { @@ -152,11 +152,11 @@ watch( } } - ::deep(.code-wrapper) { + ::v-deep(.code-wrapper) { overflow-x: auto; } - ::deep(.line-number) { + ::v-deep(.line-number) { position: sticky; left: 0; z-index: 2; @@ -169,7 +169,7 @@ watch( text-align: center; } - ::deep(.copy-button) { + ::v-deep(.copy-button) { position: absolute; top: 6px; right: 6px; diff --git a/frontend/web/src/views/dashboard/console/modules/new-user.vue b/frontend/web/src/views/dashboard/console/modules/new-user.vue index 48c8e736..1194f69c 100755 --- a/frontend/web/src/views/dashboard/console/modules/new-user.vue +++ b/frontend/web/src/views/dashboard/console/modules/new-user.vue @@ -164,7 +164,7 @@ onMounted(() => { diff --git a/frontend/web/src/views/module_application/portal/index.vue b/frontend/web/src/views/module_application/portal/index.vue index 21d04103..ac535223 100644 --- a/frontend/web/src/views/module_application/portal/index.vue +++ b/frontend/web/src/views/module_application/portal/index.vue @@ -343,7 +343,7 @@ const { }, }); -const formData = reactive({ +const formData = ref({ name: "", access_url: "", icon_url: "", @@ -471,10 +471,10 @@ async function handleSubmit() { await formRef.value?.validate(); if (dialogType.value === "create") { - await ApplicationAPI.createApp(formData); + await ApplicationAPI.createApp(formData.value); await refreshCreate(); } else { - await ApplicationAPI.updateApp(currentApp.value!.id!, formData); + await ApplicationAPI.updateApp(currentApp.value!.id!, formData.value); await refreshUpdate(); } @@ -532,12 +532,12 @@ async function handleSubmit() { opacity: 0.55; } - ::deep(.el-card__header) { + ::v-deep(.el-card__header) { padding: 14px 14px 12px; border-bottom: none; } - ::deep(.el-card__body) { + ::v-deep(.el-card__body) { display: flex; flex: 1; flex-direction: column; @@ -546,7 +546,7 @@ async function handleSubmit() { padding: 12px 14px; } - ::deep(.el-card__footer) { + ::v-deep(.el-card__footer) { padding: 10px 14px 14px; margin-top: auto; } @@ -634,11 +634,11 @@ async function handleSubmit() { } } -.crud-dialog-art-form ::deep(.el-row > .el-col:last-child) { +.crud-dialog-art-form ::v-deep(.el-row > .el-col:last-child) { display: none; } -.crud-dialog-art-form ::deep(.el-form-item__content) { +.crud-dialog-art-form ::v-deep(.el-form-item__content) { max-width: 100%; } diff --git a/frontend/web/src/views/module_example/demo/index.vue b/frontend/web/src/views/module_example/demo/index.vue index f8c7a0c1..36c2b4e1 100644 --- a/frontend/web/src/views/module_example/demo/index.vue +++ b/frontend/web/src/views/module_example/demo/index.vue @@ -497,7 +497,7 @@ const dialogVisible = reactive({ const detailFormData = ref({}); -const formData = reactive({ +const formData = ref({ id: undefined, name: "", status: "0", @@ -620,15 +620,15 @@ async function openEditDialog(type: "add" | "edit", row?: DemoTable) { dialogVisible.type = type === "add" ? "create" : "update"; if (type === "add") { dialogVisible.title = "新增示例"; - Object.assign(formData, initialFormData); - formData.id = undefined; + Object.assign(formData.value, initialFormData); + formData.value.id = undefined; metadataList.value = []; } else if (row?.id) { dialogVisible.title = "修改"; const response = await DemoAPI.getDemoDetail(row.id); - Object.assign(formData, response.data.data); - if (formData.i && typeof formData.i === "object") { - metadataList.value = Object.entries(formData.i).map(([key, value]) => ({ + Object.assign(formData.value, response.data.data); + if (formData.value.i && typeof formData.value.i === "object") { + metadataList.value = Object.entries(formData.value.i).map(([key, value]) => ({ key, value: String(value), })); @@ -644,7 +644,7 @@ async function resetForm() { dataFormRef.value.resetFields(); dataFormRef.value.clearValidate(); } - Object.assign(formData, initialFormData); + Object.assign(formData.value, initialFormData); metadataList.value = []; } @@ -656,7 +656,7 @@ async function handleCloseDialog() { async function handleSubmit() { dataFormRef.value.validate(async (valid: boolean) => { if (!valid) return; - const submitData = { ...formData }; + const submitData = { ...formData.value }; if (metadataList.value.length > 0) { const metadataObj: Record = {}; metadataList.value.forEach((item) => { @@ -668,7 +668,7 @@ async function handleSubmit() { } else { submitData.i = undefined; } - const id = formData.id; + const id = formData.value.id; try { if (id) { await DemoAPI.updateDemo(id, { id, ...submitData }); diff --git a/frontend/web/src/views/module_example/demo01/index.vue b/frontend/web/src/views/module_example/demo01/index.vue index 35939f7e..fcf65a3c 100644 --- a/frontend/web/src/views/module_example/demo01/index.vue +++ b/frontend/web/src/views/module_example/demo01/index.vue @@ -368,7 +368,7 @@ const dialogVisible = reactive({ const detailFormData = ref({}); -const formData = reactive({ +const formData = ref({ id: undefined, name: "", status: "0", @@ -499,12 +499,12 @@ async function openEditDialog(type: "add" | "edit", row?: Demo01Table) { dialogVisible.type = type === "add" ? "create" : "update"; if (type === "add") { dialogVisible.title = "新增示例01"; - Object.assign(formData, initialFormData); - formData.id = undefined; + Object.assign(formData.value, initialFormData); + formData.value.id = undefined; } else if (row?.id) { dialogVisible.title = "修改"; const response = await Demo01API.getDemo01Detail(row.id); - Object.assign(formData, response.data.data); + Object.assign(formData.value, response.data.data); } demo01FormRenderKey.value += 1; dialogVisible.visible = true; @@ -513,7 +513,7 @@ async function openEditDialog(type: "add" | "edit", row?: Demo01Table) { async function resetForm() { dataFormRef.value?.ref?.resetFields(); dataFormRef.value?.ref?.clearValidate(); - Object.assign(formData, initialFormData); + Object.assign(formData.value, initialFormData); } async function handleCloseDialog() { @@ -524,13 +524,13 @@ async function handleCloseDialog() { async function handleSubmit() { dataFormRef.value?.validate(async (valid: boolean) => { if (!valid) return; - const id = formData.id; + const id = formData.value.id; try { if (id) { - await Demo01API.updateDemo01(id, { id, ...formData }); + await Demo01API.updateDemo01(id, { id, ...formData.value }); await refreshUpdate(); } else { - await Demo01API.createDemo01(formData); + await Demo01API.createDemo01(formData.value); await refreshCreate(); } dialogVisible.visible = false; @@ -627,11 +627,11 @@ function openExportModal() { diff --git a/frontend/web/src/views/module_generator/gencode/components/CreateTableDialog.vue b/frontend/web/src/views/module_generator/gencode/components/CreateTableDialog.vue index 0f6afff4..b5d7aa95 100644 --- a/frontend/web/src/views/module_generator/gencode/components/CreateTableDialog.vue +++ b/frontend/web/src/views/module_generator/gencode/components/CreateTableDialog.vue @@ -426,7 +426,7 @@ function handleCancel() { position: relative; } -.visual-pane ::deep(.el-textarea__inner) { +.visual-pane ::v-deep(.el-textarea__inner) { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; } @@ -437,20 +437,20 @@ function handleCancel() { /* 表结构:描述列表表格化,标签列对齐、内容区可伸缩 */ .visual-structure { .visual-desc { - ::deep(.el-descriptions__label) { + ::v-deep(.el-descriptions__label) { width: 108px; vertical-align: middle; } - ::deep(.el-descriptions__cell) { + ::v-deep(.el-descriptions__cell) { vertical-align: middle; } - ::deep(.el-descriptions__content) { + ::v-deep(.el-descriptions__content) { min-width: 0; } - ::deep(.el-descriptions__title) { + ::v-deep(.el-descriptions__title) { margin-bottom: 8px; } } diff --git a/frontend/web/src/views/module_generator/gencode/components/GenBasicStep.vue b/frontend/web/src/views/module_generator/gencode/components/GenBasicStep.vue index 8b9af147..5c52f85b 100644 --- a/frontend/web/src/views/module_generator/gencode/components/GenBasicStep.vue +++ b/frontend/web/src/views/module_generator/gencode/components/GenBasicStep.vue @@ -352,15 +352,15 @@ onUnmounted(() => { min-width: 0; } -.gen-basic-step ::deep(.el-col) { +.gen-basic-step ::v-deep(.el-col) { min-width: 0; } -.gen-basic-step ::deep(.el-form-item__content) { +.gen-basic-step ::v-deep(.el-form-item__content) { min-width: 0; } -.gen-basic-step ::deep(.el-input-group) { +.gen-basic-step ::v-deep(.el-input-group) { width: 100%; min-width: 0; max-width: 100%; @@ -383,11 +383,11 @@ onUnmounted(() => { border: 1px solid var(--el-border-color-lighter); } -.master-sub-card ::deep(.el-card__header) { +.master-sub-card ::v-deep(.el-card__header) { padding: 8px 10px; } -.master-sub-card ::deep(.el-card__body) { +.master-sub-card ::v-deep(.el-card__body) { padding: 10px; } @@ -396,7 +396,7 @@ onUnmounted(() => { border: 1px solid var(--el-border-color-lighter); } -.gen-form-card ::deep(.el-card__body) { +.gen-form-card ::v-deep(.el-card__body) { overflow-x: hidden; } @@ -425,7 +425,7 @@ onUnmounted(() => { border-bottom: 1px solid var(--el-border-color-lighter); } -.gen-echo-card ::deep(.el-card__body) { +.gen-echo-card ::v-deep(.el-card__body) { padding: 6px 8px; } diff --git a/frontend/web/src/views/module_generator/gencode/components/GencodeHelpPanel.vue b/frontend/web/src/views/module_generator/gencode/components/GencodeHelpPanel.vue index 92054f87..a9b0e2dd 100644 --- a/frontend/web/src/views/module_generator/gencode/components/GencodeHelpPanel.vue +++ b/frontend/web/src/views/module_generator/gencode/components/GencodeHelpPanel.vue @@ -66,18 +66,18 @@ const rows = [ border-radius: var(--el-border-radius-base); } -.gencode-help-collapse ::deep(.el-collapse-item__header) { +.gencode-help-collapse ::v-deep(.el-collapse-item__header) { padding: 8px 12px; font-size: 13px; font-weight: 500; background: var(--el-fill-color-light); } -.gencode-help-collapse ::deep(.el-collapse-item__wrap) { +.gencode-help-collapse ::v-deep(.el-collapse-item__wrap) { border-top: 1px solid var(--el-border-color-lighter); } -.gencode-help-collapse ::deep(.el-collapse-item__content) { +.gencode-help-collapse ::v-deep(.el-collapse-item__content) { padding: 10px 12px 12px; } @@ -91,7 +91,7 @@ const rows = [ flex-shrink: 0; } -.gencode-rules-table ::deep(.el-table__cell) { +.gencode-rules-table ::v-deep(.el-table__cell) { font-size: 12px; } diff --git a/frontend/web/src/views/module_generator/gencode/index.vue b/frontend/web/src/views/module_generator/gencode/index.vue index 48b097f0..71c77e1d 100644 --- a/frontend/web/src/views/module_generator/gencode/index.vue +++ b/frontend/web/src/views/module_generator/gencode/index.vue @@ -90,7 +90,7 @@ ([]); // 导入弹窗专用状态 const importLoading = ref(false); const importTotal = ref(0); -const importQueryFormData = ref({ +const formData = ref({ page_no: 1, page_size: 10, table_name: undefined, @@ -1009,7 +1009,7 @@ async function handleImportTable(): Promise { async function getDbList(): Promise { importLoading.value = true; try { - const res = await GencodeAPI.listDbTable(importQueryFormData.value); + const res = await GencodeAPI.listDbTable(formData.value); if (res.data && res.data.data) { dbTableList.value = res.data.data.items; importTotal.value = res.data.data.total; @@ -1023,7 +1023,7 @@ async function getDbList(): Promise { /** 导入弹窗搜索按钮操作 */ async function handleImportQuery(): Promise { - importQueryFormData.value.page_no = 1; + formData.value.page_no = 1; await getDbList(); } diff --git a/frontend/web/src/views/module_monitor/cache/index.vue b/frontend/web/src/views/module_monitor/cache/index.vue index 46deaa81..9ad49061 100644 --- a/frontend/web/src/views/module_monitor/cache/index.vue +++ b/frontend/web/src/views/module_monitor/cache/index.vue @@ -567,7 +567,7 @@ onUnmounted(() => { flex-direction: column; min-height: 0; - ::deep(.el-card__body) { + ::v-deep(.el-card__body) { display: flex; flex: 1; flex-direction: column; @@ -607,7 +607,7 @@ onUnmounted(() => { flex-direction: column; min-height: 0; - ::deep(.el-card__body) { + ::v-deep(.el-card__body) { display: flex; flex: 1; flex-direction: column; diff --git a/frontend/web/src/views/module_monitor/resource/index.vue b/frontend/web/src/views/module_monitor/resource/index.vue index 46e80f9a..a251f313 100644 --- a/frontend/web/src/views/module_monitor/resource/index.vue +++ b/frontend/web/src/views/module_monitor/resource/index.vue @@ -633,14 +633,14 @@ async function handleBatchDelete() { diff --git a/frontend/web/src/views/module_system/dict/components/DataDrawer.vue b/frontend/web/src/views/module_system/dict/components/DataDrawer.vue index 01d9a91d..645e58ac 100644 --- a/frontend/web/src/views/module_system/dict/components/DataDrawer.vue +++ b/frontend/web/src/views/module_system/dict/components/DataDrawer.vue @@ -541,7 +541,7 @@ const dialogVisible = reactive({ const detailFormData = ref({}); -const formData = reactive({ +const formData = ref({ id: undefined, dict_sort: 1, dict_label: "", @@ -715,11 +715,11 @@ async function handleOpenDialog(type: "create" | "update" | "detail", id?: numbe } } else { dialogVisible.title = "新增字典数据"; - Object.assign(formData, initialFormData); - formData.dict_type = props.dictType; - formData.dict_type_id = props.dictTypeId; - formData.status = "0"; - formData.id = undefined; + Object.assign(formData.value, initialFormData); + formData.value.dict_type = props.dictType; + formData.value.dict_type_id = props.dictTypeId; + formData.value.status = "0"; + formData.value.id = undefined; } dictDataFormRenderKey.value += 1; dialogVisible.visible = true; @@ -728,20 +728,20 @@ async function handleOpenDialog(type: "create" | "update" | "detail", id?: numbe async function handleSubmit() { dataFormRef.value?.validate(async (valid: boolean) => { if (!valid) return; - const id = formData.id; + const id = formData.value.id; try { if (id) { - await DictAPI.updateDictData(id, { id, ...formData }); + await DictAPI.updateDictData(id, { id, ...formData.value }); await refreshUpdate(); } else { - await DictAPI.createDictData(formData); + await DictAPI.createDictData(formData.value); await refreshCreate(); } dialogVisible.visible = false; await resetForm(); dictStore.clearDictData(); - if (formData.dict_type) { - await dictStore.getDict([formData.dict_type]); + if (formData.value.dict_type) { + await dictStore.getDict([formData.value.dict_type]); } } catch (error: unknown) { console.error(error); @@ -890,11 +890,11 @@ function openExportModal() { border-color: var(--el-border-color-lighter); } -.crud-dialog-art-form ::deep(.el-row > .el-col:last-child) { +.crud-dialog-art-form ::v-deep(.el-row > .el-col:last-child) { display: none; } -.crud-dialog-art-form ::deep(.el-form-item__content) { +.crud-dialog-art-form ::v-deep(.el-form-item__content) { max-width: 100%; } diff --git a/frontend/web/src/views/module_system/dict/index.vue b/frontend/web/src/views/module_system/dict/index.vue index 4fc38dde..b6a19a9f 100644 --- a/frontend/web/src/views/module_system/dict/index.vue +++ b/frontend/web/src/views/module_system/dict/index.vue @@ -359,7 +359,7 @@ const dialogVisible = reactive({ const detailFormData = ref({}); -const formData = reactive({ +const formData = ref({ id: undefined, dict_name: "", dict_type: "", @@ -529,8 +529,8 @@ async function handleOpenDialog(type: "create" | "update" | "detail", id?: numbe } } else { dialogVisible.title = "新增字典"; - Object.assign(formData, initialFormData); - formData.id = undefined; + Object.assign(formData.value, initialFormData); + formData.value.id = undefined; } dictFormRenderKey.value += 1; dialogVisible.visible = true; @@ -539,20 +539,20 @@ async function handleOpenDialog(type: "create" | "update" | "detail", id?: numbe async function handleSubmit() { dataFormRef.value?.validate(async (valid: boolean) => { if (!valid) return; - const id = formData.id; + const id = formData.value.id; try { if (id) { - await DictAPI.updateDictType(id, { id, ...formData }); + await DictAPI.updateDictType(id, { id, ...formData.value }); await refreshUpdate(); } else { - await DictAPI.createDictType(formData); + await DictAPI.createDictType(formData.value); await refreshCreate(); } dialogVisible.visible = false; await resetForm(); dictStore.clearDictData(); - if (formData.dict_type) { - await dictStore.getDict([formData.dict_type]); + if (formData.value.dict_type) { + await dictStore.getDict([formData.value.dict_type]); } } catch (error: unknown) { console.error(error); @@ -636,11 +636,11 @@ function openExportModal() { diff --git a/frontend/web/src/views/module_system/log/index.vue b/frontend/web/src/views/module_system/log/index.vue index 531a1a6c..24e61634 100644 --- a/frontend/web/src/views/module_system/log/index.vue +++ b/frontend/web/src/views/module_system/log/index.vue @@ -446,7 +446,7 @@ function onResetSearch() { } async function resetForm() { - formData.value = {}; + Object.assign(formData, {}); } async function handleCloseDialog() { @@ -457,7 +457,7 @@ async function handleCloseDialog() { async function handleOpenDialog(id: number) { dialogVisible.value.title = "日志详情"; const response = await LogAPI.detailLog(id); - Object.assign(formData.value, response.data.data ?? {}); + Object.assign(formData, response.data.data ?? {}); dialogVisible.value.visible = true; } diff --git a/frontend/web/src/views/module_system/menu/index.vue b/frontend/web/src/views/module_system/menu/index.vue index 2531d9a7..f58fcbb8 100644 --- a/frontend/web/src/views/module_system/menu/index.vue +++ b/frontend/web/src/views/module_system/menu/index.vue @@ -692,7 +692,7 @@ const createParentLocked = ref(false); const detailFormData = ref({}); -const formData = reactive({ +const formData = ref({ id: undefined, name: undefined, type: MenuTypeEnum.CATALOG, @@ -959,7 +959,7 @@ const rules = reactive({ redirect: [ { validator: (_rule: unknown, value: string | undefined, callback: (e?: Error) => void) => { - if (formData.type === MenuTypeEnum.CATALOG) { + if (formData.value.type === MenuTypeEnum.CATALOG) { if (value === undefined || value === null || String(value).trim() === "") { callback(new Error("目录类型必须填写重定向地址")); return; @@ -1012,7 +1012,7 @@ async function handleRowClick(row: MenuTable) { } const allowedMenuTypeValues = computed(() => { - const pid = formData.parent_id; + const pid = formData.value.parent_id; const parentNode = findMenuNodeById(pid); if (!parentNode?.type) { return [MenuTypeEnum.CATALOG, MenuTypeEnum.MENU, MenuTypeEnum.EXTLINK]; @@ -1046,28 +1046,28 @@ async function handleOpenDialog( dialogVisible.title = "新增菜单"; Object.assign(formData, initialFormData); if (parentRow?.id != null) { - formData.parent_id = parentRow.id; - formData.client = (parentRow.client as MenuClientEnum) || menuClientTab.value; + formData.value.parent_id = parentRow.id; + formData.value.client = (parentRow.client as MenuClientEnum) || menuClientTab.value; if (parentRow.type === MenuTypeEnum.MENU) { createParentLocked.value = true; - formData.type = MenuTypeEnum.BUTTON; + formData.value.type = MenuTypeEnum.BUTTON; } else if (parentRow.type === MenuTypeEnum.CATALOG) { - formData.type = MenuTypeEnum.MENU; + formData.value.type = MenuTypeEnum.MENU; } } else { - formData.client = menuClientTab.value; + formData.value.client = menuClientTab.value; } } dialogVisible.visible = true; } function handleMenuTypeChange() { - if (formData.type === MenuTypeEnum.MENU) { - formData.component_path = ""; + if (formData.value.type === MenuTypeEnum.MENU) { + formData.value.component_path = ""; } nextTick(() => { dataFormRef.value?.clearValidate("redirect"); - if (formData.type === MenuTypeEnum.CATALOG) { + if (formData.value.type === MenuTypeEnum.CATALOG) { dataFormRef.value?.validateField("redirect").catch(() => {}); } }); @@ -1076,19 +1076,19 @@ function handleMenuTypeChange() { async function handleSubmit() { const allowed = allowedMenuTypeValues.value; if (!allowed.length) return; - const t = formData.type as MenuTypeEnum; + const t = formData.value.type as MenuTypeEnum; if (!allowed.includes(t)) { - formData.type = allowed[0] as MenuForm["type"]; + formData.value.type = allowed[0] as MenuForm["type"]; } dataFormRef.value?.validate(async (valid: boolean) => { if (!valid) return; submitLoading.value = true; - const id = formData.id; + const id = formData.value.id; try { if (id) { - await MenuAPI.updateMenu(id, { id, ...formData }); + await MenuAPI.updateMenu(id, { id, ...formData.value }); } else { - await MenuAPI.createMenu(formData); + await MenuAPI.createMenu(formData.value); } dialogVisible.visible = false; await resetForm(); @@ -1153,7 +1153,7 @@ onMounted(() => { diff --git a/frontend/web/src/views/module_system/notice/index.vue b/frontend/web/src/views/module_system/notice/index.vue index 4730dd15..64c54712 100644 --- a/frontend/web/src/views/module_system/notice/index.vue +++ b/frontend/web/src/views/module_system/notice/index.vue @@ -450,7 +450,7 @@ const detailHasRenderableContent = computed(() => { return plain.length > 0; }); -const formData = reactive({ +const formData = ref({ id: undefined, notice_title: "", notice_type: "", @@ -606,8 +606,8 @@ async function handleOpenDialog(type: "create" | "update" | "detail", id?: numbe } } else { dialogVisible.title = "新增公告通知"; - Object.assign(formData, initialFormData); - formData.id = undefined; + Object.assign(formData.value, initialFormData); + formData.value.id = undefined; } noticeFormRenderKey.value += 1; dialogVisible.visible = true; @@ -617,13 +617,13 @@ async function handleSubmit() { dataFormRef.value?.validate(async (valid: boolean) => { if (!valid) return; submitLoading.value = true; - const id = formData.id; + const id = formData.value.id; try { if (id) { - await NoticeAPI.updateNotice(id, { id, ...formData }); + await NoticeAPI.updateNotice(id, { id, ...formData.value }); await refreshUpdate(); } else { - await NoticeAPI.createNotice(formData); + await NoticeAPI.createNotice(formData.value); await refreshCreate(); } dialogVisible.visible = false; @@ -747,11 +747,11 @@ onMounted(async () => { diff --git a/frontend/web/src/views/module_system/position/index.vue b/frontend/web/src/views/module_system/position/index.vue index 2dc1ad75..9ab55fdf 100644 --- a/frontend/web/src/views/module_system/position/index.vue +++ b/frontend/web/src/views/module_system/position/index.vue @@ -524,7 +524,7 @@ const positionExportContentConfig = computed(() => ({ const detailFormData = ref({}); -const formData = reactive({ +const formData = ref({ id: undefined, name: undefined, order: 1, @@ -649,8 +649,8 @@ async function handleOpenDialog(type: "create" | "update" | "detail", id?: numbe } } else { dialogVisible.title = "新增岗位"; - Object.assign(formData, initialFormData); - formData.id = undefined; + Object.assign(formData.value, initialFormData); + formData.value.id = undefined; } positionFormRenderKey.value += 1; dialogVisible.visible = true; @@ -660,13 +660,13 @@ async function handleSubmit() { dataFormRef.value?.validate(async (valid: boolean) => { if (!valid) return; submitLoading.value = true; - const id = formData.id; + const id = formData.value.id; try { if (id) { - await PositionAPI.updatePosition(id, { id, ...formData }); + await PositionAPI.updatePosition(id, { id, ...formData.value }); await refreshUpdate(); } else { - await PositionAPI.createPosition(formData); + await PositionAPI.createPosition(formData.value); await refreshCreate(); } dialogVisible.visible = false; @@ -728,15 +728,15 @@ function handleMoreClick(status: string) { diff --git a/frontend/web/src/views/module_system/role/index.vue b/frontend/web/src/views/module_system/role/index.vue index 4638524f..54f68786 100644 --- a/frontend/web/src/views/module_system/role/index.vue +++ b/frontend/web/src/views/module_system/role/index.vue @@ -547,7 +547,7 @@ const roleExportContentConfig = computed(() => ({ const detailFormData = ref({} as RoleTable); -const formData = reactive({ +const formData = ref({ id: undefined, name: undefined, order: 1, @@ -684,8 +684,8 @@ async function handleOpenDialog(type: "create" | "update" | "detail", id?: numbe } } else { dialogVisible.title = "新增角色"; - Object.assign(formData, initialFormData); - formData.id = undefined; + Object.assign(formData.value, initialFormData); + formData.value.id = undefined; } roleFormRenderKey.value += 1; dialogVisible.visible = true; @@ -695,13 +695,13 @@ async function handleSubmit() { dataFormRef.value?.validate(async (valid: boolean) => { if (!valid) return; submitLoading.value = true; - const id = formData.id; + const id = formData.value.id; try { if (id) { - await RoleAPI.updateRole(id, { id, ...formData }); + await RoleAPI.updateRole(id, { id, ...formData.value }); await refreshUpdate(); } else { - await RoleAPI.createRole(formData); + await RoleAPI.createRole(formData.value); await refreshCreate(); } dialogVisible.visible = false; @@ -766,15 +766,15 @@ function openExportModal() { diff --git a/frontend/web/src/views/module_system/tenant/index.vue b/frontend/web/src/views/module_system/tenant/index.vue index 579cc65c..e58f2a83 100644 --- a/frontend/web/src/views/module_system/tenant/index.vue +++ b/frontend/web/src/views/module_system/tenant/index.vue @@ -440,7 +440,7 @@ const detailFormData = ref({ code: "", name: "", status: "0" }); const currentEditId = ref(null); -const formData = reactive({ +const formData = ref({ name: "", code: "", status: "0", @@ -458,7 +458,11 @@ const dialogVisible = reactive({ const CODE_PATTERN = /^[A-Za-z0-9]+$/; const validateTimeRange = (rule: unknown, value: unknown, callback: (e?: Error) => void) => { - if (formData.start_time && formData.end_time && formData.start_time > formData.end_time) { + if ( + formData.value.start_time && + formData.value.end_time && + formData.value.start_time > formData.value.end_time + ) { callback(new Error("结束时间不能早于开始时间")); } else { callback(); @@ -618,18 +622,18 @@ async function handleSubmit() { try { if (id) { const payload: TenantUpdateForm = { - name: formData.name, - start_time: formData.start_time, - end_time: formData.end_time, + name: formData.value.name, + start_time: formData.value.start_time, + end_time: formData.value.end_time, }; await TenantAPI.updateTenant(id, payload); await refreshUpdate(); } else { const payload: TenantCreateForm = { - name: formData.name as string, - code: formData.code as string, - start_time: formData.start_time, - end_time: formData.end_time, + name: formData.value.name as string, + code: formData.value.code as string, + start_time: formData.value.start_time, + end_time: formData.value.end_time, }; await TenantAPI.createTenant(payload); await refreshCreate(); @@ -668,15 +672,15 @@ function handleBatchDelete() { diff --git a/frontend/web/src/views/module_system/user/components/UserTableSelect.vue b/frontend/web/src/views/module_system/user/components/UserTableSelect.vue index 93e06cea..675858ce 100644 --- a/frontend/web/src/views/module_system/user/components/UserTableSelect.vue +++ b/frontend/web/src/views/module_system/user/components/UserTableSelect.vue @@ -1,6 +1,6 @@ - + diff --git a/frontend/web/src/views/module_task/workflow/components/NodeConfigPanel.vue b/frontend/web/src/views/module_task/workflow/components/NodeConfigPanel.vue index 82fce6bd..16012672 100644 --- a/frontend/web/src/views/module_task/workflow/components/NodeConfigPanel.vue +++ b/frontend/web/src/views/module_task/workflow/components/NodeConfigPanel.vue @@ -159,13 +159,13 @@ watch( } } - formData.value = { + Object.assign(formData, { type: newNode.type || "", label: newNode.data?.label || "", args: newNode.data?.args || "", kwargsStr, description: newNode.data?.description || "", - }; + }); } }, { deep: true, immediate: true } @@ -250,15 +250,15 @@ onMounted(() => { flex: 1; } -.panel-art-form ::deep(.el-row > .el-col:last-child) { +.panel-art-form ::v-deep(.el-row > .el-col:last-child) { display: none; } -.panel-art-form ::deep(.el-form-item__content) { +.panel-art-form ::v-deep(.el-form-item__content) { max-width: 100%; } -.panel-art-form ::deep(section) { +.panel-art-form ::v-deep(section) { padding: 0; } diff --git a/frontend/web/src/views/module_task/workflow/components/WorkflowDesignDrawer.vue b/frontend/web/src/views/module_task/workflow/components/WorkflowDesignDrawer.vue index 20f73269..7f7ff8d8 100644 --- a/frontend/web/src/views/module_task/workflow/components/WorkflowDesignDrawer.vue +++ b/frontend/web/src/views/module_task/workflow/components/WorkflowDesignDrawer.vue @@ -183,7 +183,7 @@