修改文本显示的最大高度

master
于肖磊 2025-02-27 14:59:08 +08:00
parent 83d91a5904
commit 88f01ce2e4
3 changed files with 17 additions and 3 deletions

View File

@ -7,10 +7,10 @@
data: {
//
//
request_url:'https://new.shopxo.vip/',
request_url:'http://shopxo.com/',
// publicpublichttps://d1.shopxo.vip/public/
static_url:'https://new.shopxo.vip/',
static_url:'http://shopxo.com/',
// default
system_type: 'default',

View File

@ -858,6 +858,18 @@ button[disabled].bg-grey {
overflow-wrap: break-word;
word-wrap: break-word;
}
.text-line-3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
/* 添加标准属性以增加兼容性 */
line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-word;
overflow-wrap: break-word;
word-wrap: break-word;
}
/**
*
*/

View File

@ -1,6 +1,6 @@
<template>
<view v-if="is_show" class="img-outer wh-auto ht-auto re oh" :style="com_style" @tap="url_event">
<view :style="text_style" class="break wh-auto ht-auto">
<view :style="text_style" :class="'break ' + text_line_class">
<template v-if="form.is_rich_text == '1'">
<mp-html :content="text_title" />
</template>
@ -74,6 +74,7 @@
brand: 'name'
},
is_show: true,
text_line_class: ''
};
},
watch: {
@ -105,6 +106,7 @@
com_style: this.get_com_style(new_form, this.propScale),
text_url: url,
is_show: this.get_is_show(new_form),
text_line_class: new_form.width_omit_num == '0' || new_form.is_rich_text == '1' ? '' : `text-line-${ new_form?.width_omit_num || '' }`
});
},
get_is_show(form) {