From 9d6bceb6cd886444dcbfc49d08caac861f03ea16 Mon Sep 17 00:00:00 2001 From: Seven Date: Sun, 14 Dec 2025 20:31:52 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20Tailwind=20CSS=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=B9=B6=E4=BC=98=E5=8C=96=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/theme/index.css | 1 + .../user/components/recharge-channel.vue | 14 ++--- src/views/withdraw/index.vue | 2 +- tailwind.config.ts | 59 +++++++++++++++++++ tsconfig.node.json | 2 +- uno.config.ts | 58 ------------------ 6 files changed, 69 insertions(+), 67 deletions(-) create mode 100644 tailwind.config.ts delete mode 100644 uno.config.ts diff --git a/src/theme/index.css b/src/theme/index.css index f1d8c73..d591966 100644 --- a/src/theme/index.css +++ b/src/theme/index.css @@ -1 +1,2 @@ @import "tailwindcss"; +@config "../../tailwind.config.ts"; \ No newline at end of file diff --git a/src/views/user/components/recharge-channel.vue b/src/views/user/components/recharge-channel.vue index 29e9623..d941c97 100644 --- a/src/views/user/components/recharge-channel.vue +++ b/src/views/user/components/recharge-channel.vue @@ -12,27 +12,27 @@ async function handleFiatRecharge() { diff --git a/src/views/withdraw/index.vue b/src/views/withdraw/index.vue index 5fae46a..677d122 100644 --- a/src/views/withdraw/index.vue +++ b/src/views/withdraw/index.vue @@ -66,7 +66,7 @@ async function onSubmit() { -
+
Choose Currency diff --git a/tailwind.config.ts b/tailwind.config.ts new file mode 100644 index 0000000..ef3f39f --- /dev/null +++ b/tailwind.config.ts @@ -0,0 +1,59 @@ +import type { Config } from "tailwindcss"; + +const config: Config = { + content: ["./index.html", "./src/**/*.{vue,js,ts,jsx,tsx}"], + theme: { + extend: { + colors: { + primary: "var(--ion-color-primary)", + secondary: "var(--ion-color-secondary)", + tertiary: "var(--ion-color-tertiary)", + success: "var(--ion-color-success)", + warning: "var(--ion-color-warning)", + danger: "var(--ion-color-danger)", + light: "var(--ion-color-light)", + medium: "var(--ion-color-medium)", + dark: "var(--ion-color-dark)", + text: { + 50: "var(--ion-text-color-step-50)", + 100: "var(--ion-text-color-step-100)", + 150: "var(--ion-text-color-step-150)", + 200: "var(--ion-text-color-step-200)", + 250: "var(--ion-text-color-step-250)", + 300: "var(--ion-text-color-step-300)", + 350: "var(--ion-text-color-step-350)", + 400: "var(--ion-text-color-step-400)", + 450: "var(--ion-text-color-step-450)", + 500: "var(--ion-text-color-step-500)", + 550: "var(--ion-text-color-step-550)", + 600: "var(--ion-text-color-step-600)", + 650: "var(--ion-text-color-step-650)", + 700: "var(--ion-text-color-step-700)", + 750: "var(--ion-text-color-step-750)", + 800: "var(--ion-text-color-step-800)", + 850: "var(--ion-text-color-step-850)", + 900: "var(--ion-text-color-step-900)", + }, + }, + }, + }, + plugins: [ + function ({ addUtilities }) { + addUtilities({ + ".flex-center": { + "display": "flex", + "align-items": "center", + "justify-content": "center", + }, + ".flex-col-center": { + "display": "flex", + "flex-direction": "column", + "align-items": "center", + "justify-content": "center", + }, + }); + }, + ], +}; + +export default config; diff --git a/tsconfig.node.json b/tsconfig.node.json index 3cc84f0..a2365d8 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -10,5 +10,5 @@ }, "allowSyntheticDefaultImports": true }, - "include": ["vite.config.ts"] + "include": ["vite.config.ts", "tailwind.config.ts"] } diff --git a/uno.config.ts b/uno.config.ts deleted file mode 100644 index efb3f1c..0000000 --- a/uno.config.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { presetWind4 } from "@unocss/preset-wind4"; -import { - defineConfig, - presetIcons, - transformerDirectives, - transformerVariantGroup, -} from "unocss"; - -export default defineConfig({ - presets: [ - presetWind4(), - presetIcons(), - ], - transformers: [ - transformerDirectives({ - applyVariable: ["--at-apply", "--uno-apply", "--uno"], - }), - transformerVariantGroup(), - ], - shortcuts: { - "flex-center": "flex items-center justify-center", - "flex-col-center": "flex flex-col items-center justify-center", - }, - // 为 Ionic 添加 CSS 变量支持 - theme: { - colors: { - primary: "var(--ion-color-primary)", - secondary: "var(--ion-color-secondary)", - tertiary: "var(--ion-color-tertiary)", - success: "var(--ion-color-success)", - warning: "var(--ion-color-warning)", - danger: "var(--ion-color-danger)", - light: "var(--ion-color-light)", - medium: "var(--ion-color-medium)", - dark: "var(--ion-color-dark)", - text: { - 50: "var(--ion-text-color-step-50)", - 100: "var(--ion-text-color-step-100)", - 150: "var(--ion-text-color-step-150)", - 200: "var(--ion-text-color-step-200)", - 250: "var(--ion-text-color-step-250)", - 300: "var(--ion-text-color-step-300)", - 350: "var(--ion-text-color-step-350)", - 400: "var(--ion-text-color-step-400)", - 450: "var(--ion-text-color-step-450)", - 500: "var(--ion-text-color-step-500)", - 550: "var(--ion-text-color-step-550)", - 600: "var(--ion-text-color-step-600)", - 650: "var(--ion-text-color-step-650)", - 700: "var(--ion-text-color-step-700)", - 750: "var(--ion-text-color-step-750)", - 800: "var(--ion-text-color-step-800)", - 850: "var(--ion-text-color-step-850)", - 900: "var(--ion-text-color-step-900)", - }, - }, - }, -});