Commit aa5855bf authored by 沈良进's avatar 沈良进

详情页增加空字段判断

parent badaeef3
......@@ -19,7 +19,7 @@
:key="yi"
v-if="y.type == 1"
>
<div
<div v-if="y.childItem.description"
class="bg-white rounded-borders q-pa-md diy-content"
v-html="y.childItem.description"
></div>
......@@ -62,7 +62,7 @@
</div>
</template>
<div class="bg-white rounded-borders q-pa-md diy-content">
<span v-html="y.childItem.description"></span>
<span v-if="y.childItem.description" v-html="y.childItem.description"></span>
<div
v-if="y.childItem.imaArray.length > 0"
class="rounded-borders overflow-hidden row q-mt-md"
......@@ -108,7 +108,7 @@
v-if="y.type == 4"
>
<div class="bg-white rounded-borders q-pa-md diy-content">
<span v-html="y.childItem.description"></span>
<span v-if="y.childItem.description" v-html="y.childItem.description"></span>
<div
v-if="y.childItem.imaArray.length > 0"
class="rounded-borders overflow-hidden row q-mt-md"
......@@ -151,13 +151,13 @@
v-if="y.type == 5"
>
<div class="bg-white rounded-borders q-pa-md diy-content">
<span v-html="y.childItem.description"></span>
<span v-if="y.childItem.description" v-html="y.childItem.description"></span>
<div
v-if="y.childItem.imaArray.length > 0"
class="rounded-borders overflow-hidden row q-mt-md"
>
<template v-for="(z, zi) in y.childItem.imaArray">
<q-parallax
<!-- <q-parallax
style="height: 20vmin; width: 100%"
:speed="0.5"
v-if="y.childItem.imaArray.length == 1"
......@@ -166,7 +166,14 @@
<template v-slot:media>
<img :src="z.url" />
</template>
</q-parallax>
</q-parallax> -->
<q-img :key="zi"
v-if="y.childItem.imaArray.length == 1"
:src="z.url"
:ratio="16 / 9"
spinner-color="grey"
spinner-size="20px"
/>
<q-responsive
:ratio="16 / 9"
class="col"
......@@ -245,7 +252,7 @@
</div>
</template>
<div class="bg-white rounded-borders q-pa-md diy-content">
<span v-html="y.childItem.description"></span>
<span v-if="y.childItem.description" v-html="y.childItem.description"></span>
<div
v-if="y.childItem.imaArray.length > 0"
class="rounded-borders overflow-hidden row q-mt-md"
......@@ -288,7 +295,7 @@
v-if="y.type == 6"
>
<div class="bg-orange-1 rounded-borders q-pa-md diy-content">
<span v-html="y.childItem.description"></span>
<span v-if="y.childItem.description" v-html="y.childItem.description"></span>
</div>
</q-timeline-entry>
</template>
......@@ -347,8 +354,12 @@ export default {
y.icon = "iconfont iconjiaotong";
} else if (y.type == 4) {
let t = ["早餐", "午餐", "晚餐"];
y.childItem.dinnerTypeName =
t[parseInt(y.childItem.useDinnerType) - 1];
const arr = y.childItem.useDinnerType.split(',')
let titleArr = []
arr.forEach(item => {
titleArr.push(t[item - 1])
})
y.childItem.dinnerTypeName = titleArr.join(',')
}
});
});
......
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