improve MkTab
This commit is contained in:
parent
619b925d12
commit
9fe4833348
1 changed files with 5 additions and 7 deletions
|
@ -10,20 +10,18 @@ export default defineComponent({
|
||||||
render() {
|
render() {
|
||||||
const options = this.$slots.default();
|
const options = this.$slots.default();
|
||||||
|
|
||||||
return withDirectives(h('div', {
|
return h('div', {
|
||||||
class: 'pxhvhrfw',
|
class: 'pxhvhrfw',
|
||||||
}, options.map(option => withDirectives(h('button', {
|
}, options.map(option => withDirectives(h('button', {
|
||||||
class: ['_button', { active: this.modelValue === option.props.value }],
|
class: ['_button', { active: this.modelValue === option.props?.value }],
|
||||||
key: option.key,
|
key: option.key,
|
||||||
disabled: this.modelValue === option.props.value,
|
disabled: this.modelValue === option.props?.value,
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
this.$emit('update:modelValue', option.props.value);
|
this.$emit('update:modelValue', option.props?.value);
|
||||||
},
|
},
|
||||||
}, option.children), [
|
}, option.children), [
|
||||||
[resolveDirective('click-anime')],
|
[resolveDirective('click-anime')],
|
||||||
]))), [
|
])));
|
||||||
[resolveDirective('size'), { max: [500] }],
|
|
||||||
]);
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue