Merge branch 'main' of github.com:pure-admin/vue-pure-admin into gitee

This commit is contained in:
xiaoxian521 2023-06-07 11:05:30 +08:00
commit 793e228be2
4 changed files with 30 additions and 18 deletions

View File

@ -3,6 +3,7 @@
"christian-kohler.path-intellisense", "christian-kohler.path-intellisense",
"vscode-icons-team.vscode-icons", "vscode-icons-team.vscode-icons",
"davidanson.vscode-markdownlint", "davidanson.vscode-markdownlint",
"ms-azuretools.vscode-docker",
"stylelint.vscode-stylelint", "stylelint.vscode-stylelint",
"bradlc.vscode-tailwindcss", "bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",

View File

@ -22,7 +22,18 @@ notices.value.map(v => (noticesNum.value += v.list.length));
</span> </span>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-tabs :stretch="true" v-model="activeKey" class="dropdown-tabs"> <el-tabs
:stretch="true"
v-model="activeKey"
class="dropdown-tabs"
:style="{ width: notices.length === 0 ? '200px' : '330px' }"
>
<el-empty
v-if="notices.length === 0"
description="暂无消息"
:image-size="60"
/>
<span v-else>
<template v-for="item in notices" :key="item.key"> <template v-for="item in notices" :key="item.key">
<el-tab-pane <el-tab-pane
:label="`${item.name}(${item.list.length})`" :label="`${item.name}(${item.list.length})`"
@ -35,6 +46,7 @@ notices.value.map(v => (noticesNum.value += v.list.length));
</el-scrollbar> </el-scrollbar>
</el-tab-pane> </el-tab-pane>
</template> </template>
</span>
</el-tabs> </el-tabs>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
@ -57,8 +69,6 @@ notices.value.map(v => (noticesNum.value += v.list.length));
} }
.dropdown-tabs { .dropdown-tabs {
width: 330px;
.noticeList-container { .noticeList-container {
padding: 15px 24px 0; padding: 15px 24px 0;
} }

View File

@ -145,6 +145,7 @@ onKeyStroke("ArrowDown", handleDown);
:style="{ :style="{
borderRadius: '6px' borderRadius: '6px'
}" }"
append-to-body
@opened="inputRef.focus()" @opened="inputRef.focus()"
@closed="inputRef.blur()" @closed="inputRef.blur()"
> >

View File

@ -12,7 +12,7 @@ export const REGEXP_PWD =
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)]|[()])+$)(?!^.*[\u4E00-\u9FA5].*$)([^(0-9a-zA-Z)]|[()]|[a-z]|[A-Z]|[0-9]){8,18}$/; /^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)]|[()])+$)(?!^.*[\u4E00-\u9FA5].*$)([^(0-9a-zA-Z)]|[()]|[a-z]|[A-Z]|[0-9]){8,18}$/;
/** 登录校验 */ /** 登录校验 */
const loginRules = reactive(<FormRules>{ const loginRules = reactive<FormRules>({
password: [ password: [
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
@ -44,7 +44,7 @@ const loginRules = reactive(<FormRules>{
}); });
/** 手机登录校验 */ /** 手机登录校验 */
const phoneRules = reactive(<FormRules>{ const phoneRules = reactive<FormRules>({
phone: [ phone: [
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {
@ -76,7 +76,7 @@ const phoneRules = reactive(<FormRules>{
}); });
/** 忘记密码校验 */ /** 忘记密码校验 */
const updateRules = reactive(<FormRules>{ const updateRules = reactive<FormRules>({
phone: [ phone: [
{ {
validator: (rule, value, callback) => { validator: (rule, value, callback) => {