Commit 69df35bf authored by Jenny's avatar Jenny

fix: 弹框关闭后清除数据

parent 2005a5c8
......@@ -8,12 +8,13 @@
>
<view class="slot-content">
<swiper
v-if="show"
class="swiper"
circular
:current="currentIndex"
:style="{ height: `${height}px` }"
>
<swiper-item v-for="item in popupData">
<swiper-item v-for="(item, index) in popupData" :key="index">
<view v-for="(val, key) in item" :key="key" class="data-view">
<view class="data-key ellipsis">{{ key }}</view>
<template v-if="customRender[key] === 'picture'">
......@@ -69,6 +70,7 @@ export default {
}
},
height() {
if (!this.popupData.length) return
const keys = Object.keys(this.popupData[0])
const customRenderKeys = Object.keys(this.customRender)
return keys.length * 30 + customRenderKeys.length * 50
......
......@@ -63,7 +63,7 @@
:popupData="popupData"
:currentIndex="currentIndex"
:customRender="customRender"
@close="popupShow=false"
@close="popupShow=false;popupData = []"
></ModelData>
<MySelect></MySelect>
......
......@@ -66,7 +66,7 @@
:popupData="popupData"
:currentIndex="currentIndex"
:customRender="customRender"
@close="popupShow=false"
@close="popupShow=false;popupData = []"
></ModelData>
<MySelect></MySelect>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment