feat(components): 在图片组件中添加长按显示菜单功能

This commit is contained in:
2026-05-07 15:12:59 +08:00
parent 2f24661cd9
commit d113d6125b
125 changed files with 622 additions and 368 deletions

View File

@@ -6,7 +6,7 @@
<view class="brand-content" v-if="brandList.length > 0">
<uni-grid :column="3" @change="change" :showBorder="!1">
<uni-grid-item v-for="(item, index) in brandList" :key="index" index="index">
<image class="brand-pic" :src="$util.img(item.image_url)" mode="widthFix"></image>
<image class="brand-pic" :src="$util.img(item.image_url)" mode="widthFix" show-menu-by-longpress></image>
<view class="brand_name">{{ item.brand_name }}</view>
</uni-grid-item>
</uni-grid>

View File

@@ -19,7 +19,7 @@
:style="{ backgroundColor: item.useState == 2 ? '#F2F2F2' : 'var(--main-color-shallow)' }">
<view class="item-base" :class="{ disabled: item.useState == 2 }">
<image class="coupon-line" mode="heightFix"
:src="$util.img('public/uniapp/coupon/coupon_line.png')"></image>
:src="$util.img('public/uniapp/coupon/coupon_line.png')" show-menu-by-longpress></image>
<view>
<view class="use_price price-font" v-if="item.type == 'reward'"
:class="{ disabled: item.useState == 2 }">

View File

@@ -2,7 +2,7 @@
<view class="container" :style="themeColor">
<view class="content">
<view class="wx-code">
<image :src="$util.img(path)" />
<image :src="$util.img(path)" show-menu-by-longpress/>
</view>
<view class="get-coupon">
<text class="coupon-name">{{ info.coupon_name }}</text>

View File

@@ -13,8 +13,8 @@
<view>
<view class="evaluator-face">
<image v-if="item.member_headimg" :src="$util.img(item.member_headimg)"
@error="imageError(index)" mode="aspectFill" />
<image v-else :src="$util.getDefaultImage().head" mode="aspectFill" />
@error="imageError(index)" mode="aspectFill" show-menu-by-longpress/>
<image v-else :src="$util.getDefaultImage().head" mode="aspectFill" show-menu-by-longpress/>
</view>
<view class="evaluator-info">
@@ -38,7 +38,7 @@
<view class="evaluate-img" v-if="item.images">
<view class="img-box" v-for="(img, img_index) in item.images" :key="img_index"
@click="previewEvaluate(index, img_index, 'images')">
<image :src="$util.img(img)" mode="aspectFill" />
<image :src="$util.img(img)" mode="aspectFill" show-menu-by-longpress/>
</view>
</view>
</scroll-view>
@@ -55,7 +55,7 @@
<view class="evaluate-img" v-if="item.again_images.length > 0">
<view class="img-box" v-for="(again_img, again_index) in item.again_images"
:key="again_index" @click="previewEvaluate(index, again_index, 'again_images')">
<image :src="$util.img(again_img)" mode="aspectFill"></image>
<image :src="$util.img(again_img)" mode="aspectFill" show-menu-by-longpress></image>
</view>
</view>
</scroll-view>

View File

@@ -1,7 +1,7 @@
<template>
<view class="page" :style="themeColor">
<view class="closeBox">
<image :src="$util.img('public/uniapp/goods/not_exist.png')" mode="widthFix"></image>
<image :src="$util.img('public/uniapp/goods/not_exist.png')" mode="widthFix" show-menu-by-longpress></image>
<text class="close-title">您查看的商品不存在,可能已下架或被删除</text>
</view>
</view>