Commit 66d19401 by 胡悦

提交

1 parent 7c9bc515
<template> <template>
<view class="layout"> <view class="layout" @click.prevent="touch">
<wnCanvas :drawStatus="penSwitch" :canvasId="`c-${madiaId}`" custom> <wnCanvas :drawStatus="penSwitch" :canvasId="`c-${madiaId}`" custom>
<template slot="customContent"> <template slot="customContent">
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
<view class="container"> <view class="container">
<view class="container-left"> <view class="container-left">
<view v-for="(item, index) in views" :key="item.name" class="item" @click="showSection(index)" :class="item.class" :style="item.style"> <view v-for="(item, index) in views" :key="item.name" class="item" @click.stop="showSection(index)" :class="item.class" :style="item.style">
<view class="image-container"> <view class="image-container">
<image :src="item.detailUrl" mode="widthFix" class="item-image" /> <image :src="item.detailUrl" mode="widthFix" class="item-image" />
<view class="item-text">{{item.name}}</view> <view class="item-text">{{item.name}}</view>
...@@ -212,6 +212,10 @@ export default { ...@@ -212,6 +212,10 @@ export default {
// 否则,打开新点击的项 // 否则,打开新点击的项
this.showIndex = index; this.showIndex = index;
} }
},
touch() {
console.log(111111)
this.showIndex = -1
} }
}, },
}; };
...@@ -245,6 +249,9 @@ export default { ...@@ -245,6 +249,9 @@ export default {
position: relative; position: relative;
column-gap: 16rpx; column-gap: 16rpx;
border-radius: 24rpx; border-radius: 24rpx;
.image-container {
font-size: 0;
}
&::after{ &::after{
content: ""; content: "";
display: block; display: block;
...@@ -275,21 +282,16 @@ export default { ...@@ -275,21 +282,16 @@ export default {
border-radius: 24rpx; border-radius: 24rpx;
} }
.details-section { .details-section {
// position: absolute;
// top: 0;
// left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
color: #FFFFFF; color: #FFFFFF;
padding: 24rpx; padding: 24rpx;
border-radius: 24rpx; border-radius: 24rpx;
background-image: linear-gradient(180deg, #21425cb3 0%, #4A84F9 68%); background-image: linear-gradient(180deg, #21425cb3 0%, #4A84F9 68%);
display: none; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-end; justify-content: flex-end;
animation: show-gradient .2s linear; transform: translateY(100%);
// overflow: hidden;
// animation: slide-top 2s linear;
.section-title { .section-title {
font-size: 30rpx; font-size: 30rpx;
} }
...@@ -299,11 +301,10 @@ export default { ...@@ -299,11 +301,10 @@ export default {
} }
} }
.show { .show {
display: flex; animation: show-gradient .2s linear forwards;
} }
.hide { .hide {
// display: none; animation: hidden-gradient .2s linear;
animation: hidden-gradient 2s linear;
} }
} }
&-right { &-right {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!