23 lines
558 B
TypeScript
23 lines
558 B
TypeScript
|
|
import { defineComponent, h } from 'vue';
|
||
|
|
|
||
|
|
export const CustomItem = defineComponent({
|
||
|
|
name: 'CustomItem',
|
||
|
|
props: { label: String },
|
||
|
|
setup(props, { slots }) {
|
||
|
|
return () => h('div', {
|
||
|
|
style: {
|
||
|
|
background: 'rgba(255,255,255,0.15)',
|
||
|
|
borderRadius: '8px',
|
||
|
|
padding: '12px',
|
||
|
|
},
|
||
|
|
}, [
|
||
|
|
h('div', {
|
||
|
|
style: { fontSize: '12px', opacity: 0.8, marginBottom: '4px' },
|
||
|
|
}, props.label),
|
||
|
|
h('div', {
|
||
|
|
style: { fontSize: '16px', fontWeight: 'bold' },
|
||
|
|
}, slots.default?.()),
|
||
|
|
]);
|
||
|
|
},
|
||
|
|
});
|