mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-21 15:00:28 +08:00
Compare commits
2 Commits
v6.3.0
...
feat/fulls
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13a4f6ab63 | ||
|
|
30459741d4 |
@@ -55,6 +55,9 @@ 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
|
||||
|
||||
@@ -55,6 +55,9 @@ panel:
|
||||
pureTagsStyleCardTip: 卡片标签,高效浏览
|
||||
pureTagsStyleChrome: 谷歌
|
||||
pureTagsStyleChromeTip: 谷歌风格,经典美观
|
||||
pureFullScreenWatermark: 全屏水印
|
||||
pureEnableWatermark: 水印
|
||||
pureWatermarkText: 文本
|
||||
pureInterfaceDisplay: 界面显示
|
||||
pureGreyModel: 灰色模式
|
||||
pureWeakModel: 色弱模式
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vite-plugin-fake-server": "^2.2.2",
|
||||
"vite-plugin-remove-console": "^2.2.0",
|
||||
"vite-plugin-router-warn": "^1.0.0",
|
||||
"vite-plugin-router-warn": "^2.0.0",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue-eslint-parser": "^10.2.0",
|
||||
"vue-tsc": "^3.1.8"
|
||||
|
||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -370,8 +370,8 @@ importers:
|
||||
specifier: ^2.2.0
|
||||
version: 2.2.0
|
||||
vite-plugin-router-warn:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
specifier: ^2.0.0
|
||||
version: 2.0.0
|
||||
vite-svg-loader:
|
||||
specifier: ^5.1.0
|
||||
version: 5.1.0(vue@3.5.25(typescript@5.9.3))
|
||||
@@ -5247,8 +5247,8 @@ packages:
|
||||
vite-plugin-remove-console@2.2.0:
|
||||
resolution: {integrity: sha512-qgjh5pz75MdE9Kzs8J0kBwaCfifHV0ezRbB9rpGsIOxam+ilcGV7WOk91vFJXquzRmiKrFh3Hxlh0JJWAmXTbQ==}
|
||||
|
||||
vite-plugin-router-warn@1.0.0:
|
||||
resolution: {integrity: sha512-jnr7faHJPkKxukBXVpg7Ui1UDqhmxD7xU6JGidq8ivSHTsNAPqzSpPpwW8O1PBP/0+Owq4bLfNNk11drOkz4xA==}
|
||||
vite-plugin-router-warn@2.0.0:
|
||||
resolution: {integrity: sha512-Zgg5IUaNtUSHdL+SL+g7YOYQQlTHh1eRqSkmf8c961AQv1eaJxCl/9/8pUZZDcTbwWjAlgbctgAF7iGm2vxNjA==}
|
||||
|
||||
vite-svg-loader@5.1.0:
|
||||
resolution: {integrity: sha512-M/wqwtOEjgb956/+m5ZrYT/Iq6Hax0OakWbokj8+9PXOnB7b/4AxESHieEtnNEy7ZpjsjYW1/5nK8fATQMmRxw==}
|
||||
@@ -10875,7 +10875,7 @@ snapshots:
|
||||
|
||||
vite-plugin-remove-console@2.2.0: {}
|
||||
|
||||
vite-plugin-router-warn@1.0.0: {}
|
||||
vite-plugin-router-warn@2.0.0: {}
|
||||
|
||||
vite-svg-loader@5.1.0(vue@3.5.25(typescript@5.9.3)):
|
||||
dependencies:
|
||||
|
||||
@@ -9,6 +9,14 @@ 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";
|
||||
@@ -17,7 +25,6 @@ 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";
|
||||
@@ -27,8 +34,9 @@ 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();
|
||||
@@ -58,6 +66,12 @@ 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,
|
||||
@@ -129,6 +143,21 @@ 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)
|
||||
@@ -448,29 +477,38 @@ onUnmounted(() => removeMatchMedia);
|
||||
/>
|
||||
|
||||
<p class="mt-5! font-medium text-sm dark:text-white">
|
||||
{{ t("panel.pureInterfaceDisplay") }}
|
||||
{{ t("panel.pureFullScreenWatermark") }}
|
||||
</p>
|
||||
<ul class="setting">
|
||||
<li>
|
||||
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
|
||||
<span class="dark:text-white">
|
||||
{{ t("panel.pureEnableWatermark") }}
|
||||
</span>
|
||||
<el-switch
|
||||
v-model="settings.greyVal"
|
||||
v-model="watermarkConfigs.enable"
|
||||
inline-prompt
|
||||
:active-text="t('buttons.pureOpenText')"
|
||||
:inactive-text="t('buttons.pureCloseText')"
|
||||
@change="greyChange"
|
||||
@change="onWatermarkSwitchChange"
|
||||
/>
|
||||
</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"
|
||||
<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.pureHiddenTags") }}</span>
|
||||
<el-switch
|
||||
@@ -491,6 +529,18 @@ 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
|
||||
@@ -504,15 +554,23 @@ onUnmounted(() => removeMatchMedia);
|
||||
/>
|
||||
</li>
|
||||
<li>
|
||||
<span class="dark:text-white">
|
||||
{{ t("panel.pureMultiTagsCache") }}
|
||||
</span>
|
||||
<span class="dark:text-white">{{ t("panel.pureGreyModel") }}</span>
|
||||
<el-switch
|
||||
v-model="settings.multiTagsCache"
|
||||
v-model="settings.greyVal"
|
||||
inline-prompt
|
||||
:active-text="t('buttons.pureOpenText')"
|
||||
:inactive-text="t('buttons.pureCloseText')"
|
||||
@change="multiTagsCacheChange"
|
||||
@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>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user