mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-21 15:00:28 +08:00
Compare commits
1 Commits
feat/layou
...
refactor/v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13f61e824e |
@@ -97,7 +97,7 @@
|
|||||||
"vditor": "^3.11.2",
|
"vditor": "^3.11.2",
|
||||||
"version-rocket": "^1.7.4",
|
"version-rocket": "^1.7.4",
|
||||||
"vue": "^3.5.25",
|
"vue": "^3.5.25",
|
||||||
"vue-i18n": "^11.2.2",
|
"vue-i18n": "https://pkg.pr.new/vue-i18n@2337",
|
||||||
"vue-json-pretty": "^2.6.0",
|
"vue-json-pretty": "^2.6.0",
|
||||||
"vue-pdf-embed": "^2.1.3",
|
"vue-pdf-embed": "^2.1.3",
|
||||||
"vue-router": "^4.6.3",
|
"vue-router": "^4.6.3",
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"typescript-eslint": "^8.49.0",
|
"typescript-eslint": "^8.49.0",
|
||||||
"unplugin-icons": "^22.5.0",
|
"unplugin-icons": "^22.5.0",
|
||||||
"vite": "^7.2.7",
|
"vite": "8.0.0-beta.3",
|
||||||
"vite-plugin-cdn-import": "^1.0.1",
|
"vite-plugin-cdn-import": "^1.0.1",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vite-plugin-fake-server": "^2.2.2",
|
"vite-plugin-fake-server": "^2.2.2",
|
||||||
|
|||||||
1148
pnpm-lock.yaml
generated
1148
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -53,11 +53,9 @@ 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">
|
||||||
<div
|
<GlobalizationIcon
|
||||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
>
|
/>
|
||||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
|
||||||
</div>
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -115,7 +113,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="set-icon navbar-bg-hover"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ 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/lucide/bell";
|
import BellIcon from "~icons/ep/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})` : "")
|
||||||
@@ -18,9 +21,14 @@ const getLabel = computed(
|
|||||||
<template>
|
<template>
|
||||||
<el-dropdown trigger="click" placement="bottom-end">
|
<el-dropdown trigger="click" placement="bottom-end">
|
||||||
<span
|
<span
|
||||||
:class="['dropdown-badge', 'navbar-bg-hover', 'select-none', 'mr-[7px]']"
|
:class="[
|
||||||
|
'dropdown-badge',
|
||||||
|
'navbar-bg-hover',
|
||||||
|
'select-none',
|
||||||
|
Number(noticesNum) !== 0 && 'mr-[10px]'
|
||||||
|
]"
|
||||||
>
|
>
|
||||||
<el-badge is-dot>
|
<el-badge :value="Number(noticesNum) === 0 ? '' : noticesNum" :max="99">
|
||||||
<span class="header-notice-icon">
|
<span class="header-notice-icon">
|
||||||
<IconifyIconOffline :icon="BellIcon" />
|
<IconifyIconOffline :icon="BellIcon" />
|
||||||
</span>
|
</span>
|
||||||
@@ -57,34 +65,6 @@ 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;
|
||||||
@@ -94,13 +74,7 @@ const getLabel = computed(
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.header-notice-icon {
|
.header-notice-icon {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
.header-notice-icon svg {
|
|
||||||
animation: pure-bell-ring 1s both;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 hover:[&>svg]:animate-scale-bounce"
|
class="search-container w-[40px] h-[48px] flex-c cursor-pointer navbar-bg-hover"
|
||||||
@click="handleSearch"
|
@click="handleSearch"
|
||||||
>
|
>
|
||||||
<IconifyIconOffline icon="ri/search-line" />
|
<IconifyIconOffline icon="ri/search-line" />
|
||||||
|
|||||||
@@ -83,11 +83,9 @@ onMounted(() => {
|
|||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<el-dropdown id="header-translation" trigger="click">
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
<div
|
<GlobalizationIcon
|
||||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
>
|
/>
|
||||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
|
||||||
</div>
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -143,7 +141,7 @@ onMounted(() => {
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="set-icon navbar-bg-hover"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -104,11 +104,9 @@ watch(
|
|||||||
<LaySearch id="header-search" />
|
<LaySearch id="header-search" />
|
||||||
<!-- 国际化 -->
|
<!-- 国际化 -->
|
||||||
<el-dropdown id="header-translation" trigger="click">
|
<el-dropdown id="header-translation" trigger="click">
|
||||||
<div
|
<GlobalizationIcon
|
||||||
class="globalization-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
|
||||||
>
|
/>
|
||||||
<IconifyIconOffline :icon="GlobalizationIcon" />
|
|
||||||
</div>
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu class="translation">
|
<el-dropdown-menu class="translation">
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@@ -164,7 +162,7 @@ watch(
|
|||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="set-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
class="set-icon navbar-bg-hover"
|
||||||
:title="t('buttons.pureOpenSystemSet')"
|
:title="t('buttons.pureOpenSystemSet')"
|
||||||
@click="onPanel"
|
@click="onPanel"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -24,10 +24,7 @@ watch(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<span
|
<span class="fullscreen-icon navbar-bg-hover" @click="toggle">
|
||||||
class="fullscreen-icon navbar-bg-hover hover:[&>svg]:animate-scale-bounce"
|
|
||||||
@click="toggle"
|
|
||||||
>
|
|
||||||
<IconifyIconOffline :icon="screenIcon" />
|
<IconifyIconOffline :icon="screenIcon" />
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -35,18 +35,3 @@
|
|||||||
.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,14 +34,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -451,7 +449,7 @@
|
|||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
.search-container,
|
.search-container,
|
||||||
/* 国际化 */
|
/* 国际化 */
|
||||||
.globalization-icon,
|
.globalization,
|
||||||
/* 全屏 */
|
/* 全屏 */
|
||||||
.fullscreen-icon,
|
.fullscreen-icon,
|
||||||
/* 消息通知 */
|
/* 消息通知 */
|
||||||
@@ -470,6 +468,15 @@
|
|||||||
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;
|
||||||
@@ -623,7 +630,7 @@ body[layout="vertical"] {
|
|||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
.search-container,
|
.search-container,
|
||||||
/* 国际化 */
|
/* 国际化 */
|
||||||
.globalization-icon,
|
.globalization,
|
||||||
/* 全屏 */
|
/* 全屏 */
|
||||||
.fullscreen-icon,
|
.fullscreen-icon,
|
||||||
/* 消息通知 */
|
/* 消息通知 */
|
||||||
|
|||||||
@@ -44,7 +44,3 @@
|
|||||||
@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;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
|||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
// 消除打包大小超过500kb警告
|
// 消除打包大小超过500kb警告
|
||||||
chunkSizeWarningLimit: 4000,
|
chunkSizeWarningLimit: 4000,
|
||||||
rollupOptions: {
|
rolldownOptions: {
|
||||||
input: {
|
input: {
|
||||||
index: pathResolve("./index.html", import.meta.url)
|
index: pathResolve("./index.html", import.meta.url)
|
||||||
},
|
},
|
||||||
@@ -51,6 +51,10 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
|
|||||||
chunkFileNames: "static/js/[name]-[hash].js",
|
chunkFileNames: "static/js/[name]-[hash].js",
|
||||||
entryFileNames: "static/js/[name]-[hash].js",
|
entryFileNames: "static/js/[name]-[hash].js",
|
||||||
assetFileNames: "static/[ext]/[name]-[hash].[ext]"
|
assetFileNames: "static/[ext]/[name]-[hash].[ext]"
|
||||||
|
},
|
||||||
|
checks: {
|
||||||
|
// 禁用插件计时警告
|
||||||
|
pluginTimings: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user