mooho-base-admin-plus 2.2.8 → 2.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/history.md +2 -0
- package/package/mooho-base-admin-plus.min.esm.js +25 -19
- package/package/mooho-base-admin-plus.min.js +5 -5
- package/package.json +1 -1
- package/src/components/upload/upload-attachment.vue +9 -1
- package/src/components/upload/upload-image.vue +23 -1
- package/src/components/view/column-edit.vue +1 -1
- package/src/components/view/table-filter.vue +2 -1
- package/src/components/view/view-form-draggable.vue +3 -2
- package/src/components/view/view-form.vue +4 -2
- package/src/components/view/view-table.vue +4 -3
package/history.md
CHANGED
|
@@ -36294,7 +36294,8 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36294
36294
|
"on-preview": $options.onUploadPreview,
|
|
36295
36295
|
"on-remove": $options.onUploadRemove,
|
|
36296
36296
|
disabled: $props.readonly,
|
|
36297
|
-
accept: $props.accept,
|
|
36297
|
+
accept: !!($props.accept || "").trim() ? $props.accept.split(",").map((item) => "." + item.replaceAll(".", "")).join(",") : null,
|
|
36298
|
+
format: !!($props.accept || "").trim() ? $props.accept.split(",").map((item) => item.replaceAll(".", "")) : null,
|
|
36298
36299
|
multiple: true,
|
|
36299
36300
|
type: $props.draggable ? "drag" : "select"
|
|
36300
36301
|
}, {
|
|
@@ -36319,7 +36320,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36319
36320
|
])) : createCommentVNode("v-if", true)
|
|
36320
36321
|
]),
|
|
36321
36322
|
_: 1
|
|
36322
|
-
}, 8, ["action", "headers", "default-file-list", "before-upload", "on-success", "on-preview", "on-remove", "disabled", "accept", "type"]),
|
|
36323
|
+
}, 8, ["action", "headers", "default-file-list", "before-upload", "on-success", "on-preview", "on-remove", "disabled", "accept", "format", "type"]),
|
|
36323
36324
|
withDirectives(createVNode$1(_component_Input, {
|
|
36324
36325
|
type: "text",
|
|
36325
36326
|
"model-value": $props.modelValue,
|
|
@@ -36355,6 +36356,9 @@ const _sfc_main$z = {
|
|
|
36355
36356
|
},
|
|
36356
36357
|
height: {
|
|
36357
36358
|
type: Number
|
|
36359
|
+
},
|
|
36360
|
+
accept: {
|
|
36361
|
+
type: String
|
|
36358
36362
|
}
|
|
36359
36363
|
},
|
|
36360
36364
|
computed: {
|
|
@@ -36489,7 +36493,8 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36489
36493
|
}), 128)),
|
|
36490
36494
|
!$props.readonly ? (openBlock(), createBlock(_component_Upload, {
|
|
36491
36495
|
key: 0,
|
|
36492
|
-
accept: "image/*",
|
|
36496
|
+
accept: !!($props.accept || "").trim() ? $props.accept.split(",").map((item) => "." + item.replaceAll(".", "")).join(",") : "image/*",
|
|
36497
|
+
format: !!($props.accept || "").trim() ? $props.accept.split(",").map((item) => item.replaceAll(".", "")) : null,
|
|
36493
36498
|
action: _ctx.uploadURL,
|
|
36494
36499
|
headers: _ctx.uploadHeaders,
|
|
36495
36500
|
"show-upload-list": false,
|
|
@@ -36510,7 +36515,7 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
36510
36515
|
], 4)) : createCommentVNode("v-if", true)
|
|
36511
36516
|
]),
|
|
36512
36517
|
_: 1
|
|
36513
|
-
}, 8, ["action", "headers", "before-upload", "on-success"])) : createCommentVNode("v-if", true),
|
|
36518
|
+
}, 8, ["accept", "format", "action", "headers", "before-upload", "on-success"])) : createCommentVNode("v-if", true),
|
|
36514
36519
|
withDirectives(createVNode$1(_component_Input, {
|
|
36515
36520
|
type: "text",
|
|
36516
36521
|
"model-value": $props.modelValue
|
|
@@ -37123,7 +37128,7 @@ const _sfc_main$w = {
|
|
|
37123
37128
|
column.triggers = [];
|
|
37124
37129
|
});
|
|
37125
37130
|
this.columns.filter((column) => {
|
|
37126
|
-
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim();
|
|
37131
|
+
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !column.dataType.startsWith("Enum:");
|
|
37127
37132
|
}).forEach((column) => {
|
|
37128
37133
|
let param = JSON.parse(column.param);
|
|
37129
37134
|
for (let key in param) {
|
|
@@ -37328,7 +37333,7 @@ const _sfc_main$w = {
|
|
|
37328
37333
|
}
|
|
37329
37334
|
if (sender == null || sender.triggers && sender.triggers !== []) {
|
|
37330
37335
|
this.columns.forEach(function(column) {
|
|
37331
|
-
if (!column.isStaticItem && !!(column.source || "").trim() && (sender == null || sender.triggers.some((item) => {
|
|
37336
|
+
if (!column.isStaticItem && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:") && (sender == null || sender.triggers.some((item) => {
|
|
37332
37337
|
return item.code == column.code;
|
|
37333
37338
|
}))) {
|
|
37334
37339
|
column.needRefresh = true;
|
|
@@ -37347,7 +37352,7 @@ const _sfc_main$w = {
|
|
|
37347
37352
|
column.triggers.forEach((item) => {
|
|
37348
37353
|
item.needClear = true;
|
|
37349
37354
|
});
|
|
37350
|
-
} else if (column.needRefresh && !!(column.source || "").trim()) {
|
|
37355
|
+
} else if (column.needRefresh && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:")) {
|
|
37351
37356
|
let param = this.getParam(this.data, column);
|
|
37352
37357
|
if (column.controlType === "Select" || column.controlType === "MultiSelect" || column.controlType === "TreeSelect" || column.controlType === "MultiTreeSelect" || column.controlType === "SelectWithOther" || column.controlType === "ComboSelect" || column.controlType === "Radio" || column.controlType === "CheckGroup") {
|
|
37353
37358
|
if (param != null) {
|
|
@@ -38021,8 +38026,9 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
38021
38026
|
readonly: $props.readonly || column.isReadonly,
|
|
38022
38027
|
maxCount: column.maxLength,
|
|
38023
38028
|
height: column.controlHeight,
|
|
38024
|
-
width: column.controlWidth
|
|
38025
|
-
|
|
38029
|
+
width: column.controlWidth,
|
|
38030
|
+
accept: column.pattern
|
|
38031
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "readonly", "maxCount", "height", "width", "accept"])) : column.controlType === "Slider" ? (openBlock(), createElementBlock(Fragment, { key: 25 }, [
|
|
38026
38032
|
!$props.readonly && !column.isReadonly ? (openBlock(), createBlock(_component_Slider, {
|
|
38027
38033
|
key: 0,
|
|
38028
38034
|
"model-value": _ctx.parseData($data.data, column.code),
|
|
@@ -39524,7 +39530,7 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39524
39530
|
]),
|
|
39525
39531
|
_: 1
|
|
39526
39532
|
}, 16)) : createCommentVNode("v-if", true),
|
|
39527
|
-
$data.data.controlType == "Attachment" ? (openBlock(), createBlock(_component_Col, normalizeProps(mergeProps({ key: 32 }, _ctx.grid8)), {
|
|
39533
|
+
$data.data.controlType == "Attachment" || $data.data.controlType == "Image" ? (openBlock(), createBlock(_component_Col, normalizeProps(mergeProps({ key: 32 }, _ctx.grid8)), {
|
|
39528
39534
|
default: withCtx(() => [
|
|
39529
39535
|
createVNode$1(_component_FormItem, {
|
|
39530
39536
|
label: "\u63A5\u53D7\u7684\u6587\u4EF6\u7C7B\u578B",
|
|
@@ -41512,7 +41518,7 @@ const _sfc_main$r = {
|
|
|
41512
41518
|
column.triggers = [];
|
|
41513
41519
|
});
|
|
41514
41520
|
this.columns.filter((column) => {
|
|
41515
|
-
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim();
|
|
41521
|
+
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !column.dataType.startsWith("Enum:");
|
|
41516
41522
|
}).forEach((column) => {
|
|
41517
41523
|
let param = JSON.parse(column.param);
|
|
41518
41524
|
for (let key in param) {
|
|
@@ -41629,7 +41635,7 @@ const _sfc_main$r = {
|
|
|
41629
41635
|
});
|
|
41630
41636
|
if (sender == null || sender.triggers !== []) {
|
|
41631
41637
|
this.columns.forEach(function(column) {
|
|
41632
|
-
if (!column.isStaticItem && !!(column.source || "").trim() && (sender == null || sender.triggers.some((item) => {
|
|
41638
|
+
if (!column.isStaticItem && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:") && (sender == null || sender.triggers.some((item) => {
|
|
41633
41639
|
return item.id === column.id;
|
|
41634
41640
|
}))) {
|
|
41635
41641
|
column.needRefresh = true;
|
|
@@ -42837,7 +42843,7 @@ const _sfc_main$q = {
|
|
|
42837
42843
|
}
|
|
42838
42844
|
});
|
|
42839
42845
|
} else {
|
|
42840
|
-
if (!!(column.source || "").trim()) {
|
|
42846
|
+
if (!!(column.source || "").trim() && !column.dataType.startsWith("Enum:")) {
|
|
42841
42847
|
this.data.forEach((row) => {
|
|
42842
42848
|
if (row._dataSource && row._dataSource[column.code]) {
|
|
42843
42849
|
return;
|
|
@@ -42857,7 +42863,7 @@ const _sfc_main$q = {
|
|
|
42857
42863
|
column.triggers = [];
|
|
42858
42864
|
});
|
|
42859
42865
|
this.columns.filter((column) => {
|
|
42860
|
-
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim();
|
|
42866
|
+
return !column.isStaticItem && !!(column.source || "").trim() && !!(column.param || "").trim() && !column.dataType.startsWith("Enum:");
|
|
42861
42867
|
}).forEach((column) => {
|
|
42862
42868
|
let param = JSON.parse(column.param);
|
|
42863
42869
|
for (let key in param) {
|
|
@@ -42991,7 +42997,7 @@ const _sfc_main$q = {
|
|
|
42991
42997
|
this.$emit("on-change", data2, sender, selected);
|
|
42992
42998
|
if (sender == null || sender.triggers !== []) {
|
|
42993
42999
|
this.columns.forEach(function(column) {
|
|
42994
|
-
if (!column.isStaticItem && !!(column.source || "").trim() && (sender == null || sender.triggers.some((item) => {
|
|
43000
|
+
if (!column.isStaticItem && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:") && (sender == null || sender.triggers.some((item) => {
|
|
42995
43001
|
return item.code == column.code;
|
|
42996
43002
|
}))) {
|
|
42997
43003
|
if (data2._needRefresh) {
|
|
@@ -43012,7 +43018,7 @@ const _sfc_main$q = {
|
|
|
43012
43018
|
column.triggers.forEach((item) => {
|
|
43013
43019
|
data2._needClear[item.code] = true;
|
|
43014
43020
|
});
|
|
43015
|
-
} else if (data2._needRefresh[column.code] && !!(column.source || "").trim()) {
|
|
43021
|
+
} else if (data2._needRefresh[column.code] && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:")) {
|
|
43016
43022
|
let param = this.getParam(data2, column, this.parentData);
|
|
43017
43023
|
if (column.controlType === "Select" || column.controlType === "SelectWithOther" || column.controlType === "ComboSelect" || column.controlType === "MulitSelect" || column.controlType === "Radio" || column.controlType === "CheckGroup") {
|
|
43018
43024
|
if (param != null) {
|
|
@@ -51117,7 +51123,7 @@ const _sfc_main$o = {
|
|
|
51117
51123
|
column.triggers = [];
|
|
51118
51124
|
});
|
|
51119
51125
|
this.columns.filter((column) => {
|
|
51120
|
-
return !!(column.source || "").trim() && !!(column.param || "").trim();
|
|
51126
|
+
return !!(column.source || "").trim() && !!(column.param || "").trim() && !column.dataType.startsWith("Enum:");
|
|
51121
51127
|
}).forEach((column) => {
|
|
51122
51128
|
let param = JSON.parse(column.param);
|
|
51123
51129
|
for (let key in param) {
|
|
@@ -51206,7 +51212,7 @@ const _sfc_main$o = {
|
|
|
51206
51212
|
async onDataChange(sender) {
|
|
51207
51213
|
if (sender == null || sender.triggers !== []) {
|
|
51208
51214
|
this.columns.forEach(function(column) {
|
|
51209
|
-
if (!!(column.source || "").trim() && (sender == null || sender.triggers.some((item) => {
|
|
51215
|
+
if (!!(column.source || "").trim() && !column.dataType.startsWith("Enum:") && (sender == null || sender.triggers.some((item) => {
|
|
51210
51216
|
return item.id === column.id;
|
|
51211
51217
|
}))) {
|
|
51212
51218
|
column.needRefresh = true;
|
|
@@ -51225,7 +51231,7 @@ const _sfc_main$o = {
|
|
|
51225
51231
|
column.triggers.forEach((item) => {
|
|
51226
51232
|
item.needClear = true;
|
|
51227
51233
|
});
|
|
51228
|
-
} else if (column.needRefresh && !!(column.source || "").trim()) {
|
|
51234
|
+
} else if (column.needRefresh && !!(column.source || "").trim() && !column.dataType.startsWith("Enum:")) {
|
|
51229
51235
|
let param = this.getParam(this.data, column);
|
|
51230
51236
|
if (column.controlType === "Select" || column.controlType === "MultiSelect" || column.controlType === "TreeSelect" || column.controlType === "MultiTreeSelect" || column.controlType === "SelectWithOther" || column.controlType === "ComboSelect" || column.controlType === "Radio" || column.controlType === "CheckGroup") {
|
|
51231
51237
|
if (param != null) {
|