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,9 +1,12 @@
<script lang="ts" setup>
import type { Component } from 'vue';
import type { AnyPromiseFunction } from '@vben/types';
import { type Component, computed, ref, unref, useAttrs, watch } from 'vue';
import { computed, ref, unref, useAttrs, watch } from 'vue';
import { LoaderCircle } from '@vben/icons';
import { get, isEqual, isFunction } from '@vben-core/shared/utils';
import { objectOmit } from '@vueuse/core';

View File

@@ -3,6 +3,7 @@ import type { CaptchaPoint, PointSelectionCaptchaProps } from '../types';
import { RotateCw } from '@vben/icons';
import { $t } from '@vben/locales';
import { VbenButton, VbenIconButton } from '@vben-core/shadcn-ui';
import { useCaptchaPoints } from '../hooks/useCaptchaPoints';

View File

@@ -4,6 +4,7 @@ import type { PointSelectionCaptchaCardProps } from '../types';
import { computed } from 'vue';
import { $t } from '@vben/locales';
import {
Card,
CardContent,

View File

@@ -8,6 +8,7 @@ import type {
import { reactive, unref, useTemplateRef, watch, watchEffect } from 'vue';
import { $t } from '@vben/locales';
import { cn } from '@vben-core/shared/utils';
import { useTimeoutFn } from '@vueuse/core';

View File

@@ -1,8 +1,10 @@
<script setup lang="ts">
import type { CSSProperties } from 'vue';
import { computed, ref, useTemplateRef } from 'vue';
import { Check, ChevronsRight } from '@vben/icons';
import { Slot } from '@vben-core/shadcn-ui';
const props = defineProps<{

View File

@@ -1,5 +1,7 @@
<script setup lang="ts">
import { computed, type CSSProperties, ref, useTemplateRef } from 'vue';
import type { CSSProperties } from 'vue';
import { computed, ref, useTemplateRef } from 'vue';
const props = defineProps<{
barStyle: CSSProperties;

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import type { CSSProperties } from 'vue';
import { computed, useTemplateRef } from 'vue';
import { VbenSpineText } from '@vben-core/shadcn-ui';

View File

@@ -1,7 +1,7 @@
import type { ClassType } from '@vben/types';
import type { CSSProperties } from 'vue';
import type { ClassType } from '@vben/types';
export interface CaptchaData {
/**
* x

View File

@@ -1,5 +1,7 @@
<script setup lang="ts">
import { computed, type CSSProperties, ref, watchEffect } from 'vue';
import type { CSSProperties } from 'vue';
import { computed, ref, watchEffect } from 'vue';
import { VbenTooltip } from '@vben-core/shadcn-ui';

View File

@@ -1,9 +1,12 @@
<script setup lang="ts">
import { computed, h, ref, type VNode, watch, watchEffect } from 'vue';
import type { VNode } from 'vue';
import { computed, h, ref, watch, watchEffect } from 'vue';
import { usePagination } from '@vben/hooks';
import { EmptyIcon, Grip, listIcons } from '@vben/icons';
import { $t } from '@vben/locales';
import {
Button,
Pagination,

View File

@@ -1,4 +1,5 @@
import { mount } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';
import { Page } from '..';

View File

@@ -1,14 +1,9 @@
<script setup lang="ts">
import type { StyleValue } from 'vue';
import type { PageProps } from './types';
import {
computed,
nextTick,
onMounted,
ref,
type StyleValue,
useTemplateRef,
} from 'vue';
import { computed, nextTick, onMounted, ref, useTemplateRef } from 'vue';
import { CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT } from '@vben-core/shared/constants';
import { cn } from '@vben-core/shared/utils';

View File

@@ -8,6 +8,7 @@ import {
VBEN_GITHUB_URL,
VBEN_PREVIEW_URL,
} from '@vben/constants';
import { VbenRenderContent } from '@vben-core/shadcn-ui';
import { Page } from '../../components';

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import type { Recordable } from '@vben/types';
import type { VbenFormSchema } from '@vben-core/form-ui';
import { computed, reactive } from 'vue';
import { useRouter } from 'vue-router';
import { $t } from '@vben/locales';
import { useVbenForm } from '@vben-core/form-ui';
import { VbenButton } from '@vben-core/shadcn-ui';

View File

@@ -5,6 +5,7 @@ import { computed, reactive } from 'vue';
import { useRouter } from 'vue-router';
import { $t } from '@vben/locales';
import { useVbenForm } from '@vben-core/form-ui';
import { VbenButton } from '@vben-core/shadcn-ui';

View File

@@ -1,7 +1,7 @@
export { default as AuthenticationCodeLogin } from './code-login.vue';
export { default as AuthenticationForgetPassword } from './forget-password.vue';
export { default as AuthenticationLogin } from './login.vue';
export { default as AuthenticationLoginExpiredModal } from './login-expired-modal.vue';
export { default as AuthenticationLogin } from './login.vue';
export { default as AuthenticationQrCodeLogin } from './qrcode-login.vue';
export { default as AuthenticationRegister } from './register.vue';
export type { AuthenticationProps } from './types';

View File

@@ -1,5 +1,6 @@
<script setup lang="ts">
import type { Recordable } from '@vben/types';
import type { VbenFormSchema } from '@vben-core/form-ui';
import type { AuthenticationProps } from './types';
@@ -8,6 +9,7 @@ import { computed, onMounted, reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { $t } from '@vben/locales';
import { useVbenForm } from '@vben-core/form-ui';
import { VbenButton, VbenCheckbox } from '@vben-core/shadcn-ui';

View File

@@ -3,6 +3,7 @@ import { ref } from 'vue';
import { useRouter } from 'vue-router';
import { $t } from '@vben/locales';
import { VbenButton } from '@vben-core/shadcn-ui';
import { useQRCode } from '@vueuse/integrations/useQRCode';

View File

@@ -1,11 +1,13 @@
<script setup lang="ts">
import type { Recordable } from '@vben/types';
import type { VbenFormSchema } from '@vben-core/form-ui';
import { computed, reactive } from 'vue';
import { useRouter } from 'vue-router';
import { $t } from '@vben/locales';
import { useVbenForm } from '@vben-core/form-ui';
import { VbenButton } from '@vben-core/shadcn-ui';

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { MdiGithub, MdiGoogle, MdiQqchat, MdiWechat } from '@vben/icons';
import { $t } from '@vben/locales';
import { VbenIconButton } from '@vben-core/shadcn-ui';
defineOptions({

View File

@@ -6,6 +6,7 @@ import { useRouter } from 'vue-router';
import { ArrowLeft, RotateCw } from '@vben/icons';
import { $t } from '@vben/locales';
import { VbenButton } from '@vben-core/shadcn-ui';
interface Props extends FallbackProps {}