perf: format code with better style (#5283)

This commit is contained in:
Vben
2025-01-01 11:39:49 +08:00
committed by GitHub
parent 4d81b9d18d
commit 081d2aed23
288 changed files with 1805 additions and 2164 deletions

View File

@@ -1,16 +1,17 @@
<script setup lang="ts">
import type { ClassType } from '@vben-core/typings';
import type {
AvatarFallbackProps,
AvatarImageProps,
AvatarRootProps,
} from 'radix-vue';
import type { ClassType } from '@vben-core/typings';
import { computed } from 'vue';
import { Avatar, AvatarFallback, AvatarImage } from '../../ui';
interface Props extends AvatarRootProps, AvatarFallbackProps, AvatarImageProps {
interface Props extends AvatarFallbackProps, AvatarImageProps, AvatarRootProps {
alt?: string;
class?: ClassType;
dot?: boolean;

View File

@@ -3,8 +3,8 @@ import type { BreadcrumbProps } from './types';
import { useForwardPropsEmits } from 'radix-vue';
import Breadcrumb from './breadcrumb.vue';
import BreadcrumbBackground from './breadcrumb-background.vue';
import Breadcrumb from './breadcrumb.vue';
interface Props extends BreadcrumbProps {
class?: any;

View File

@@ -1,7 +1,7 @@
import type { BreadcrumbStyleType } from '@vben-core/typings';
import type { Component } from 'vue';
import type { BreadcrumbStyleType } from '@vben-core/typings';
export interface IBreadcrumb {
icon?: Component | string;
isHome?: boolean;

View File

@@ -1,9 +1,9 @@
import type { AsTag } from 'radix-vue';
import type { ButtonVariants, ButtonVariantSize } from '../../ui';
import type { Component } from 'vue';
import type { ButtonVariants, ButtonVariantSize } from '../../ui';
export interface VbenButtonProps {
/**
* The element or component this component should render as. Can be overwrite by `asChild`

View File

@@ -1,11 +1,12 @@
<script setup lang="ts">
import type { ClassType } from '@vben-core/typings';
import type {
ContextMenuContentProps,
ContextMenuRootEmits,
ContextMenuRootProps,
} from 'radix-vue';
import type { ClassType } from '@vben-core/typings';
import type { IContextMenuItem } from './interface';
import { computed } from 'vue';
@@ -22,14 +23,14 @@ import {
} from '../../ui/context-menu';
const props = defineProps<
{
ContextMenuRootProps & {
class?: ClassType;
contentClass?: ClassType;
contentProps?: ContextMenuContentProps;
handlerData?: Record<string, any>;
itemClass?: ClassType;
menus: (data: any) => IContextMenuItem[];
} & ContextMenuRootProps
}
>();
const emits = defineEmits<ContextMenuRootEmits>();

View File

@@ -1,11 +1,12 @@
<script setup lang="ts">
import type { ClassType } from '@vben-core/typings';
import type {
HoverCardContentProps,
HoverCardRootEmits,
HoverCardRootProps,
} from 'radix-vue';
import type { ClassType } from '@vben-core/typings';
import { computed } from 'vue';
import { useForwardPropsEmits } from 'radix-vue';

View File

@@ -1,5 +1,7 @@
<script setup lang="ts">
import { type Component, computed } from 'vue';
import type { Component } from 'vue';
import { computed } from 'vue';
import { IconDefault, IconifyIcon } from '@vben-core/icons';
import {

View File

@@ -1,11 +1,12 @@
<script setup lang="ts">
import type { ClassType } from '@vben-core/typings';
import type {
PopoverContentProps,
PopoverRootEmits,
PopoverRootProps,
} from 'radix-vue';
import type { ClassType } from '@vben-core/typings';
import { computed } from 'vue';
import { useForwardPropsEmits } from 'radix-vue';

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import type { Component, PropType } from 'vue';
import { defineComponent, h } from 'vue';
import { isFunction, isObject } from '@vben-core/shared/utils';

View File

@@ -7,7 +7,7 @@ import { cn } from '@vben-core/shared/utils';
import { TabsIndicator, useForwardProps } from 'radix-vue';
const props = defineProps<{ class?: any } & TabsIndicatorProps>();
const props = defineProps<TabsIndicatorProps & { class?: any }>();
const delegatedProps = computed(() => {
const { class: _, ...delegated } = props;

View File

@@ -1,9 +1,10 @@
<script setup lang="ts">
import type { ClassType } from '@vben-core/typings';
import type { TooltipContentProps } from 'radix-vue';
import type { StyleValue } from 'vue';
import type { ClassType } from '@vben-core/typings';
import {
Tooltip,
TooltipContent,