chore: 优化部分代码(同步 GiDemo 更新)

This commit is contained in:
2025-01-13 23:33:39 +08:00
parent ccfec2155f
commit 33e0c61bb6
5 changed files with 114 additions and 56 deletions

View File

@@ -17,7 +17,7 @@ export function useBreakpoint() {
const arr = breakpoints.current() as ComputedRef<Breakpoint[]>
const breakpoint = computed(() => {
return arr.value[arr.value.length - 1] || 'xs'
return arr.value.length ? arr.value[arr.value.length - 1] : 'xs'
})
return { breakpoint }