mooho-base-admin-plus 2.1.1 → 2.1.3
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 +1 -0
- package/package/mooho-base-admin-plus.min.esm.js +40 -68
- package/package/mooho-base-admin-plus.min.js +4 -4
- package/package.json +1 -1
- package/src/components/view/view-form-draggable.vue +49 -70
- package/src/pages/common/home.vue +0 -1
- package/src/store/modules/admin/modules/i18n.js +11 -0
- package/test/pages/test/logReport.vue +6 -12
package/history.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.1.3 修复因为 i18n 加载延迟导致的页面出错,特别是日期控件
|
|
@@ -21491,6 +21491,11 @@ var i18n = {
|
|
|
21491
21491
|
state.locale = locale2;
|
|
21492
21492
|
app.config.globalProperties.$i18n.locale = locale2;
|
|
21493
21493
|
const ViewUIPlusLocale = { "../../../../i18n/locale/en-US.js": __glob_5_0, "../../../../i18n/locale/zh-CN.js": __glob_5_1 };
|
|
21494
|
+
Object.keys(ViewUIPlusLocale).forEach((path) => {
|
|
21495
|
+
const currentLocale = ViewUIPlusLocale[path].default;
|
|
21496
|
+
i18n$1.global.setLocaleMessage(currentLocale.i.locale, currentLocale);
|
|
21497
|
+
});
|
|
21498
|
+
console.log("ViewUIPlusLocale", ViewUIPlusLocale);
|
|
21494
21499
|
let res2 = await i18nTextApi.getAll();
|
|
21495
21500
|
state.languages = {};
|
|
21496
21501
|
for (let lanCode in res2) {
|
|
@@ -21501,6 +21506,7 @@ var i18n = {
|
|
|
21501
21506
|
}
|
|
21502
21507
|
});
|
|
21503
21508
|
state.languages[lanCode] = res2[lanCode].name;
|
|
21509
|
+
console.log("setLocaleMessage", lanCode);
|
|
21504
21510
|
i18n$1.global.setLocaleMessage(lanCode, res2[lanCode]["text"]);
|
|
21505
21511
|
}
|
|
21506
21512
|
}
|
|
@@ -23903,7 +23909,6 @@ const _hoisted_22$2 = { class: "content" };
|
|
|
23903
23909
|
const _hoisted_23$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "value1" }, "\u5F85\u5206\u6D3E", -1));
|
|
23904
23910
|
const _hoisted_24$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "value2" }, "\u5DF2\u5206\u6D3E", -1));
|
|
23905
23911
|
function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
23906
|
-
const _component_DatePicker = resolveComponent("DatePicker");
|
|
23907
23912
|
const _component_Icon = resolveComponent("Icon");
|
|
23908
23913
|
const _component_Numeral = resolveComponent("Numeral");
|
|
23909
23914
|
const _component_Card = resolveComponent("Card");
|
|
@@ -23913,10 +23918,6 @@ function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23913
23918
|
const _component_shortcut = resolveComponent("shortcut");
|
|
23914
23919
|
const _directive_font = resolveDirective("font");
|
|
23915
23920
|
return openBlock(), createElementBlock("div", null, [
|
|
23916
|
-
createVNode$1(_component_DatePicker, {
|
|
23917
|
-
type: "date",
|
|
23918
|
-
size: "small"
|
|
23919
|
-
}),
|
|
23920
23921
|
createVNode$1(_component_Row, {
|
|
23921
23922
|
gutter: 24,
|
|
23922
23923
|
class: "ivu-mt"
|
|
@@ -50599,24 +50600,6 @@ const _sfc_main$o = {
|
|
|
50599
50600
|
computed: {},
|
|
50600
50601
|
methods: {
|
|
50601
50602
|
...mapActions("admin/dataView", { loadDataView: "load" }),
|
|
50602
|
-
getWidth(column) {
|
|
50603
|
-
switch (column.columnWidth) {
|
|
50604
|
-
case "Column12":
|
|
50605
|
-
return 100 * 24 / 24;
|
|
50606
|
-
case "Column9":
|
|
50607
|
-
return 100 * 18 / 24;
|
|
50608
|
-
case "Column8":
|
|
50609
|
-
return 100 * 16 / 24;
|
|
50610
|
-
case "Column6":
|
|
50611
|
-
return 100 * 12 / 24;
|
|
50612
|
-
case "Column4":
|
|
50613
|
-
return 100 * 8 / 24;
|
|
50614
|
-
case "Column3":
|
|
50615
|
-
return 100 * 6 / 24;
|
|
50616
|
-
case "Column2":
|
|
50617
|
-
return 100 * 4 / 24;
|
|
50618
|
-
}
|
|
50619
|
-
},
|
|
50620
50603
|
getRules(column) {
|
|
50621
50604
|
if (!column.isShow) {
|
|
50622
50605
|
return [];
|
|
@@ -50710,6 +50693,7 @@ const _sfc_main$o = {
|
|
|
50710
50693
|
this.initTab();
|
|
50711
50694
|
this.initStaticItem();
|
|
50712
50695
|
this.initTrigger();
|
|
50696
|
+
this.initNewLine();
|
|
50713
50697
|
this.onDataChange();
|
|
50714
50698
|
});
|
|
50715
50699
|
},
|
|
@@ -50993,44 +50977,13 @@ const _sfc_main$o = {
|
|
|
50993
50977
|
return column.name;
|
|
50994
50978
|
}
|
|
50995
50979
|
},
|
|
50996
|
-
|
|
50997
|
-
|
|
50998
|
-
|
|
50999
|
-
|
|
51000
|
-
|
|
51001
|
-
case "Column12":
|
|
51002
|
-
width = 24;
|
|
51003
|
-
break;
|
|
51004
|
-
case "Column9":
|
|
51005
|
-
width = 18;
|
|
51006
|
-
break;
|
|
51007
|
-
case "Column8":
|
|
51008
|
-
width = 16;
|
|
51009
|
-
break;
|
|
51010
|
-
case "Column6":
|
|
51011
|
-
width = 12;
|
|
51012
|
-
break;
|
|
51013
|
-
case "Column4":
|
|
51014
|
-
width = 8;
|
|
51015
|
-
break;
|
|
51016
|
-
case "Column3":
|
|
51017
|
-
width = 6;
|
|
51018
|
-
break;
|
|
51019
|
-
case "Column2":
|
|
51020
|
-
width = 4;
|
|
51021
|
-
break;
|
|
51022
|
-
}
|
|
51023
|
-
if (width == 24) {
|
|
51024
|
-
current = 0;
|
|
51025
|
-
} else if (this.columns[i3].newLine || current + width > 24) {
|
|
51026
|
-
current = width;
|
|
51027
|
-
} else if (current + width == 24) {
|
|
51028
|
-
current = 0;
|
|
51029
|
-
} else {
|
|
51030
|
-
current = current + width;
|
|
51031
|
-
}
|
|
50980
|
+
getClass(column) {
|
|
50981
|
+
const grid = this.getGrid(column.columnWidth);
|
|
50982
|
+
const classes = [];
|
|
50983
|
+
for (const key in grid) {
|
|
50984
|
+
classes.push("ivu-col-span-" + key + "-" + grid[key]);
|
|
51032
50985
|
}
|
|
51033
|
-
return
|
|
50986
|
+
return classes;
|
|
51034
50987
|
},
|
|
51035
50988
|
mouseover(column) {
|
|
51036
50989
|
if (!this.dragging) {
|
|
@@ -51043,7 +50996,7 @@ const _sfc_main$o = {
|
|
|
51043
50996
|
}
|
|
51044
50997
|
},
|
|
51045
50998
|
start(evt) {
|
|
51046
|
-
this.draggingColumn = this.columns[evt.
|
|
50999
|
+
this.draggingColumn = this.columns[evt.oldDraggableIndex];
|
|
51047
51000
|
this.draggingColumn._actived = true;
|
|
51048
51001
|
this.draggingColumn._editable = false;
|
|
51049
51002
|
this.dragging = true;
|
|
@@ -51051,10 +51004,28 @@ const _sfc_main$o = {
|
|
|
51051
51004
|
end(evt) {
|
|
51052
51005
|
this.draggingColumn._actived = false;
|
|
51053
51006
|
this.dragging = false;
|
|
51007
|
+
this.initNewLine();
|
|
51008
|
+
},
|
|
51009
|
+
initNewLine() {
|
|
51010
|
+
this.columns.forEach((column, index2) => {
|
|
51011
|
+
const line = document.getElementById("line-" + index2);
|
|
51012
|
+
if (line) {
|
|
51013
|
+
line.parentNode.removeChild(line);
|
|
51014
|
+
}
|
|
51015
|
+
});
|
|
51016
|
+
this.columns.forEach((column, index2) => {
|
|
51017
|
+
if (column.newLine) {
|
|
51018
|
+
const col = document.getElementById("col-" + index2);
|
|
51019
|
+
const line = document.createElement("div");
|
|
51020
|
+
line.id = "line-" + index2;
|
|
51021
|
+
line.style.width = "100%";
|
|
51022
|
+
col.parentNode.insertBefore(line, col);
|
|
51023
|
+
}
|
|
51024
|
+
});
|
|
51054
51025
|
}
|
|
51055
51026
|
}
|
|
51056
51027
|
};
|
|
51057
|
-
const _hoisted_1$f = ["onMouseover", "onMouseleave"];
|
|
51028
|
+
const _hoisted_1$f = ["id", "onMouseover", "onMouseleave"];
|
|
51058
51029
|
const _hoisted_2$d = { style: { "position": "absolute", "z-index": "100", "top": "4px", "right": "4px" } };
|
|
51059
51030
|
const _hoisted_3$b = { key: 2 };
|
|
51060
51031
|
const _hoisted_4$4 = { class: "title" };
|
|
@@ -51105,14 +51076,15 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
51105
51076
|
group: "sort",
|
|
51106
51077
|
onStart: $options.start,
|
|
51107
51078
|
onEnd: $options.end,
|
|
51108
|
-
|
|
51079
|
+
class: "ivu-row ivu-row-flex",
|
|
51080
|
+
style: { "margin-left": "-12px", "margin-right": "-12px" }
|
|
51109
51081
|
}, {
|
|
51110
51082
|
item: withCtx(({ element: column, index: index2 }) => [
|
|
51111
51083
|
createElementVNode("div", {
|
|
51112
|
-
|
|
51113
|
-
|
|
51114
|
-
|
|
51115
|
-
]),
|
|
51084
|
+
id: "col-" + index2,
|
|
51085
|
+
ref: "col-" + index2,
|
|
51086
|
+
class: normalizeClass(["ivu-col", $options.getClass(column)]),
|
|
51087
|
+
style: normalizeStyle$1([{ "padding-left": "12px", "padding-right": "12px" }, column._actived ? "border: dashed #ddd 1px; background-color: #ffefd5;" : ""]),
|
|
51116
51088
|
onMouseover: ($event) => $options.mouseover(column),
|
|
51117
51089
|
onMouseleave: ($event) => $options.mouseleave(column)
|
|
51118
51090
|
}, [
|
|
@@ -51563,7 +51535,7 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
51563
51535
|
]),
|
|
51564
51536
|
_: 2
|
|
51565
51537
|
}, 1032, ["label", "prop", "rules", "error"])) : createCommentVNode("v-if", true)
|
|
51566
|
-
],
|
|
51538
|
+
], 46, _hoisted_1$f)
|
|
51567
51539
|
]),
|
|
51568
51540
|
_: 1
|
|
51569
51541
|
}, 8, ["modelValue", "onStart", "onEnd"])
|