This commit is contained in:
yanran200730
2022-06-01 11:23:42 +08:00
parent dd6fd8a707
commit 63dc9a16f0

View File

@@ -2,7 +2,7 @@
<div class="photo" :class="[isHide ? 'home-active' : '']" @click="isHide = true" :style="{height: height + 'px'}"> <div class="photo" :class="[isHide ? 'home-active' : '']" @click="isHide = true" :style="{height: height + 'px'}">
<div class="photo-top" data-html2canvas-ignore> <div class="photo-top" data-html2canvas-ignore>
<div class="photo-top__middle" @click="isShowAlbum = true"> <div class="photo-top__middle" @click="isShowAlbum = true">
<span>保存至{{ albumName || '默认相册' }}</span> <span>保存至{{ albumName || '系统相册' }}</span>
<image src="./images/to-right.png" /> <image src="./images/to-right.png" />
</div> </div>
</div> </div>
@@ -145,7 +145,7 @@
isHide: true, isHide: true,
height: '100%', height: '100%',
waterSrc: '', waterSrc: '',
albumId: '1', albumId: '',
albumName: '', albumName: '',
albumIndex: 0, albumIndex: 0,
watermarkList: [], watermarkList: [],
@@ -373,12 +373,25 @@
} }
}) })
this.albumName = this.albumList.filter((v, index) => { this.albumList.some((v, index) => {
if (v.value === this.albumId) { if (this.albumId) {
this.albumIndex = index if (v.value === this.albumId) {
this.albumIndex = index
this.albumName = v.label
return true
}
} else {
console.log(v)
if (v.label === '系统相册') {
this.albumIndex = index
this.albumId = v.value
this.albumName = '系统相册'
return true
}
} }
return v.value === this.albumId })
})[0].label
} }
}) })
}, },