From 4f8096a6a14fb145fe15de3be1f34da095973ef8 Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期五, 15 十二月 2023 13:44:50 +0800 Subject: [PATCH] 解决打包问题导致树组件以及弹窗组件内容无法正常显示问题,解决方式为将弹窗或相关底部按钮区域样式drawer-bootom-button修改为drawer-bottom-button --- src/views/system/modules/PasswordModal.vue | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/src/views/system/modules/PasswordModal.vue b/src/views/system/modules/PasswordModal.vue index f9f897e..810cc5f 100644 --- a/src/views/system/modules/PasswordModal.vue +++ b/src/views/system/modules/PasswordModal.vue @@ -31,6 +31,7 @@ <script> import {changePassword} from '@/api/api' + import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' export default { name: "PasswordModal", @@ -69,6 +70,13 @@ sm: { span: 16 }, }, form:this.$form.createForm(this) + } + }, + watch:{ + visible:{ + handler(value){ + if(value) this.initDictData('password_length') + } } }, created () { @@ -136,7 +144,20 @@ handleConfirmBlur (e) { const value = e.target.value this.confirmDirty = this.confirmDirty || !!value - } + }, + initDictData(dictCode) { + //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁� + ajaxGetDictItems(dictCode, null).then((res) => { + if (res.success) { + const regExp = new RegExp("^(?=.*[a-zA-Z])(?=.*\\\d)(?=.*[~!@#$%^&*()_+`\\-={}:\";'<>?,./]).{"+Number(res.result[0].value)+",}$"); + this.validatorRules.password.rules[0]={ + required:true, + pattern: regExp, + message: `瀵嗙爜鐢�${res.result[0].value}浣嶆暟瀛椼�佸ぇ灏忓啓瀛楁瘝鍜岀壒娈婄鍙风粍鎴�!`, + } + } + }) + }, } } </script> \ No newline at end of file -- Gitblit v1.9.3