From a1002f8518838d2baa757ce26f229c0c989ceb93 Mon Sep 17 00:00:00 2001 From: luoer Date: Fri, 22 Sep 2023 16:31:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=88=87=E6=8D=A2=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E9=85=8D=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- scripts/vite/color.ts | 10 ++++++++++ src/pages/_layout/index.vue | 2 +- src/pages/_login/index.vue | 2 +- src/styles/css-arco.less | 9 +++++++-- vite.config.ts | 16 +++------------- 6 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 scripts/vite/color.ts diff --git a/.env b/.env index f84a78f..60dfc9a 100644 --- a/.env +++ b/.env @@ -6,7 +6,7 @@ VITE_TITLE = 绝弹管理后台 # 网站副标题 VITE_SUBTITLE = 快速开发web应用的模板工具 # 接口前缀 说明:参见 axios 的 baseURL -VITE_API = http://127.0.0.1:3030/ +VITE_API = http://demo.dev.juetan.cn/ # ===================================================================================== # 开发设置 diff --git a/scripts/vite/color.ts b/scripts/vite/color.ts new file mode 100644 index 0000000..a33a1e7 --- /dev/null +++ b/scripts/vite/color.ts @@ -0,0 +1,10 @@ +const unoLevels = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900]; +const arcoLevels = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + +export const arcoToUnoColor = (arcoColorName: string) => { + const colors = {}; + for (let i = 0; i < 10; i++) { + colors[unoLevels[i]] = `rgb(var(--${arcoColorName}-${arcoLevels[i]}))`; + } + return colors; +}; diff --git a/src/pages/_layout/index.vue b/src/pages/_layout/index.vue index fc52276..ad8407d 100644 --- a/src/pages/_layout/index.vue +++ b/src/pages/_layout/index.vue @@ -12,7 +12,7 @@ v-if="isDev" class="absolute -right-14 -top-1 text-xs font-normal text-brand-500 bg-brand-50 px-1.5 rounded-full" > - 开发版 + 本地版 diff --git a/src/pages/_login/index.vue b/src/pages/_login/index.vue index c91f7ff..bbd7614 100644 --- a/src/pages/_login/index.vue +++ b/src/pages/_login/index.vue @@ -15,7 +15,7 @@
-