slw 0.6.0 → 0.6.2
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/lib/index.js +56 -43
- package/lib/index.umd.cjs +5 -5
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -8511,7 +8511,7 @@ PictureUpload.name = "slw-picture-upload";
|
|
|
8511
8511
|
PictureUpload.install = (Q) => {
|
|
8512
8512
|
Q.component(PictureUpload.name, PictureUpload);
|
|
8513
8513
|
};
|
|
8514
|
-
const
|
|
8514
|
+
const windowGrid_vue_vue_type_style_index_0_scoped_588d3ee7_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-588d3ee7"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
|
|
8515
8515
|
class: "slw-window-grid-container",
|
|
8516
8516
|
style: { height: "100%" }
|
|
8517
8517
|
}, _hoisted_2$kS = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-main-area" }, null, -1)), _hoisted_3$hT = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-active-area" }, null, -1)), _hoisted_4$au = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4U = [
|
|
@@ -9729,36 +9729,40 @@ const windowGrid_vue_vue_type_style_index_0_scoped_1e029ec8_lang = "", _withScop
|
|
|
9729
9729
|
G && (G.itemRender.defaultValue = H);
|
|
9730
9730
|
}, setFormSelectOption = (Q, H, G = []) => {
|
|
9731
9731
|
let X = getCurRegion();
|
|
9732
|
-
Q && (X = getRegion(Q))
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9732
|
+
if (Q && (X = getRegion(Q)), X) {
|
|
9733
|
+
let Z = X.formConfig.items.filter(
|
|
9734
|
+
(K) => K.field == H
|
|
9735
|
+
)[0];
|
|
9736
|
+
Z && (Z.itemRender.options = G);
|
|
9737
|
+
}
|
|
9737
9738
|
}, getFormSelectOption = async (Q, H) => {
|
|
9738
9739
|
let G = getCurRegion();
|
|
9739
9740
|
Q && (G = getRegion(Q));
|
|
9740
|
-
let X =
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9741
|
+
let X = [];
|
|
9742
|
+
if (G) {
|
|
9743
|
+
let Z = G.formConfig.items.filter(
|
|
9744
|
+
(K) => K.field == H
|
|
9745
|
+
)[0];
|
|
9746
|
+
if (Z.querys) {
|
|
9747
|
+
const K = await axios.post(
|
|
9748
|
+
"/window/selector",
|
|
9749
|
+
$qs.stringify({
|
|
9750
|
+
_region_id: G.params._region_id,
|
|
9751
|
+
_field_id: Z.querys.id,
|
|
9752
|
+
_select_id: Z.querys.selectorId
|
|
9753
|
+
})
|
|
9754
|
+
);
|
|
9755
|
+
K.data.result && K.data.data && (X = K.data.data.map((ee) => Object.assign(
|
|
9756
|
+
{
|
|
9757
|
+
value: ee.VALUE,
|
|
9758
|
+
label: ee.NAME
|
|
9759
|
+
},
|
|
9760
|
+
ee
|
|
9761
|
+
)));
|
|
9762
|
+
} else
|
|
9763
|
+
X = Z.itemRender.options;
|
|
9764
|
+
}
|
|
9765
|
+
return X;
|
|
9762
9766
|
}, footerSum = (Q) => {
|
|
9763
9767
|
const H = (X, Z) => {
|
|
9764
9768
|
let K = 0;
|
|
@@ -9769,6 +9773,14 @@ const windowGrid_vue_vue_type_style_index_0_scoped_1e029ec8_lang = "", _withScop
|
|
|
9769
9773
|
X.map((K, ee) => ee === 2 ? "和值" : Q.includes(K.field) ? H(Z, K.field) : "")
|
|
9770
9774
|
];
|
|
9771
9775
|
gridData.value.showFooter = !0, gridData.value.footerMethod = G;
|
|
9776
|
+
}, setColumnFixed = (Q, H = "left") => {
|
|
9777
|
+
let G = getCurRegion();
|
|
9778
|
+
if (G) {
|
|
9779
|
+
let X = G.columns.filter(
|
|
9780
|
+
(Z) => Z.field == Q.toUpperCase()
|
|
9781
|
+
)[0];
|
|
9782
|
+
X.fixed = H;
|
|
9783
|
+
}
|
|
9772
9784
|
};
|
|
9773
9785
|
return onMounted(async () => {
|
|
9774
9786
|
gridData.value.addListener && getCurRegion() && addListener(), gridData.value.type === "TREE_STRUCTURE" && (gridData.value.menuConfig = {
|
|
@@ -9840,7 +9852,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_1e029ec8_lang = "", _withScop
|
|
|
9840
9852
|
search(Q);
|
|
9841
9853
|
}, curRegion.value.getCheckedData = () => getCheckedData(), curRegion.value.getSelectRecord = () => getSelectRecord(), curRegion.value.setChecked = (Q) => {
|
|
9842
9854
|
setChecked(Q);
|
|
9843
|
-
}, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (Q) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = () => setCheckboxRowColor(), curRegion.value.setFormValue = () => setFormValue(), curRegion.value.setRowCellColor = () => setRowCellColor(), curRegion.value.setFormSelectOption = () => setFormSelectOption(), curRegion.value.getFormSelectOption = () => getFormSelectOption();
|
|
9855
|
+
}, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (Q) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = () => setCheckboxRowColor(), curRegion.value.setFormValue = () => setFormValue(), curRegion.value.setRowCellColor = () => setRowCellColor(), curRegion.value.setFormSelectOption = () => setFormSelectOption(), curRegion.value.getFormSelectOption = () => getFormSelectOption(), curRegion.value.setColumnFixed = () => setColumnFixed();
|
|
9844
9856
|
}), onUnmounted(() => {
|
|
9845
9857
|
document.removeEventListener("mousedown", tableOutDestroyAreaBox), document.removeEventListener("mouseup", tbodymouseup), document.removeEventListener("paste", ctrlVPaste), document.removeEventListener("copy", ctrlCopyAndCut), document.removeEventListener("cut", ctrlCopyAndCut);
|
|
9846
9858
|
}), __expose({ gridReload, reload }), (Q, H) => {
|
|
@@ -10010,7 +10022,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_1e029ec8_lang = "", _withScop
|
|
|
10010
10022
|
]);
|
|
10011
10023
|
};
|
|
10012
10024
|
}
|
|
10013
|
-
}, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-
|
|
10025
|
+
}, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-588d3ee7"]]);
|
|
10014
10026
|
WindowGrid.name = "slw-window-grid";
|
|
10015
10027
|
WindowGrid.install = (Q) => {
|
|
10016
10028
|
Q.component(WindowGrid.name, WindowGrid);
|
|
@@ -37044,7 +37056,7 @@ const pseudoClasses = /* @__PURE__ */ [
|
|
|
37044
37056
|
function css$1() {
|
|
37045
37057
|
return new LanguageSupport(cssLanguage, cssLanguage.data.of({ autocomplete: cssCompletionSource }));
|
|
37046
37058
|
}
|
|
37047
|
-
const
|
|
37059
|
+
const windowForm_vue_vue_type_style_index_0_scoped_911a42de_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-911a42de"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
|
|
37048
37060
|
key: 0,
|
|
37049
37061
|
style: { "text-align": "left", "font-size": "18px", "line-height": "30px", "font-weight": "bold", padding: "5px 30px 0 15px" }
|
|
37050
37062
|
}, _hoisted_3$hS = ["onClick"], _sfc_main$5 = {
|
|
@@ -37168,22 +37180,22 @@ const windowForm_vue_vue_type_style_index_0_scoped_a12a6513_lang = "", _withScop
|
|
|
37168
37180
|
}), Q;
|
|
37169
37181
|
});
|
|
37170
37182
|
onMounted(async () => {
|
|
37171
|
-
var H;
|
|
37183
|
+
var H, G;
|
|
37172
37184
|
if (formConfig.value.params.linkUrl)
|
|
37173
37185
|
return;
|
|
37174
37186
|
formLoading.value = !0;
|
|
37175
37187
|
let Q = !0;
|
|
37176
37188
|
if (formConfig.value.formData) {
|
|
37177
37189
|
formData.value = formConfig.value.formData, Q = formConfig.value.openType === "new";
|
|
37178
|
-
for (const
|
|
37179
|
-
|
|
37190
|
+
for (const X of formConfig.value.columns)
|
|
37191
|
+
X.dataType === "EDITOR" && formData.value[X.field] == null ? formData.value[X.field] = "" : ((H = X.itemRender) == null ? void 0 : H.name) == "ElSelect" && X.itemRender.props.multiple && (formData.value[X.field] = (G = formData.value[X.field]) == null ? void 0 : G.split(","));
|
|
37180
37192
|
} else
|
|
37181
|
-
for (const
|
|
37182
|
-
formConfig.value.columns[
|
|
37183
|
-
uploadConfig.value.dataId = formData.value[formConfig.value.rowId], uploadConfig.value.regionId = formConfig.value.params._region_id, uploadConfig.value.isHavePicUploadBtn = formConfig.value.params.isHavePicUploadBtn, uploadConfig.value.openType = formConfig.value.openType, computeNewLine(formConfig.value), formConfig.value.columns.forEach((
|
|
37184
|
-
|
|
37185
|
-
}), formData.value._region_id = formConfig.value.params._region_id, await evalEvent(formConfig.value.params.formEvents.dataInit), await formInitData(formData.value, formConfig.value.params._region_id, Q), form.value.params = formConfig.value.params, formConfig.value.params.queryParams && Object.keys(formConfig.value.params.queryParams).length > 0 && formConfig.value.params.queryParams.unQuery !== !0 && searchData(formConfig.value.params.queryParams), formConfig.value.columns.map((
|
|
37186
|
-
|
|
37193
|
+
for (const X in formConfig.value.columns)
|
|
37194
|
+
formConfig.value.columns[X].type !== "seq" && formConfig.value.columns[X].type !== "checkbox" && (formData.value[formConfig.value.columns[X].field] = "");
|
|
37195
|
+
uploadConfig.value.dataId = formData.value[formConfig.value.rowId], uploadConfig.value.regionId = formConfig.value.params._region_id, uploadConfig.value.isHavePicUploadBtn = formConfig.value.params.isHavePicUploadBtn, uploadConfig.value.openType = formConfig.value.openType, computeNewLine(formConfig.value), formConfig.value.columns.forEach((X, Z, K) => {
|
|
37196
|
+
X.hasOwnProperty("field") && !X.hasOwnProperty("treeNode") && (X.events.change = onFieldChange, X.hasOwnProperty("search") && (X.events.search = remoteSearch), X.events.keyup = onFieldEnter, X.events.click = onFieldClick), (X == null ? void 0 : X.dataType) === "IMG" && (uploadConfig.value.isHaveImgField = !0);
|
|
37197
|
+
}), formData.value._region_id = formConfig.value.params._region_id, await evalEvent(formConfig.value.params.formEvents.dataInit), await formInitData(formData.value, formConfig.value.params._region_id, Q), form.value.params = formConfig.value.params, formConfig.value.params.queryParams && Object.keys(formConfig.value.params.queryParams).length > 0 && formConfig.value.params.queryParams.unQuery !== !0 && searchData(formConfig.value.params.queryParams), formConfig.value.columns.map((X) => {
|
|
37198
|
+
X.hasOwnProperty("field") && !X.hasOwnProperty("treeNode") && (fieldColumnMap.value[X.field] = X);
|
|
37187
37199
|
}), !formConfig.value.params.linkUrl && (formConfig.value.type === "FORM" ? (regionMap.value[formConfig.value.params.code + "-" + preTag.value] = form.value, regionMap.value[formConfig.value.params.code] = form.value) : regionMap.value["Edit-" + formConfig.value.params.code + "-" + preTag.value] = form.value, throwFunction(form.value), await evalEvent(formConfig.value.params.formEvents.regionInit), nextTick(() => {
|
|
37188
37200
|
formDataClone.value = XEUtils$1.clone(toRaw(formData.value), !0);
|
|
37189
37201
|
}), formLoading.value = !1);
|
|
@@ -37687,6 +37699,7 @@ const windowForm_vue_vue_type_style_index_0_scoped_a12a6513_lang = "", _withScop
|
|
|
37687
37699
|
"title-prefix": ne.titlePrefix,
|
|
37688
37700
|
visible: ne.displayForm,
|
|
37689
37701
|
style: normalizeStyle(ne.style),
|
|
37702
|
+
"class-name": { "item-readonly": unref(formConfig).openType === "view" },
|
|
37690
37703
|
"visible-method": ne.editRender.props.displayLogic ? displayLogicEvent : null
|
|
37691
37704
|
}, createSlots({ _: 2 }, [
|
|
37692
37705
|
ne.dataType === "EDITOR" ? {
|
|
@@ -37750,7 +37763,7 @@ const windowForm_vue_vue_type_style_index_0_scoped_a12a6513_lang = "", _withScop
|
|
|
37750
37763
|
]),
|
|
37751
37764
|
key: "3"
|
|
37752
37765
|
} : void 0
|
|
37753
|
-
]), 1032, ["field", "title", "span", "item-render", "title-prefix", "visible", "style", "visible-method"])) : createCommentVNode("", !0)
|
|
37766
|
+
]), 1032, ["field", "title", "span", "item-render", "title-prefix", "visible", "style", "class-name", "visible-method"])) : createCommentVNode("", !0)
|
|
37754
37767
|
], 64))), 128)),
|
|
37755
37768
|
unref(formConfig).type === "FORM" && buttons.value.length > 0 ? (openBlock(), createBlock(X, {
|
|
37756
37769
|
key: 0,
|
|
@@ -37817,7 +37830,7 @@ const windowForm_vue_vue_type_style_index_0_scoped_a12a6513_lang = "", _withScop
|
|
|
37817
37830
|
]);
|
|
37818
37831
|
};
|
|
37819
37832
|
}
|
|
37820
|
-
}, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
37833
|
+
}, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-911a42de"]]);
|
|
37821
37834
|
WindowForm.name = "slw-window-form";
|
|
37822
37835
|
WindowForm.install = (Q) => {
|
|
37823
37836
|
Q.component(WindowForm.name, WindowForm);
|
|
@@ -122335,7 +122348,7 @@ function reConsole() {
|
|
|
122335
122348
|
}
|
|
122336
122349
|
}
|
|
122337
122350
|
console.info(
|
|
122338
|
-
"%cSLW %cVer 0.6.
|
|
122351
|
+
"%cSLW %cVer 0.6.2",
|
|
122339
122352
|
"color:#409EFF;font-size: 22px;font-weight:bolder",
|
|
122340
122353
|
"color:#999;font-size: 12px"
|
|
122341
122354
|
);
|