chore: merge src and src-next

This commit is contained in:
chenjiahan
2020-07-15 20:02:00 +08:00
parent 6672b34618
commit 0304fcb6fa
382 changed files with 464 additions and 24746 deletions
+6 -8
View File
@@ -6,12 +6,10 @@ const [createComponent, bem] = createNamespace('sidebar');
export default createComponent({
mixins: [ParentMixin('vanSidebar')],
model: {
prop: 'activeKey',
},
emits: ['change', 'update:modelValue'],
props: {
activeKey: {
modelValue: {
type: [Number, String],
default: 0,
},
@@ -19,13 +17,13 @@ export default createComponent({
data() {
return {
index: +this.activeKey,
index: +this.modelValue,
};
},
watch: {
activeKey() {
this.setIndex(+this.activeKey);
modelValue() {
this.setIndex(+this.modelValue);
},
},
@@ -39,6 +37,6 @@ export default createComponent({
},
render() {
return <div class={bem()}>{this.slots()}</div>;
return <div class={bem()}>{this.$slots.default?.()}</div>;
},
});