From 082bc39142618693301d9a3d917a2ecd833e8017 Mon Sep 17 00:00:00 2001 From: zhangtao <9480807882@qq.com> Date: Wed, 13 May 2026 21:10:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(web):=20=E8=BF=81=E7=A7=BBwangEditor?= =?UTF-8?q?=E8=87=B3@wangeditor-next=E5=B9=B6=E5=9B=9E=E9=80=80=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/web/.env | 2 +- frontend/web/.env.example | 2 +- .../src/components/forms/fa-wang-editor/index.vue | 12 ++++++------ frontend/web/src/mock/upgrade/changeLog.ts | 6 +++--- .../src/types/shims-wangeditor-editor-for-vue.d.ts | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/web/.env b/frontend/web/.env index ae462cb69..24c65f388 100755 --- a/frontend/web/.env +++ b/frontend/web/.env @@ -1,7 +1,7 @@ # 【通用】环境变量 - 所有环境共享 # 应用版本号 -VITE_VERSION = 3.0.2 +VITE_VERSION = 3.0.0 # 开发服务器端口 VITE_PORT = 5180 diff --git a/frontend/web/.env.example b/frontend/web/.env.example index 4963f391e..7b313ed84 100644 --- a/frontend/web/.env.example +++ b/frontend/web/.env.example @@ -2,7 +2,7 @@ # Vite 会加载:.env、.env.[mode](如 .env.development),后者覆盖前者同名变量。 # ---------- 通用(建议复制到 .env)---------- -VITE_VERSION=3.0.2 +VITE_VERSION=3.0.0 VITE_PORT=5180 VITE_BASE_URL=/ diff --git a/frontend/web/src/components/forms/fa-wang-editor/index.vue b/frontend/web/src/components/forms/fa-wang-editor/index.vue index 8f94d3636..48b0450df 100644 --- a/frontend/web/src/components/forms/fa-wang-editor/index.vue +++ b/frontend/web/src/components/forms/fa-wang-editor/index.vue @@ -18,12 +18,12 @@ diff --git a/frontend/web/src/components/tables/fa-table-header/index.vue b/frontend/web/src/components/tables/fa-table-header/index.vue index 446829fa1..c1f4f8b07 100644 --- a/frontend/web/src/components/tables/fa-table-header/index.vue +++ b/frontend/web/src/components/tables/fa-table-header/index.vue @@ -139,6 +139,9 @@ {{ t("table.headerBackground") }} + + {{ t("table.highlightCurrentRow") }} + @@ -179,7 +182,7 @@ interface Props { } const props = withDefaults(defineProps(), { - fullClass: "fa-page-view", + fullClass: "fa-table-card", layout: "search,refresh,size,fullscreen,columns,rowDrag,settings", showSearchBar: undefined, }); @@ -224,7 +227,8 @@ const tableSizeOptions = [ ]; const tableStore = useTableStore(); -const { tableSize, isZebra, isBorder, isHeaderBackground, isRowDrag } = storeToRefs(tableStore); +const { tableSize, isZebra, isBorder, isHeaderBackground, isRowDrag, highlightCurrentRow } = + storeToRefs(tableStore); const toggleRowDrag = () => { tableStore.setIsRowDrag(!isRowDrag.value); @@ -289,12 +293,29 @@ const isFullScreen = ref(false); /** 保存原始的 overflow 样式,用于退出全屏时恢复 */ const originalOverflow = ref(""); +/** + * 查找可全屏的容器元素 + * 优先取 .fa-table-card 的父级(包含搜索栏 + 表格卡片),其次降级到 fullClass + */ +const findFullscreenContainer = (): HTMLElement | null => { + const headerEl = document.getElementById("fa-table-header"); + if (headerEl) { + const card = headerEl.closest(`.${props.fullClass}`); + if (card?.parentElement) { + // 取父级 — 通常包裹了搜索栏 + 表格卡片 + return card.parentElement as HTMLElement; + } + if (card) return card as HTMLElement; + } + return document.querySelector(`.${props.fullClass}`); +}; + /** * 切换全屏状态 * 进入全屏时会隐藏页面滚动条,退出时恢复原状态 */ const toggleFullScreen = () => { - const el = document.querySelector(`.${props.fullClass}`); + const el = findFullscreenContainer(); if (!el) return; isFullScreen.value = !isFullScreen.value; @@ -336,7 +357,7 @@ onUnmounted(() => { // 如果组件在全屏状态下被卸载,恢复页面滚动状态 if (isFullScreen.value) { document.body.style.overflow = originalOverflow.value; - const el = document.querySelector(`.${props.fullClass}`); + const el = findFullscreenContainer(); if (el) { el.classList.remove("el-full-screen"); } diff --git a/frontend/web/src/components/tables/fa-table/index.vue b/frontend/web/src/components/tables/fa-table/index.vue index d6c6546fb..5e07dd774 100644 --- a/frontend/web/src/components/tables/fa-table/index.vue +++ b/frontend/web/src/components/tables/fa-table/index.vue @@ -116,8 +116,15 @@ const elTableRef = ref | null>(null); const paginationRef = ref(); const tableHeaderRef = ref(); const tableStore = useTableStore(); -const { isBorder, isZebra, tableSize, isFullScreen, isHeaderBackground, isRowDrag } = - storeToRefs(tableStore); +const { + isBorder, + isZebra, + tableSize, + isFullScreen, + isHeaderBackground, + isRowDrag, + highlightCurrentRow, +} = storeToRefs(tableStore); /** 分页配置接口 */ interface PaginationConfig { @@ -306,6 +313,7 @@ const mergedTableProps = computed(() => ({ border: border.value, size: size.value, headerCellStyle: headerCellStyle.value, + highlightCurrentRow: highlightCurrentRow.value, // Element Plus 默认值为 true,未显式传入时不应被 FaTable 覆盖成 false。 selectOnIndeterminate: hasExplicitTableProp("selectOnIndeterminate") ? props.selectOnIndeterminate diff --git a/frontend/web/src/config/modules/fastEnter.ts b/frontend/web/src/config/modules/fastEnter.ts index 2147ee9a9..135e13d25 100644 --- a/frontend/web/src/config/modules/fastEnter.ts +++ b/frontend/web/src/config/modules/fastEnter.ts @@ -29,13 +29,13 @@ const fastEnterConfig: FastEnterConfig = { routeName: "DashboardAnalysis", }, { - name: "礼花效果", - description: "动画特效展示", - icon: "ri:loader-line", - iconColor: "#7A7FFF", + name: "定价", + description: "价格方案与套餐选择", + icon: "ri:money-cny-box-line", + iconColor: "#FF6B35", enabled: true, order: 3, - routeName: "Fireworks", + routeName: "FastlinkPricing", }, { name: "聊天", @@ -44,7 +44,7 @@ const fastEnterConfig: FastEnterConfig = { iconColor: "#13DEB9", enabled: true, order: 4, - routeName: "Chat", + routeName: "FastlinkFachat", }, { name: "官方文档", @@ -77,7 +77,7 @@ const fastEnterConfig: FastEnterConfig = { name: "操作手册", description: "产品操作指南", icon: "ri:book-2-line", - iconColor: "#38C0FC", + iconColor: "#009688", enabled: true, order: 8, routeName: "FastlinkTutorial", @@ -104,16 +104,16 @@ const fastEnterConfig: FastEnterConfig = { routeName: "Login", }, { - name: "定价", + name: "礼花效果", enabled: true, order: 4, - routeName: "FastlinkPricing", + isDialog: true, }, { name: "个人中心", enabled: true, order: 5, - routeName: "Profile", + routeName: "FastlinkProfile", }, { name: "留言管理", diff --git a/frontend/web/src/locales/langs/en.json b/frontend/web/src/locales/langs/en.json index 7395290ec..4bf9483c7 100644 --- a/frontend/web/src/locales/langs/en.json +++ b/frontend/web/src/locales/langs/en.json @@ -540,6 +540,9 @@ "workplace": { "title": "Workbench" }, + "fachat": { + "title": "Fachat" + }, "changelog": { "title": "Release notes" }, @@ -620,6 +623,7 @@ "zebra": "Zebra", "border": "Border", "headerBackground": "Header BG", + "highlightCurrentRow": "Highlight Row", "toolbar": { "hideSearch": "Hide search area", "showSearch": "Show search area", diff --git a/frontend/web/src/locales/langs/zh.json b/frontend/web/src/locales/langs/zh.json index c89c21680..853291ebb 100644 --- a/frontend/web/src/locales/langs/zh.json +++ b/frontend/web/src/locales/langs/zh.json @@ -540,6 +540,9 @@ "workplace": { "title": "工作台" }, + "fachat": { + "title": "聊天" + }, "changelog": { "title": "更新日志" }, @@ -620,6 +623,7 @@ "zebra": "斑马纹", "border": "边框", "headerBackground": "表头背景", + "highlightCurrentRow": "高亮行", "toolbar": { "hideSearch": "隐藏搜索区域", "showSearch": "显示搜索区域", diff --git a/frontend/web/src/router/staticRoutes.ts b/frontend/web/src/router/staticRoutes.ts index 5c8123300..d669ce20d 100644 --- a/frontend/web/src/router/staticRoutes.ts +++ b/frontend/web/src/router/staticRoutes.ts @@ -11,6 +11,7 @@ import type { AppRouteRecord, RouteMeta } from "@/types/router"; import { defineComponent, h, onMounted, ref } from "vue"; import type { RouteRecordRaw } from "vue-router"; import { RouterView, useRoute } from "vue-router"; +import { t } from "@wangeditor-next/editor"; /** 首页 / 仪表盘父级 meta(侧栏、静态子路由共用) */ export const HOME_MENU_META: RouteMeta = { @@ -376,14 +377,14 @@ export const staticRoutes: AppRouteRecordRaw[] = [ { path: "profile", name: "FastlinkProfile", - meta: { title: "个人中心", icon: "ri:user-line", hidden: true }, + meta: { title: t("menus.system.userCenter"), icon: "ri:user-line", hidden: true }, component: () => import("@views/fastlink/current/profile.vue"), }, { path: "changelog", name: "FastlinkChangeLog", meta: { - title: "menus.changelog.title", + title: t("menus.changelog.title"), icon: "ri:draft-line", hidden: true, keepAlive: true, @@ -394,7 +395,7 @@ export const staticRoutes: AppRouteRecordRaw[] = [ path: "pricing", name: "FastlinkPricing", meta: { - title: "menus.dashboard.pricing", + title: t("menus.dashboard.pricing"), icon: "ri:money-cny-box-line", hidden: true, keepAlive: true, @@ -405,7 +406,7 @@ export const staticRoutes: AppRouteRecordRaw[] = [ path: "article/list", name: "FastlinkArticleList", meta: { - title: "menus.article.articleList", + title: t("menus.article.articleList"), icon: "ri:article-line", hidden: true, keepAlive: true, @@ -416,13 +417,24 @@ export const staticRoutes: AppRouteRecordRaw[] = [ path: "tutorial", name: "FastlinkTutorial", meta: { - title: "menus.dashboard.tutorial", + title: t("menus.dashboard.tutorial"), icon: "ri:book-2-line", hidden: true, keepAlive: true, }, component: () => import("@views/fastlink/tutorial/index.vue"), }, + { + path: "fachat", + name: "FastlinkFachat", + meta: { + title: t("menus.fachat"), + icon: "ri:message-3-line", + hidden: true, + keepAlive: true, + }, + component: () => import("@views/fastlink/fachat/index.vue"), + }, ], }, ], diff --git a/frontend/web/src/store/modules/table.store.ts b/frontend/web/src/store/modules/table.store.ts index 5c4ddb58e..d915571d7 100644 --- a/frontend/web/src/store/modules/table.store.ts +++ b/frontend/web/src/store/modules/table.store.ts @@ -24,6 +24,8 @@ export const useTableStore = defineStore( const isFullScreen = ref(false); /** 工具栏「行拖拽」;仅当表格数据为可变数组时有效 */ const isRowDrag = ref(false); + /** 高亮当前行 */ + const highlightCurrentRow = ref(false); const setTableSize = (size: TableSizeEnum) => (tableSize.value = size); const setIsZebra = (value: boolean) => (isZebra.value = value); @@ -31,6 +33,7 @@ export const useTableStore = defineStore( const setIsHeaderBackground = (value: boolean) => (isHeaderBackground.value = value); const setIsFullScreen = (value: boolean) => (isFullScreen.value = value); const setIsRowDrag = (value: boolean) => (isRowDrag.value = value); + const setHighlightCurrentRow = (value: boolean) => (highlightCurrentRow.value = value); return { tableSize, @@ -45,6 +48,8 @@ export const useTableStore = defineStore( setIsFullScreen, isRowDrag, setIsRowDrag, + highlightCurrentRow, + setHighlightCurrentRow, }; }, { diff --git a/frontend/web/src/styles/core/app.scss b/frontend/web/src/styles/core/app.scss index b862e1bc1..780306f86 100755 --- a/frontend/web/src/styles/core/app.scss +++ b/frontend/web/src/styles/core/app.scss @@ -161,17 +161,14 @@ // 元素全屏 .el-full-screen { position: fixed; - top: 0; - right: 0; - left: 0; + inset: 0; z-index: 2300; box-sizing: border-box; display: flex; flex-direction: column; - width: 100vw !important; - height: 100% !important; + width: 100vw; padding: 15px; - margin-top: 0; + margin: 0; background-color: var(--default-box-color); } diff --git a/frontend/web/src/types/config/index.ts b/frontend/web/src/types/config/index.ts index 7b17ae9e8..cd9b3eae4 100644 --- a/frontend/web/src/types/config/index.ts +++ b/frontend/web/src/types/config/index.ts @@ -114,6 +114,8 @@ export interface FastEnterBaseItem { routeQuery?: Record; /** 外部链接 */ link?: string; + /** 点击弹出介绍弹窗(代替路由跳转) */ + isDialog?: boolean; } // 快速入口应用项 diff --git a/frontend/web/src/utils/constants/definitions.ts b/frontend/web/src/utils/constants/definitions.ts index d92d6c608..4870a9d71 100644 --- a/frontend/web/src/utils/constants/definitions.ts +++ b/frontend/web/src/utils/constants/definitions.ts @@ -3,10 +3,9 @@ export const WEB_LINKS = { GITHUB_HOME: "https://github.com/fastapiadmin", GITHUB: "https://github.com/fastapiadmin/FastapiAdmin", - /** 备用镜像 / 国内仓库(与旧版顶栏一致时可指向业务 Gitee) */ GITEE: "https://gitee.com/fastapiadmin/FastapiAdmin", BLOG: "https://blog.csdn.net/weixin_46768253?type=blog", - DOCS: "https://service.fastapiadmin.com/overview/", + DOCS: "https://service.fastapiadmin.com/guide/overview.html", LiteVersion: "https://gitee.com/fastapiadmin/FastCloud", OldVersion: "https://github.com/fastapiadmin/FastapiAdmin/tree/v2.0.0", COMMUNITY: "https://service.fastapiadmin.com", diff --git a/frontend/web/src/views/dashboard/analysis/modules/top-products.vue b/frontend/web/src/views/dashboard/analysis/modules/top-products.vue index f04f81bf0..10be6382b 100644 --- a/frontend/web/src/views/dashboard/analysis/modules/top-products.vue +++ b/frontend/web/src/views/dashboard/analysis/modules/top-products.vue @@ -14,6 +14,7 @@ :stripe="false" :header-cell-style="{ background: 'transparent' }" > +