mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-21 15:00:28 +08:00
Compare commits
3 Commits
perf/sysCo
...
feat/layou
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98b863704a | ||
|
|
cdd1b1270c | ||
|
|
8bc3f5686c |
@@ -53,9 +53,11 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<el-dropdown id="header-translation" trigger="click">
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
<GlobalizationIcon
|
<div
|
||||||
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||||
/>
|
>
|
||||||
|
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||||
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -113,7 +115,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover"
|
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -3,15 +3,12 @@ import { useI18n } from "vue-i18n";
|
|||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { noticesData } from "./data";
|
import { noticesData } from "./data";
|
||||||
import NoticeList from "./components/NoticeList.vue";
|
import NoticeList from "./components/NoticeList.vue";
|
||||||
import BellIcon from "~icons/ep/bell";
|
import BellIcon from "~icons/lucide/bell";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const noticesNum = ref(0);
|
|
||||||
const notices = ref(noticesData);
|
const notices = ref(noticesData);
|
||||||
const activeKey = ref(noticesData[0]?.key);
|
const activeKey = ref(noticesData[0]?.key);
|
||||||
|
|
||||||
notices.value.map(v => (noticesNum.value += v.list.length));
|
|
||||||
|
|
||||||
const getLabel = computed(
|
const getLabel = computed(
|
||||||
() => item =>
|
() => item =>
|
||||||
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
t(item.name) + (item.list.length > 0 ? `(${item.list.length})` : "")
|
||||||
@@ -21,14 +18,9 @@ const getLabel = computed(
|
|||||||
<template>
|
<template>
|
||||||
<el-dropdown trigger="click" placement="bottom-end">
|
<el-dropdown trigger="click" placement="bottom-end">
|
||||||
<span
|
<span
|
||||||
:class="[
|
:class="['dropdown-badge', 'navbar-bg-hover', 'select-none', 'mr-[7px]']"
|
||||||
'dropdown-badge',
|
|
||||||
'navbar-bg-hover',
|
|
||||||
'select-none',
|
|
||||||
Number(noticesNum) !== 0 && 'mr-[10px]'
|
|
||||||
]"
|
|
||||||
>
|
>
|
||||||
<el-badge :value="Number(noticesNum) === 0 ? '' : noticesNum" :max="99">
|
<el-badge is-dot>
|
||||||
<span class="header-notice-icon">
|
<span class="header-notice-icon">
|
||||||
<IconifyIconOffline :icon="BellIcon" />
|
<IconifyIconOffline :icon="BellIcon" />
|
||||||
</span>
|
</span>
|
||||||
@@ -65,6 +57,34 @@ const getLabel = computed(
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
/* ”铃铛“摇晃衰减动画 */
|
||||||
|
@keyframes pure-bell-ring {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
transform-origin: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
15% {
|
||||||
|
transform: rotateZ(10deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
30% {
|
||||||
|
transform: rotateZ(-10deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
45% {
|
||||||
|
transform: rotateZ(5deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
60% {
|
||||||
|
transform: rotateZ(-5deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
75% {
|
||||||
|
transform: rotateZ(2deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-badge {
|
.dropdown-badge {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -74,7 +94,13 @@ const getLabel = computed(
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.header-notice-icon {
|
.header-notice-icon {
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.header-notice-icon svg {
|
||||||
|
animation: pure-bell-ring 1s both;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ onBeforeUnmount(() => {
|
|||||||
<div class="right-panel-background" />
|
<div class="right-panel-background" />
|
||||||
<div ref="target" class="right-panel bg-bg_color">
|
<div ref="target" class="right-panel bg-bg_color">
|
||||||
<div
|
<div
|
||||||
class="flex-bc py-3 px-5 border-0 border-l border-solid border-(--pure-border-color)"
|
class="project-configuration border-0 border-b-[1px] border-solid border-[var(--pure-border-color)]"
|
||||||
>
|
>
|
||||||
<h4 class="dark:text-white">
|
<h4 class="dark:text-white">
|
||||||
{{ t("panel.pureSystemSet") }}
|
{{ t("panel.pureSystemSet") }}
|
||||||
@@ -73,14 +73,12 @@ onBeforeUnmount(() => {
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<el-scrollbar
|
<el-scrollbar>
|
||||||
class="border-y border-l border-r-0 border-solid border-(--pure-border-color) h-[calc(100vh-104px)]!"
|
|
||||||
>
|
|
||||||
<slot />
|
<slot />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="flex justify-end p-3 border-0 border-l border-solid border-(--pure-border-color)"
|
class="flex justify-end p-3 border-0 border-t-[1px] border-solid border-[var(--pure-border-color)]"
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-tippy="{
|
v-tippy="{
|
||||||
@@ -101,6 +99,10 @@ onBeforeUnmount(() => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-scrollbar) {
|
||||||
|
height: calc(100vh - 110px);
|
||||||
|
}
|
||||||
|
|
||||||
.right-panel-background {
|
.right-panel-background {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -137,4 +139,11 @@ onBeforeUnmount(() => {
|
|||||||
transform: translate(0);
|
transform: translate(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.project-configuration {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 14px 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ function handleSearch() {
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
|
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||||
@click="handleSearch"
|
@click="handleSearch"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="ri/search-line" />
|
<IconifyIconOffline icon="ri/search-line" />
|
||||||
|
|||||||
@@ -83,9 +83,11 @@ onMounted(() => {
|
|||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<el-dropdown id="header-translation" trigger="click">
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
<GlobalizationIcon
|
<div
|
||||||
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||||
/>
|
>
|
||||||
|
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||||
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -141,7 +143,7 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover"
|
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -104,9 +104,11 @@ watch(
|
|||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<el-dropdown id="header-translation" trigger="click">
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
<GlobalizationIcon
|
<div
|
||||||
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||||
/>
|
>
|
||||||
|
<IconifyIconOffline :icon="GlobalizationIcon" />
|
||||||
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -162,7 +164,7 @@ watch(
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover"
|
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -24,7 +24,10 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span class="fullscreen-icon navbar-bg-hover" @click="toggle">
|
<span
|
||||||
|
class="fullscreen-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
||||||
|
@click="toggle"
|
||||||
|
>
|
||||||
<IconifyIconOffline :icon="screenIcon" />
|
<IconifyIconOffline :icon="screenIcon" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -135,6 +135,17 @@ html.dark {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 系统配置面板 */
|
||||||
|
.right-panel-items {
|
||||||
|
.el-divider__text {
|
||||||
|
--el-bg-color: var(--el-bg-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-divider--horizontal {
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* 表单设计器 */
|
/* 表单设计器 */
|
||||||
.design-form {
|
.design-form {
|
||||||
.el-main.config-content,
|
.el-main.config-content,
|
||||||
|
|||||||
@@ -35,3 +35,18 @@
|
|||||||
.html-weakness {
|
.html-weakness {
|
||||||
filter: invert(80%);
|
filter: invert(80%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 轻微缩小,再恢复原状的平滑缩放动画 */
|
||||||
|
@keyframes pure-scale-bounce {
|
||||||
|
0% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
transform: scale(0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -34,12 +34,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.set-icon,
|
.set-icon,
|
||||||
.fullscreen-icon {
|
.fullscreen-icon,
|
||||||
|
.globalization-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
|
font-size: 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -449,7 +451,7 @@
|
|||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
.search-container,
|
.search-container,
|
||||||
/* 国际化 */
|
/* 国际化 */
|
||||||
.globalization,
|
.globalization-icon,
|
||||||
/* 全屏 */
|
/* 全屏 */
|
||||||
.fullscreen-icon,
|
.fullscreen-icon,
|
||||||
/* 消息通知 */
|
/* 消息通知 */
|
||||||
@@ -468,15 +470,6 @@
|
|||||||
color: var(--pure-theme-sub-menu-active-text);
|
color: var(--pure-theme-sub-menu-active-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.globalization {
|
|
||||||
width: 40px;
|
|
||||||
height: 48px;
|
|
||||||
padding: 11px;
|
|
||||||
color: var(--pure-theme-sub-menu-active-text);
|
|
||||||
cursor: pointer;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-dropdown-link {
|
.el-dropdown-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -630,7 +623,7 @@ body[layout="vertical"] {
|
|||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
.search-container,
|
.search-container,
|
||||||
/* 国际化 */
|
/* 国际化 */
|
||||||
.globalization,
|
.globalization-icon,
|
||||||
/* 全屏 */
|
/* 全屏 */
|
||||||
.fullscreen-icon,
|
.fullscreen-icon,
|
||||||
/* 消息通知 */
|
/* 消息通知 */
|
||||||
|
|||||||
@@ -44,3 +44,7 @@
|
|||||||
@utility navbar-bg-hover {
|
@utility navbar-bg-hover {
|
||||||
@apply dark:text-white dark:hover:bg-[#242424]!;
|
@apply dark:text-white dark:hover:bg-[#242424]!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@utility animate-scale-bounce {
|
||||||
|
animation: pure-scale-bounce 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user