1.diy---代码优化
parent
2a494f5bc7
commit
3b95bb173b
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
tabs_data: {},
|
||||
|
||||
// 是否滑动置顶
|
||||
top_up: 0,
|
||||
top_up: '0',
|
||||
// 5,7,0 是误差,, 12 是下边距,60是高度,bar_height是不同小程序下的导航栏距离顶部的高度
|
||||
// #ifdef MP
|
||||
tabs_top: 'padding-top:' + (bar_height + 34 + 5 + 12) + 'px;',
|
||||
|
|
|
|||
Loading…
Reference in New Issue