perf: enable strict ts type checking (#4045)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import type { ButtonVariants } from '@vben-core/shadcn-ui/components/ui/button';
|
||||
|
||||
import { computed, type HTMLAttributes, useSlots } from 'vue';
|
||||
|
||||
import { VbenTooltip } from '@vben-core/shadcn-ui/components/tooltip';
|
||||
import { ButtonVariants } from '@vben-core/shadcn-ui/components/ui/button';
|
||||
import { cn } from '@vben-core/shared';
|
||||
|
||||
import { type PrimitiveProps } from 'radix-vue';
|
||||
|
@@ -94,7 +94,7 @@ function formatNumber(num: number | string) {
|
||||
const x2 = x.length > 1 ? decimal + x[1] : '';
|
||||
|
||||
const rgx = /(\d+)(\d{3})/;
|
||||
if (separator && !isNumber(separator)) {
|
||||
if (separator && !isNumber(separator) && x1) {
|
||||
while (rgx.test(x1)) {
|
||||
x1 = x1.replace(rgx, `$1${separator}$2`);
|
||||
}
|
||||
|
@@ -1,7 +1,12 @@
|
||||
<script setup lang="ts">
|
||||
import type { HoverCardRootEmits, HoverCardRootProps } from 'radix-vue';
|
||||
import type {
|
||||
HoverCardContentProps,
|
||||
HoverCardRootEmits,
|
||||
HoverCardRootProps,
|
||||
} from 'radix-vue';
|
||||
|
||||
import { computed, HTMLAttributes } from 'vue';
|
||||
import type { HTMLAttributes } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import {
|
||||
HoverCard,
|
||||
@@ -9,7 +14,7 @@ import {
|
||||
HoverCardTrigger,
|
||||
} from '@vben-core/shadcn-ui/components/ui/hover-card';
|
||||
|
||||
import { HoverCardContentProps, useForwardPropsEmits } from 'radix-vue';
|
||||
import { useForwardPropsEmits } from 'radix-vue';
|
||||
|
||||
const props = defineProps<
|
||||
{
|
||||
|
@@ -5,7 +5,8 @@ import type {
|
||||
PopoverRootProps,
|
||||
} from 'radix-vue';
|
||||
|
||||
import { computed, HTMLAttributes } from 'vue';
|
||||
import type { HTMLAttributes } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
|
||||
import {
|
||||
PopoverContent,
|
||||
|
@@ -6,7 +6,10 @@ defineOptions({
|
||||
});
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{ content: Component | string; props?: Record<string, any> }>(),
|
||||
defineProps<{
|
||||
content: Component | string | undefined;
|
||||
props?: Record<string, any>;
|
||||
}>(),
|
||||
{
|
||||
props: () => ({}),
|
||||
},
|
||||
|
@@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { TooltipContentProps } from 'radix-vue';
|
||||
|
||||
import type { HTMLAttributes } from 'vue';
|
||||
|
||||
import {
|
||||
@@ -8,8 +10,6 @@ import {
|
||||
TooltipTrigger,
|
||||
} from '@vben-core/shadcn-ui/components/ui/tooltip';
|
||||
|
||||
import { TooltipContentProps } from 'radix-vue';
|
||||
|
||||
interface Props {
|
||||
contentClass?: HTMLAttributes['class'];
|
||||
delayDuration?: number;
|
||||
|
Reference in New Issue
Block a user