1.diy---代码优化

master
sws 2024-09-25 18:00:16 +08:00
parent 2a494f5bc7
commit 3b95bb173b
2 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,9 @@
<template>
<!-- 文章列表 -->
<view :style="style_container">
<componentDiyModulesTabsView :value="article_tabs" @tabs-click="tabs_click_event"></componentDiyModulesTabsView>
<view class="pr" :style="style_container">
<view :class="top_up == '1' ? 'ps z-i-deep-must top-0' : ''">
<componentDiyModulesTabsView :value="article_tabs" @tabs-click="tabs_click_event"></componentDiyModulesTabsView>
</view>
<view class="padding-top">
<componentDiyArticleList :key="key" :value="article_tabs" :is-common-style="false"></componentDiyArticleList>
</view>
@ -33,6 +35,7 @@
style: '',
article_tabs: {},
key: 1,
top_up: '0',
};
},
created() {
@ -40,8 +43,10 @@
},
methods: {
init() {
const new_content = this.value.content || {};
const new_style = this.value.style || {};
let new_data = JSON.parse(JSON.stringify(this.value));
this.top_up = new_content.tabs_top_up;
new_data.content.theme = new_data.content.article_theme;
new_data.content.data_type = new_data.content.tabs_list[0].data_type;
new_data.content.category = new_data.content.tabs_list[0].category;

View File

@ -50,7 +50,7 @@
tabs_data: {},
//
top_up: 0,
top_up: '0',
// 5,7,0 12 60bar_height
// #ifdef MP
tabs_top: 'padding-top:' + (bar_height + 34 + 5 + 12) + 'px;',