Commit 1f07588e by 李伟康

提交

1 parent d9d74f13
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<template v-for="(i, index) in formObject"> <template v-for="(i, index) in formObject">
<view class="form-item" :key="index"> <view class="form-item" :key="index">
<view class="label">{{ i.label }}</view> <view class="label">{{ i.label }}</view>
<view class="value"> <view :class="['value', {error:i.error}]">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
<input <input
:type="i.inputType" :type="i.inputType"
...@@ -265,7 +265,14 @@ export default { ...@@ -265,7 +265,14 @@ export default {
// 保存 // 保存
submit() { submit() {
console.log(this.formData); console.log(this.formData);
this.messageBoxVisible = false; // this.messageBoxVisible = false;
try {
for(let i in this.formData) {
if (!this.formData[i]) throw i
}
} catch (error) {
this.formData[i].error = true
}
this.stopAudio(); this.stopAudio();
}, },
// 选择车型与销售 // 选择车型与销售
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!