Skip to content

Commit

Permalink
Merge branch 'pure-admin:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
shark-lajiao committed Jun 7, 2023
2 parents a81d1d9 + f613a79 commit 6cf0780
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 18 deletions.
40 changes: 25 additions & 15 deletions src/layout/components/notice/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,31 @@ notices.value.map(v => (noticesNum.value += v.list.length));
</span>
<template #dropdown>
<el-dropdown-menu>
<el-tabs :stretch="true" v-model="activeKey" class="dropdown-tabs">
<template v-for="item in notices" :key="item.key">
<el-tab-pane
:label="`${item.name}(${item.list.length})`"
:name="`${item.key}`"
>
<el-scrollbar max-height="330px">
<div class="noticeList-container">
<NoticeList :list="item.list" />
</div>
</el-scrollbar>
</el-tab-pane>
</template>
<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">
<el-tab-pane
:label="`${item.name}(${item.list.length})`"
:name="`${item.key}`"
>
<el-scrollbar max-height="330px">
<div class="noticeList-container">
<NoticeList :list="item.list" />
</div>
</el-scrollbar>
</el-tab-pane>
</template>
</span>
</el-tabs>
</el-dropdown-menu>
</template>
Expand All @@ -57,8 +69,6 @@ notices.value.map(v => (noticesNum.value += v.list.length));
}
.dropdown-tabs {
width: 330px;
.noticeList-container {
padding: 15px 24px 0;
}
Expand Down
1 change: 1 addition & 0 deletions src/layout/components/search/components/SearchModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ onKeyStroke("ArrowDown", handleDown);
:style="{
borderRadius: '6px'
}"
append-to-body
@opened="inputRef.focus()"
@closed="inputRef.blur()"
>
Expand Down
6 changes: 3 additions & 3 deletions src/views/login/utils/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}$/;

/** 登录校验 */
const loginRules = reactive(<FormRules>{
const loginRules = reactive<FormRules>({
password: [
{
validator: (rule, value, callback) => {
Expand Down Expand Up @@ -44,7 +44,7 @@ const loginRules = reactive(<FormRules>{
});

/** 手机登录校验 */
const phoneRules = reactive(<FormRules>{
const phoneRules = reactive<FormRules>({
phone: [
{
validator: (rule, value, callback) => {
Expand Down Expand Up @@ -76,7 +76,7 @@ const phoneRules = reactive(<FormRules>{
});

/** 忘记密码校验 */
const updateRules = reactive(<FormRules>{
const updateRules = reactive<FormRules>({
phone: [
{
validator: (rule, value, callback) => {
Expand Down

0 comments on commit 6cf0780

Please sign in to comment.