mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[new feature] ImagePreview: add onChange option (#3630)
This commit is contained in:
@@ -24,6 +24,12 @@ const initInstance = () => {
|
||||
el: document.createElement('div')
|
||||
});
|
||||
document.body.appendChild(instance.$el);
|
||||
|
||||
instance.$on('change', index => {
|
||||
if (instance.onChange) {
|
||||
instance.onChange(index);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const ImagePreview = (images, startPosition = 0) => {
|
||||
|
Reference in New Issue
Block a user