feat: unocss add shortcuts

(cherry picked from commit f26a4cae10)
This commit is contained in:
xingyu 2023-10-31 10:04:31 +08:00 committed by shizhong
parent 3fd38c4ca4
commit 8b8d7451e0
3 changed files with 6 additions and 3 deletions

View File

@ -227,7 +227,7 @@ const disabledClick = () => {
<div
v-if="disabled"
:class="`${prefixCls}--disabled`"
class="absolute left-0 top-0 h-full w-full flex items-center justify-center"
class="wh-full absolute left-0 top-0 flex items-center justify-center"
@click="disabledClick"
>
<div class="absolute left-[50%] top-[50%] font-bold">

View File

@ -50,7 +50,7 @@ export default defineComponent({
<section class={[prefixCls, `${prefixCls}__${layout.value}`, 'w-[100%] h-[100%] relative']}>
{mobile.value && !collapse.value ? (
<div
class="absolute left-0 top-0 z-99 h-full w-full bg-[var(--el-color-black)] opacity-30"
class="wh-full absolute left-0 top-0 z-99 bg-[var(--el-color-black)] opacity-30"
onClick={handleClickOutside}
></div>
) : undefined}

View File

@ -101,5 +101,8 @@ ${selector}:after {
]
],
presets: [presetUno({ dark: 'class', attributify: false })],
transformers: [transformerVariantGroup()]
transformers: [transformerVariantGroup()],
shortcuts: {
'wh-full': 'w-full h-full'
}
})