mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2025-07-04 19:13:13 +08:00
chore: resolve reflict
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { computed, defineComponent } from 'vue'
|
||||
import { useProviderConfigState } from '../config-provider/context'
|
||||
import useStyle from './style'
|
||||
export default defineComponent({
|
||||
const Button = defineComponent({
|
||||
name: 'AButton',
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
@ -9,7 +9,7 @@ export default defineComponent({
|
||||
type: String
|
||||
}
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
setup(props, { slots, attrs }) {
|
||||
const { getPrefixCls } = useProviderConfigState()
|
||||
const prefixCls = computed(() => getPrefixCls('btn', props.prefixCls))
|
||||
const [wrapSSR, hashId] = useStyle(prefixCls)
|
||||
@ -18,7 +18,9 @@ export default defineComponent({
|
||||
[prefixCls.value]: true,
|
||||
[hashId.value]: true
|
||||
}
|
||||
return wrapSSR(<button class={cls}>{slots.default?.()}</button>)
|
||||
return wrapSSR(<button class={[cls, attrs.class]}>{slots.default?.()}</button>)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
export default Button
|
||||
|
Reference in New Issue
Block a user