Merge branch 'dev-sws' of gitee.com:zongzhige/shopxo-uniapp into dev

master
gongfuxiang 2024-10-18 16:52:47 +08:00
commit 3fe40595e2
2 changed files with 18 additions and 10 deletions

View File

@ -14,7 +14,10 @@
</template>
</template>
<view class="jc-sb flex-1" :class="article_theme == '3' ? 'flex-row align-c' : 'flex-col'" :style="article_theme !== '0' ? content_padding : ''">
<view class="title" :class="article_theme == '3' ? 'text-line-1 flex-1 flex-width' : 'text-line-2'" :style="article_name">{{ item.new_title ? item.new_title : item.data.title }}</view>
<div class="flex-col" :class="article_theme == '3' ? 'flex-1 flex-width' : ''" :style="'gap:' + name_desc_space + 'px;'">
<div class="title" :class="article_theme == '3' ? 'text-line-1' : 'text-line-2'" :style="article_name">{{ item.new_title ? item.new_title : item.data.title }}</div>
<div v-if="field_show.includes('2')" class="desc text-line-1" :style="article_desc">{{ item.data.describe || '' }}</div>
</div>
<view class="flex-row jc-sb gap-8" :class="article_theme == '3' ? 'margin-left' : 'align-e margin-top'">
<view :style="article_date">{{ field_show.includes('0') ? item.data.add_time : '' }}</view>
<view v-show="field_show.includes('1')" class="flex-row align-c gap-3" :style="article_page_view">
@ -38,7 +41,10 @@
<image :src="item.data.cover" class="img" :style="img_radius + article_item_height" mode="aspectFill" />
</template>
<view class="jc-sb flex-1 flex-col" :style="article_theme !== '0' ? content_padding : ''">
<view class="title text-line-2" :style="article_name + article_name_height_computer">{{ item.new_title ? item.new_title : item.data.title }}</view>
<div class="flex-col" :style="'gap:' + name_desc_space + 'px;'">
<div class="title text-line-2" :style="article_name + article_name_height_computer">{{ item.new_title ? item.new_title : item.data.title }}</div>
<div v-if="field_show.includes('2')" class="desc text-line-1" :style="article_desc">{{ item.data.describe || '' }}</div>
</div>
<view class="flex-row jc-sb gap-8 align-e margin-top">
<view :style="article_date">{{ field_show.includes('0') ? item.data.add_time : '' }}</view>
<view v-show="field_show.includes('1')" class="flex-row align-c gap-3" :style="article_page_view">
@ -90,6 +96,8 @@
field_show: ['0', '1'],
//
article_name: '',
//
article_desc: '',
//
article_date: '',
//
@ -119,6 +127,8 @@
article_name_height_computer: '',
//
article_carousel_list: [],
//
name_desc_space: 0,
};
},
watch: {
@ -150,6 +160,7 @@
field_show: new_content.field_show,
//
article_name: 'font-size:' + new_style.name_size + 'px;' + 'font-weight:' + new_style.name_weight + ';' + 'color:' + new_style.name_color + ';',
article_desc: 'font-size:' + new_style.desc_size + 'px;' + 'color:' + new_style.desc_color + ';',
article_date: 'font-size:' + new_style.time_size + 'px;' + 'font-weight:' + new_style.time_weight + ';' + 'color:' + new_style.time_color + ';',
article_page_view: 'font-size:' + new_style.page_view_size + 'px;' + 'font-weight:' + new_style.page_view_weight + ';' + 'color:' + new_style.page_view_color + ';',
content_radius: radius_computer(new_style.content_radius),
@ -160,6 +171,8 @@
content_spacing: `gap: ${new_style.content_spacing}px;`,
//
article_spacing: `gap: ${new_style.article_spacing}px;`,
//
name_desc_space: parseInt(new_style.name_desc_space),
});
//
if (this.article_theme == '0') {

View File

@ -5,14 +5,14 @@
<view class="pr flex-row" :class="title_center">
<view class="z-i flex-row align-c gap-10">
<template v-if="!isEmpty(form.img_src) && !isEmpty(form.img_src[0].url)">
<view :style="{ 'height': form.img_height * 2 + 'rpx' }">
<image :src="form.img_src[0].url" class="title-img" mode="aspectFit"></image>
<view class="wh-auto" :style="{'height': new_style.img_height * 2 + 'rpx' }">
<image :src="form.img_src[0].url" class="ht-auto" mode="heightFix"></image>
</view>
</template>
<template v-else-if="!isEmpty(form.icon_class)">
<iconfont :name="'icon-' + form.icon_class" :size="new_style.icon_size * 2 + 'rpx'" :color="new_style.icon_color" propContainerDisplay="flex"></iconfont>
</template>
<view class="pr-15 nowrap" :style="title_style">{{ form.title }}</view>
<view v-if="!isEmpty(form.title)" class="pr-15 nowrap" :style="title_style">{{ form.title }}</view>
</view>
<view class="flex-row gap-10 align-c right-0 pa">
<template v-if="form.keyword_show == '1'">
@ -139,9 +139,4 @@
overflow-wrap: break-word;
word-wrap: break-word;
}
.title-img {
max-width: 120rpx;
max-height: 60rpx;
}
</style>