Skip to content

Commit dcad2c6

Browse files
committed
refactor!: radix-vue 迁移到 reka-ui
1 parent 2b08e82 commit dcad2c6

File tree

107 files changed

+331
-278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+331
-278
lines changed

‎components.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"baseColor": "neutral",
99
"cssVariables": true
1010
},
11-
"framework": "vite",
1211
"aliases": {
1312
"components": "@/ui/shadcn",
14-
"utils": "@/utils"
13+
"utils": "@/utils",
14+
"lib": "@/utils"
1515
}
1616
}

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"type": "module",
33
"version": "5.1.0",
4+
"packageManager": "pnpm@9.10.0",
45
"engines": {
56
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
67
},
@@ -45,7 +46,7 @@
4546
"path-to-regexp": "^8.2.0",
4647
"pinia": "^3.0.1",
4748
"qs": "^6.14.0",
48-
"radix-vue": "^1.9.17",
49+
"reka-ui": "^2.0.2",
4950
"scule": "^1.3.0",
5051
"tailwind-merge": "^3.0.2",
5152
"ua-parser-js": "^2.0.2",

‎pnpm-lock.yaml‎

Lines changed: 25 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/layouts/components/Topbar/Toolbar/ColorScheme/index.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function toggleColorScheme(event: MouseEvent) {
3737
</script>
3838

3939
<template>
40-
<FaButton variant="ghost" size="icon" @click="toggleColorScheme">
40+
<FaButton variant="ghost" size="icon" class="size-9" @click="toggleColorScheme">
4141
<FaIcon
4242
:name="{
4343
light: 'i-ri:sun-line',

‎src/layouts/components/Topbar/Toolbar/Fullscreen/index.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { isFullscreen, toggle } = useFullscreen()
1212
</script>
1313

1414
<template>
15-
<FaButton v-if="settingsStore.mode === 'pc'" variant="ghost" size="icon" @click="toggle">
15+
<FaButton v-if="settingsStore.mode === 'pc'" variant="ghost" size="icon" class="size-9" @click="toggle">
1616
<FaIcon :name="isFullscreen ? 'i-ri:fullscreen-exit-line' : 'i-ri:fullscreen-line'" class="size-4" />
1717
</FaButton>
1818
</template>

‎src/layouts/components/Topbar/Toolbar/NavSearch/index.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const isShow = ref(false)
1212
</script>
1313

1414
<template>
15-
<FaButton :variant="settingsStore.mode === 'pc' ? 'outline' : 'ghost'" :size="settingsStore.mode === 'pc' ? undefined : 'icon'" :class="{ 'mx-2 px-3': settingsStore.mode === 'pc' }" @click="isShow = true">
15+
<FaButton :variant="settingsStore.mode === 'pc' ? 'outline' : 'ghost'" :size="settingsStore.mode === 'pc' ? undefined : 'icon'" :class="{ 'mx-2 px-3 h-9': settingsStore.mode === 'pc', 'size-9': settingsStore.mode !== 'pc' }" @click="isShow = true">
1616
<FaIcon name="i-ri:search-line" class="size-4" />
1717
<template v-if="settingsStore.mode === 'pc'">
1818
<span class="text-sm text-muted-foreground/60 transition group-hover-text-muted-foreground">搜索</span>

‎src/layouts/components/Topbar/Toolbar/PageReload/index.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function handleCtrlClick() {
4141
<p>可切换为浏览器原生刷新</p>
4242
</div>
4343
</template>
44-
<FaButton variant="ghost" size="icon" @click.exact="handleClick" @click.ctrl.exact="handleCtrlClick" @animationend="isAnimating = false">
44+
<FaButton variant="ghost" size="icon" class="size-9" @click.exact="handleClick" @click.ctrl.exact="handleCtrlClick" @animationend="isAnimating = false">
4545
<FaIcon name="i-iconoir:refresh-double" class="size-4" :class="{ animation: isAnimating }" />
4646
</FaButton>
4747
</FaTooltip>

‎src/ui/components/FaAvatar/avatar/Avatar.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { HTMLAttributes } from 'vue'
33
import type { AvatarVariants } from '.'
44
import { cn } from '@/utils'
5-
import { AvatarRoot } from 'radix-vue'
5+
import { AvatarRoot } from 'reka-ui'
66
import { avatarVariant } from '.'
77
88
const props = withDefaults(defineProps<{

‎src/ui/components/FaAvatar/avatar/AvatarFallback.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
2-
import type { AvatarFallbackProps } from 'radix-vue'
3-
import { AvatarFallback } from 'radix-vue'
2+
import type { AvatarFallbackProps } from 'reka-ui'
3+
import { AvatarFallback } from 'reka-ui'
44
55
const props = defineProps<AvatarFallbackProps>()
66
</script>
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<script setup lang="ts">
2-
import type { AvatarImageProps } from 'radix-vue'
3-
import { AvatarImage } from 'radix-vue'
2+
import type { AvatarImageProps } from 'reka-ui'
3+
import { AvatarImage } from 'reka-ui'
44
55
const props = defineProps<AvatarImageProps>()
66
</script>
77

88
<template>
9-
<AvatarImage v-bind="props" class="h-full w-full object-cover" />
9+
<AvatarImage v-bind="props" class="h-full w-full object-cover">
10+
<slot />
11+
</AvatarImage>
1012
</template>

0 commit comments

Comments
 (0)