diff --git a/build/vite/vconsole.ts b/build/vite/vconsole.ts index adddd6d..9476b96 100644 --- a/build/vite/vconsole.ts +++ b/build/vite/vconsole.ts @@ -10,9 +10,9 @@ export function createViteVConsole() { theme: 'light', }, // https://github.com/vadxq/vite-plugin-vconsole/issues/21 - dynamicConfig: { - theme: `document.documentElement.classList.contains('dark') ? 'dark' : 'light'`, - }, + // dynamicConfig: { + // theme: `document.documentElement.classList.contains('dark') ? 'dark' : 'light'`, + // }, eventListener: ` const targetElement = document.querySelector('html'); // 择要监听的元素 const observerOptions = { diff --git a/src/App.vue b/src/App.vue index 6f742bc..88f0a19 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,20 +3,6 @@ import { storeToRefs } from 'pinia' import useAppStore from '@/stores/modules/app' import useRouteTransitionNameStore from '@/stores/modules/routeTransitionName' -// useHead({ -// title: 'Vue3 Vant Mobile', -// meta: [ -// { -// name: 'description', -// content: 'Vue + Vite H5 Starter Template', -// }, -// { -// name: 'theme-color', -// content: () => isDark.value ? '#00aba9' : '#ffffff', -// }, -// ], -// }) - const appStore = useAppStore() const { mode } = storeToRefs(appStore) diff --git a/src/components/README.md b/src/components/README.md deleted file mode 100644 index b2f7c9f..0000000 --- a/src/components/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Components - -Components in this dir will be auto-registered and on-demand, powered by [`unplugin-vue-components`](https://github.com/antfu/unplugin-vue-components). diff --git a/src/components/chart/dark.ts b/src/components/chart/dark.ts deleted file mode 100644 index 24e21c2..0000000 --- a/src/components/chart/dark.ts +++ /dev/null @@ -1,179 +0,0 @@ -const contrastColor = 'rgba(255, 255, 255, 0.65)' -const backgroundColor = 'transparent' -const axisCommon = function () { - return { - axisLine: { - lineStyle: { - color: contrastColor, - }, - }, - splitLine: { - lineStyle: { - color: '#484753', - }, - }, - splitArea: { - areaStyle: { - color: ['rgba(255,255,255,0.02)', 'rgba(255,255,255,0.05)'], - }, - }, - minorSplitLine: { - lineStyle: { - color: '#20203B', - }, - }, - } -} - -const colorPalette = [ - '#4992ff', - '#7cffb2', - '#fddd60', - '#ff6e76', - '#58d9f9', - '#05c091', - '#ff8a45', - '#8d48e3', - '#dd79ff', -] -const theme: any = { - color: colorPalette, - backgroundColor, - axisPointer: { - lineStyle: { - color: '#817f91', - }, - crossStyle: { - color: '#817f91', - }, - label: { - // TODO Contrast of label backgorundColor - color: '#fff', - }, - }, - legend: { - textStyle: { - color: contrastColor, - }, - }, - textStyle: { - color: contrastColor, - }, - title: { - textStyle: { - color: 'red', - }, - subtextStyle: { - color: 'rgba(255, 255, 255, 0.65)', - }, - }, - toolbox: { - iconStyle: { - borderColor: contrastColor, - }, - }, - dataZoom: { - borderColor: '#71708A', - textStyle: { - color: contrastColor, - }, - brushStyle: { - color: 'rgba(135,163,206,0.3)', - }, - handleStyle: { - color: '#353450', - borderColor: '#C5CBE3', - }, - moveHandleStyle: { - color: '#B0B6C3', - opacity: 0.3, - }, - fillerColor: 'rgba(135,163,206,0.2)', - emphasis: { - handleStyle: { - borderColor: '#91B7F2', - color: '#4D587D', - }, - moveHandleStyle: { - color: '#636D9A', - opacity: 0.7, - }, - }, - dataBackground: { - lineStyle: { - color: '#71708A', - width: 1, - }, - areaStyle: { - color: '#71708A', - }, - }, - selectedDataBackground: { - lineStyle: { - color: '#87A3CE', - }, - areaStyle: { - color: '#87A3CE', - }, - }, - }, - visualMap: { - textStyle: { - color: contrastColor, - }, - }, - timeline: { - lineStyle: { - color: contrastColor, - }, - label: { - color: contrastColor, - }, - controlStyle: { - color: contrastColor, - borderColor: contrastColor, - }, - }, - calendar: { - itemStyle: { - color: backgroundColor, - }, - dayLabel: { - color: contrastColor, - }, - monthLabel: { - color: contrastColor, - }, - yearLabel: { - color: contrastColor, - }, - }, - timeAxis: axisCommon(), - logAxis: axisCommon(), - valueAxis: axisCommon(), - categoryAxis: axisCommon(), - - line: { - symbol: 'circle', - }, - graph: { - color: colorPalette, - }, - gauge: { - title: { - color: contrastColor, - }, - }, - candlestick: { - itemStyle: { - color: '#FD1050', - color0: '#0CF49B', - borderColor: '#FD1050', - borderColor0: '#0CF49B', - }, - }, -} - -theme.categoryAxis.splitLine.show = false - -export default theme diff --git a/src/components/chart/index.vue b/src/components/chart/index.vue deleted file mode 100644 index dc5f416..0000000 --- a/src/components/chart/index.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - diff --git a/src/components/chart/typing.ts b/src/components/chart/typing.ts deleted file mode 100644 index 08a54d9..0000000 --- a/src/components/chart/typing.ts +++ /dev/null @@ -1,15 +0,0 @@ -export interface SeriesDataItem { - x: any - y: any -} - -export interface RadarDataItem { - label: string - name: string - value: string | number -} - -export interface RadarIndicatorItem { - name: string - max: number -} diff --git a/src/components/container/index.vue b/src/components/container/index.vue deleted file mode 100644 index fc43ded..0000000 --- a/src/components/container/index.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/src/components/index.ts b/src/components/index.ts deleted file mode 100644 index 36fb26e..0000000 --- a/src/components/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { default as Container } from './container/index.vue' - -// charts -export { default as Chart } from './chart/index.vue' -export type { SeriesDataItem, RadarDataItem, RadarIndicatorItem } from './chart/typing' diff --git a/src/composables/dark.ts b/src/composables/dark.ts deleted file mode 100644 index 5ad5936..0000000 --- a/src/composables/dark.ts +++ /dev/null @@ -1,4 +0,0 @@ -// these APIs are auto-imported from @vueuse/core -export const isDark = useDark() -export const toggleDark = useToggle(isDark) -export const preferredDark = usePreferredDark() diff --git a/src/stores/modules/app.ts b/src/stores/modules/app.ts index b7c43f3..9d54d98 100644 --- a/src/stores/modules/app.ts +++ b/src/stores/modules/app.ts @@ -1,12 +1,13 @@ import { defineStore } from 'pinia' import type { ConfigProviderTheme } from 'vant' -const prefersDark -= window.matchMedia -&& window.matchMedia('(prefers-color-scheme: dark)').matches +// const prefersDark +// = window.matchMedia +// && window.matchMedia('(prefers-color-scheme: dark)').matches const useAppStore = defineStore('app', () => { - const theme = prefersDark ? 'dark' : 'light' + // const theme = prefersDark ? 'dark' : 'light' + const theme = 'light' const mode = ref(theme) const swithMode = (val: ConfigProviderTheme) => { diff --git a/src/styles/app.less b/src/styles/app.less index 003bbca..652f0b7 100644 --- a/src/styles/app.less +++ b/src/styles/app.less @@ -9,10 +9,10 @@ html { color-scheme: light; } -html.dark { - background: #121212; - color-scheme: dark; -} +// html.dark { +// background: #121212; +// color-scheme: dark; +// } *, *::before, diff --git a/src/views/signUp/index.vue b/src/views/signUp/index.vue index c81b3f7..182e9c1 100644 --- a/src/views/signUp/index.vue +++ b/src/views/signUp/index.vue @@ -1,26 +1,24 @@ + + - -