chore: update dependency version for improved stability and compatibility (#6023)

* chore: update dependency version for improved stability and compatibility

* fix: optimize clearPoints function in useCaptchaPoints hook to improve performance

* fix: make several props optional in various components for better flexibility
This commit is contained in:
Vben
2025-04-27 22:06:49 +08:00
committed by GitHub
parent dd2b1ed580
commit 76de450c71
29 changed files with 1988 additions and 2360 deletions

View File

@@ -1,8 +1,8 @@
<script lang="ts" setup>
interface Props {
companyName: string;
companyName?: string;
companySiteLink?: string;
date: string;
date?: string;
icp?: string;
icpLink?: string;
}

View File

@@ -11,7 +11,7 @@ import { useNavigation } from './use-navigation';
interface Props extends MenuProps {
collapse?: boolean;
menus: MenuRecordRaw[];
menus?: MenuRecordRaw[];
}
withDefaults(defineProps<Props>(), {

View File

@@ -6,7 +6,7 @@ import type { MenuProps } from '@vben-core/menu-ui';
import { Menu } from '@vben-core/menu-ui';
interface Props extends MenuProps {
menus: MenuRecordRaw[];
menus?: MenuRecordRaw[];
}
const props = withDefaults(defineProps<Props>(), {

View File

@@ -24,7 +24,7 @@ defineOptions({
});
const props = withDefaults(
defineProps<{ enableShortcutKey?: boolean; menus: MenuRecordRaw[] }>(),
defineProps<{ enableShortcutKey?: boolean; menus?: MenuRecordRaw[] }>(),
{
enableShortcutKey: true,
menus: () => [],

View File

@@ -18,7 +18,7 @@ defineOptions({
});
const props = withDefaults(
defineProps<{ keyword: string; menus: MenuRecordRaw[] }>(),
defineProps<{ keyword?: string; menus?: MenuRecordRaw[] }>(),
{
keyword: '',
menus: () => [],

View File

@@ -14,7 +14,7 @@ defineOptions({
withDefaults(
defineProps<{
disabled?: boolean;
items: SelectOption[];
items?: SelectOption[];
multiple?: boolean;
onBtnClick?: (value: string) => void;
placeholder?: string;

View File

@@ -7,7 +7,7 @@ defineOptions({
name: 'PreferenceToggleItem',
});
withDefaults(defineProps<{ disabled?: boolean; items: SelectOption[] }>(), {
withDefaults(defineProps<{ disabled?: boolean; items?: SelectOption[] }>(), {
disabled: false,
items: () => [],
});

View File

@@ -132,8 +132,8 @@ function toggleTheme(event: MouseEvent) {
&__sun {
@apply fill-foreground/90 stroke-none;
transition: transform 1.6s cubic-bezier(0.25, 0, 0.2, 1);
transform-origin: center center;
transition: transform 1.6s cubic-bezier(0.25, 0, 0.2, 1);
&:hover > svg > & {
@apply fill-foreground/90;
@@ -143,10 +143,10 @@ function toggleTheme(event: MouseEvent) {
&__sun-beams {
@apply stroke-foreground/90 stroke-[2px];
transform-origin: center center;
transition:
transform 1.6s cubic-bezier(0.5, 1.5, 0.75, 1.25),
opacity 0.6s cubic-bezier(0.25, 0, 0.3, 1);
transform-origin: center center;
&:hover > svg > & {
@apply stroke-foreground;