bugfix 0704zentao
This commit is contained in:
@@ -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">
|
||||
<!-- title -->
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
configs: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
clickModalToClose: true,
|
||||
clickModalToClose: false,
|
||||
forms: null,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -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%'">
|
||||
<!-- title -->
|
||||
<div slot="title" class="dialog-title">
|
||||
@@ -81,11 +81,6 @@
|
||||
{{ opt[col.customLabel] || "-" }}
|
||||
</span>
|
||||
</el-option>
|
||||
<!-- <el-option
|
||||
v-for="(opt, optIdx) in col.options"
|
||||
:key="'option_' + optIdx"
|
||||
:label="opt.label"
|
||||
:value="opt.value" /> -->
|
||||
</el-select>
|
||||
<el-switch
|
||||
v-if="col.switch"
|
||||
@@ -172,7 +167,7 @@ export default {
|
||||
configs: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
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);
|
||||
|
||||
|
||||
@@ -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">
|
||||
<el-upload
|
||||
style="margin-top: 24px; text-align: center"
|
||||
drag
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
configs: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
clickModalToClose: true,
|
||||
clickModalToClose: false,
|
||||
forms: null,
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -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 = [];
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
.upload-demo {
|
||||
margin-top: 48px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
/* .upload-demo >>> .el-upload__tip {
|
||||
|
||||
Reference in New Issue
Block a user