chore: update

This commit is contained in:
xiaoxian521 2024-04-17 13:21:41 +08:00
parent 05ec64ea8d
commit d0b8efdb3b
22 changed files with 78 additions and 54 deletions

View File

@ -41,7 +41,7 @@
- 修复`windwos`下点击注册页面会出现滚动条问题
- 修复`windows`下页面切换,内容区会出现滚动条问题
- 修复`pure-table`带状态表格在深色整体风格下状态样式消失的问题
- 修复项目配置中开启灰色模式和深色整体风格,刷新页面整体风格异常
- 修复系统配置中开启灰色模式和深色整体风格,刷新页面整体风格异常
### 🍏 Perf
@ -84,7 +84,7 @@
- 所有`search`搜索图标统一替换为`@iconify-icons/ri/search-line`它比较常用将其放入全局离线图标中
- 移除`iframe`在暗模式下的滤镜效果
- 带来更美观精致的首页
- 更干净整洁的项目配置右侧弹出面板
- 更干净整洁的系统配置右侧弹出面板
- 重构关于页面,整体更紧致,关键信息更突出
### 🎫 Feat

View File

@ -2,7 +2,7 @@ buttons:
pureAccountSettings: Account
pureLoginOut: LoginOut
pureLogin: Login
pureSystemSet: Open ProjectConfig
pureOpenSystemSet: Open System Configs
pureReload: Reload
pureCloseCurrentTab: Close CurrentTab
pureCloseLeftTabs: Close LeftTabs
@ -16,6 +16,7 @@ buttons:
pureConfirm: Confirm
pureSwitch: Switch
pureClose: Close
pureBackTop: BackTop
search:
pureTotal: Total
pureHistory: History
@ -23,6 +24,11 @@ search:
pureDragSort: Drag Sort
pureEmpty: Empty
purePlaceholder: Search Menu
panel:
pureSystemSet: System Configs
pureCloseSystemSet: Close System Configs
pureClearCacheAndToLogin: Clear Cache And To Login Page
pureClearCache: Clear Cache
menus:
pureHome: Home
pureLogin: Login
@ -148,6 +154,7 @@ menus:
pureChildMenuOverflow: Child Menu Overflow Show Tooltip Text
status:
pureLoad: Loading...
pureNoMessage: No Message
login:
pureUsername: Username
purePassword: Password

View File

@ -2,7 +2,7 @@ buttons:
pureAccountSettings: 账户设置
pureLoginOut: 退出系统
pureLogin: 登录
pureSystemSet: 打开项目配置
pureOpenSystemSet: 打开系统配置
pureReload: 重新加载
pureCloseCurrentTab: 关闭当前标签页
pureCloseLeftTabs: 关闭左侧标签页
@ -16,6 +16,7 @@ buttons:
pureConfirm: 确认
pureSwitch: 切换
pureClose: 关闭
pureBackTop: 回到顶部
search:
pureTotal:
pureHistory: 搜索历史
@ -23,6 +24,11 @@ search:
pureDragSort: (可拖拽排序)
pureEmpty: 暂无搜索结果
purePlaceholder: 搜索菜单(支持拼音搜索)
panel:
pureSystemSet: 系统配置
pureCloseSystemSet: 关闭配置
pureClearCacheAndToLogin: 清空缓存并返回登录页
pureClearCache: 清空缓存
menus:
pureHome: 首页
pureLogin: 登录
@ -148,6 +154,7 @@ menus:
pureChildMenuOverflow: 菜单超出显示 Tooltip 文字提示
status:
pureLoad: 加载中...
pureNoMessage: 暂无消息
login:
pureUsername: 账号
purePassword: 密码

View File

