feat(ImagePreview): passing current index to index slot (#7552)

This commit is contained in:
neverland
2020-11-14 08:56:46 +08:00
committed by GitHub
parent 24e8e82f34
commit 29dbd66c80
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ export default createComponent({
if (this.showIndex) {
return (
<div class={bem('index')}>
{this.slots('index') ||
{this.slots('index', { index: this.active }) ||
`${this.active + 1} / ${this.images.length}`}
</div>
);