This commit is contained in:
tamaina 2023-04-09 02:26:57 +00:00
parent 91e2a4f7ba
commit 4751512c90
1 changed files with 3 additions and 2 deletions

View File

@ -22,6 +22,7 @@ export default defineComponent({
}, },
}, },
render() { render() {
console.log(this.$slots, this.$slots.label && this.$slots.label());
if (!this.$slots.default) return null; if (!this.$slots.default) return null;
let options = this.$slots.default(); let options = this.$slots.default();
const label = this.$slots.label && this.$slots.label(); const label = this.$slots.label && this.$slots.label();
@ -35,7 +36,7 @@ export default defineComponent({
}, [ }, [
...(label ? [h('div', { ...(label ? [h('div', {
class: 'label', class: 'label',
}, () => [label])] : []), }, label)] : []),
h('div', { h('div', {
class: 'body', class: 'body',
}, options.map(option => h(MkRadio, { }, options.map(option => h(MkRadio, {
@ -47,7 +48,7 @@ export default defineComponent({
), ),
...(caption ? [h('div', { ...(caption ? [h('div', {
class: 'caption', class: 'caption',
}, () => [caption])] : []), }, caption)] : []),
]); ]);
}, },
}); });