Commit 4fda1016 by 李伟康

commit 提交

1 parent 1579c641
<template> <template>
<view class="layout"> <view class="layout">
<view
class="content"
:style="{background:background}"
>
<template v-if="views.length && views.length > 1">
<tabs
:list="views"
@tabclick="changeView"
ref="tabs"
/>
</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 <wnCanvas
:drawImage="i.detailUrl"
:drawStatus="penSwitch" :drawStatus="penSwitch"
:canvasId="`c-${madiaId}-${index}`" :canvasId="`c-${madiaId}-${index}`"
></wnCanvas> custom
</view> >
<template slot="customContent">
<view class="title">{{title}}</view>
</template> </template>
</view> </wnCanvas>
</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 {
border-radius: 40rpx 40rpx 0 0;
background: linear-gradient(180deg, #f7f9fc 0%, #f7f9fc 100%);
overflow: hidden;
position: relative;
z-index: 1;
.title { .title {
font-size: 40rpx; position: absolute;
line-height: 48rpx; left: 0;
top: 112rpx;
font-weight: 500;
font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
padding: 32rpx 0; letter-spacing: 4rpx;
line-height: 64rpx;
text-align: center; text-align: center;
} width: 100%;
}
.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!