From d6522c3a0b2561b2813a125805fb507faeb886da Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 9 May 2025 23:54:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=AF=B9=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods-compare/goods-compare.vue | 8 +- pages/plugins/goodscompare/index/index.css | 40 +++ pages/plugins/goodscompare/index/index.vue | 234 +++++++++++++++++- 3 files changed, 273 insertions(+), 9 deletions(-) create mode 100644 pages/plugins/goodscompare/index/index.css diff --git a/pages/plugins/goodscompare/components/goods-compare/goods-compare.vue b/pages/plugins/goodscompare/components/goods-compare/goods-compare.vue index 93954cb2..f0fc66cd 100644 --- a/pages/plugins/goodscompare/components/goods-compare/goods-compare.vue +++ b/pages/plugins/goodscompare/components/goods-compare/goods-compare.vue @@ -17,16 +17,14 @@ - + - - {{ item.title }} - - {{item.symbol}}{{item.price}} + {{ item.title }} + {{item.symbol}}{{item.price}} {{$t('common.remove')}} diff --git a/pages/plugins/goodscompare/index/index.css b/pages/plugins/goodscompare/index/index.css new file mode 100644 index 00000000..adee8cfa --- /dev/null +++ b/pages/plugins/goodscompare/index/index.css @@ -0,0 +1,40 @@ +.table-container .head { + width: 240rpx; + padding-left: 20rpx; +} +.table-container .content, +.table-container .goods-info .goods-title, +.table-container .goods-info .goods-image { + width: 300rpx; +} +.table-container .goods-info .goods-image { + height: 300rpx; +} +.table-container .sticky { + position: sticky; + left: 0; + z-index: 1; + -webkit-box-shadow: 10rpx 0 20rpx rgb(145 145 145 / 20%); + -moz-box-shadow: 10rpx 0 20rpx rgb(145 145 145 / 20%); + box-shadow: 10rpx 16rpx 20rpx rgb(145 145 145 / 20%); +} +.table-container .sticky, +.table-container .group, +.table-container .group .content { + background: #f2f2f2; +} +.table-container .group:not(:first-child) { + border-left: 2rpx solid #f2f2f2 !important; +} +.table-container .head, +.table-container .content { + height: 44rpx; +} +.table-container .head.goods_score, +.table-container .content.goods_score{ + height: 90rpx; +} +.table-container .table-header .head, +.table-container .table-header .goods-info { + height: 428rpx; +} \ No newline at end of file diff --git a/pages/plugins/goodscompare/index/index.vue b/pages/plugins/goodscompare/index/index.vue index 02409e35..9125ae97 100644 --- a/pages/plugins/goodscompare/index/index.vue +++ b/pages/plugins/goodscompare/index/index.vue @@ -1,8 +1,234 @@ - + + + // 高亮不同项 + highlight_event(e) { + if(e.detail.value.length > 0) { + console.log('选择'); + } else { + console.log('取消'); + } + }, + // 隐藏相同项 + identical_event(e) { + if(e.detail.value.length > 0) { + console.log('选择'); + } else { + console.log('取消'); + } + }, + + // url事件 + url_event(e) { + app.globalData.url_event(e); + } + }, + }; + \ No newline at end of file