Commit 4fda1016 by 李伟康

commit 提交

1 parent 1579c641
<template> <template>
<view class="layout"> <view class="layout">
<view <wnCanvas
class="content" :drawStatus="penSwitch"
:style="{background:background}" :canvasId="`c-${madiaId}-${index}`"
custom
> >
<template v-if="views.length && views.length > 1"> <template slot="customContent">
<tabs <view class="title">{{title}}</view>
:list="views"
@tabclick="changeView"
ref="tabs"
/>
</template> </template>
<view </wnCanvas>
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>
</view> </view>
</template> </template>
...@@ -42,13 +21,6 @@ export default { ...@@ -42,13 +21,6 @@ export default {
penSwitch: Boolean, penSwitch: Boolean,
title: String, title: String,
madiaId: Number, madiaId: Number,
mediaBg: String,
background: String,
defaultIndex: {
type: Number,
default: 0
},
canvasStyle: String
}, },
name: 'MediaComponent', name: 'MediaComponent',
data () { data () {
...@@ -87,28 +59,17 @@ export default { ...@@ -87,28 +59,17 @@ export default {
position: relative; position: relative;
background-image: url("@/assets/images/media/media-bg.webp"); background-image: url("@/assets/images/media/media-bg.webp");
background-size: 100%; background-size: 100%;
.content { .title {
border-radius: 40rpx 40rpx 0 0; position: absolute;
background: linear-gradient(180deg, #f7f9fc 0%, #f7f9fc 100%); left: 0;
overflow: hidden; top: 112rpx;
position: relative; font-weight: 500;
z-index: 1; font-size: 48rpx;
.title { color: #1a1a1a;
font-size: 40rpx; letter-spacing: 4rpx;
line-height: 48rpx; line-height: 64rpx;
color: #1a1a1a; text-align: center;
padding: 32rpx 0; width: 100%;
text-align: center;
}
}
.canvas-box {
padding-top: 6rpx;
.left {
animation: show-view-left 0.3s;
}
.right {
animation: show-view-right 0.3s;
}
} }
} }
</style> </style>
\ No newline at end of file \ 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!