From 7f10d4f4e448629a2f491681bf1d5f9df49d1f24 Mon Sep 17 00:00:00 2001 From: Seven Date: Mon, 29 Dec 2025 16:58:32 +0700 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=20IonRange=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=B1=BB=E5=9E=8B=E5=A3=B0=E6=98=8E=EF=BC=9B?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=20CSS=20=E5=8F=98=E9=87=8F=E4=BB=A5=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=A0=B7=E5=BC=8F=EF=BC=9B=E9=87=8D=E6=9E=84=E4=BA=A4?= =?UTF-8?q?=E6=98=93=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BA=A4?= =?UTF-8?q?=E6=98=93=E5=88=87=E6=8D=A2=E5=92=8C=E5=B8=82=E5=9C=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 2 + src/theme/variables.css | 8 +- src/ui/tag/index.vue | 17 +- src/views/trade/components/orders-panel.vue | 6 +- src/views/trade/components/trade-switch.vue | 35 ++ src/views/trade/components/trade-way.vue | 19 ++ src/views/trade/index.vue | 347 ++++---------------- tailwind.config.ts | 1 + 8 files changed, 141 insertions(+), 294 deletions(-) create mode 100644 src/views/trade/components/trade-switch.vue create mode 100644 src/views/trade/components/trade-way.vue diff --git a/components.d.ts b/components.d.ts index 2f5e8c2..4c82edf 100644 --- a/components.d.ts +++ b/components.d.ts @@ -42,6 +42,7 @@ declare module 'vue' { IonPage: typeof import('@ionic/vue')['IonPage'] IonRadio: typeof import('@ionic/vue')['IonRadio'] IonRadioGroup: typeof import('@ionic/vue')['IonRadioGroup'] + IonRange: typeof import('@ionic/vue')['IonRange'] IonRefresher: typeof import('@ionic/vue')['IonRefresher'] IonRefresherContent: typeof import('@ionic/vue')['IonRefresherContent'] IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet'] @@ -95,6 +96,7 @@ declare global { const IonPage: typeof import('@ionic/vue')['IonPage'] const IonRadio: typeof import('@ionic/vue')['IonRadio'] const IonRadioGroup: typeof import('@ionic/vue')['IonRadioGroup'] + const IonRange: typeof import('@ionic/vue')['IonRange'] const IonRefresher: typeof import('@ionic/vue')['IonRefresher'] const IonRefresherContent: typeof import('@ionic/vue')['IonRefresherContent'] const IonRouterOutlet: typeof import('@ionic/vue')['IonRouterOutlet'] diff --git a/src/theme/variables.css b/src/theme/variables.css index f28dc0d..728da6e 100644 --- a/src/theme/variables.css +++ b/src/theme/variables.css @@ -38,8 +38,8 @@ html.ion-palette-light { --ion-color-danger: #ff3344; --ion-color-danger-rgb: 255, 51, 68; - --ion-color-danger-contrast: #000000; - --ion-color-danger-contrast-rgb: 0, 0, 0; + --ion-color-danger-contrast: #ffffff; + --ion-color-danger-contrast-rgb: 255, 255, 255; --ion-color-danger-shade: #e02d3c; --ion-color-danger-tint: #ff4757; @@ -110,6 +110,8 @@ html.ion-palette-light { --ion-background-color-step-900: #191919; --ion-background-color-step-950: #0d0d0d; + --ion-color-faint: #f8fafb; + --ion-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; @@ -186,4 +188,6 @@ html.ion-palette-dark { --ui-input-background: #1e1e1e; --ui-input-color: #ffffff; + + --ion-color-faint: #626262; } diff --git a/src/ui/tag/index.vue b/src/ui/tag/index.vue index 53876c6..2ec4d9a 100644 --- a/src/ui/tag/index.vue +++ b/src/ui/tag/index.vue @@ -1,13 +1,13 @@ @@ -16,7 +16,7 @@ const { type = "primary", size = "medium", round = false } = defineProps<{ @reference "tailwindcss"; .ui-tag { - @apply px-3 py-1 text-xs; + @apply px-3 py-1 text-xs rounded-md inline-block; } .ui-tag.primary { @apply bg-(--ion-color-dark) text-white; @@ -25,7 +25,7 @@ const { type = "primary", size = "medium", round = false } = defineProps<{ @apply bg-(--ion-color-medium-shade) text-white; } .ui-tag.tertiary { - @apply bg-(--ion-color-medium-tint) text-white; + @apply bg-(--ion-color-light-shade) text-black; } .ui-tag.success { @apply bg-(--ion-color-success) text-white; @@ -36,13 +36,16 @@ const { type = "primary", size = "medium", round = false } = defineProps<{ .ui-tag.danger { @apply bg-(--ion-color-danger) text-white; } +.ui-tag.mini { + @apply text-[10px] px-1 py-0.5 rounded-sm; +} .ui-tag.small { - @apply text-xs px-2 py-0.5; + @apply text-xs px-2 py-0.5 rounded-sm; } .ui-tag.medium { - @apply text-sm px-3 py-1; + @apply text-sm px-3 py-1 rounded-md; } .ui-tag.large { - @apply text-base px-4 py-2; + @apply text-base px-4 py-2 rounded-md; } diff --git a/src/views/trade/components/orders-panel.vue b/src/views/trade/components/orders-panel.vue index db8865b..9531074 100644 --- a/src/views/trade/components/orders-panel.vue +++ b/src/views/trade/components/orders-panel.vue @@ -120,7 +120,7 @@ async function cancelOrder(orderId: string) {