From f700dc0a580a0cc0fb1a2691bb8dc7c09c90741c Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 7 May 2026 17:02:02 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96CSS=E4=BD=93=E7=A7=AF?= =?UTF-8?q?=EF=BC=8C=E4=BB=8E5.18MB=E5=87=8F=E5=B0=91=E5=88=B0179KB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 用自定义flag-icons.css替换vue3-flag-icons全量导入,只包含cn和us国旗 - 删除themes.css中重复定义的.theme-yellow样式 --- frontend/src/assets/flag-icons.css | 5 +++ frontend/src/assets/themes.css | 70 ------------------------------ frontend/src/main.ts | 2 +- frontend/src/types/route-map.d.ts | 40 +++++++---------- 4 files changed, 21 insertions(+), 96 deletions(-) create mode 100644 frontend/src/assets/flag-icons.css diff --git a/frontend/src/assets/flag-icons.css b/frontend/src/assets/flag-icons.css new file mode 100644 index 0000000..92db8dc --- /dev/null +++ b/frontend/src/assets/flag-icons.css @@ -0,0 +1,5 @@ +.fib[data-v-c8aad0d0],.fi[data-v-c8aad0d0]{background-size:contain;background-position:50%;background-repeat:no-repeat}.fi[data-v-c8aad0d0]{position:relative;display:inline-block;width:1.333333em;line-height:1em}.fi[data-v-c8aad0d0]:before{content:" "}.fi.fis[data-v-c8aad0d0]{width:1em} +.fi-cn[data-v-c8aad0d0]{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cn'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cpath%20id='cn-a'%20fill='%23ff0'%20d='M-.6.8%200-1%20.6.8-1-.3h2z'/%3e%3c/defs%3e%3cpath%20fill='%23ee1c25'%20d='M0%200h640v480H0z'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(71.9991%200%200%2072%20120%20120)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(-12.33562%20-20.5871%2020.58684%20-12.33577%20240.3%2048)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(-3.38573%20-23.75998%2023.75968%20-3.38578%20288%2095.8)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(6.5991%20-23.0749%2023.0746%206.59919%20288%20168)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(14.9991%20-18.73557%2018.73533%2014.99929%20240%20216)'/%3e%3c/svg%3e")} +.fi-cn.fis[data-v-c8aad0d0]{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20id='flag-icons-cn'%20viewBox='0%200%20512%20512'%3e%3cdefs%3e%3cpath%20id='cn-a'%20fill='%23ff0'%20d='M1-.3-.7.8%200-1%20.6.8-1-.3z'/%3e%3c/defs%3e%3cpath%20fill='%23ee1c25'%20d='M0%200h512v512H0z'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='translate(128%20128)scale(76.8)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='rotate(-121%20142.6%20-47)scale(25.5827)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='rotate(-98.1%20198%20-82)scale(25.6)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='rotate(-74%20272.4%20-114)scale(25.6137)'/%3e%3cuse%20xlink:href='%23cn-a'%20width='30'%20height='20'%20transform='matrix(16%20-19.968%2019.968%2016%20256%20230.4)'/%3e%3c/svg%3e")} +.fi-us[data-v-c8aad0d0]{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-us'%20viewBox='0%200%20640%20480'%3e%3cpath%20fill='%23bd3d44'%20d='M0%200h640v480H0'/%3e%3cpath%20stroke='%23fff'%20stroke-width='37'%20d='M0%2055.3h640M0%20129h640M0%20203h640M0%20277h640M0%20351h640M0%20425h640'/%3e%3cpath%20fill='%23192f5d'%20d='M0%200h364.8v258.5H0'/%3e%3cmarker%20id='us-a'%20markerHeight='30'%20markerWidth='30'%3e%3cpath%20fill='%23fff'%20d='m14%200%209%2027L0%2010h28L5%2027z'/%3e%3c/marker%3e%3cpath%20fill='none'%20marker-mid='url(%23us-a)'%20d='m0%200%2016%2011h61%2061%2061%2061%2060L47%2037h61%2061%2060%2061L16%2063h61%2061%2061%2061%2060L47%2089h61%2061%2060%2061L16%20115h61%2061%2061%2061%2060L47%20141h61%2061%2060%2061L16%20166h61%2061%2061%2061%2060L47%20192h61%2061%2060%2061L16%20218h61%2061%2061%2061%2060z'/%3e%3c/svg%3e")} +.fi-us.fis[data-v-c8aad0d0]{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-us'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='%23bd3d44'%20d='M0%200h512v512H0'/%3e%3cpath%20stroke='%23fff'%20stroke-width='40'%20d='M0%2058h512M0%20137h512M0%20216h512M0%20295h512M0%20374h512M0%20453h512'/%3e%3cpath%20fill='%23192f5d'%20d='M0%200h390v275H0z'/%3e%3cmarker%20id='us-a'%20markerHeight='30'%20markerWidth='30'%3e%3cpath%20fill='%23fff'%20d='m15%200%209.3%2028.6L0%2011h30L5.7%2028.6'/%3e%3c/marker%3e%3cpath%20fill='none'%20marker-mid='url(%23us-a)'%20d='m0%200%2018%2011h65%2065%2065%2065%2066L51%2039h65%2065%2065%2065L18%2066h65%2065%2065%2065%2066L51%2094h65%2065%2065%2065L18%20121h65%2065%2065%2065%2066L51%20149h65%2065%2065%2065L18%20177h65%2065%2065%2065%2066L51%20205h65%2065%2065%2065L18%20232h65%2065%2065%2065%2066z'/%3e%3c/svg%3e")} diff --git a/frontend/src/assets/themes.css b/frontend/src/assets/themes.css index eeb9d8f..fb8f170 100644 --- a/frontend/src/assets/themes.css +++ b/frontend/src/assets/themes.css @@ -418,76 +418,6 @@ --sidebar-ring: oklch(0.488 0.243 264.376); } -/* theme yellow */ -.theme-yellow { - --radius: 0.65rem; - --background: oklch(1 0 0); - --foreground: oklch(0.141 0.005 285.823); - --card: oklch(1 0 0); - --card-foreground: oklch(0.141 0.005 285.823); - --popover: oklch(1 0 0); - --popover-foreground: oklch(0.141 0.005 285.823); - --primary: oklch(0.795 0.184 86.047); - --primary-foreground: oklch(0.421 0.095 57.708); - --secondary: oklch(0.967 0.001 286.375); - --secondary-foreground: oklch(0.21 0.006 285.885); - --muted: oklch(0.967 0.001 286.375); - --muted-foreground: oklch(0.552 0.016 285.938); - --accent: oklch(0.967 0.001 286.375); - --accent-foreground: oklch(0.21 0.006 285.885); - --destructive: oklch(0.577 0.245 27.325); - --border: oklch(0.92 0.004 286.32); - --input: oklch(0.92 0.004 286.32); - --ring: oklch(0.795 0.184 86.047); - --chart-1: oklch(0.646 0.222 41.116); - --chart-2: oklch(0.6 0.118 184.704); - --chart-3: oklch(0.398 0.07 227.392); - --chart-4: oklch(0.828 0.189 84.429); - --chart-5: oklch(0.769 0.188 70.08); - --sidebar: oklch(0.985 0 0); - --sidebar-foreground: oklch(0.141 0.005 285.823); - --sidebar-primary: oklch(0.795 0.184 86.047); - --sidebar-primary-foreground: oklch(0.421 0.095 57.708); - --sidebar-accent: oklch(0.967 0.001 286.375); - --sidebar-accent-foreground: oklch(0.21 0.006 285.885); - --sidebar-border: oklch(0.92 0.004 286.32); - --sidebar-ring: oklch(0.795 0.184 86.047); -} - -.theme-yellow.dark { - --background: oklch(0.141 0.005 285.823); - --foreground: oklch(0.985 0 0); - --card: oklch(0.21 0.006 285.885); - --card-foreground: oklch(0.985 0 0); - --popover: oklch(0.21 0.006 285.885); - --popover-foreground: oklch(0.985 0 0); - --primary: oklch(0.795 0.184 86.047); - --primary-foreground: oklch(0.421 0.095 57.708); - --secondary: oklch(0.274 0.006 286.033); - --secondary-foreground: oklch(0.985 0 0); - --muted: oklch(0.274 0.006 286.033); - --muted-foreground: oklch(0.705 0.015 286.067); - --accent: oklch(0.274 0.006 286.033); - --accent-foreground: oklch(0.985 0 0); - --destructive: oklch(0.704 0.191 22.216); - --border: oklch(1 0 0 / 10%); - --input: oklch(1 0 0 / 15%); - --ring: oklch(0.554 0.135 66.442); - --chart-1: oklch(0.488 0.243 264.376); - --chart-2: oklch(0.696 0.17 162.48); - --chart-3: oklch(0.769 0.188 70.08); - --chart-4: oklch(0.627 0.265 303.9); - --chart-5: oklch(0.645 0.246 16.439); - --sidebar: oklch(0.21 0.006 285.885); - --sidebar-foreground: oklch(0.985 0 0); - --sidebar-primary: oklch(0.795 0.184 86.047); - --sidebar-primary-foreground: oklch(0.421 0.095 57.708); - --sidebar-accent: oklch(0.274 0.006 286.033); - --sidebar-accent-foreground: oklch(0.985 0 0); - --sidebar-border: oklch(1 0 0 / 10%); - --sidebar-ring: oklch(0.554 0.135 66.442); -} - /* theme violet */ .theme-violet { --radius: 0.65rem; diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 45de71e..5329b6e 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -8,7 +8,7 @@ import '@/assets/scrollbar.css' import '@/assets/themes.css' import '@/assets/chart-theme.css' import 'vue-sonner/style.css' -import 'vue3-flag-icons/styles' +import '@/assets/flag-icons.css' import '@/utils/env' diff --git a/frontend/src/types/route-map.d.ts b/frontend/src/types/route-map.d.ts index c371c71..c7e21ea 100644 --- a/frontend/src/types/route-map.d.ts +++ b/frontend/src/types/route-map.d.ts @@ -14,6 +14,9 @@ import type { ParamValueZeroOrMore, ParamValueZeroOrOne, } from 'vue-router' +import type { + _ExtractParamParserType, +} from 'vue-router/experimental' declare module 'vue-router' { interface TypesConfig { @@ -48,13 +51,6 @@ declare module 'vue-router/auto-routes' { Record, | never >, - '/admin/agent-apps/[id]/card-types': RouteRecordInfo< - '/admin/agent-apps/[id]/card-types', - '/admin/agent-apps/:id/card-types', - { id: ParamValue }, - { id: ParamValue }, - | never - >, '/admin/agent-apps/[id]/edit': RouteRecordInfo< '/admin/agent-apps/[id]/edit', '/admin/agent-apps/:id/edit', @@ -69,16 +65,16 @@ declare module 'vue-router/auto-routes' { { id: ParamValue }, | never >, - '/admin/agent-apps/invite': RouteRecordInfo< - '/admin/agent-apps/invite', - '/admin/agent-apps/invite', - Record, - Record, + '/admin/agent-apps/[id]/view': RouteRecordInfo< + '/admin/agent-apps/[id]/view', + '/admin/agent-apps/:id/view', + { id: ParamValue }, + { id: ParamValue }, | never >, - '/admin/agent-apps/request': RouteRecordInfo< - '/admin/agent-apps/request', - '/admin/agent-apps/request', + '/admin/agent-apps/create': RouteRecordInfo< + '/admin/agent-apps/create', + '/admin/agent-apps/create', Record, Record, | never @@ -663,12 +659,6 @@ declare module 'vue-router/auto-routes' { views: | never } - 'src/pages/admin/agent-apps/[id]/card-types.vue': { - routes: - | '/admin/agent-apps/[id]/card-types' - views: - | never - } 'src/pages/admin/agent-apps/[id]/edit.vue': { routes: | '/admin/agent-apps/[id]/edit' @@ -681,15 +671,15 @@ declare module 'vue-router/auto-routes' { views: | never } - 'src/pages/admin/agent-apps/invite.vue': { + 'src/pages/admin/agent-apps/[id]/view.vue': { routes: - | '/admin/agent-apps/invite' + | '/admin/agent-apps/[id]/view' views: | never } - 'src/pages/admin/agent-apps/request.vue': { + 'src/pages/admin/agent-apps/create.vue': { routes: - | '/admin/agent-apps/request' + | '/admin/agent-apps/create' views: | never }