refactor components
This commit is contained in:
parent
0d3a36e519
commit
1ac1a968b9
179 changed files with 2611 additions and 2386 deletions
|
|
@ -3,7 +3,7 @@ import { defineComponent, h, resolveDirective, withDirectives } from 'vue';
|
|||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
value: {
|
||||
modelValue: {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
|
@ -13,11 +13,11 @@ export default defineComponent({
|
|||
return withDirectives(h('div', {
|
||||
class: 'pxhvhrfw',
|
||||
}, options.map(option => withDirectives(h('button', {
|
||||
class: ['_button', { active: this.value === option.props.value }],
|
||||
class: ['_button', { active: this.modelValue === option.props.modelValue }],
|
||||
key: option.key,
|
||||
disabled: this.value === option.props.value,
|
||||
disabled: this.modelValue === option.props.modelValue,
|
||||
onClick: () => {
|
||||
this.$emit('update:value', option.props.value);
|
||||
this.$emit('update:modelValue', option.props.modelValue);
|
||||
}
|
||||
}, option.children), [
|
||||
[resolveDirective('click-anime')]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue