diff --git a/web/app.vue b/web/app.vue index b57448d..6545eb7 100755 --- a/web/app.vue +++ b/web/app.vue @@ -1,12 +1,15 @@ diff --git a/web/assets/min.scss b/web/assets/min.scss index 4d258df..e078adc 100755 --- a/web/assets/min.scss +++ b/web/assets/min.scss @@ -3,7 +3,7 @@ * { margin: 0; box-sizing: border-box; - transition: color .2s, background-color .2s, border-color .2s, box-shadow .2s, stork .2s, fill .2s, opacity .2s; + transition: background-color .08s, border-color .2s, box-shadow .2s, stork .2s, fill .2s, opacity .2s; } body { @@ -20,3 +20,26 @@ body { a { text-decoration: none; } + +//noinspection CssInvalidPseudoSelector +::view-transition-old(root), +::view-transition-new(root) { + animation: none; + mix-blend-mode: normal; +} +//noinspection CssInvalidPseudoSelector +::view-transition-old(root) { + z-index: 1; +} +//noinspection CssInvalidPseudoSelector +::view-transition-new(root) { + z-index: 9999; +} +//noinspection CssInvalidPseudoSelector +.dark-mode::view-transition-old(root) { + z-index: 9999; +} +//noinspection CssInvalidPseudoSelector +.dark-mode::view-transition-new(root) { + z-index: 1; +} diff --git a/web/components/Cards/IChart.vue b/web/components/Cards/IChart.vue index 90c8ef1..7d51a84 100755 --- a/web/components/Cards/IChart.vue +++ b/web/components/Cards/IChart.vue @@ -3,10 +3,16 @@ import {charts} from "~/config/charts"; import type {PropType} from "vue"; import type {serverValueItem} from "~/components/SettingCard.vue"; import {useMainLayoutStore} from "~/strores/UseMainLayoutStore"; +import {THEME_KEY} from "vue-echarts"; const mainLayoutStore = useMainLayoutStore() const visible = ref(false) +const cardRef = ref(null) +const {width} = useElementBounding(cardRef) +const rangeNum = ref(6) +const targetIsVisible = useElementVisibility(cardRef) +const isSwitched = ref(false) const props = defineProps({ id: { type: String, @@ -29,12 +35,8 @@ const props = defineProps({ required: false } }) -const cardRef = ref(null) -const {width} = useElementBounding(cardRef) -const rangeNum = ref(6) -const targetIsVisible = useElementVisibility(cardRef) -const isSwitched = ref(false) -watch(() => mainLayoutStore.SelectServer.id, () => { + +watch(() => mainLayoutStore.SelectServer.value, () => { isSwitched.value = true setTimeout(() => { isSwitched.value = false @@ -50,6 +52,17 @@ watchDebounced( }, {debounce: 500, maxWait: 1000}, ) +// watchDebounced( +// ()=>useColorMode().value, +// +// {debounce: 500, maxWait: 1000} +// ) +watch(()=>useColorMode().value,()=>{ + isSwitched.value = true + setTimeout(() => { + isSwitched.value = false + }) +}) const valueIds = computed(() => props.values.map(x => x.dataType)) const valueNames = computed(() => props.values.map(x => x.dataName)) const items = [ diff --git a/web/components/Charts/AreaChart.vue b/web/components/Charts/AreaChart.vue index 24e0c6f..4299f14 100644 --- a/web/components/Charts/AreaChart.vue +++ b/web/components/Charts/AreaChart.vue @@ -32,6 +32,7 @@ const props = defineProps({ }) const option = computed(() => { return { + backgroundColor:'', tooltip: { trigger: 'axis', axisPointer: { @@ -87,9 +88,6 @@ const option = computed(() => { ], legend: { data: props.valueNames, - textStyle: { - fontSize: 16, - }, }, series: props.valueNames?.map((id) => { return { @@ -169,7 +167,7 @@ const zoom = _.throttle((e: any) => { 'Authorization': 'Bearer ' + useCookie('token').value }, params: { - ServerId: mainLayoutStore.SelectServer.id, + ServerId: mainLayoutStore.SelectServer.value, DataTypes: props.valueIds, StartIndex: endIndex, }, @@ -203,6 +201,7 @@ const zoom = _.throttle((e: any) => { diff --git a/web/components/Charts/AreaChart2.vue b/web/components/Charts/AreaChart2.vue index 38ffe78..814831b 100644 --- a/web/components/Charts/AreaChart2.vue +++ b/web/components/Charts/AreaChart2.vue @@ -10,7 +10,7 @@ const mainLayoutStore = useMainLayoutStore() const dataStore = useDataStore() const isLoading = ref(false) const chartRef = ref(null); - +const isSwitch= ref(false) const props = defineProps({ valueIds: { type: Array as PropType, @@ -67,6 +67,7 @@ const props = defineProps({ }) const option = computed(() => { return { + backgroundColor:'', grid: { left: '0', right: '0', @@ -197,7 +198,7 @@ const zoom = _.throttle((e: any) => { 'Authorization': 'Bearer ' + useCookie('token').value }, params: { - ServerId: mainLayoutStore.SelectServer.id, + ServerId: mainLayoutStore.SelectServer.value, DataTypes: props.valueIds, StartIndex: endIndex, }, @@ -225,13 +226,20 @@ const zoom = _.throttle((e: any) => { }) } }, 1000) - +watch(()=>useColorMode().value,()=>{ + isSwitch.value=true + nextTick(()=>{ + isSwitch.value=false + }) +})