Skip to content

Commit ac0656b

Browse files
committed
feat: 优化移动端布局
1 parent dce9b8c commit ac0656b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

frontend/src/components/print/PrintOptions.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
</template>
99
<div class="space-y-4">
1010
<!-- 第一行:颜色 + 方向(紧凑按钮组) -->
11-
<div class="grid grid-cols-2 gap-3">
12-
<UFormField label="颜色模式">
11+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
12+
<UFormField label="颜色模式" :hint="isColor ? undefined : '文档中的彩色内容将以灰阶模式打印输出'">
1313
<div class="flex rounded-lg border border-muted overflow-hidden">
1414
<label v-for="item in colorItems" :key="String(item.value)"
1515
class="flex-1 flex items-center justify-center gap-1.5 py-2 px-2 cursor-pointer text-sm transition"
1616
:class="isColor === item.value ? 'bg-primary text-white font-medium' : 'hover:bg-elevated'">
1717
<input type="radio" :value="item.value" :checked="isColor === item.value" class="sr-only" @change="$emit('update:isColor', item.value)" />
1818
<UIcon :name="item.icon" class="w-3.5 h-3.5 shrink-0" />
19-
<span class="truncate text-xs">{{ item.label }}</span>
19+
<span class="text-xs whitespace-nowrap">{{ item.label }}</span>
2020
</label>
2121
</div>
2222
</UFormField>
@@ -28,14 +28,14 @@
2828
:class="orientation === item.value ? 'bg-primary text-white font-medium' : 'hover:bg-elevated'">
2929
<input type="radio" :value="item.value" :checked="orientation === item.value" class="sr-only" @change="$emit('update:orientation', item.value)" />
3030
<UIcon :name="item.icon" class="w-3.5 h-3.5 shrink-0" />
31-
<span class="truncate text-xs">{{ item.label }}</span>
31+
<span class="text-xs whitespace-nowrap">{{ item.label }}</span>
3232
</label>
3333
</div>
3434
</UFormField>
3535
</div>
3636

3737
<!-- 第二行:双面 + 份数 -->
38-
<div class="grid grid-cols-2 gap-3">
38+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
3939
<UFormField label="双面打印">
4040
<USelect :model-value="duplex" :items="duplexItems" value-key="value" label-key="label" class="w-full" @update:model-value="$emit('update:duplex', $event)" />
4141
</UFormField>
@@ -53,7 +53,7 @@
5353
</div>
5454

5555
<!-- 第三行:纸张大小 + 纸张类型 -->
56-
<div class="grid grid-cols-2 gap-3">
56+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
5757
<UFormField label="纸张大小">
5858
<USelect :model-value="paperSize" :items="paperSizeItems" value-key="value" label-key="label" class="w-full" @update:model-value="$emit('update:paperSize', $event)" />
5959
</UFormField>
@@ -63,7 +63,7 @@
6363
</div>
6464

6565
<!-- 第四行:打印缩放 + 页面范围 -->
66-
<div class="grid grid-cols-2 gap-3">
66+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
6767
<UFormField label="缩放">
6868
<USelect :model-value="printScaling" :items="scalingItems" value-key="value" label-key="label" class="w-full" @update:model-value="$emit('update:printScaling', $event)" />
6969
</UFormField>
@@ -168,7 +168,7 @@ const pageRangeError = ref('')
168168
169169
const colorItems = [
170170
{ label: '彩色打印', value: true, icon: 'i-lucide-palette' },
171-
{ label: '黑白打印', value: false, icon: 'i-lucide-circle' }
171+
{ label: '黑白打印', value: false, icon: 'i-lucide-contrast' }
172172
]
173173
174174
const duplexItems = [

0 commit comments

Comments
 (0)