Compare commits

..

1 Commits

Author SHA1 Message Date
xiaoxian521
13f61e824e refactor: 升级vitev8版本,从esbuildRollup转向RolldownOxc 2025-12-18 18:09:30 +08:00
6 changed files with 728 additions and 548 deletions

View File

@@ -55,9 +55,6 @@ panel:
pureTagsStyleCardTip: Card tags for efficient browsing
pureTagsStyleChrome: Chrome
pureTagsStyleChromeTip: Chrome style is classic and elegant
pureFullScreenWatermark: FullScreen Watermark
pureEnableWatermark: Watermark
pureWatermarkText: Text
pureInterfaceDisplay: Interface Display
pureGreyModel: Grey Model
pureWeakModel: Weak Model

View File

@@ -55,9 +55,6 @@ panel:
pureTagsStyleCardTip: 卡片标签,高效浏览
pureTagsStyleChrome: 谷歌
pureTagsStyleChromeTip: 谷歌风格,经典美观
pureFullScreenWatermark: 全屏水印
pureEnableWatermark: 水印
pureWatermarkText: 文本
pureInterfaceDisplay: 界面显示
pureGreyModel: 灰色模式
pureWeakModel: 色弱模式

View File

@@ -97,7 +97,7 @@
"vditor": "^3.11.2",
"version-rocket": "^1.7.4",
"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-pdf-embed": "^2.1.3",
"vue-router": "^4.6.3",
@@ -164,7 +164,7 @@
"typescript": "^5.9.3",
"typescript-eslint": "^8.49.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-compression": "^0.5.1",
"vite-plugin-fake-server": "^2.2.2",

1148
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,14 +9,6 @@ import {
onUnmounted,
onBeforeMount
} from "vue";
import {
useDark,
debounce,
isNumber,
useGlobal,
isAllEmpty,
useWatermark
} from "@pureadmin/utils";
import { useI18n } from "vue-i18n";
import { emitter } from "@/utils/mitt";
import LayPanel from "../lay-panel/index.vue";
@@ -25,6 +17,7 @@ import { useAppStoreHook } from "@/store/modules/app";
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
import Segmented, { type OptionsType } from "@/components/ReSegmented";
import { useDataThemeChange } from "@/layout/hooks/useDataThemeChange";
import { useDark, useGlobal, debounce, isNumber } from "@pureadmin/utils";
import Check from "~icons/ep/check";
import LeftArrow from "~icons/ri/arrow-left-s-line?width=20&height=20";
@@ -34,9 +27,8 @@ import DarkIcon from "@/assets/svg/dark.svg?component";
import SystemIcon from "@/assets/svg/system.svg?component";
const { t } = useI18n();
const { device } = useNav();
const { isDark } = useDark();
const { device, title } = useNav();
const { setWatermark, clear } = useWatermark();
const { $storage } = useGlobal<GlobalPropertiesApi>();
const mixRef = ref();
@@ -66,12 +58,6 @@ const markValue = ref($storage.configure?.showModel ?? "smart");
const logoVal = ref($storage.configure?.showLogo ?? true);
/** WIP... */
const watermarkConfigs = reactive({
enable: false,
text: null
});
const settings = reactive({
greyVal: $storage.configure.grey,
weakVal: $storage.configure.weak,
@@ -143,21 +129,6 @@ function onChange({ option }) {
emitter.emit("tagViewsShowModel", value);
}
function onWatermarkSwitchChange(value) {
const text = isAllEmpty(watermarkConfigs.text)
? title.value
: watermarkConfigs.text;
if (value) {
setWatermark(text);
} else {
clear();
}
}
function onWatermarkInputChange(value) {
setWatermark(value);
}
/** 侧边栏Logo */
function logoChange() {
unref(logoVal)
@@ -476,39 +447,30 @@ onUnmounted(() => removeMatchMedia);
@change="onChange"
/>
<p class="mt-5! font-medium text-sm dark:text-white">
{{ t("panel.pureFullScreenWatermark") }}
</p>
<ul class="setting">
<li>
<span class="dark:text-white">
{{ t("panel.pureEnableWatermark") }}
</span>
<el-switch
v-model="watermarkConfigs.enable"
inline-prompt
:active-text="t('buttons.pureOpenText')"
:inactive-text="t('buttons.pureCloseText')"
@change="onWatermarkSwitchChange"
/>
</li>
<li>
<span class="dark:text-white">
{{ t("panel.pureWatermarkText") }}
</span>
<el-input
v-model="watermarkConfigs.text"
class="w-[100px]!"
:placeholder="title"
@input="onWatermarkInputChange"
/>
</li>
</ul>
<p class="mt-5! font-medium text-sm dark:text-white">
{{ t("panel.pureInterfaceDisplay") }}
</p>
<ul class="setting">
<li>
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
<el-switch
v-model="settings.greyVal"
inline-prompt
:active-text="t('buttons.pureOpenText')"
:inactive-text="t('buttons.pureCloseText')"
@change="greyChange"
/>
</li>
<li>
<span class="dark:text-white">{{ t("panel.pureWeakModel") }}</span>
<el-switch
v-model="settings.weakVal"
inline-prompt
:active-text="t('buttons.pureOpenText')"
:inactive-text="t('buttons.pureCloseText')"
@change="weekChange"
/>
</li>
<li>
<span class="dark:text-white">{{ t("panel.pureHiddenTags") }}</span>
<el-switch
@@ -529,18 +491,6 @@ onUnmounted(() => removeMatchMedia);
@change="hideFooterChange"
/>
</li>
<li>
<span class="dark:text-white">
{{ t("panel.pureMultiTagsCache") }}
</span>
<el-switch
v-model="settings.multiTagsCache"
inline-prompt
:active-text="t('buttons.pureOpenText')"
:inactive-text="t('buttons.pureCloseText')"
@change="multiTagsCacheChange"
/>
</li>
<li>
<span class="dark:text-white">Logo</span>
<el-switch
@@ -554,23 +504,15 @@ onUnmounted(() => removeMatchMedia);
/>
</li>
<li>
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
<span class="dark:text-white">
{{ t("panel.pureMultiTagsCache") }}
</span>
<el-switch
v-model="settings.greyVal"
v-model="settings.multiTagsCache"
inline-prompt
:active-text="t('buttons.pureOpenText')"
:inactive-text="t('buttons.pureCloseText')"
@change="greyChange"
/>
</li>
<li>
<span class="dark:text-white">{{ t("panel.pureWeakModel") }}</span>
<el-switch
v-model="settings.weakVal"
inline-prompt
:active-text="t('buttons.pureOpenText')"
:inactive-text="t('buttons.pureCloseText')"
@change="weekChange"
@change="multiTagsCacheChange"
/>
</li>
</ul>

View File

@@ -42,7 +42,7 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
sourcemap: false,
// 消除打包大小超过500kb警告
chunkSizeWarningLimit: 4000,
rollupOptions: {
rolldownOptions: {
input: {
index: pathResolve("./index.html", import.meta.url)
},
@@ -51,6 +51,10 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
chunkFileNames: "static/js/[name]-[hash].js",
entryFileNames: "static/js/[name]-[hash].js",
assetFileNames: "static/[ext]/[name]-[hash].[ext]"
},
checks: {
// 禁用插件计时警告
pluginTimings: false
}
}
},