@ -35,7 +35,7 @@ export const getPlatformConfig = async (app: App): Promise<undefined> => {
})
.then(({ data: config }) => {
let $config = app.config.globalProperties.$config;
// 自动注入项目配置
// 自动注入系统配置
if (app && $config && typeof config === "object") {
$config = Object.assign($config, config);
app.config.globalProperties.$config = $config;

View File

@ -1,4 +1,5 @@
<script setup lang="ts">
import { useI18n } from "vue-i18n";
import Footer from "./footer/index.vue";
import { useGlobal, isNumber } from "@pureadmin/utils";
import KeepAliveFrame from "./keepAliveFrame/index.vue";
@ -10,6 +11,7 @@ const props = defineProps({
fixedHeader: Boolean
});
const { t } = useI18n();
const { $storage, $config } = useGlobal<GlobalPropertiesApi>();
const isKeepAlive = computed(() => {
@ -121,7 +123,7 @@ const transitionMain = defineComponent({
}"
>
<el-backtop
title="回到顶部"
:title="t('buttons.pureBackTop')"
target=".app-main .el-scrollbar__wrap"
>
<backTop />

View File

@ -113,7 +113,7 @@ const { t, locale, translationCh, translationEn } = useTranslationLang();
</el-dropdown>
<span
class="set-icon navbar-bg-hover"
:title="t('buttons.pureSystemSet')"
:title="t('buttons.pureOpenSystemSet')"
@click="onPanel"
>
<IconifyIconOffline :icon="Setting" />

View File

@ -1,9 +1,11 @@
<script setup lang="ts">
import { ref } from "vue";
import { useI18n } from "vue-i18n";
import { noticesData } from "./data";
import NoticeList from "./noticeList.vue";
import Bell from "@iconify-icons/ep/bell";
const { t } = useI18n();
const noticesNum = ref(0);
const notices = ref(noticesData);
const activeKey = ref(noticesData[0].key);
@ -30,7 +32,7 @@ notices.value.map(v => (noticesNum.value += v.list.length));
>
<el-empty
v-if="notices.length === 0"
description="暂无消息"
:description="t('status.pureNoMessage')"
:image-size="60"
/>
<span v-else>

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import { PropType } from "vue";
import { ListItem } from "./data";
import { useI18n } from "vue-i18n";
import NoticeItem from "./noticeItem.vue";
const props = defineProps({
@ -9,6 +10,8 @@ const props = defineProps({
default: () => []
}
});
const { t } = useI18n();
</script>
<template>
@ -19,5 +22,5 @@ const props = defineProps({
:noticeItem="item"
/>
</div>
<el-empty v-else description="暂无消息" />
<el-empty v-else :description="t('status.pureNoMessage')" />
</template>

View File

@ -1,4 +1,5 @@
<script setup lang="ts">
import { useI18n } from "vue-i18n";
import { emitter } from "@/utils/mitt";
import { onClickOutside } from "@vueuse/core";
import { ref, computed, onMounted, onBeforeUnmount } from "vue";
@ -25,6 +26,7 @@ const iconClass = computed(() => {
];
});
const { t } = useI18n();
const { onReset } = useDataThemeChange();
onClickOutside(target, (event: any) => {
@ -51,10 +53,12 @@ onBeforeUnmount(() => {
<div
class="project-configuration border-b-[1px] border-solid border-[var(--pure-border-color)]"
>
<h4 class="dark:text-white">项目配置</h4>
<h4 class="dark:text-white">
{{ t("panel.pureSystemSet") }}
</h4>
<span
v-tippy="{
content: '关闭配置',
content: t('panel.pureCloseSystemSet'),
placement: 'bottom-start',
zIndex: 41000
}"
@ -78,7 +82,7 @@ onBeforeUnmount(() => {
>
<el-button
v-tippy="{
content: '清空缓存并返回登录页',
content: t('panel.pureClearCacheAndToLogin'),
placement: 'left-start',
zIndex: 41000
}"
@ -87,7 +91,7 @@ onBeforeUnmount(() => {
bg
@click="onReset"
>
清空缓存
{{ t("panel.pureClearCache") }}
</el-button>
</div>
</div>

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { useI18n } from "vue-i18n";
import { useNav } from "@/layout/hooks/useNav";
import { transformI18n, $t } from "@/plugins/i18n";
import mdiKeyboardEsc from "@/assets/svg/keyboard_esc.svg?component";
import enterOutlined from "@/assets/svg/enter_outlined.svg?component";
import ArrowUpLine from "@iconify-icons/ri/arrow-up-line";
@ -10,6 +10,7 @@ const props = withDefaults(defineProps<{ total: number }>(), {
total: 0
});
const { t } = useI18n();
const { device } = useNav();
</script>
@ -17,22 +18,22 @@ const { device } = useNav();
<div class="search-footer text-[#333] dark:text-white">
<span class="search-footer-item">
<enterOutlined class="icon" />
{{ transformI18n($t("buttons.pureConfirm")) }}
{{ t("buttons.pureConfirm") }}
</span>
<span class="search-footer-item">
<IconifyIconOffline :icon="ArrowUpLine" class="icon" />
<IconifyIconOffline :icon="ArrowDownLine" class="icon" />
{{ transformI18n($t("buttons.pureSwitch")) }}
{{ t("buttons.pureSwitch") }}
</span>
<span class="search-footer-item">
<mdiKeyboardEsc class="icon" />
{{ transformI18n($t("buttons.pureClose")) }}
{{ t("buttons.pureClose") }}
</span>
<p
v-if="device !== 'mobile' && props.total > 0"
class="search-footer-total"
>
{{ `${transformI18n($t("search.pureTotal"))} ${props.total}` }}
{{ `${t("search.pureTotal")} ${props.total}` }}
</p>
</div>
</template>

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import Sortable from "sortablejs";
import { transformI18n, $t } from "@/plugins/i18n";
import { useI18n } from "vue-i18n";
import SearchHistoryItem from "./SearchHistoryItem.vue";
import type { optionsItem, dragItem, Props } from "../types";
import { useEpThemeStoreHook } from "@/store/modules/epTheme";
@ -20,6 +20,7 @@ const innerHeight = ref();
/** 判断是否停止鼠标移入事件处理 */
const stopMouseEvent = ref(false);
const { t } = useI18n();
const emit = defineEmits<Emits>();
const instance = getCurrentInstance()!;
const props = withDefaults(defineProps<Props>(), {});
@ -143,7 +144,7 @@ defineExpose({ handleScroll });
<div ref="historyRef" class="history">
<template v-if="historyList.length">
<div :style="titleStyle">
{{ transformI18n($t("search.pureHistory")) }}
{{ t("search.pureHistory") }}
</div>
<div
v-for="(item, index) in historyList"
@ -164,7 +165,7 @@ defineExpose({ handleScroll });
<template v-if="collectList.length">
<div :style="titleStyle">
{{
`${transformI18n($t("search.pureCollect"))}${collectList.length > 1 ? transformI18n($t("search.pureDragSort")) : ""}`
`${t("search.pureCollect")}${collectList.length > 1 ? t("search.pureDragSort") : ""}`
}}
</div>
<div class="collect-container">

View File

@ -29,7 +29,7 @@ const emit = defineEmits<Emits>();
const props = withDefaults(defineProps<Props>(), {});
const router = useRouter();
const { locale } = useI18n();
const { t, locale } = useI18n();
const HISTORY_TYPE = "history";
const COLLECT_TYPE = "collect";
@ -293,7 +293,7 @@ onKeyStroke("ArrowDown", handleDown);
v-model="keyword"
size="large"
clearable
:placeholder="transformI18n($t('search.purePlaceholder'))"
:placeholder="t('search.purePlaceholder')"
@input="handleSearch"
>
<template #prefix>
@ -305,10 +305,7 @@ onKeyStroke("ArrowDown", handleDown);
</el-input>
<div class="search-content">
<el-scrollbar ref="scrollbarRef" max-height="calc(90vh - 140px)">
<el-empty
v-if="showEmpty"
:description="transformI18n($t('search.pureEmpty'))"
/>
<el-empty v-if="showEmpty" :description="t('search.pureEmpty')" />
<SearchHistory
v-if="showSearchHistory"
ref="historyRef"

View File

@ -291,7 +291,7 @@ function watchSystemThemeChange() {
}
onBeforeMount(() => {
/* 初始化项目配置 */
/* 初始化系统配置 */
nextTick(() => {
watchSystemThemeChange();
settings.greyVal &&

View File

@ -1,8 +1,8 @@
<script setup lang="ts">
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useGlobal } from "@pureadmin/utils";
import { useNav } from "@/layout/hooks/useNav";
import { transformI18n, $t } from "@/plugins/i18n";
import ArrowLeft from "@iconify-icons/ri/arrow-left-double-fill";
@ -14,6 +14,7 @@ const props = withDefaults(defineProps<Props>(), {
isActive: false
});
const { t } = useI18n();
const { tooltipEffect } = useNav();
const iconClass = computed(() => {
@ -35,11 +36,9 @@ const toggleClick = () => {
<template>
<div
v-tippy="{
content: transformI18n(
props.isActive
? $t('buttons.pureClickCollapse')
: $t('buttons.pureClickExpand')
),
content: props.isActive
? t('buttons.pureClickCollapse')
: t('buttons.pureClickExpand'),
theme: tooltipEffect,
hideOnClick: 'toggle',
placement: 'right'

View File

@ -129,7 +129,7 @@ nextTick(() => {
</el-dropdown>
<span
class="set-icon navbar-bg-hover"
:title="t('buttons.pureSystemSet')"
:title="t('buttons.pureOpenSystemSet')"
@click="onPanel"
>
<IconifyIconOffline :icon="Setting" />

View File

@ -1,8 +1,8 @@
<script setup lang="ts">
import { computed } from "vue";
import { useI18n } from "vue-i18n";
import { useGlobal } from "@pureadmin/utils";
import { useNav } from "@/layout/hooks/useNav";
import { transformI18n, $t } from "@/plugins/i18n";
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
@ -14,6 +14,7 @@ const props = withDefaults(defineProps<Props>(), {
isActive: false
});
const { t } = useI18n();
const { tooltipEffect } = useNav();
const iconClass = computed(() => {
@ -45,11 +46,9 @@ const toggleClick = () => {
<div class="left-collapse">
<IconifyIconOffline
v-tippy="{
content: transformI18n(
props.isActive
? $t('buttons.pureClickCollapse')
: $t('buttons.pureClickExpand')
),
content: props.isActive
? t('buttons.pureClickCollapse')
: t('buttons.pureClickExpand'),
theme: tooltipEffect,
hideOnClick: 'toggle',
placement: 'right'

View File

@ -162,7 +162,7 @@ watch(
</el-dropdown>
<span
class="set-icon navbar-bg-hover"
:title="t('buttons.pureSystemSet')"
:title="t('buttons.pureOpenSystemSet')"
@click="onPanel"
>
<IconifyIconOffline :icon="Setting" />

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { transformI18n, $t } from "@/plugins/i18n";
import { useI18n } from "vue-i18n";
import MenuFold from "@iconify-icons/ri/menu-fold-fill";
import MenuUnfold from "@iconify-icons/ri/menu-unfold-fill";
@ -11,6 +11,8 @@ const props = withDefaults(defineProps<Props>(), {
isActive: false
});
const { t } = useI18n();
const emit = defineEmits<{
(e: "toggleClick"): void;
}>();
@ -24,11 +26,9 @@ const toggleClick = () => {
<div
class="px-3 mr-1 navbar-bg-hover"
:title="
transformI18n(
props.isActive
? $t('buttons.pureClickCollapse')
: $t('buttons.pureClickExpand')
)
props.isActive
? t('buttons.pureClickCollapse')
: t('buttons.pureClickExpand')
"
@click="toggleClick"
>

View File

@ -3,6 +3,7 @@ import "animate.css";
// src/components/ReIcon/src/offlineIcon.ts 使addIcon
import "@/components/ReIcon/src/offlineIcon";
import { setType } from "./types";
import { useI18n } from "vue-i18n";
import { useLayout } from "./hooks/useLayout";
import { useAppStoreHook } from "@/store/modules/app";
import { useSettingStoreHook } from "@/store/modules/settings";
@ -31,6 +32,7 @@ import Vertical from "./components/sidebar/vertical.vue";
import Horizontal from "./components/sidebar/horizontal.vue";
import backTop from "@/assets/svg/back_top.svg?component";
const { t } = useI18n();
const appWrapperRef = ref();
const { isDark } = useDark();
const { layout } = useLayout();
@ -185,7 +187,7 @@ const layoutHeader = defineComponent({
</div>
<el-scrollbar v-else>
<el-backtop
title="回到顶部"
:title="t('buttons.pureBackTop')"
target=".main-container .el-scrollbar__wrap"
>
<backTop />

View File

@ -117,7 +117,7 @@ html.dark {
}
}
/* 项目配置面板 */
/* 系统配置面板 */
.right-panel-items {
.el-divider__text {
--el-bg-color: var(--el-bg-color);

View File

@ -19,10 +19,10 @@ export const injectResponsiveStorage = (app: App, config: PlatformConfigs) => {
darkMode: config.DarkMode ?? false,
sidebarStatus: config.SidebarStatus ?? true,
epThemeColor: config.EpThemeColor ?? "#409EFF",
themeColor: config.Theme ?? "light", // 主题色(对应项目配置中的主题色与theme不同的是它不会受到浅色、深色整体风格切换的影响只会在手动点击主题色时改变
themeColor: config.Theme ?? "light", // 主题色(对应系统配置中的主题色与theme不同的是它不会受到浅色、深色整体风格切换的影响只会在手动点击主题色时改变
overallStyle: config.OverallStyle ?? "light" // 整体风格浅色light、深色dark、自动system
},
// 项目配置-界面显示
// 系统配置-界面显示
configure: Storage.getData("configure", nameSpace) ?? {
grey: config.Grey ?? false,
weak: config.Weak ?? false,

View File

@ -51,8 +51,8 @@ const GUIDE_STEPS = [
},
{
element: document.querySelector(".set-icon") as string | HTMLElement,
title: "项目配置",
intro: "您可以在这里查看项目配置",
title: "系统配置",
intro: "您可以在这里查看系统配置",
position: "left"
},
{