feat(merch/detail): add long press to show full merchant description
add longpress event handler to display full merch desc in a modal when triggered
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<text class="icox icox-xing"></text>
|
||||
<text class="icox icox-xing"></text>
|
||||
</view>
|
||||
<view style="overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;">{{ merch.desc }}</view>
|
||||
<view style="overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;" @longpress="showFullDesc">{{ merch.desc }}</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -337,6 +337,15 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showFullDesc() {
|
||||
if (this.merch.desc) {
|
||||
uni.showModal({
|
||||
title: '商家描述',
|
||||
content: this.merch.desc,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
},
|
||||
initHeaderHeight() {
|
||||
setTimeout(() => {
|
||||
const query = uni.createSelectorQuery().in(this);
|
||||
|
||||
Reference in New Issue
Block a user