Commit 7d5b41de by 李伟康

commit 修改样式&增加默认显示

1 parent 0358834c
......@@ -13,14 +13,16 @@
>
<view name="content">
<template v-if="step == 1">
<view
class="error-tip"
v-if="errorTip"
>以下信息不能为空,请完善信息后保存</view>
<view
class="pop-tips"
v-else
>检测到“交车通知书”中未填写客户档案,请填写后再完成接待。</view>
<template v-if="!check(true)">
<view
class="error-tip"
v-if="errorTip"
>以下信息不能为空,请完善信息后保存</view>
<view
class="pop-tips"
v-else
>检测到“交车通知书”中未填写客户档案,请填写后再完成接待。</view>
</template>
<view class="form">
<template v-for="(i, index) in formObject">
<view
......@@ -202,12 +204,12 @@ export default {
this.receptionStatus = -1
this.$refs.formRef.close()
},
check () {
check (all = false) {
let flag = true
try {
Object.keys(this.formData).map(key => {
if (!this.formData[key]) throw false
if (key == 'phoneNumber' && this.formData[key] && !phoneRex.test(this.formData[key])) throw false
if (!all && key == 'phoneNumber' && this.formData[key] && !phoneRex.test(this.formData[key])) throw false
})
} catch (error) {
flag = error
......
......@@ -7,7 +7,10 @@
class="content"
:style="{background:background}"
>
<view class="title" v-if="title">{{title}}</view>
<view
class="title"
v-if="title"
>{{title}}</view>
<template v-if="views.length && views.length > 1">
<tabs
:list="views"
......@@ -44,7 +47,11 @@ export default {
title: String,
madiaId: Number,
mediaBg: String,
background: String
background: String,
defaultIndex: {
type: Number,
default: 0
}
},
name: 'MediaComponent',
data () {
......@@ -56,7 +63,7 @@ export default {
watchStatus: {
immediate: true,
handler (newval) {
this.$refs?.tabs?.tabClick(0)
this.$refs?.tabs?.tabClick(this.defaultIndex)
}
},
},
......@@ -66,6 +73,7 @@ export default {
},
},
mounted () {
this.$refs?.tabs?.tabClick(this.defaultIndex)
},
methods: {
changeView (index) {
......
......@@ -37,6 +37,8 @@
:mediaBg="item.top_bg"
:madiaId="item.id"
:background="item.background"
:defaultIndex="item.id == 4 ? 1 : 0"
/>
</view>
</template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!