Commit 4fda1016 by 李伟康

commit 提交

1 parent 1579c641
<template>
<view class="layout">
<view
class="content"
:style="{background:background}"
<wnCanvas
:drawStatus="penSwitch"
:canvasId="`c-${madiaId}-${index}`"
custom
>
<template v-if="views.length && views.length > 1">
<tabs
:list="views"
@tabclick="changeView"
ref="tabs"
/>
<template slot="customContent">
<view class="title">{{title}}</view>
</template>
<view
class="canvas-box"
:style="canvasStyle"
>
<template v-for="(i,index) in views">
<view
:key="index"
v-show="viewIndex == index"
:class="['canvas-view', `${viewIndex == 0 ? 'left' : 'right'}`]"
>
<wnCanvas
:drawImage="i.detailUrl"
:drawStatus="penSwitch"
:canvasId="`c-${madiaId}-${index}`"
></wnCanvas>
</view>
</template>
</view>
</view>
</wnCanvas>
</view>
</template>
......@@ -42,13 +21,6 @@ export default {
penSwitch: Boolean,
title: String,
madiaId: Number,
mediaBg: String,
background: String,
defaultIndex: {
type: Number,
default: 0
},
canvasStyle: String
},
name: 'MediaComponent',
data () {
......@@ -87,28 +59,17 @@ export default {
position: relative;
background-image: url("@/assets/images/media/media-bg.webp");
background-size: 100%;
.content {
border-radius: 40rpx 40rpx 0 0;
background: linear-gradient(180deg, #f7f9fc 0%, #f7f9fc 100%);
overflow: hidden;
position: relative;
z-index: 1;
.title {
font-size: 40rpx;
line-height: 48rpx;
color: #1a1a1a;
padding: 32rpx 0;
text-align: center;
}
}
.canvas-box {
padding-top: 6rpx;
.left {
animation: show-view-left 0.3s;
}
.right {
animation: show-view-right 0.3s;
}
.title {
position: absolute;
left: 0;
top: 112rpx;
font-weight: 500;
font-size: 48rpx;
color: #1a1a1a;
letter-spacing: 4rpx;
line-height: 64rpx;
text-align: center;
width: 100%;
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!