新增轮播图
parent
ae16b3d2d5
commit
f071982663
|
|
@ -1,41 +1,47 @@
|
|||
<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>
|
||||
<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 * 2 }rpx;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>
|
||||
|
|
@ -4,10 +4,11 @@
|
|||
<view v-if="value.diy_data.length > 0" :style="diy_content_style">
|
||||
<view v-for="(item, index) in value.diy_data" :key="index">
|
||||
<!-- 基础组件 -->
|
||||
<componentDiySearch></componentDiySearch>
|
||||
<!-- <componentDiySearch></componentDiySearch> -->
|
||||
<componentDiyUserInfo v-if="item.key == 'user-info'" :value="item.com_data"></componentDiyUserInfo>
|
||||
<componentDiyVideo v-else-if="item.key == 'video'" :value="item.com_data"></componentDiyVideo>
|
||||
<componentDiyArticleList v-else-if="item.key == 'article-list'" :value="item.com_data"></componentDiyArticleList>
|
||||
<componentCarousel v-if="item.key == 'carousel'" :value="item.com_data"></componentCarousel>
|
||||
<!-- 工具组件 -->
|
||||
<componentFloatWindow v-else-if="item.key == 'float-window'" :value="item.com_data"></componentFloatWindow>
|
||||
<componentTextTitle v-else-if="item.key == 'text-title'" :value="item.com_data"></componentTextTitle>
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
import componentDiyAuxiliaryLine from '@/components/diy/auxiliary-line';
|
||||
import componentDiyRichText from '@/components/diy/rich-text.vue';
|
||||
import componentAuxiliaryBlank from '@/components/diy/auxiliary-blank.vue';
|
||||
import componentCarousel from '@/components/diy/carousel.vue';
|
||||
export default {
|
||||
name: 'diy',
|
||||
props: {
|
||||
|
|
@ -52,6 +54,7 @@
|
|||
componentFloatWindow,
|
||||
componentTextTitle,
|
||||
componentAuxiliaryBlank,
|
||||
componentCarousel
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in New Issue