Skip to content

Commit f26a4ca

Browse files
committed
feat: unocss add shortcuts
1 parent 899880b commit f26a4ca

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

src/components/Qrcode/src/Qrcode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const disabledClick = () => {
227227
<div
228228
v-if="disabled"
229229
:class="`${prefixCls}--disabled`"
230-
class="absolute left-0 top-0 h-full w-full flex items-center justify-center"
230+
class="wh-full absolute left-0 top-0 flex items-center justify-center"
231231
@click="disabledClick"
232232
>
233233
<div class="absolute left-[50%] top-[50%] font-bold">

src/layout/Layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default defineComponent({
5050
<section class={[prefixCls, `${prefixCls}__${layout.value}`, 'w-[100%] h-[100%] relative']}>
5151
{mobile.value && !collapse.value ? (
5252
<div
53-
class="absolute left-0 top-0 z-99 h-full w-full bg-[var(--el-color-black)] opacity-30"
53+
class="wh-full absolute left-0 top-0 z-99 bg-[var(--el-color-black)] opacity-30"
5454
onClick={handleClickOutside}
5555
></div>
5656
) : undefined}

uno.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,8 @@ ${selector}:after {
101101
]
102102
],
103103
presets: [presetUno({ dark: 'class', attributify: false })],
104-
transformers: [transformerVariantGroup()]
104+
transformers: [transformerVariantGroup()],
105+
shortcuts: {
106+
'wh-full': 'w-full h-full'
107+
}
105108
})

0 commit comments

Comments
 (0)