...
|
...
|
@@ -53,15 +53,32 @@ export default { |
|
|
showAricleImages(e) { // 点击推荐小图展示文章内大图
|
|
|
this.initialIndex = parseInt(e.currentTarget.dataset.index, 10) || 0;
|
|
|
|
|
|
this.$createImagePreview({
|
|
|
let imagePreview = this.$createImagePreview({
|
|
|
imgs: this.imgs,
|
|
|
initialIndex: this.initialIndex,
|
|
|
loop: false,
|
|
|
speed: 500,
|
|
|
onChange: (i) => {
|
|
|
this.initialIndex = i;
|
|
|
},
|
|
|
onHide: () => {
|
|
|
console.log('hide');
|
|
|
}
|
|
|
}).show();
|
|
|
}, (h) => {
|
|
|
return h('a', {
|
|
|
class: {
|
|
|
'image-preview-custom-close': true
|
|
|
},
|
|
|
slot: 'header',
|
|
|
on: {
|
|
|
click: (ev) => {
|
|
|
imagePreview.hide();
|
|
|
}
|
|
|
}
|
|
|
}, '关 闭',);
|
|
|
});
|
|
|
|
|
|
imagePreview.show();
|
|
|
|
|
|
// yas
|
|
|
/**
|
...
|
...
|
|