chore: format code

This commit is contained in:
vben
2024-06-09 13:31:43 +08:00
parent 68229a4d2f
commit 35c3dd78ec
65 changed files with 419 additions and 494 deletions

View File

@@ -35,13 +35,13 @@ function handleClick(value: string) {
<div
v-for="item in transitionPreset"
:key="item"
class="outline-box p-2"
:class="{
'outline-box-active': transitionName === item,
}"
class="outline-box p-2"
@click="handleClick(item)"
>
<div class="bg-accent h-10 w-12 rounded-md" :class="`${item}-slow`"></div>
<div :class="`${item}-slow`" class="bg-accent h-10 w-12 rounded-md"></div>
</div>
</div>
</template>

View File

@@ -45,8 +45,8 @@ const disableItem = computed(() => {
</SwitchItem>
<ToggleItem
v-model="breadcrumbStyleType"
:items="typeItems"
:disabled="disableItem"
:items="typeItems"
>
{{ $t('preference.breadcrumb-style') }}
</ToggleItem>

View File

@@ -41,8 +41,8 @@ const localeItems: SelectListItem[] = [
</SwitchItem>
<SelectItem
v-model="headerMode"
:items="localeItems"
:disabled="!headerEnable"
:items="localeItems"
>
{{ $t('preference.mode') }}
</SelectItem>

View File

@@ -25,8 +25,8 @@ const stylesItems: SelectListItem[] = [
<template>
<ToggleItem
v-model="navigationStyleType"
:items="stylesItems"
:disabled="disabled"
:items="stylesItems"
>
{{ $t('preference.navigation-style') }}
</ToggleItem>

View File

@@ -37,11 +37,11 @@ const slots = useSlots();
<template>
<div
class="my-1 flex w-full items-center justify-between rounded-md px-2 py-1"
:class="{
'hover:bg-accent': !slots.tip,
'pointer-events-none opacity-50': disabled,
}"
class="my-1 flex w-full items-center justify-between rounded-md px-2 py-1"
>
<span class="flex items-center text-sm">
<slot></slot>

View File

@@ -23,10 +23,10 @@ function handleClick() {
<template>
<div
class="hover:bg-accent my-1 flex w-full items-center justify-between rounded-md px-2 py-2"
:class="{
'pointer-events-none opacity-50': disabled,
}"
class="hover:bg-accent my-1 flex w-full items-center justify-between rounded-md px-2 py-2"
@click="handleClick"
>
<span class="flex items-center text-sm">

View File

@@ -17,19 +17,19 @@ const modelValue = defineModel<string>();
<template>
<div
disabled
class="hover:bg-accent flex w-full items-center justify-between rounded-md px-2 py-2"
:class="{
'pointer-events-none opacity-50': disabled,
}"
class="hover:bg-accent flex w-full items-center justify-between rounded-md px-2 py-2"
disabled
>
<span class="text-sm"><slot></slot></span>
<ToggleGroup
v-model="modelValue"
class="gap-2"
size="sm"
type="single"
variant="outline"
size="sm"
class="gap-2"
>
<template v-for="item in items" :key="item.value">
<ToggleGroupItem