Skip to content

Commit

Permalink
refactor(projects): refactor unocss shortcuts: wh-full => size-full
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Mar 11, 2024
1 parent 1bebf8b commit 835cb4f
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/materials/src/libs/page-tab/chrome-tab-bg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defineOptions({
</script>

<template>
<svg class="wh-full">
<svg class="size-full">
<defs>
<symbol id="geometry-left" viewBox="0 0 214 36">
<path d="M17 0h197v36H0v-2c4.5 0 9-3.5 9-8V8c0-4.5 3.5-8 8-8z"></path>
Expand Down
7 changes: 2 additions & 5 deletions packages/uno-preset/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ export function presetSoybeanAdmin(): Preset<Theme> {
const preset: Preset<Theme> = {
name: 'preset-soybean-admin',
shortcuts: [
{
'wh-full': 'w-full h-full'
},
{
'flex-center': 'flex justify-center items-center',
'flex-x-center': 'flex justify-center',
Expand All @@ -33,7 +30,7 @@ export function presetSoybeanAdmin(): Preset<Theme> {
'absolute-tr': 'absolute-rt',
'absolute-bl': 'absolute-lb',
'absolute-br': 'absolute-rb',
'absolute-center': 'absolute-lt flex-center wh-full',
'absolute-center': 'absolute-lt flex-center size-full',
'fixed-lt': 'fixed left-0 top-0',
'fixed-lb': 'fixed left-0 bottom-0',
'fixed-rt': 'fixed right-0 top-0',
Expand All @@ -42,7 +39,7 @@ export function presetSoybeanAdmin(): Preset<Theme> {
'fixed-tr': 'fixed-rt',
'fixed-bl': 'fixed-lb',
'fixed-br': 'fixed-rb',
'fixed-center': 'fixed-lt flex-center wh-full'
'fixed-center': 'fixed-lt flex-center size-full'
},
{
'nowrap-hidden': 'overflow-hidden whitespace-nowrap',
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/exception-base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const icon = computed(() => iconMap[props.type]);
</script>

<template>
<div class="flex-vertical-center gap-24px min-h-520px wh-full overflow-hidden">
<div class="flex-vertical-center gap-24px min-h-520px size-full overflow-hidden">
<div class="flex text-400px text-primary">
<SvgIcon :local-icon="icon" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/custom/look-forward.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defineOptions({
</script>

<template>
<div class="flex-vertical-center gap-24px min-h-520px wh-full overflow-hidden">
<div class="flex-vertical-center gap-24px min-h-520px size-full overflow-hidden">
<div class="flex text-400px text-primary">
<SvgIcon local-icon="expectation" />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/custom/wave-bg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const darkColor = computed(() => getColorPalette(props.themeColor, 6));
</script>

<template>
<div class="absolute-lt z-1 wh-full overflow-hidden">
<div class="absolute-lt z-1 size-full overflow-hidden">
<div class="absolute -right-300px -top-900px <sm:(-right-100px -top-1170px)">
<svg height="1337" width="1337">
<defs>
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/modules/global-menu/base-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function handleClickMenu(menuInfo: MenuInfo) {
:open-keys="openKeys"
:inline-collapsed="inlineCollapsed"
:inline-indent="18"
class="wh-full border-0! transition-300"
class="size-full border-0! transition-300"
:class="{ 'bg-container!': !darkTheme, 'horizontal-menu': isHorizontal }"
@click="handleClickMenu"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/modules/global-sider/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const showLogo = computed(() => !isVerticalMix.value && !isHorizontalMix.value);
</script>

<template>
<DarkModeContainer class="flex-vertical-stretch wh-full shadow-sider" :inverted="darkMenu">
<DarkModeContainer class="flex-vertical-stretch size-full shadow-sider" :inverted="darkMenu">
<GlobalLogo
v-if="showLogo"
:show-title="!appStore.siderCollapse"
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/modules/global-tab/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ init();
</script>

<template>
<DarkModeContainer class="flex-y-center wh-full px-16px shadow-tab">
<DarkModeContainer class="flex-y-center size-full px-16px shadow-tab">
<div ref="bsWrapper" class="flex-1-hidden h-full">
<BetterScroll ref="bsScroll" :options="{ scrollX: true, scrollY: false, click: appStore.isMobile }">
<div
Expand Down
2 changes: 1 addition & 1 deletion src/views/_builtin/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const bgColor = computed(() => {
</script>

<template>
<div class="relative flex-center wh-full" :style="{ backgroundColor: bgColor }">
<div class="relative flex-center size-full" :style="{ backgroundColor: bgColor }">
<WaveBg :theme-color="bgThemeColor" />
<ACard class="relative z-4">
<div class="w-400px <sm:w-300px">
Expand Down

0 comments on commit 835cb4f

Please sign in to comment.