|
8 | 8 | </template> |
9 | 9 | <div class="space-y-4"> |
10 | 10 | <!-- 第一行:颜色 + 方向(紧凑按钮组) --> |
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 : '文档中的彩色内容将以灰阶模式打印输出'"> |
13 | 13 | <div class="flex rounded-lg border border-muted overflow-hidden"> |
14 | 14 | <label v-for="item in colorItems" :key="String(item.value)" |
15 | 15 | class="flex-1 flex items-center justify-center gap-1.5 py-2 px-2 cursor-pointer text-sm transition" |
16 | 16 | :class="isColor === item.value ? 'bg-primary text-white font-medium' : 'hover:bg-elevated'"> |
17 | 17 | <input type="radio" :value="item.value" :checked="isColor === item.value" class="sr-only" @change="$emit('update:isColor', item.value)" /> |
18 | 18 | <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> |
20 | 20 | </label> |
21 | 21 | </div> |
22 | 22 | </UFormField> |
|
28 | 28 | :class="orientation === item.value ? 'bg-primary text-white font-medium' : 'hover:bg-elevated'"> |
29 | 29 | <input type="radio" :value="item.value" :checked="orientation === item.value" class="sr-only" @change="$emit('update:orientation', item.value)" /> |
30 | 30 | <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> |
32 | 32 | </label> |
33 | 33 | </div> |
34 | 34 | </UFormField> |
35 | 35 | </div> |
36 | 36 |
|
37 | 37 | <!-- 第二行:双面 + 份数 --> |
38 | | - <div class="grid grid-cols-2 gap-3"> |
| 38 | + <div class="grid grid-cols-1 sm:grid-cols-2 gap-3"> |
39 | 39 | <UFormField label="双面打印"> |
40 | 40 | <USelect :model-value="duplex" :items="duplexItems" value-key="value" label-key="label" class="w-full" @update:model-value="$emit('update:duplex', $event)" /> |
41 | 41 | </UFormField> |
|
53 | 53 | </div> |
54 | 54 |
|
55 | 55 | <!-- 第三行:纸张大小 + 纸张类型 --> |
56 | | - <div class="grid grid-cols-2 gap-3"> |
| 56 | + <div class="grid grid-cols-1 sm:grid-cols-2 gap-3"> |
57 | 57 | <UFormField label="纸张大小"> |
58 | 58 | <USelect :model-value="paperSize" :items="paperSizeItems" value-key="value" label-key="label" class="w-full" @update:model-value="$emit('update:paperSize', $event)" /> |
59 | 59 | </UFormField> |
|
63 | 63 | </div> |
64 | 64 |
|
65 | 65 | <!-- 第四行:打印缩放 + 页面范围 --> |
66 | | - <div class="grid grid-cols-2 gap-3"> |
| 66 | + <div class="grid grid-cols-1 sm:grid-cols-2 gap-3"> |
67 | 67 | <UFormField label="缩放"> |
68 | 68 | <USelect :model-value="printScaling" :items="scalingItems" value-key="value" label-key="label" class="w-full" @update:model-value="$emit('update:printScaling', $event)" /> |
69 | 69 | </UFormField> |
@@ -168,7 +168,7 @@ const pageRangeError = ref('') |
168 | 168 |
|
169 | 169 | const colorItems = [ |
170 | 170 | { label: '彩色打印', value: true, icon: 'i-lucide-palette' }, |
171 | | - { label: '黑白打印', value: false, icon: 'i-lucide-circle' } |
| 171 | + { label: '黑白打印', value: false, icon: 'i-lucide-contrast' } |
172 | 172 | ] |
173 | 173 |
|
174 | 174 | const duplexItems = [ |
|
0 commit comments