Merge remote-tracking branch 'origin/dev-yxl' into dev-sws

master
sws 2024-09-10 09:41:58 +08:00
commit 57e19dcd0e
3 changed files with 48 additions and 4 deletions

View File

@ -0,0 +1,41 @@
<template>
<view :style="style_container">
<view :style="style"></view>
</view>
</template>
<script>
const app = getApp();
import { common_styles_computer } from '@/common/js/common/common.js';
export default {
props: {
value: {
type: Object,
default: () => {
return {};
},
},
},
data() {
return {
style_container: '',
style: ''
};
},
created() {
const { height } = this.value.content;
const { line_color, common_style} = this.value.style;
this.style = `height: ${height}px;background: ${line_color || 'transparent'};`;
this.style_container = common_styles_computer(common_style);
},
methods: {
},
};
</script>
<style scoped lang="scss">
.right-0 {
top: 50%;
transform: translateY(-50%);
}
</style>

View File

@ -10,6 +10,7 @@
<componentTextTitle v-if="item.key == 'text-title'" :value="item.com_data"></componentTextTitle>
<componentDiyAuxiliaryLine v-if="item.key == 'row-line'" :value="item.com_data"></componentDiyAuxiliaryLine>
<componentDiyRichText v-if="item.key == 'rich-text'" :value="item.com_data"></componentDiyRichText>
<componentAuxiliaryBlank v-if="item.key == 'auxiliary-blank'" :value="item.com_data"></componentAuxiliaryBlank>
</view>
</view>
<componentDiyFooter :value="value.footer.com_data" @footer-height="footer_height_computer"></componentDiyFooter>
@ -24,6 +25,7 @@
import componentTextTitle from '@/components/diy/text-title';
import componentDiyAuxiliaryLine from '@/components/diy/auxiliary-line';
import componentDiyRichText from '@/components/diy/rich-text.vue';
import componentAuxiliaryBlank from '@/components/diy/auxiliary-blank.vue';
export default {
name: 'diy',
props: {
@ -40,6 +42,7 @@
componentDiyRichText,
componentFloatWindow,
componentTextTitle,
componentAuxiliaryBlank
},
data() {
return {

View File

@ -55,12 +55,12 @@ export default {
this.keyword_list = this.form.keyword_list.filter(item => item.is_show == '1');
},
set_common_styles() {
const {keyword_color, keyword_size, right_color, right_size, common_style, title_weight, title_color, title_size } = this.new_style;
const { keyword_color, keyword_size, right_color, right_size, common_style, title_weight, title_color, title_size } = this.new_style;
//
this.keyword_style = `color:${keyword_color}; font-size: ${keyword_size * 2}rpx;`;
this.keyword_style = `color:${ keyword_color }; font-size: ${ keyword_size * 2 }rpx;`;
//
this.right_size = right_size * 2 + 'rpx';
this.right_style = `color:${right_color}; font-size: ${right_size * 2}rpx;`;
this.right_style = `color:${ right_color }; font-size: ${ right_size * 2 }rpx;`;
//
let common_styles = '';
if (title_weight == 'italic') {
@ -68,7 +68,7 @@ export default {
} else if (title_weight == '500') {
common_styles += `font-weight: 500`;
}
this.title_style = `color:${title_color}; font-size: ${title_size * 2}rpx; ${common_styles}`;
this.title_style = `color:${ title_color }; font-size: ${ title_size * 2 }rpx; ${ common_styles }`;
//
this.style_container = common_styles_computer(common_style);
},