From ab67540d5f2a6fc1c81277f2af8cb8488251012a Mon Sep 17 00:00:00 2001 From: xingyu Date: Mon, 26 Dec 2022 17:47:48 +0800 Subject: [PATCH 1/2] fix: crud bug --- yudao-ui-admin-vue3/package.json | 6 +++--- yudao-ui-admin-vue3/src/hooks/web/useCrudSchemas.ts | 9 +++++---- yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts | 3 ++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/yudao-ui-admin-vue3/package.json b/yudao-ui-admin-vue3/package.json index 20aa74fb0..4bc43875d 100644 --- a/yudao-ui-admin-vue3/package.json +++ b/yudao-ui-admin-vue3/package.json @@ -25,7 +25,7 @@ }, "dependencies": { "@iconify/iconify": "^3.0.1", - "@vueuse/core": "^9.8.2", + "@vueuse/core": "^9.9.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^2.1.0", @@ -57,7 +57,7 @@ "devDependencies": { "@commitlint/cli": "^17.3.0", "@commitlint/config-conventional": "^17.3.0", - "@iconify/json": "^2.1.156", + "@iconify/json": "^2.1.157", "@intlify/unplugin-vue-i18n": "^0.8.1", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.0", @@ -104,7 +104,7 @@ "vite-plugin-svg-icons": "^2.0.1", "vite-plugin-vue-setup-extend": "^0.4.0", "vite-plugin-windicss": "^1.8.10", - "vue-tsc": "^1.0.16", + "vue-tsc": "^1.0.17", "windicss": "^3.5.6" }, "engines": { diff --git a/yudao-ui-admin-vue3/src/hooks/web/useCrudSchemas.ts b/yudao-ui-admin-vue3/src/hooks/web/useCrudSchemas.ts index 33bfddc7e..514881947 100644 --- a/yudao-ui-admin-vue3/src/hooks/web/useCrudSchemas.ts +++ b/yudao-ui-admin-vue3/src/hooks/web/useCrudSchemas.ts @@ -7,7 +7,7 @@ import { useI18n } from '@/hooks/web/useI18n' import { FormSchema } from '@/types/form' import { TableColumn } from '@/types/table' import { DescriptionsSchema } from '@/types/descriptions' -import { ComponentOptions } from '@/types/components' +import { ComponentOptions, ComponentProps } from '@/types/components' export type CrudSchema = Omit & { isSearch?: boolean // 是否在查询显示 @@ -98,7 +98,7 @@ const filterSearchSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): F if (schemaItem?.isSearch || schemaItem.search?.show) { let component = schemaItem?.search?.component || 'Input' const options: ComponentOptions[] = [] - let comonentProps = {} + let comonentProps: ComponentProps = {} if (schemaItem.dictType) { const allOptions: ComponentOptions = { label: '全部', value: '' } options.push(allOptions) @@ -187,7 +187,7 @@ const filterFormSchema = (crudSchema: CrudSchema[], allSchemas: AllSchemas): For defaultValue = 0 } } - let comonentProps = {} + let comonentProps: ComponentProps = {} if (schemaItem.dictType) { const options: ComponentOptions[] = [] if (schemaItem.dictClass && schemaItem.dictClass === 'number') { @@ -264,7 +264,8 @@ const filterDescriptionsSchema = (crudSchema: CrudSchema[]): DescriptionsSchema[ descriptionsSchemaItem.dictType = schemaItem.dictType } if (schemaItem.detail?.dateFormat || schemaItem.formatter == 'formatDate') { - descriptionsSchemaItem.dateFormat = schemaItem.dateFormat + // 优先使用 detail 下的配置,如果没有默认为 YYYY-MM-DD HH:mm:ss + descriptionsSchemaItem.dateFormat = schemaItem?.detail?.dateFormat ? schemaItem?.detail?.dateFormat : 'YYYY-MM-DD HH:mm:ss' } diff --git a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts index ada67a0e6..c799aae71 100644 --- a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts +++ b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts @@ -314,7 +314,8 @@ const filterDescriptionsSchema = (crudSchema: VxeCrudSchema): DescriptionsSchema descriptionsSchemaItem.dictType = schemaItem.dictType } if (schemaItem.detail?.dateFormat || schemaItem.formatter == 'formatDate') { - descriptionsSchemaItem.dateFormat = schemaItem.dateFormat + // 优先使用 detail 下的配置,如果没有默认为 YYYY-MM-DD HH:mm:ss + descriptionsSchemaItem.dateFormat = schemaItem?.detail?.dateFormat ? schemaItem?.detail?.dateFormat : 'YYYY-MM-DD HH:mm:ss' } From d86c36a151a09ec1e0ee65282f9ad8dc338513ce Mon Sep 17 00:00:00 2001 From: xingyu Date: Tue, 27 Dec 2022 11:18:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?vue2=20=E5=9C=86=E8=A7=92=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yudao-ui-admin/package.json | 4 +- yudao-ui-admin/src/assets/styles/ruoyi.scss | 4 ++ .../src/components/HeaderSearch/index.vue | 1 - .../src/components/RightPanel/index.vue | 6 -- .../src/components/TopNav/index.vue | 31 +++++---- .../src/components/Verifition/Verify.vue | 1 - .../src/layout/components/TagsView/index.vue | 11 ++-- .../src/views/dashboard/BarChart.vue | 2 +- .../src/views/dashboard/LineChart.vue | 2 +- .../src/views/dashboard/PieChart.vue | 2 +- .../src/views/dashboard/RaddarChart.vue | 2 +- yudao-ui-admin/yarn.lock | 66 +++++++++++-------- 12 files changed, 72 insertions(+), 60 deletions(-) diff --git a/yudao-ui-admin/package.json b/yudao-ui-admin/package.json index ccb7d2b4f..b59eb5041 100644 --- a/yudao-ui-admin/package.json +++ b/yudao-ui-admin/package.json @@ -47,7 +47,7 @@ "clipboard": "2.0.8", "core-js": "^3.26.0", "crypto-js": "^4.0.0", - "echarts": "4.9.0", + "echarts": "5.4.0", "element-ui": "2.15.10", "file-saver": "2.0.5", "fuse.js": "6.6.2", @@ -89,7 +89,7 @@ "fs-extra": "^8.1.0", "lint-staged": "12.5.0", "runjs": "4.4.2", - "sass": "1.3.0", + "sass": "1.32.13", "sass-loader": "10.2.0", "script-ext-html-webpack-plugin": "2.1.5", "svg-sprite-loader": "5.1.1", diff --git a/yudao-ui-admin/src/assets/styles/ruoyi.scss b/yudao-ui-admin/src/assets/styles/ruoyi.scss index 55e00fa7a..c95bb0a55 100644 --- a/yudao-ui-admin/src/assets/styles/ruoyi.scss +++ b/yudao-ui-admin/src/assets/styles/ruoyi.scss @@ -60,6 +60,10 @@ color: inherit; } +.el-message-box__status + .el-message-box__message{ + word-break: break-word; +} + .el-dialog:not(.is-fullscreen) { margin-top: 6vh !important; } diff --git a/yudao-ui-admin/src/components/HeaderSearch/index.vue b/yudao-ui-admin/src/components/HeaderSearch/index.vue index 44280555c..b1d413f0e 100644 --- a/yudao-ui-admin/src/components/HeaderSearch/index.vue +++ b/yudao-ui-admin/src/components/HeaderSearch/index.vue @@ -88,7 +88,6 @@ export default { threshold: 0.4, location: 0, distance: 100, - maxPatternLength: 32, minMatchCharLength: 1, keys: [{ name: 'title', diff --git a/yudao-ui-admin/src/components/RightPanel/index.vue b/yudao-ui-admin/src/components/RightPanel/index.vue index fbf27eb4f..6c6dfaca6 100644 --- a/yudao-ui-admin/src/components/RightPanel/index.vue +++ b/yudao-ui-admin/src/components/RightPanel/index.vue @@ -53,7 +53,6 @@ export default { } }, mounted() { - this.insertToBody() this.addEventClick() }, beforeDestroy() { @@ -70,11 +69,6 @@ export default { this.show = false window.removeEventListener('click', this.closeSidebar) } - }, - insertToBody() { - const elx = this.$refs.rightPanel - const body = document.querySelector('body') - body.insertBefore(elx, body.firstChild) } } } diff --git a/yudao-ui-admin/src/components/TopNav/index.vue b/yudao-ui-admin/src/components/TopNav/index.vue index 483a9f3fc..98c4afe84 100644 --- a/yudao-ui-admin/src/components/TopNav/index.vue +++ b/yudao-ui-admin/src/components/TopNav/index.vue @@ -1,14 +1,14 @@