-
zhangwei
2025-03-05 16213c0f85aa3ac8317797bf4a05fd12940e16d3
src/uni_modules/uview-plus/components/u-album/u-album.vue
@@ -13,7 +13,7 @@
                v-for="(item, index1) in arr"
                :key="index1"
                :style="[imageStyle(index + 1, index1 + 1)]"
                @tap="previewFullImage ? onPreviewTap(getSrc(item)) : ''"
                @tap="previewFullImage ? onPreviewTap($event, getSrc(item)) : ''"
            >
                <image
                    :src="getSrc(item)"
@@ -119,7 +119,6 @@
        imageStyle() {
            return (index1, index2) => {
                const { space, rowCount, multipleSize, urls } = this,
                    { addUnit, addStyle } = uni.$u,
                    rowLen = this.showUrls.length,
                    allLen = this.urls.length
                const style = {
@@ -189,7 +188,7 @@
    methods: {
        addUnit,
        // 预览图片
        onPreviewTap(url) {
        onPreviewTap(e, url) {
            const urls = this.urls.map((item) => {
                return this.getSrc(item)
            })
@@ -197,6 +196,8 @@
                current: url,
                urls
            })
            // 是否阻止事件传播
         this.stop && this.preventEvent(e)
        },
        // 获取图片的路径
        getSrc(item) {