From df77276456e91b923197d1b0b215aaf8d21f9767 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 11 Aug 2024 05:48:29 +0000 Subject: [PATCH 01/32] fix(deps): update dependency element-plus to v2.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6db5ceb..3ae93541 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "crypto-js": "4.2.0", "driver.js": "1.3.1", "echarts": "5.5.1", - "element-plus": "2.7.8", + "element-plus": "2.8.0", "js-cookie": "3.0.5", "mitt": "3.0.1", "nprogress": "0.2.0", From 44aa6b9df6e1850eb4cc182e7de5730d9b88ab73 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 01:17:10 +0000 Subject: [PATCH 02/32] fix(deps): update dependency autoprefixer to v10.4.20 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 748328ee..76fff119 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@element-plus/icons-vue": "2.3.1", "@wangeditor/editor": "5.1.23", "@wangeditor/editor-for-vue": "5.1.12", - "autoprefixer": "10.4.19", + "autoprefixer": "10.4.20", "axios": "1.7.4", "china-area-data": "^5.0.1", "codemirror": "5.65.17", From 769420891aa8f7c77eb872b4642889455ebc2d39 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 09:19:28 +0000 Subject: [PATCH 03/32] fix(deps): update dependency vue to v3.4.38 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 54d45b9c..31c457c8 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "sortablejs": "1.15.2", "splitpanes": "3.1.5", "tailwindcss": "3.4.10", - "vue": "3.4.37", + "vue": "3.4.38", "vue-clipboard3": "2.0.0", "vue-echarts": "6.7.3", "vue-i18n": "9.13.1", From ed80d211a2165a921f5f129cc934523c7bb8a359 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 05:05:15 +0000 Subject: [PATCH 04/32] fix(deps): update dependency postcss to v8.4.41 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08a8d7c1..a2bb3b70 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "mitt": "3.0.1", "nprogress": "0.2.0", "pinia": "2.2.2", - "postcss": "8.4.40", + "postcss": "8.4.41", "qs": "6.13.0", "screenfull": "6.0.2", "sm-crypto": "0.3.13", From 71ea5d8bd6cf66796bf6f59e1addbbf3f9829f87 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 18:19:26 +0000 Subject: [PATCH 05/32] fix(deps): update dependency vue-i18n to v9.14.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08a8d7c1..174e8ddc 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "vue": "3.4.37", "vue-clipboard3": "2.0.0", "vue-echarts": "6.7.3", - "vue-i18n": "9.13.1", + "vue-i18n": "9.14.0", "vue-router": "4.4.3", "vuedraggable": "4.1.0" }, From bdeb143434137e2f25e1440d8dc75ae318bc2c37 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 17 Aug 2024 13:13:54 +0000 Subject: [PATCH 06/32] fix(deps): update dependency vue-echarts to v7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 174e8ddc..eb93de8f 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "tailwindcss": "3.4.10", "vue": "3.4.37", "vue-clipboard3": "2.0.0", - "vue-echarts": "6.7.3", + "vue-echarts": "7.0.2", "vue-i18n": "9.14.0", "vue-router": "4.4.3", "vuedraggable": "4.1.0" From f2c367f67c09b33cb64949ed77550390957622c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 16:08:09 +0000 Subject: [PATCH 07/32] fix(deps): update dependency vue-echarts to v7.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b5ce8819..a6531865 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "tailwindcss": "3.4.10", "vue": "3.4.38", "vue-clipboard3": "2.0.0", - "vue-echarts": "7.0.2", + "vue-echarts": "7.0.3", "vue-i18n": "9.14.0", "vue-router": "4.4.3", "vuedraggable": "4.1.0" From f8f6d229e3b26fceb0f6eaa3dd812feff38ea4e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A9?= <19910352037@163.com> Date: Wed, 21 Aug 2024 15:16:37 +0800 Subject: [PATCH 08/32] =?UTF-8?q?fix(=E8=A1=A8=E5=8D=95=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E8=A7=84=E5=88=99):=20=E6=B7=BB=E5=8A=A0=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E8=B6=85=E9=95=BF=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/admin/client/form.vue | 8 ++++++-- src/views/admin/dept/form.vue | 6 +++--- src/views/admin/dict/dictItem/form.vue | 9 +++++---- src/views/admin/dict/form.vue | 3 ++- src/views/admin/menu/form.vue | 10 +++++----- src/views/admin/param/form.vue | 4 +++- src/views/admin/post/form.vue | 8 +++++--- src/views/admin/user/form.vue | 6 +++++- src/views/admin/user/personal.vue | 8 ++++---- src/views/daemon/job-manage/form.vue | 12 ++++++------ src/views/gen/datasource/form.vue | 3 ++- src/views/gen/field-type/form.vue | 4 +++- src/views/gen/group/form.vue | 3 ++- src/views/login/component/mobile.vue | 3 ++- src/views/login/component/password.vue | 8 ++++---- 15 files changed, 57 insertions(+), 38 deletions(-) diff --git a/src/views/admin/client/form.vue b/src/views/admin/client/form.vue index 83502555..10c3a64c 100644 --- a/src/views/admin/client/form.vue +++ b/src/views/admin/client/form.vue @@ -100,6 +100,7 @@ const form = reactive({ // 定义校验规则 const dataRules = ref({ clientId: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '编号不能为空', trigger: 'blur'}, {validator: rule.validatorLowercase, trigger: 'blur'}, { @@ -110,21 +111,24 @@ const dataRules = ref({ }, ], clientSecret: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '密钥不能为空', trigger: 'blur'}, {validator: rule.validatorLower, trigger: 'blur'}, ], - scope: [{required: true, message: '域不能为空', trigger: 'blur'}], + scope: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '域不能为空', trigger: 'blur'}], authorizedGrantTypes: [{required: true, message: '授权模式不能为空', trigger: 'blur'}], accessTokenValidity: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '令牌时效不能为空', trigger: 'blur'}, {type: 'number', min: 1, message: '令牌时效不能小于一小时', trigger: 'blur'}, ], refreshTokenValidity: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '刷新时效不能为空', trigger: 'blur'}, {type: 'number', min: 1, message: '刷新时效不能小于两小时', trigger: 'blur'}, ], autoapprove: [{required: true, message: '自动放行不能为空', trigger: 'blur'}], - webServerRedirectUri: [{required: true, message: '回调地址不能为空', trigger: 'blur'}], + webServerRedirectUri: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '回调地址不能为空', trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/dept/form.vue b/src/views/admin/dept/form.vue index 66d38d54..efecf0f0 100644 --- a/src/views/admin/dept/form.vue +++ b/src/views/admin/dept/form.vue @@ -37,7 +37,7 @@ import {useI18n} from 'vue-i18n'; import {getObj, deptTree, addObj, putObj} from '/@/api/admin/dept'; import {useMessage} from '/@/hooks/message'; - +import {rule} from '/@/utils/validate'; // 定义子组件向父组件传值/事件 const emit = defineEmits(['refresh']); const {t} = useI18n(); @@ -55,8 +55,8 @@ const loading = ref(false); const dataRules = ref({ parentId: [{required: true, message: '上级部门不能为空', trigger: 'blur'}], - name: [{required: true, message: '部门名称不能为空', trigger: 'blur'}], - sortOrder: [{required: true, message: '排序不能为空', trigger: 'blur'}], + name: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '部门名称不能为空', trigger: 'blur'}], + sortOrder: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '排序不能为空', trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/dict/dictItem/form.vue b/src/views/admin/dict/dictItem/form.vue index a383de03..66dc828e 100644 --- a/src/views/admin/dict/dictItem/form.vue +++ b/src/views/admin/dict/dictItem/form.vue @@ -41,7 +41,7 @@ import {useI18n} from 'vue-i18n'; import {getItemObj, addItemObj, putItemObj, validateDictItemLabel} from '/@/api/admin/dict'; import {useMessage} from '/@/hooks/message'; - +import {rule} from '/@/utils/validate'; // 定义子组件向父组件传值/事件 const emit = defineEmits(['refresh']); const {t} = useI18n(); @@ -64,8 +64,9 @@ const dataForm = reactive({ }); const dataRules = reactive({ - value: [{required: true, message: '数据值不能为空', trigger: 'blur'}], + value: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '数据值不能为空', trigger: 'blur'}], label: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '标签不能为空', trigger: 'blur'}, { validator: (rule: any, value: any, callback: any) => { @@ -74,8 +75,8 @@ const dataRules = reactive({ trigger: 'blur', }, ], - description: [{required: true, message: '描述不能为空', trigger: 'blur'}], - sortOrder: [{required: true, message: '排序不能为空', trigger: 'blur'}], + description: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '描述不能为空', trigger: 'blur'}], + sortOrder: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '排序不能为空', trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/dict/form.vue b/src/views/admin/dict/form.vue index 54f072be..f8d4ba3b 100644 --- a/src/views/admin/dict/form.vue +++ b/src/views/admin/dict/form.vue @@ -60,6 +60,7 @@ const dataForm = reactive({ const dataRules = reactive({ dictType: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '类型不能为空', trigger: 'blur'}, {validator: rule.validatorNameCn, trigger: 'blur'}, { @@ -70,7 +71,7 @@ const dataRules = reactive({ }, ], systemFlag: [{required: true, message: '字典类型不能为空', trigger: 'blur'}], - description: [{required: true, message: '描述不能为空', trigger: 'blur'}], + description: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '描述不能为空', trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/menu/form.vue b/src/views/admin/menu/form.vue index c449358f..ff5a1f6b 100644 --- a/src/views/admin/menu/form.vue +++ b/src/views/admin/menu/form.vue @@ -72,7 +72,7 @@ import {useI18n} from 'vue-i18n'; import {info, pageList, putObj, addObj} from '/@/api/admin/menu'; import {useMessage} from '/@/hooks/message'; - +import {rule} from '/@/utils/validate'; // 定义子组件向父组件传值/事件 const emit = defineEmits(['refresh']); const {t} = useI18n(); @@ -106,11 +106,11 @@ const state = reactive({ const dataRules = reactive({ menType: [{required: true, message: '菜单类型不能为空', trigger: 'blur'}], parentId: [{required: true, message: '上级菜单不能为空', trigger: 'blur'}], - name: [{required: true, message: '菜单不能为空', trigger: 'blur'}], - path: [{required: true, message: '路径不能为空', trigger: 'blur'}], + name: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '菜单不能为空', trigger: 'blur'}], + path: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '路径不能为空', trigger: 'blur'}], icon: [{required: true, message: '图标不能为空', trigger: 'blur'}], - permission: [{required: true, message: '权限代码不能为空', trigger: 'blur'}], - sortOrder: [{required: true, message: '排序不能为空', trigger: 'blur'}], + permission: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '权限代码不能为空', trigger: 'blur'}], + sortOrder: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '排序不能为空', trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/param/form.vue b/src/views/admin/param/form.vue index e7b57481..3902179e 100644 --- a/src/views/admin/param/form.vue +++ b/src/views/admin/param/form.vue @@ -81,6 +81,7 @@ const form = reactive({ // 定义校验规则 const dataRules = reactive({ publicName: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '名称不能为空', trigger: 'blur'}, { validator: (rule: any, value: any, callback: any) => { @@ -90,6 +91,7 @@ const dataRules = reactive({ }, ], publicKey: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '参数键不能为空', trigger: 'blur'}, {validator: rule.validatorCapital, trigger: 'blur'}, { @@ -99,7 +101,7 @@ const dataRules = reactive({ trigger: 'blur', }, ], - publicValue: [{required: true, message: '参数值不能为空', trigger: 'blur'}], + publicValue: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '参数值不能为空', trigger: 'blur'}], status: [{required: true, message: '状态不能为空', trigger: 'blur'}], publicType: [{required: true, message: '类型不能为空', trigger: 'blur'}], systemFlag: [{required: true, message: '类型不能为空', trigger: 'blur'}], diff --git a/src/views/admin/post/form.vue b/src/views/admin/post/form.vue index 798fd73c..913fe610 100644 --- a/src/views/admin/post/form.vue +++ b/src/views/admin/post/form.vue @@ -28,7 +28,7 @@ import {useMessage} from '/@/hooks/message'; import {getObj, addObj, putObj, validatePostCode, validatePostName} from '/@/api/admin/post'; import {useI18n} from 'vue-i18n'; - +import {rule} from '/@/utils/validate'; // 定义子组件向父组件传值/事件 const emit = defineEmits(['refresh']); @@ -56,6 +56,7 @@ const form = reactive({ // 定义校验规则 const dataRules = ref({ postCode: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '岗位编码不能为空', trigger: 'blur'}, { validator: (rule: any, value: any, callback: any) => { @@ -65,6 +66,7 @@ const dataRules = ref({ }, ], postName: [ + {validator: rule.overLength, trigger: 'blur'}, {required: true, message: '岗位名称不能为空', trigger: 'blur'}, { validator: (rule: any, value: any, callback: any) => { @@ -73,8 +75,8 @@ const dataRules = ref({ trigger: 'blur', }, ], - postSort: [{required: true, message: '岗位排序不能为空', trigger: 'blur'}], - remark: [{required: true, message: '岗位描述不能为空', trigger: 'blur'}], + postSort: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '岗位排序不能为空', trigger: 'blur'}], + remark: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '岗位描述不能为空', trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/user/form.vue b/src/views/admin/user/form.vue index a688ea48..01ad7066 100644 --- a/src/views/admin/user/form.vue +++ b/src/views/admin/user/form.vue @@ -128,6 +128,7 @@ const dataForm = reactive({ const dataRules = ref({ // 用户名校验,不能为空 、长度 5-20、不能和已有数据重复 username: [ + {validator: rule.overLength, trigger: 'blur'}, { required: true, message: '用户名不能为空', trigger: 'blur' }, { min: 5, max: 20, message: '用户名称长度必须介于 5 和 20 之间', trigger: 'blur' }, { @@ -138,6 +139,7 @@ const dataRules = ref({ }, ], password: [ + {validator: rule.overLength, trigger: 'blur'}, { required: true, message: '密码不能为空', trigger: 'blur' }, { min: 6, @@ -149,6 +151,7 @@ const dataRules = ref({ // 姓名校验,不能为空、只能是中文 name: [ { required: true, message: '姓名不能为空', trigger: 'blur' }, + {validator: rule.overLength, trigger: 'blur'}, { validator: rule.chinese, trigger: 'blur' }, ], deptId: [{ required: true, message: '部门不能为空', trigger: 'blur' }], @@ -157,6 +160,7 @@ const dataRules = ref({ // 手机号校验,不能为空、新增的时不能重复校验 phone: [ { required: true, message: '手机号不能为空', trigger: 'blur' }, + {validator: rule.overLength, trigger: 'blur'}, { validator: rule.validatePhone, trigger: 'blur' }, { validator: (rule: any, value: any, callback: any) => { @@ -165,7 +169,7 @@ const dataRules = ref({ trigger: 'blur', }, ], - email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], + email: [{validator: rule.overLength, trigger: 'blur'},{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], lockFlag: [{ required: true, message: '状态不能为空', trigger: 'blur' }], }); diff --git a/src/views/admin/user/personal.vue b/src/views/admin/user/personal.vue index 3b841057..ce85de75 100644 --- a/src/views/admin/user/personal.vue +++ b/src/views/admin/user/personal.vue @@ -131,9 +131,9 @@ const ruleForm = reactive({ {required: true, message: '手机号不能为空', trigger: 'blur'}, {validator: rule.validatePhone, trigger: 'blur'}, ], - nickname: [{required: true, message: '昵称不能为空', trigger: 'blur'}], - email: [{required: true, message: '邮箱不能为空', trigger: 'blur'}], - name: [{required: true, message: '姓名不能为空', trigger: 'blur'}], + nickname: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '昵称不能为空', trigger: 'blur'}], + email: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '邮箱不能为空', trigger: 'blur'}], + name: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '姓名不能为空', trigger: 'blur'}], }); const validatorPassword2 = (rule: any, value: any, callback: any) => { if (value !== passwordFormData.newpassword1) { @@ -151,7 +151,7 @@ const validatorScore = (rule: any, value: any, callback: any) => { }; const passwordRuleForm = reactive({ - password: [{required: true, message: '密码不能为空', trigger: 'blur'}], + password: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '密码不能为空', trigger: 'blur'}], newpassword1: [ { min: 6, diff --git a/src/views/daemon/job-manage/form.vue b/src/views/daemon/job-manage/form.vue index 9c677233..40d5bb86 100644 --- a/src/views/daemon/job-manage/form.vue +++ b/src/views/daemon/job-manage/form.vue @@ -84,7 +84,7 @@ import {useDict} from '/@/hooks/dict'; import {useMessage} from '/@/hooks/message'; import {addObj, getObj, putObj} from '/@/api/daemon/job'; import {useI18n} from 'vue-i18n'; - +import {rule} from '/@/utils/validate'; const emit = defineEmits(['refresh']); const Crontab = defineAsyncComponent(() => import('/@/components/Crontab/index.vue')); @@ -122,14 +122,14 @@ const popoverVis = (bol: boolean) => { const popoverVisible = ref(false); // 定义校验规则 const dataRules = reactive({ - jobName: [{required: true, message: '任务名称不能为空', trigger: 'blur'}], - jobGroup: [{required: true, message: '任务组名不能为空', trigger: 'blur'}], + jobName: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '任务名称不能为空', trigger: 'blur'}], + jobGroup: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '任务组名不能为空', trigger: 'blur'}], jobType: [{required: true, message: '任务类型不能为空', trigger: 'blur'}], cronExpression: [{required: true, message: 'cron不能为空', trigger: 'blur'}], misfirePolicy: [{required: true, message: '策略不能为空', trigger: 'blur'}], - executePath: [{required: true, message: '执行路径不能为空', trigger: 'blur'}], - className: [{required: true, message: '执行文件不能为空', trigger: 'blur'}], - methodName: [{required: true, message: '执行方法不能为空', trigger: 'blur'}], + executePath: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '执行路径不能为空', trigger: 'blur'}], + className: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '执行文件不能为空', trigger: 'blur'}], + methodName: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '执行方法不能为空', trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/gen/datasource/form.vue b/src/views/gen/datasource/form.vue index 37d34a9c..87ef5b99 100644 --- a/src/views/gen/datasource/form.vue +++ b/src/views/gen/datasource/form.vue @@ -125,6 +125,7 @@ const validateDsName = (_rule, value, callback) => { const dataRules = ref({ name: [ {required: true, message: '别名不能为空', trigger: 'blur'}, + {validator: rule.overLength, trigger: 'blur'}, {validator: validateDsName, trigger: 'blur'}, ], url: [{required: true, message: 'jdbcurl不能为空', trigger: 'blur'}, { @@ -139,7 +140,7 @@ const dataRules = ref({ confType: [{required: true, message: '配置类型不能为空', trigger: 'blur'}], dsName: [{ validator: rule.overLength, trigger: 'blur' },{required: true, message: '数据库名称不能为空', trigger: 'blur'}], instance: [{ validator: rule.overLength, trigger: 'blur' },{required: true, message: '实例不能为空', trigger: 'blur'}], - port: [{required: true, message: '端口不能为空', trigger: 'blur'}], + port: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '端口不能为空', trigger: 'blur'}], host: [{ validator: rule.overLength, trigger: 'blur' },{required: true, message: '主机不能为空', trigger: 'blur'}], }); diff --git a/src/views/gen/field-type/form.vue b/src/views/gen/field-type/form.vue index 86540aef..23300ad0 100644 --- a/src/views/gen/field-type/form.vue +++ b/src/views/gen/field-type/form.vue @@ -24,6 +24,7 @@ import { useMessage } from '/@/hooks/message'; import { getObj, addObj, putObj, validateColumnType } from '/@/api/gen/fieldtype'; import { useI18n } from 'vue-i18n'; +import {rule} from '/@/utils/validate'; // 定义子组件向父组件传值/事件 const emit = defineEmits(['refresh']); const { t } = useI18n(); @@ -46,13 +47,14 @@ const form = reactive({ const dataRules = ref({ columnType: [ { required: true, message: '字段类型不能为空', trigger: 'blur' }, + {validator: rule.overLength, trigger: 'blur'}, { validator: (rule: any, value: any, callback: any) => { validateColumnType(rule, value, callback, form.id !== ''); }, }, ], - attrType: [{ required: true, message: '属性类型不能为空', trigger: 'blur' }], + attrType: [{validator: rule.overLength, trigger: 'blur'},{ required: true, message: '属性类型不能为空', trigger: 'blur' }], }); // 打开弹窗 diff --git a/src/views/gen/group/form.vue b/src/views/gen/group/form.vue index 4d6fed5d..4d5cfd2f 100644 --- a/src/views/gen/group/form.vue +++ b/src/views/gen/group/form.vue @@ -27,6 +27,7 @@ import { useMessage } from '/@/hooks/message'; import { addObj, getObj, putObj } from '/@/api/gen/group'; import { useI18n } from 'vue-i18n'; import { list as templateList } from '/@/api/gen/template'; +import {rule} from '/@/utils/validate'; // 定义子组件向父组件传值/事件 const emit = defineEmits(['refresh']); const { t } = useI18n(); @@ -49,7 +50,7 @@ const form = reactive({ // 定义校验规则 const dataRules = ref({ - groupName: [{ required: true, message: '分组名称不能为空', trigger: 'blur' }], + groupName: [{validator: rule.overLength, trigger: 'blur'},{ required: true, message: '分组名称不能为空', trigger: 'blur' }], templateId: [{ required: true, message: '模板不能为空', trigger: 'blur' }], }); diff --git a/src/views/login/component/mobile.vue b/src/views/login/component/mobile.vue index 5a47b70c..645563b4 100644 --- a/src/views/login/component/mobile.vue +++ b/src/views/login/component/mobile.vue @@ -52,8 +52,9 @@ const loginForm = reactive({ // 定义校验规则 const loginRules = reactive({ - mobile: [{ required: true, trigger: 'blur', validator: rule.validatePhone }], + mobile: [{validator: rule.overLength, trigger: 'blur'},{ required: true, trigger: 'blur', validator: rule.validatePhone }], code: [ + {validator: rule.overLength, trigger: 'blur'}, { required: true, trigger: 'blur', diff --git a/src/views/login/component/password.vue b/src/views/login/component/password.vue index f920a763..176abac2 100644 --- a/src/views/login/component/password.vue +++ b/src/views/login/component/password.vue @@ -63,7 +63,7 @@ import {reactive, ref, defineEmits} from 'vue'; import {useUserInfo} from '/@/stores/userInfo'; import {useI18n} from 'vue-i18n'; import {generateUUID} from "/@/utils/other"; - +import {rule} from '/@/utils/validate'; // 使用国际化插件 const {t} = useI18n(); @@ -83,9 +83,9 @@ const state = reactive({ }); const loginRules = reactive({ - username: [{required: true, trigger: 'blur', message: t('password.accountPlaceholder1')}], // 用户名校验规则 - password: [{required: true, trigger: 'blur', message: t('password.accountPlaceholder2')}], // 密码校验规则 - code: [{required: true, trigger: 'blur', message: t('password.accountPlaceholder3')}], // 验证码校验规则 + username: [{validator: rule.overLength, trigger: 'blur'},{required: true, trigger: 'blur', message: t('password.accountPlaceholder1')}], // 用户名校验规则 + password: [{validator: rule.overLength, trigger: 'blur'},{required: true, trigger: 'blur', message: t('password.accountPlaceholder2')}], // 密码校验规则 + code: [{validator: rule.overLength, trigger: 'blur'},{required: true, trigger: 'blur', message: t('password.accountPlaceholder3')}], // 验证码校验规则 }); // 是否开启验证码 From b615d3ac7d02faff7dd2711677640c40fdc3ac7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A9?= <19910352037@163.com> Date: Wed, 21 Aug 2024 15:19:08 +0800 Subject: [PATCH 09/32] =?UTF-8?q?fix(=E8=8F=9C=E5=8D=95):=20=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/admin/menu/form.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/admin/menu/form.vue b/src/views/admin/menu/form.vue index ff5a1f6b..eb2b6915 100644 --- a/src/views/admin/menu/form.vue +++ b/src/views/admin/menu/form.vue @@ -104,7 +104,7 @@ const state = reactive({ // 表单校验规则 const dataRules = reactive({ - menType: [{required: true, message: '菜单类型不能为空', trigger: 'blur'}], + menuType: [{required: true, message: '菜单类型不能为空', trigger: 'blur'}], parentId: [{required: true, message: '上级菜单不能为空', trigger: 'blur'}], name: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '菜单不能为空', trigger: 'blur'}], path: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '路径不能为空', trigger: 'blur'}], From 7775e92e2acca7b5b744bed76b444c33f8f04c2e Mon Sep 17 00:00:00 2001 From: wangyong <2021332310@qq.com> Date: Thu, 22 Aug 2024 09:01:24 +0800 Subject: [PATCH 10/32] =?UTF-8?q?fix(=E8=A1=A8=E5=8D=95=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E8=A7=84=E5=88=99=EF=BC=89:=E6=B7=BB=E5=8A=A0=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E8=BE=93=E5=85=A5=E8=B6=85=E9=95=BF=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/admin/client/form.vue | 1 + src/views/admin/menu/form.vue | 1 + src/views/admin/param/form.vue | 1 + src/views/admin/user/form.vue | 1 + src/views/daemon/job-manage/form.vue | 3 ++- src/views/gen/field-type/form.vue | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/admin/client/form.vue b/src/views/admin/client/form.vue index 10c3a64c..c2447795 100644 --- a/src/views/admin/client/form.vue +++ b/src/views/admin/client/form.vue @@ -129,6 +129,7 @@ const dataRules = ref({ ], autoapprove: [{required: true, message: '自动放行不能为空', trigger: 'blur'}], webServerRedirectUri: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '回调地址不能为空', trigger: 'blur'}], + authorities: [{validator: rule.overLength, trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/menu/form.vue b/src/views/admin/menu/form.vue index eb2b6915..36daac1f 100644 --- a/src/views/admin/menu/form.vue +++ b/src/views/admin/menu/form.vue @@ -111,6 +111,7 @@ const dataRules = reactive({ icon: [{required: true, message: '图标不能为空', trigger: 'blur'}], permission: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '权限代码不能为空', trigger: 'blur'}], sortOrder: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '排序不能为空', trigger: 'blur'}], + enName: [{validator: rule.overLength, trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/param/form.vue b/src/views/admin/param/form.vue index 3902179e..ca758f34 100644 --- a/src/views/admin/param/form.vue +++ b/src/views/admin/param/form.vue @@ -105,6 +105,7 @@ const dataRules = reactive({ status: [{required: true, message: '状态不能为空', trigger: 'blur'}], publicType: [{required: true, message: '类型不能为空', trigger: 'blur'}], systemFlag: [{required: true, message: '类型不能为空', trigger: 'blur'}], + validateCode: [{validator: rule.overLength, trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/admin/user/form.vue b/src/views/admin/user/form.vue index 01ad7066..0396ee39 100644 --- a/src/views/admin/user/form.vue +++ b/src/views/admin/user/form.vue @@ -171,6 +171,7 @@ const dataRules = ref({ ], email: [{validator: rule.overLength, trigger: 'blur'},{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }], lockFlag: [{ required: true, message: '状态不能为空', trigger: 'blur' }], + nickname: [{validator: rule.overLength, trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/daemon/job-manage/form.vue b/src/views/daemon/job-manage/form.vue index 40d5bb86..7d4f7503 100644 --- a/src/views/daemon/job-manage/form.vue +++ b/src/views/daemon/job-manage/form.vue @@ -125,11 +125,12 @@ const dataRules = reactive({ jobName: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '任务名称不能为空', trigger: 'blur'}], jobGroup: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '任务组名不能为空', trigger: 'blur'}], jobType: [{required: true, message: '任务类型不能为空', trigger: 'blur'}], - cronExpression: [{required: true, message: 'cron不能为空', trigger: 'blur'}], + cronExpression: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: 'cron不能为空', trigger: 'blur'}], misfirePolicy: [{required: true, message: '策略不能为空', trigger: 'blur'}], executePath: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '执行路径不能为空', trigger: 'blur'}], className: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '执行文件不能为空', trigger: 'blur'}], methodName: [{validator: rule.overLength, trigger: 'blur'},{required: true, message: '执行方法不能为空', trigger: 'blur'}], + methodParamsValue: [{validator: rule.overLength, trigger: 'blur'}], }); // 打开弹窗 diff --git a/src/views/gen/field-type/form.vue b/src/views/gen/field-type/form.vue index 23300ad0..3da71442 100644 --- a/src/views/gen/field-type/form.vue +++ b/src/views/gen/field-type/form.vue @@ -55,6 +55,7 @@ const dataRules = ref({ }, ], attrType: [{validator: rule.overLength, trigger: 'blur'},{ required: true, message: '属性类型不能为空', trigger: 'blur' }], + packageName: [{validator: rule.overLength, trigger: 'blur'}], }); // 打开弹窗 From 816035306b684e81e2cc7b885e1a6d8a2077ed7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A9?= <19910352037@163.com> Date: Thu, 22 Aug 2024 17:27:09 +0800 Subject: [PATCH 11/32] =?UTF-8?q?fix(=E6=B0=B4=E5=8D=B0):=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F=E5=90=8E=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=E4=B8=8D=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 6 ++++++ src/layout/navBars/breadcrumb/setings.vue | 1 + src/views/login/index.vue | 3 +++ 3 files changed, 10 insertions(+) diff --git a/src/App.vue b/src/App.vue index eedd3277..79690c18 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,6 +16,12 @@ import { Local, Session } from '/@/utils/storage'; import mittBus from '/@/utils/mitt'; import setIntroduction from '/@/utils/setIconfont'; +provide('onWartermarkChange', () => { + if (settingRef.value) { + settingRef.value.onWartermarkChange(); + } +}); + // 引入组件 const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue')); const Setings = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/setings.vue')); diff --git a/src/layout/navBars/breadcrumb/setings.vue b/src/layout/navBars/breadcrumb/setings.vue index c92f1e2d..c94218fa 100644 --- a/src/layout/navBars/breadcrumb/setings.vue +++ b/src/layout/navBars/breadcrumb/setings.vue @@ -678,6 +678,7 @@ onUnmounted(() => { // 暴露变量 defineExpose({ openDrawer, + onWartermarkChange, }); diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 3d4ee93e..b01fbce2 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -46,6 +46,7 @@ const Password = defineAsyncComponent(() => import('./component/password.vue')); const Mobile = defineAsyncComponent(() => import('./component/mobile.vue')); const Register = defineAsyncComponent(() => import('./component/register.vue')); +const onWartermarkChange = inject<() => void>('onWartermarkChange'); // 定义变量内容 const storesThemeConfig = useThemeConfig(); const { themeConfig } = storeToRefs(storesThemeConfig); @@ -71,6 +72,8 @@ const signInSuccess = async () => { useMessage().wraning('抱歉,您没有登录权限'); Session.clear(); } else { + // 重新加载水印 + onWartermarkChange && onWartermarkChange() // 初始化登录成功时间问候语 let currentTimeInfo = formatAxis(new Date()); if (route.query?.redirect) { From d57a423877e2b7859f2ee70d25af24fb35cba185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A9?= <19910352037@163.com> Date: Fri, 23 Aug 2024 10:26:00 +0800 Subject: [PATCH 12/32] =?UTF-8?q?fix(=E6=B0=B4=E5=8D=B0):=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E7=99=BB=E5=BD=95=E6=88=90=E5=8A=9F=E5=90=8E=E6=B0=B4?= =?UTF-8?q?=E5=8D=B0=E4=B8=8D=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98-?= =?UTF-8?q?=E6=94=B9=E4=B8=BAmittbus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 13 ++++++------- src/types/mitt.d.ts | 2 ++ src/views/login/index.vue | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/App.vue b/src/App.vue index 79690c18..9d7c32a0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,12 +16,6 @@ import { Local, Session } from '/@/utils/storage'; import mittBus from '/@/utils/mitt'; import setIntroduction from '/@/utils/setIconfont'; -provide('onWartermarkChange', () => { - if (settingRef.value) { - settingRef.value.onWartermarkChange(); - } -}); - // 引入组件 const LockScreen = defineAsyncComponent(() => import('/@/layout/lockScreen/index.vue')); const Setings = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/setings.vue')); @@ -64,6 +58,10 @@ onMounted(() => { mittBus.on('openSetingsDrawer', () => { settingRef.value.openDrawer(); }); + // 监听登录成功后重新加载水印 + mittBus.on('updateWartermark', () => { + settingRef.value.onWartermarkChange(); + }); // 获取缓存中的布局配置 if (Local.get('themeConfig')) { storesThemeConfig.setThemeConfig({ themeConfig: Local.get('themeConfig') }); @@ -75,9 +73,10 @@ onMounted(() => { } }); }); -// 页面销毁时,关闭监听布局配置/i18n监听 +// 页面销毁时,关闭监听布局配置/i18n监听/更新水印 onUnmounted(() => { mittBus.off('openSetingsDrawer', () => {}); + mittBus.off('updateWartermark', () => {}); }); // 监听路由的变化,设置网站标题 watch( diff --git a/src/types/mitt.d.ts b/src/types/mitt.d.ts index b68b80df..04ade16b 100644 --- a/src/types/mitt.d.ts +++ b/src/types/mitt.d.ts @@ -11,6 +11,7 @@ * @method openShareTagsView 布局设置弹窗,开启 TagsView 共用 * @method onTagsViewRefreshRouterView tagsview 刷新界面 * @method onCurrentContextmenuClick tagsview 右键菜单每项点击时 + * @method updateWartermark 更新水印显示内容 */ declare type MittType = { openSetingsDrawer?: string; @@ -23,6 +24,7 @@ declare type MittType = { openShareTagsView?: string; onTagsViewRefreshRouterView?: T; onCurrentContextmenuClick?: T; + updateWartermark?: T; }; // mitt 参数类型定义 diff --git a/src/views/login/index.vue b/src/views/login/index.vue index b01fbce2..0a2138dc 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -40,13 +40,13 @@ import { formatAxis } from '/@/utils/formatTime'; import { useMessage } from '/@/hooks/message'; import { Session } from '/@/utils/storage'; import { initBackEndControlRoutes } from '/@/router/backEnd'; +import mittBus from '/@/utils/mitt'; // 引入组件 const Password = defineAsyncComponent(() => import('./component/password.vue')); const Mobile = defineAsyncComponent(() => import('./component/mobile.vue')); const Register = defineAsyncComponent(() => import('./component/register.vue')); -const onWartermarkChange = inject<() => void>('onWartermarkChange'); // 定义变量内容 const storesThemeConfig = useThemeConfig(); const { themeConfig } = storeToRefs(storesThemeConfig); @@ -73,7 +73,7 @@ const signInSuccess = async () => { Session.clear(); } else { // 重新加载水印 - onWartermarkChange && onWartermarkChange() + mittBus.emit('updateWartermark'); // 初始化登录成功时间问候语 let currentTimeInfo = formatAxis(new Date()); if (route.query?.redirect) { From ab8446f4e08446d3c72d3ad3ea19364b81acfb0d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 23 Aug 2024 15:02:22 +0000 Subject: [PATCH 13/32] fix(deps): update dependency element-plus to v2.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6531865..87894ec7 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "crypto-js": "4.2.0", "driver.js": "1.3.1", "echarts": "5.5.1", - "element-plus": "2.8.0", + "element-plus": "2.8.1", "js-cookie": "3.0.5", "mitt": "3.0.1", "nprogress": "0.2.0", From 52a1b54ea8a134aeb82a8ce724d20ffd1a717bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A9?= <19910352037@163.com> Date: Mon, 26 Aug 2024 09:29:36 +0800 Subject: [PATCH 14/32] =?UTF-8?q?fix(=E6=B0=B4=E5=8D=B0):=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=9B=B4=E6=96=B0=E6=B0=B4=E5=8D=B0=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=8F=91=E8=B5=B7=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 7 +------ src/layout/navBars/breadcrumb/setings.vue | 6 +++++- src/stores/userInfo.ts | 3 +++ src/views/login/index.vue | 3 --- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/App.vue b/src/App.vue index 9d7c32a0..eedd3277 100644 --- a/src/App.vue +++ b/src/App.vue @@ -58,10 +58,6 @@ onMounted(() => { mittBus.on('openSetingsDrawer', () => { settingRef.value.openDrawer(); }); - // 监听登录成功后重新加载水印 - mittBus.on('updateWartermark', () => { - settingRef.value.onWartermarkChange(); - }); // 获取缓存中的布局配置 if (Local.get('themeConfig')) { storesThemeConfig.setThemeConfig({ themeConfig: Local.get('themeConfig') }); @@ -73,10 +69,9 @@ onMounted(() => { } }); }); -// 页面销毁时,关闭监听布局配置/i18n监听/更新水印 +// 页面销毁时,关闭监听布局配置/i18n监听 onUnmounted(() => { mittBus.off('openSetingsDrawer', () => {}); - mittBus.off('updateWartermark', () => {}); }); // 监听路由的变化,设置网站标题 watch( diff --git a/src/layout/navBars/breadcrumb/setings.vue b/src/layout/navBars/breadcrumb/setings.vue index c94218fa..09232268 100644 --- a/src/layout/navBars/breadcrumb/setings.vue +++ b/src/layout/navBars/breadcrumb/setings.vue @@ -653,6 +653,10 @@ onMounted(() => { initLayoutChangeFun(); state.isMobile = other.isMobile(); }); + // 监听登录成功后重新加载水印 + mittBus.on('updateWartermark', () => { + onWartermarkChange(); + }); setTimeout(() => { // 默认样式 onColorPickerChange(); @@ -673,12 +677,12 @@ onMounted(() => { }); onUnmounted(() => { mittBus.off('layoutMobileResize', () => {}); + mittBus.off('updateWartermark', () => {}); }); // 暴露变量 defineExpose({ openDrawer, - onWartermarkChange, }); diff --git a/src/stores/userInfo.ts b/src/stores/userInfo.ts index cdf00eb8..c2f20c46 100644 --- a/src/stores/userInfo.ts +++ b/src/stores/userInfo.ts @@ -3,6 +3,7 @@ import { Session } from '/@/utils/storage'; import { getUserInfo, login, loginByMobile, loginBySocial, refreshTokenApi } from '/@/api/login/index'; import other from '/@/utils/other'; import { useMessage } from '/@/hooks/message'; +import mittBus from '/@/utils/mitt'; /** * @function useUserInfo @@ -130,6 +131,8 @@ export const useUserInfo = defineStore('userInfo', { authBtnList: res.data.permissions, }; this.userInfos = userInfo; + // 重新加载水印 + mittBus.emit('updateWartermark'); }); }, }, diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 0a2138dc..3d4ee93e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -40,7 +40,6 @@ import { formatAxis } from '/@/utils/formatTime'; import { useMessage } from '/@/hooks/message'; import { Session } from '/@/utils/storage'; import { initBackEndControlRoutes } from '/@/router/backEnd'; -import mittBus from '/@/utils/mitt'; // 引入组件 const Password = defineAsyncComponent(() => import('./component/password.vue')); @@ -72,8 +71,6 @@ const signInSuccess = async () => { useMessage().wraning('抱歉,您没有登录权限'); Session.clear(); } else { - // 重新加载水印 - mittBus.emit('updateWartermark'); // 初始化登录成功时间问候语 let currentTimeInfo = formatAxis(new Date()); if (route.query?.redirect) { From 54e6602a9d3fcc8dcf35d8d009d32b660417f217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Tue, 27 Aug 2024 15:42:34 +0800 Subject: [PATCH 15/32] ci(mirror): add gitcode mirror --- .github/workflows/image.yml | 51 ------------------------------------ .github/workflows/mirror.yml | 24 +++++++++++++++-- 2 files changed, 22 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/image.yml diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml deleted file mode 100644 index 607e430b..00000000 --- a/.github/workflows/image.yml +++ /dev/null @@ -1,51 +0,0 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: PIG 镜像 action - -on: - push: - branches: [ master ] - -jobs: - task: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - node-version: [18.x] - npm-client: [npm] - - steps: - - uses: pnpm/action-setup@v2 - if: matrix.npm-client == 'pnpm' - name: Install pnpm - with: - version: 7 - run_install: false - - - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Check out code - uses: actions/checkout@v4 - - - name: Install dependencies - run: ${{ matrix.npm-client }} install - - - name: Build - run: ${{ matrix.npm-client }} run build:docker - - - name: Login to Docker Registry - run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} registry.cn-hangzhou.aliyuncs.com - - - name: Build and push Docker images - run: | - docker-compose -f ./docker/docker-compose.yaml build - registry="registry.cn-hangzhou.aliyuncs.com/pigx/" - for service in $(docker-compose -f ./docker/docker-compose.yaml config --services); do - docker tag ${service}:latest ${registry}${service}:latest - docker push ${registry}${service}:latest - done diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 939c1914..88599a7a 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -7,12 +7,32 @@ on: branches: [ master,jdk17 ] jobs: - sync: + gitcode: runs-on: ubuntu-latest + steps: + - uses: wearerequired/git-mirror-action@master #同步至 gitcode + env: + SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + with: + source-repo: "git@github.com:pig-mesh/pig.git" + destination-repo: "git@gitcode.com:pig-mesh/pig-ui.git" + gitlink: + runs-on: ubuntu-latest + steps: + - uses: wearerequired/git-mirror-action@master #同步至 gitlink + env: + SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + with: + source-repo: "git@github.com:pig-mesh/pig.git" + destination-repo: "git@code.gitlink.org.cn:lengleng/pig-ui.git" + gitee: + runs-on: ubuntu-latest + container: + image: "centos:8" steps: - uses: wearerequired/git-mirror-action@master #同步至 gitee env: SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} with: - source-repo: "git@github.com:pig-mesh/pig-ui.git" + source-repo: "git@github.com:pig-mesh/pig.git" destination-repo: "git@gitee.com:log4j/pig-ui.git" From 29e3325d94c920b34c2e146a8b29a28b229cff9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Tue, 27 Aug 2024 15:46:58 +0800 Subject: [PATCH 16/32] ci(mirror): add gitcode mirror --- .github/workflows/mirror.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 88599a7a..3210e464 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -2,9 +2,9 @@ name: 同步代码 on: push: - branches: [ master,jdk17 ] + branches: [ master,dev ] pull_request: - branches: [ master,jdk17 ] + branches: [ master,dev ] jobs: gitcode: From 4c7255c7774ed240ba539a47435deaa778c987b1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 22:25:39 +0000 Subject: [PATCH 17/32] fix(deps): update dependency axios to v1.7.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 87894ec7..08779845 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@wangeditor/editor": "5.1.23", "@wangeditor/editor-for-vue": "5.1.12", "autoprefixer": "10.4.20", - "axios": "1.7.4", + "axios": "1.7.6", "china-area-data": "^5.0.1", "codemirror": "5.65.17", "crypto-js": "4.2.0", From 15b10c0035817b78bcbf2fbd6d2db3b27b6a5463 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 31 Aug 2024 22:05:28 +0000 Subject: [PATCH 18/32] fix(deps): update dependency axios to v1.7.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08779845..c2173d54 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@wangeditor/editor": "5.1.23", "@wangeditor/editor-for-vue": "5.1.12", "autoprefixer": "10.4.20", - "axios": "1.7.6", + "axios": "1.7.7", "china-area-data": "^5.0.1", "codemirror": "5.65.17", "crypto-js": "4.2.0", From 5cd76a20a67248efa429d035577ebdd9bb03633e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 1 Sep 2024 19:47:18 +0000 Subject: [PATCH 19/32] fix(deps): update dependency postcss to v8.4.43 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08779845..5a33c3d8 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "mitt": "3.0.1", "nprogress": "0.2.0", "pinia": "2.2.2", - "postcss": "8.4.41", + "postcss": "8.4.43", "qs": "6.13.0", "screenfull": "6.0.2", "sm-crypto": "0.3.13", From d500a2bc74006434b7806920f441c026b377f5f3 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 00:36:13 +0000 Subject: [PATCH 20/32] fix(deps): update dependency sortablejs to v1.15.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 08779845..ea61f280 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "qs": "6.13.0", "screenfull": "6.0.2", "sm-crypto": "0.3.13", - "sortablejs": "1.15.2", + "sortablejs": "1.15.3", "splitpanes": "3.1.5", "tailwindcss": "3.4.10", "vue": "3.4.38", From 32b1a57b4f9aadc39827f14119d6abe11c5ee16b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 10:15:35 +0000 Subject: [PATCH 21/32] fix(deps): update dependency postcss to v8.4.44 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4a377fa1..199d60b6 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "mitt": "3.0.1", "nprogress": "0.2.0", "pinia": "2.2.2", - "postcss": "8.4.43", + "postcss": "8.4.44", "qs": "6.13.0", "screenfull": "6.0.2", "sm-crypto": "0.3.13", From 4b8c92deb5c8cf5558adb5cbdb8083974225fa2d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 13:37:03 +0000 Subject: [PATCH 22/32] fix(deps): update dependency element-plus to v2.8.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 199d60b6..cccf9a61 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "crypto-js": "4.2.0", "driver.js": "1.3.1", "echarts": "5.5.1", - "element-plus": "2.8.1", + "element-plus": "2.8.2", "js-cookie": "3.0.5", "mitt": "3.0.1", "nprogress": "0.2.0", From 2ab235cc16aed81d961c8ceffac096d221ede5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Sat, 7 Sep 2024 17:34:43 +0800 Subject: [PATCH 23/32] ci(github aciton): fix mirror source repo --- .github/workflows/mirror.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index 3210e464..525dcb52 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -14,7 +14,7 @@ jobs: env: SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} with: - source-repo: "git@github.com:pig-mesh/pig.git" + source-repo: "git@github.com:pig-mesh/pig-ui.git" destination-repo: "git@gitcode.com:pig-mesh/pig-ui.git" gitlink: runs-on: ubuntu-latest @@ -23,7 +23,7 @@ jobs: env: SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} with: - source-repo: "git@github.com:pig-mesh/pig.git" + source-repo: "git@github.com:pig-mesh/pig-ui.git" destination-repo: "git@code.gitlink.org.cn:lengleng/pig-ui.git" gitee: runs-on: ubuntu-latest @@ -34,5 +34,5 @@ jobs: env: SSH_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} with: - source-repo: "git@github.com:pig-mesh/pig.git" + source-repo: "git@github.com:pig-mesh/pig-ui.git" destination-repo: "git@gitee.com:log4j/pig-ui.git" From c9b99a9f4853a69f674774227608bdfcddb6029c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:53:11 +0000 Subject: [PATCH 24/32] fix(deps): update dependency vue to v3.5.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cccf9a61..d00d7607 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "sortablejs": "1.15.3", "splitpanes": "3.1.5", "tailwindcss": "3.4.10", - "vue": "3.4.38", + "vue": "3.5.4", "vue-clipboard3": "2.0.0", "vue-echarts": "7.0.3", "vue-i18n": "9.14.0", From 1017b9d5f558fb8c5f5994dc89800f36b99fee8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Sep 2024 19:02:33 +0000 Subject: [PATCH 25/32] fix(deps): update dependency vue-router to v4.4.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cccf9a61..c1ddf58f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "vue-clipboard3": "2.0.0", "vue-echarts": "7.0.3", "vue-i18n": "9.14.0", - "vue-router": "4.4.3", + "vue-router": "4.4.4", "vuedraggable": "4.1.0" }, "devDependencies": { From 3d678f80916fa97731394f6ca5c61db4ecd134a8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 11 Sep 2024 20:25:43 +0000 Subject: [PATCH 26/32] fix(deps): update dependency tailwindcss to v3.4.11 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e7dc205e..26846702 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "sm-crypto": "0.3.13", "sortablejs": "1.15.3", "splitpanes": "3.1.5", - "tailwindcss": "3.4.10", + "tailwindcss": "3.4.11", "vue": "3.5.4", "vue-clipboard3": "2.0.0", "vue-echarts": "7.0.3", From a32c2ae27bcc788463f08df971dd2a857ea9942a Mon Sep 17 00:00:00 2001 From: lbw Date: Thu, 12 Sep 2024 03:53:43 +0000 Subject: [PATCH 27/32] =?UTF-8?q?=E6=94=AF=E6=8C=81=20tailwindcss=20?= =?UTF-8?q?=E6=B7=B1=E8=89=B2=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lbw --- src/layout/navBars/breadcrumb/setings.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/layout/navBars/breadcrumb/setings.vue b/src/layout/navBars/breadcrumb/setings.vue index 09232268..65e14662 100644 --- a/src/layout/navBars/breadcrumb/setings.vue +++ b/src/layout/navBars/breadcrumb/setings.vue @@ -553,8 +553,14 @@ const onAddFilterChange = (attr: string) => { // 4、界面显示 --> 深色模式 const onAddDarkChange = () => { const body = document.documentElement as HTMLElement; - if (getThemeConfig.value.isIsDark) body.setAttribute('data-theme', 'dark'); - else body.setAttribute('data-theme', ''); + if (getThemeConfig.value.isIsDark) { + body.setAttribute('data-theme', 'dark'); + // body 再增加一个 dark : true 的class ,用于tailwindcss 判断是否是深色 + body.classList.add('dark'); + } else { + body.classList.remove('dark'); + body.setAttribute('data-theme', ''); + } }; // 4、界面显示 --> 开启水印 const onWartermarkChange = () => { From 590f0ceead37eeaccfe1c3c78fbee364f14378c6 Mon Sep 17 00:00:00 2001 From: lbw Date: Thu, 12 Sep 2024 04:05:57 +0000 Subject: [PATCH 28/32] =?UTF-8?q?=E5=90=AF=E7=94=A8=E5=9F=BA=E4=BA=8E=20cl?= =?UTF-8?q?ass=20=E7=9A=84=E6=9A=97=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lbw --- tailwind.config.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 9de54b3c..ee706234 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -116,4 +116,5 @@ module.exports = { 10: '40px', }, }, + darkMode: 'class', // 启用基于 class 的暗模式 }; From 52007ab1b32ad962b9c07cb687dafccb4731d94f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 07:48:33 +0000 Subject: [PATCH 29/32] fix(deps): update dependency vue-router to v4.4.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26846702..7f014937 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "vue-clipboard3": "2.0.0", "vue-echarts": "7.0.3", "vue-i18n": "9.14.0", - "vue-router": "4.4.4", + "vue-router": "4.4.5", "vuedraggable": "4.1.0" }, "devDependencies": { From 4f8e15e9447f151ccda80c71cd862f5c8dc2c0df Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 09:17:35 +0000 Subject: [PATCH 30/32] fix(deps): update dependency element-plus to v2.8.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26846702..b8a760df 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "crypto-js": "4.2.0", "driver.js": "1.3.1", "echarts": "5.5.1", - "element-plus": "2.8.2", + "element-plus": "2.8.3", "js-cookie": "3.0.5", "mitt": "3.0.1", "nprogress": "0.2.0", From 6b102988a7aa25a77a3ad2c736e84870fbcfa854 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 14 Sep 2024 15:48:58 +0000 Subject: [PATCH 31/32] fix(deps): update dependency postcss to v8.4.47 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8a760df..4ad00ce2 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "mitt": "3.0.1", "nprogress": "0.2.0", "pinia": "2.2.2", - "postcss": "8.4.44", + "postcss": "8.4.47", "qs": "6.13.0", "screenfull": "6.0.2", "sm-crypto": "0.3.13", From 6f928c98af50cc902d116610f2bf9308f336cbb2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:19:07 +0000 Subject: [PATCH 32/32] fix(deps): update dependency vue to v3.5.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8a760df..1239d4bc 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "sortablejs": "1.15.3", "splitpanes": "3.1.5", "tailwindcss": "3.4.11", - "vue": "3.5.4", + "vue": "3.5.6", "vue-clipboard3": "2.0.0", "vue-echarts": "7.0.3", "vue-i18n": "9.14.0",