You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
665 B
23 lines
665 B
import { defineComponent } from 'vue';
|
|
import Radio, { radioProps } from './Radio';
|
|
import useConfigInject from '../config-provider/hooks/useConfigInject';
|
|
import { useProvideRadioOptionTypeContext } from './context';
|
|
|
|
export default defineComponent({
|
|
compatConfig: { MODE: 3 },
|
|
name: 'ARadioButton',
|
|
inheritAttrs: false,
|
|
props: radioProps(),
|
|
setup(props, { slots, attrs }) {
|
|
const { prefixCls } = useConfigInject('radio', props);
|
|
useProvideRadioOptionTypeContext('button');
|
|
return () => {
|
|
return (
|
|
<Radio {...attrs} {...props} prefixCls={prefixCls.value}>
|
|
{slots.default?.()}
|
|
</Radio>
|
|
);
|
|
};
|
|
},
|
|
});
|