|
|
@@ -52,7 +52,8 @@ export default {
|
|
|
type: Object,
|
|
|
default: {},
|
|
|
},
|
|
|
- required: {
|
|
|
+ isRequired: {
|
|
|
+ // 是否开启拍照前校验
|
|
|
type: Boolean,
|
|
|
default: true,
|
|
|
},
|
|
|
@@ -68,9 +69,11 @@ export default {
|
|
|
ImagePreview([val]);
|
|
|
},
|
|
|
uploadImg() {
|
|
|
- if (required && localStorage.getItem('chainName') == null) {
|
|
|
- this.$toast('请输入名称!');
|
|
|
- return;
|
|
|
+ if (this.required) {
|
|
|
+ if (localStorage.getItem('chainName') == null) {
|
|
|
+ this.$toast('请输入名称!');
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
let url = window.location.href;
|
|
|
let that = this;
|