Skip to content

Commit 5b85bdd

Browse files
committed
页面宽度判断移动端设备从992调整为1024
1 parent e9d7970 commit 5b85bdd

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

src/layouts/components/BackTop/index.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ defineOptions({
55
66
const transitionClass = {
77
enterActiveClass: 'ease-out duration-300',
8-
enterFromClass: 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
9-
enterToClass: 'opacity-100 translate-y-0 sm:scale-100',
8+
enterFromClass: 'opacity-0 translate-y-4 lg:translate-y-0 lg:scale-95',
9+
enterToClass: 'opacity-100 translate-y-0 lg:scale-100',
1010
leaveActiveClass: 'ease-in duration-200',
11-
leaveFromClass: 'opacity-100 translate-y-0 sm:scale-100',
12-
leaveToClass: 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
11+
leaveFromClass: 'opacity-100 translate-y-0 lg:scale-100',
12+
leaveToClass: 'opacity-0 translate-y-4 lg:translate-y-0 lg:scale-95',
1313
}
1414
1515
onMounted(() => {

src/layouts/components/HotkeysIntro/index.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ onMounted(() => {
2020
<template>
2121
<HDialog v-model="isShow" title="快捷键介绍">
2222
<div class="px-4">
23-
<div class="grid gap-2 md:grid-cols-2">
23+
<div class="grid gap-2 sm:grid-cols-2">
2424
<div>
2525
<h2 class="m-0 text-lg font-bold">
2626
全局

src/layouts/components/Search/index.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ const overlayTransitionClass = ref({
3030
const transitionClass = computed(() => {
3131
return {
3232
enter: 'ease-out duration-300',
33-
enterFrom: 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
34-
enterTo: 'opacity-100 translate-y-0 sm:scale-100',
33+
enterFrom: 'opacity-0 translate-y-4 lg:translate-y-0 lg:scale-95',
34+
enterTo: 'opacity-100 translate-y-0 lg:scale-100',
3535
leave: 'ease-in duration-200',
36-
leaveFrom: 'opacity-100 translate-y-0 sm:scale-100',
37-
leaveTo: 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
36+
leaveFrom: 'opacity-100 translate-y-0 lg:scale-100',
37+
leaveTo: 'opacity-0 translate-y-4 lg:translate-y-0 lg:scale-95',
3838
}
3939
})
4040
@@ -280,9 +280,9 @@ function pageJump(path: listTypes['path'], link: listTypes['link']) {
280280
<div class="fixed inset-0 bg-stone-200/75 backdrop-blur-sm transition-opacity dark:bg-stone-8/75" />
281281
</TransitionChild>
282282
<div class="fixed inset-0">
283-
<div class="h-full flex items-end justify-center p-4 text-center sm:items-center sm:p-0">
283+
<div class="h-full flex items-end justify-center p-4 text-center lg:items-center">
284284
<TransitionChild as="template" v-bind="transitionClass">
285-
<DialogPanel class="relative h-full max-h-4/5 w-full flex flex-col text-left sm:max-w-2xl">
285+
<DialogPanel class="relative h-full max-h-4/5 w-full flex flex-col text-left lg:max-w-2xl">
286286
<div class="flex flex-col overflow-y-auto rounded-xl bg-white shadow-xl dark:bg-stone-8">
287287
<div class="flex items-center px-4 py-3" border-b="~ solid stone-2 dark:stone-7">
288288
<SvgIcon name="i-ep:search" :size="18" class="text-stone-5" />

src/layouts/ui-kit/HDialog.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ const overlayTransitionClass = ref({
3737
const transitionClass = computed(() => {
3838
return {
3939
enter: 'ease-out duration-300',
40-
enterFrom: 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
41-
enterTo: 'opacity-100 translate-y-0 sm:scale-100',
40+
enterFrom: 'opacity-0 translate-y-4 lg:translate-y-0 lg:scale-95',
41+
enterTo: 'opacity-100 translate-y-0 lg:scale-100',
4242
leave: 'ease-in duration-200',
43-
leaveFrom: 'opacity-100 translate-y-0 sm:scale-100',
44-
leaveTo: 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
43+
leaveFrom: 'opacity-100 translate-y-0 lg:scale-100',
44+
leaveTo: 'opacity-0 translate-y-4 lg:translate-y-0 lg:scale-95',
4545
}
4646
})
4747
@@ -58,9 +58,9 @@ function close() {
5858
<div class="fixed inset-0 bg-stone-2/75 transition-opacity dark:bg-stone-8/75" :class="{ 'backdrop-blur-sm': overlay }" />
5959
</TransitionChild>
6060
<div class="fixed inset-0 overflow-y-auto">
61-
<div class="min-h-full flex items-end justify-center p-4 text-center sm:items-center sm:p-0">
61+
<div class="min-h-full flex items-end justify-center p-4 text-center lg:items-center">
6262
<TransitionChild as="template" :appear="appear" v-bind="transitionClass">
63-
<DialogPanel class="relative w-full flex flex-col overflow-hidden rounded-xl bg-white text-left shadow-xl sm:my-8 sm:max-w-lg dark:bg-stone-8">
63+
<DialogPanel class="relative w-full flex flex-col overflow-hidden rounded-xl bg-white text-left shadow-xl lg:my-8 lg:max-w-lg dark:bg-stone-8">
6464
<div flex="~ items-center justify-between" px-4 py-3 border-b="~ solid stone/15" text-6>
6565
<DialogTitle m-0 text-lg text-dark dark:text-white>
6666
{{ title }}

src/store/modules/settings.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const useSettingsStore = defineStore(
7979
}
8080
else {
8181
// 如果是桌面设备,则根据页面宽度判断是否需要切换为移动端展示
82-
mode.value = width < 992 ? 'mobile' : 'pc'
82+
mode.value = width < 1024 ? 'mobile' : 'pc'
8383
}
8484
}
8585
else {

0 commit comments

Comments
 (0)