diff --git a/src/components/DialogCarPayload.vue b/src/components/DialogCarPayload.vue
index cd4ecfe..61860f9 100644
--- a/src/components/DialogCarPayload.vue
+++ b/src/components/DialogCarPayload.vue
@@ -4,7 +4,7 @@
:visible="dialogVisible"
@close="handleClose"
:destroy-on-close="false"
- :close-on-click-modal="configs.clickModalToClose ?? true"
+ :close-on-click-modal="configs.clickModalToClose ?? false"
:width="configs.dialogWidth ?? '50%'"
:append-to-body="true">
@@ -55,7 +55,7 @@ export default {
configs: {
type: Object,
default: () => ({
- clickModalToClose: true,
+ clickModalToClose: false,
forms: null,
}),
},
diff --git a/src/components/DialogJustForm.vue b/src/components/DialogJustForm.vue
index eca6fcf..64b1ba8 100644
--- a/src/components/DialogJustForm.vue
+++ b/src/components/DialogJustForm.vue
@@ -4,7 +4,7 @@
:visible="dialogVisible"
@close="handleClose"
:destroy-on-close="false"
- :close-on-click-modal="configs.clickModalToClose ?? true"
+ :close-on-click-modal="configs.clickModalToClose ?? false"
:width="configs.dialogWidth ?? '50%'">
@@ -81,11 +81,6 @@
{{ opt[col.customLabel] || "-" }}
-
({
- clickModalToClose: true,
+ clickModalToClose: false,
forms: null,
}),
},
@@ -195,6 +190,7 @@ export default {
this.configs.form.rows.forEach((row) => {
row.forEach((col) => {
+ if (col == null) return
if (!col.eraseOnSubmit && col.prop) dataForm[col.prop] = col.default ?? null;
else shadowDataForm[col.prop] = col.default ?? null;
@@ -405,6 +401,7 @@ export default {
this.configs.form.rows.forEach((row) => {
row.forEach((col) => {
+ if (col == null) return
if (col.fetchData && typeof col.fetchData === "function" && !col.hasPrev) {
getData(col);
}
@@ -414,6 +411,7 @@ export default {
/** 必须要遍历两遍 */
this.configs.form.rows.forEach((row) => {
row.forEach((col) => {
+ if (col == null) return
if (col.fetchData && typeof col.fetchData === "function" && col.hasPrev) {
console.log("[hasPrev] set watcher: ", col.hasPrev);
diff --git a/src/components/DialogUpload.vue b/src/components/DialogUpload.vue
index 2b710d2..489fd13 100644
--- a/src/components/DialogUpload.vue
+++ b/src/components/DialogUpload.vue
@@ -6,7 +6,7 @@
width="30%"
:title="title"
:destroy-on-close="false"
- :close-on-click-modal="configs.clickModalToClose ?? true">
+ :close-on-click-modal="configs.clickModalToClose ?? false">
({
- clickModalToClose: true,
+ clickModalToClose: false,
forms: null,
}),
},
diff --git a/src/components/DialogWithMenu.vue b/src/components/DialogWithMenu.vue
index 38e1e21..9be8f89 100644
--- a/src/components/DialogWithMenu.vue
+++ b/src/components/DialogWithMenu.vue
@@ -279,7 +279,9 @@ export default {
if (col.upload) dataForm[col.prop] = col.default ?? [];
else dataForm[col.prop] = col.default ?? null;
- if (col.autoDisabled) autoDisabledQueue.push(col.prop);
+ if (col.autoDisabled) {
+ autoDisabledQueue.push(col.prop);
+ }
if (!!col.refreshOptionsAfterConfirm) watingToRefreshQueue.push(col);
if (col.fetchData)
@@ -373,7 +375,6 @@ export default {
baseDialogConfig: null,
subList: [],
showSubDialog: false,
- disableXXX: false,
defaultQuillConfig: {
modules: {
toolbar: [
@@ -480,7 +481,7 @@ export default {
methods: {
disableCondition(prop) {
- return this.detailMode || (this.disableXXX && this.autoDisabledQueue.indexOf(prop) !== -1);
+ return this.detailMode || this.autoDisabledQueue.indexOf(prop) !== -1;
},
/** utitilities */
showButton(operate) {
@@ -497,11 +498,11 @@ export default {
setTimeout(
() => {
Object.keys(this.dataForm).forEach((key) => {
- console.log('reset form, key', key)
+ console.log("reset form, key", key);
if (excludeId && key === "id") return;
if ("files" in this.dataForm) this.dataForm.files = [];
else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
- else this.$set(this.dataForm, key, null)
+ else this.$set(this.dataForm, key, null);
if (Array.isArray(this.fileList)) {
this.fileList = [];
}
diff --git a/src/components/uploadBtn/index.vue b/src/components/uploadBtn/index.vue
index 61b6204..2d47b34 100644
--- a/src/components/uploadBtn/index.vue
+++ b/src/components/uploadBtn/index.vue
@@ -137,7 +137,7 @@ export default {