Skip to content

Commit 891f2fe

Browse files
committed
fix (core): 修复 Button 组件异常代码
1 parent 15725ef commit 891f2fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ui/Button.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,12 @@ const typeClasses = computed(() => {
156156
}
157157
}
158158
159-
return styles[type]?.[variant] || styles.primary.solid
159+
return styles[type as keyof typeof styles]?.[variant] || styles.primary.solid
160160
})
161161
162162
// 图标样式
163163
const iconClasses = computed(() => {
164-
const hasText = props.text || !!props.$slots?.default
164+
const hasText = props.text || !!(props as any).$slots?.default
165165
const sizeMap = {
166166
xs: 'w-3 h-3',
167167
sm: 'w-4 h-4',

0 commit comments

Comments
 (0)