@ -66,7 +66,7 @@ const closeSearch = () => {
|
||||
state.isShowSearch = false;
|
||||
};
|
||||
// 菜单搜索数据过滤
|
||||
const menuSearch = (queryString: string, cb: Function) => {
|
||||
const menuSearch = (queryString: string, cb: (options: any[]) => void) => {
|
||||
let options = state.menuList.filter((item) => {
|
||||
return item.title.indexOf(queryString) > -1;
|
||||
});
|
||||
|
@ -40,7 +40,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
router.addRoute(route); // 动态添加可访问路由表
|
||||
}
|
||||
});
|
||||
// @ts-ignore
|
||||
// @ts-expect-error hack方法 确保addRoutes已完成
|
||||
next({ path: to.path, replace: true, params: to.params, query: to.query, hash: to.hash, name: to.name as string }); // hack方法 确保addRoutes已完成
|
||||
}
|
||||
} else {
|
||||
|
@ -92,7 +92,7 @@ const registerRules: ElFormRules = {
|
||||
password: [
|
||||
{ required: true, trigger: 'blur', message: '请输入您的密码' },
|
||||
{ min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' },
|
||||
{ pattern: /^[^<>"'|\\]+$/, message: '不能包含非法字符:< > " \' \\\ |', trigger: 'blur' }
|
||||
{ pattern: /^[^<>"'|\\]+$/, message: '不能包含非法字符:< > " \' \\ |', trigger: 'blur' }
|
||||
],
|
||||
confirmPassword: [
|
||||
{ required: true, trigger: 'blur', message: '请再次输入您的密码' },
|
||||
|
@ -393,7 +393,7 @@ const initData: PageData<UserForm, UserQuery> = {
|
||||
message: '用户密码长度必须介于 5 和 20 之间',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{ pattern: /^[^<>"'|\\]+$/, message: '不能包含非法字符:< > " \' \\\ |', trigger: 'blur' }
|
||||
{ pattern: /^[^<>"'|\\]+$/, message: '不能包含非法字符:< > " \' \\ |', trigger: 'blur' }
|
||||
],
|
||||
email: [
|
||||
{
|
||||
@ -506,7 +506,7 @@ const handleResetPwd = async (row: UserVO) => {
|
||||
inputErrorMessage: '用户密码长度必须介于 5 和 20 之间',
|
||||
inputValidator: (value) => {
|
||||
if (/<|>|"|'|\||\\/.test(value)) {
|
||||
return '不能包含非法字符:< > " \' \\\ |';
|
||||
return '不能包含非法字符:< > " \' \\ |';
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -45,7 +45,7 @@ const rules = ref({
|
||||
message: '长度在 6 到 20 个字符',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{ pattern: /^[^<>"'|\\]+$/, message: '不能包含非法字符:< > " \' \\\ |', trigger: 'blur' }
|
||||
{ pattern: /^[^<>"'|\\]+$/, message: '不能包含非法字符:< > " \' \\ |', trigger: 'blur' }
|
||||
],
|
||||
confirmPassword: [
|
||||
{ required: true, message: '确认密码不能为空', trigger: 'blur' },
|
||||
|
@ -63,7 +63,7 @@ const emit = defineEmits(['ok']);
|
||||
|
||||
/** 查询参数列表 */
|
||||
const show = (dataName: string) => {
|
||||
getDataNames().then(res => {
|
||||
getDataNames().then((res) => {
|
||||
if (res.code == 200) {
|
||||
dataNameList.value = res.data;
|
||||
if (dataName) {
|
||||
|
Reference in New Issue
Block a user