|
@@ -97,7 +97,7 @@ export default create({
|
|
|
default: 35
|
|
default: 35
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- emits: ['click-item', 'click-index'],
|
|
|
|
|
|
|
+ emits: ['click-item', 'click-index', 'change'],
|
|
|
setup(props, context) {
|
|
setup(props, context) {
|
|
|
const spaceHeight = 23;
|
|
const spaceHeight = 23;
|
|
|
const listview: Ref<HTMLElement> = ref() as Ref<HTMLElement>;
|
|
const listview: Ref<HTMLElement> = ref() as Ref<HTMLElement>;
|
|
@@ -250,6 +250,13 @@ export default create({
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ watch(
|
|
|
|
|
+ () => state.currentIndex,
|
|
|
|
|
+ (newVal: number) => {
|
|
|
|
|
+ context.emit('change', newVal);
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
classes,
|
|
classes,
|
|
|
...toRefs(state),
|
|
...toRefs(state),
|