slw 0.8.71 → 0.8.73

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 CHANGED
@@ -8290,10 +8290,10 @@ const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _expor
8290
8290
  }, _withScopeId$4 = (Q) => (pushScopeId("data-v-dddba6c9"), Q = Q(), popScopeId(), Q), _hoisted_1$kX = { class: "upload-list-box" }, _hoisted_2$kT = {
8291
8291
  key: 0,
8292
8292
  class: "thumbnail"
8293
- }, _hoisted_3$hU = { class: "el-upload-list__item-actions" }, _hoisted_4$av = ["onClick"], _hoisted_5$4V = {
8293
+ }, _hoisted_3$hU = { class: "el-upload-list__item-actions" }, _hoisted_4$aw = ["onClick"], _hoisted_5$4W = {
8294
8294
  key: 0,
8295
8295
  class: "preview-img-list__item-actions"
8296
- }, _hoisted_6$1$ = ["onClick"], _sfc_main$7 = {
8296
+ }, _hoisted_6$20 = ["onClick"], _sfc_main$7 = {
8297
8297
  __name: "picture-upload",
8298
8298
  props: {
8299
8299
  uploadConfig: {
@@ -8443,7 +8443,7 @@ const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _expor
8443
8443
  ]),
8444
8444
  _: 1
8445
8445
  })
8446
- ], 8, _hoisted_4$av)) : createCommentVNode("", !0)
8446
+ ], 8, _hoisted_4$aw)) : createCommentVNode("", !0)
8447
8447
  ])
8448
8448
  ])
8449
8449
  ]),
@@ -8481,7 +8481,7 @@ const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _expor
8481
8481
  style: { "max-height": "100%" },
8482
8482
  alt: "Preview Image"
8483
8483
  }, null, 512),
8484
- X.uploadConfig.openType != "view" ? (openBlock(), createElementBlock("span", _hoisted_5$4V, [
8484
+ X.uploadConfig.openType != "view" ? (openBlock(), createElementBlock("span", _hoisted_5$4W, [
8485
8485
  createElementVNode("span", {
8486
8486
  class: "preview-img-list__item-delete",
8487
8487
  onClick: (Ve) => fe(De)
@@ -8492,7 +8492,7 @@ const pictureUpload_vue_vue_type_style_index_0_scoped_dddba6c9_lang = "", _expor
8492
8492
  ]),
8493
8493
  _: 1
8494
8494
  })
8495
- ], 8, _hoisted_6$1$)
8495
+ ], 8, _hoisted_6$20)
8496
8496
  ])) : createCommentVNode("", !0)
8497
8497
  ]),
8498
8498
  _: 2
@@ -8514,11 +8514,11 @@ PictureUpload.install = (Q) => {
8514
8514
  const windowGrid_vue_vue_type_style_index_0_scoped_6ef05836_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-6ef05836"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
8515
8515
  class: "slw-window-grid-container",
8516
8516
  style: { height: "100%" }
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 = [
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$av = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4V = [
8518
8518
  _hoisted_2$kS,
8519
8519
  _hoisted_3$hT,
8520
- _hoisted_4$au
8521
- ], _hoisted_6$1_ = ["onClick"], _hoisted_7$12 = {
8520
+ _hoisted_4$av
8521
+ ], _hoisted_6$1$ = ["onClick"], _hoisted_7$13 = {
8522
8522
  key: 0,
8523
8523
  style: { verticalAlign: "middle" }
8524
8524
  }, _hoisted_8$F = { style: { padding: "20px 0" } }, _sfc_main$6 = {
@@ -9896,7 +9896,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_6ef05836_lang = "", _withScop
9896
9896
  class: "vxe-table--cell-area",
9897
9897
  ref_key: "cellarea",
9898
9898
  ref: cellarea
9899
- }, _hoisted_5$4U, 512),
9899
+ }, _hoisted_5$4V, 512),
9900
9900
  createVNode(ee, mergeProps$1({
9901
9901
  ref_key: "curRegion",
9902
9902
  ref: curRegion,
@@ -9923,7 +9923,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_6ef05836_lang = "", _withScop
9923
9923
  class: "iconfont icon-scan1",
9924
9924
  onClick: (se) => onScanIconClick(ae[le], le),
9925
9925
  style: { cursor: "pointer" }
9926
- }, null, 8, _hoisted_6$1_)
9926
+ }, null, 8, _hoisted_6$1$)
9927
9927
  ]),
9928
9928
  _: 2
9929
9929
  }, 1032, ["modelValue", "onUpdate:modelValue"])
@@ -9940,7 +9940,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_6ef05836_lang = "", _withScop
9940
9940
  onClick: (ce) => toolBarButtonClick(se, ae, le)
9941
9941
  }, createSlots({
9942
9942
  default: withCtx(() => [
9943
- !se.iconComponent || typeof se.iconComponent > "u" ? (openBlock(), createElementBlock("span", _hoisted_7$12, toDisplayString(unref($T)(se.name)), 1)) : createCommentVNode("", !0)
9943
+ !se.iconComponent || typeof se.iconComponent > "u" ? (openBlock(), createElementBlock("span", _hoisted_7$13, toDisplayString(unref($T)(se.name)), 1)) : createCommentVNode("", !0)
9944
9944
  ]),
9945
9945
  _: 2
9946
9946
  }, [
@@ -38894,10 +38894,10 @@ var js = js$1.exports;
38894
38894
  })(Q);
38895
38895
  })(js$1);
38896
38896
  var jsExports = js$1.exports;
38897
- const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_02489a8c_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-02489a8c"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
38897
+ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_52054403_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-52054403"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
38898
38898
  key: 0,
38899
38899
  style: { "text-align": "left", "font-size": "18px", "line-height": "30px", "font-weight": "bold", padding: "5px 30px 0 15px" }
38900
- }, _hoisted_3$hS = ["onClick"], _sfc_main$5 = {
38900
+ }, _hoisted_3$hS = ["onClick"], _hoisted_4$au = ["onClick"], _hoisted_5$4U = ["onClick"], _hoisted_6$1_ = ["onClick"], _hoisted_7$12 = ["onClick"], _sfc_main$5 = {
38901
38901
  __name: "window-form",
38902
38902
  props: {
38903
38903
  formConfig: {
@@ -38948,21 +38948,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
38948
38948
  if (typeof curEvent == "function")
38949
38949
  return curEvent(...eventParams);
38950
38950
  try {
38951
- if (eventParams.length) {
38952
- let H = curEvent.substring(curEvent.indexOf("(") + 1, curEvent.indexOf(")")).split(",")[0].replace(" ", "");
38953
- if (H == "form" || H == "grid") {
38954
- let X = curEvent.split(`
38955
- `);
38956
- if (/.+function\s{0,}([.]{0,})/.test(X[0])) {
38957
- let Z = new RegExp(`[\\s\\,]{0,}${H}[\\s\\,]{0,}`, "g");
38958
- X[0] = X[0].replace(Z, "");
38959
- }
38960
- curEvent = X.join(`
38961
- `);
38962
- let G = new RegExp(`${H}\\.`, "g");
38963
- curEvent = curEvent.replace(G, "");
38964
- }
38965
- }
38951
+ eventParams.length && (curEvent = codeTranslationV3(curEvent));
38966
38952
  let fun = curEvent.replaceAll("this.$data.", "").replaceAll("this.", "");
38967
38953
  if (typeof fun == "function" || fun.indexOf("function") > -1)
38968
38954
  return typeof fun != "function" && eval("fun = " + fun), fun(...eventParams);
@@ -38971,6 +38957,21 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
38971
38957
  console.error(Q, "evalEvent");
38972
38958
  }
38973
38959
  }
38960
+ }, codeTranslationV3 = (Q) => {
38961
+ let X = Q.substring(Q.indexOf("(") + 1, Q.indexOf(")")).split(",")[0].replace(" ", "");
38962
+ if (X == "form" || X == "grid") {
38963
+ let G = Q.split(`
38964
+ `);
38965
+ if (/.+function\s{0,}([.]{0,})/.test(G[0])) {
38966
+ let K = new RegExp(`[\\s\\,]{0,}${X}[\\s\\,]{0,}`, "g");
38967
+ console.log(K), G[0] = G[0].replace(K, "");
38968
+ }
38969
+ Q = G.join(`
38970
+ `);
38971
+ let Z = new RegExp(`${X}\\.`, "g");
38972
+ Q = Q.replace(Z, "");
38973
+ }
38974
+ return Q;
38974
38975
  }, displayLogic = (displayStr, datax) => {
38975
38976
  let data = Object.assign({}, datax), result = !1;
38976
38977
  try {
@@ -39568,7 +39569,32 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39568
39569
  }
39569
39570
  }, footerSum = () => {
39570
39571
  }, onEditorBtnClick = (Q, H) => {
39571
- console.log(localEditorViews[Q.field]), H == "beautify" ? formData.value[Q.field] = jsExports.js_beautify(formData.value[Q.field], codeBeautifyConfig) : H == "checkAll", localEditorViews[Q.field].focus();
39572
+ const X = localEditorViews[Q.field], { state: G } = X;
39573
+ if (console.log(X, G), H == "beautify")
39574
+ formData.value[Q.field] = jsExports.js_beautify(formData.value[Q.field], codeBeautifyConfig);
39575
+ else if (H == "checkAll") {
39576
+ let Z = G.doc.toString().length;
39577
+ const K = G.update({
39578
+ // selection: EditorSelection.cursor(pos), // 设置光标
39579
+ selection: EditorSelection.range(0, Z),
39580
+ scrollIntoView: !0
39581
+ });
39582
+ X.dispatch(K);
39583
+ } else if (H == "copy") {
39584
+ let Z = "";
39585
+ if (G.selection.ranges.some((K) => !K.empty)) {
39586
+ const K = G.selection.ranges[0];
39587
+ Z = G.sliceDoc(K.from, K.to);
39588
+ } else
39589
+ Z = G.doc.toString();
39590
+ navigator.clipboard.writeText(Z), success("复制成功!");
39591
+ } else if (H == "clear")
39592
+ formData.value[Q.field] = "";
39593
+ else if (H == "swap") {
39594
+ let Z = G.doc.toString();
39595
+ Z = codeTranslationV3(Z), Z = Z.replaceAll("this.$data.", "").replaceAll("this.", ""), formData.value[Q.field] = Z;
39596
+ }
39597
+ X.focus();
39572
39598
  }, throwFunction = (Q) => {
39573
39599
  Q.getData = () => getData(), Q.submitData = () => submitData(), Q.getValue = (H) => getValue(H), Q.setValue = (H, X) => setValue(H, X);
39574
39600
  };
@@ -39616,7 +39642,33 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39616
39642
  onReady: (re) => handleReady(ne.field, re),
39617
39643
  onFocus: (re) => isRef(editorFocusField) ? editorFocusField.value = ne.field : editorFocusField = ne.field,
39618
39644
  "auto-destroy": ""
39619
- }, null, 8, ["modelValue", "onUpdate:modelValue", "extensions", "onReady", "onFocus"])
39645
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "extensions", "onReady", "onFocus"]),
39646
+ createElementVNode("div", {
39647
+ class: "editor-operation-btn",
39648
+ style: normalizeStyle(computeEditorBtnStyle.value(ne.field))
39649
+ }, [
39650
+ ne.language == "javascript" ? (openBlock(), createElementBlock("i", {
39651
+ key: 0,
39652
+ title: "美化",
39653
+ class: "iconfont icon-magic-stick",
39654
+ onClick: (re) => onEditorBtnClick(ne, "beautify")
39655
+ }, null, 8, _hoisted_3$hS)) : createCommentVNode("", !0),
39656
+ createElementVNode("i", {
39657
+ title: "全选",
39658
+ class: "iconfont icon-check-square",
39659
+ onClick: (re) => onEditorBtnClick(ne, "checkAll")
39660
+ }, null, 8, _hoisted_4$au),
39661
+ createElementVNode("i", {
39662
+ title: "复制",
39663
+ class: "iconfont icon-document-copy",
39664
+ onClick: (re) => onEditorBtnClick(ne, "copy")
39665
+ }, null, 8, _hoisted_5$4U),
39666
+ createElementVNode("i", {
39667
+ title: "清空",
39668
+ class: "iconfont icon-clear",
39669
+ onClick: (re) => onEditorBtnClick(ne, "clear")
39670
+ }, null, 8, _hoisted_6$1_)
39671
+ ], 4)
39620
39672
  ]),
39621
39673
  key: "0"
39622
39674
  } : ne.dataType === "STRING" && ne.canScan === !0 ? {
@@ -39696,7 +39748,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39696
39748
  params: { name: unref(formData)["_" + ne.field + "_NAME"] }
39697
39749
  }),
39698
39750
  href: "javascript: void(0)"
39699
- }, toDisplayString(unref($T)(ne.title)), 9, _hoisted_3$hS)
39751
+ }, toDisplayString(unref($T)(ne.title)), 9, _hoisted_7$12)
39700
39752
  ]),
39701
39753
  key: "4"
39702
39754
  } : void 0
@@ -39767,7 +39819,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39767
39819
  ]);
39768
39820
  };
39769
39821
  }
39770
- }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-02489a8c"]]);
39822
+ }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-52054403"]]);
39771
39823
  WindowForm.name = "slw-window-form";
39772
39824
  WindowForm.install = (Q) => {
39773
39825
  Q.component(WindowForm.name, WindowForm);
@@ -40400,7 +40452,7 @@ _sfc_main$2.name = "slw-preview-modal";
40400
40452
  _sfc_main$2.install = (Q) => {
40401
40453
  Q.component(_sfc_main$2.name, _sfc_main$2);
40402
40454
  };
40403
- const windowIndex_vue_vue_type_style_index_0_scoped_d7ca317f_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-d7ca317f"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
40455
+ const windowIndex_vue_vue_type_style_index_0_scoped_48568596_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-48568596"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
40404
40456
  __name: "window-index",
40405
40457
  props: {
40406
40458
  windowId: {
@@ -41127,10 +41179,19 @@ const windowIndex_vue_vue_type_style_index_0_scoped_d7ca317f_lang = "", _withSco
41127
41179
  iconClose: "vxe-icon--caret-right"
41128
41180
  };
41129
41181
  let se = oe.filter((ce) => ce.displayGrid);
41130
- G.checkboxConfig = {
41182
+ if (G.checkboxConfig = {
41131
41183
  labelField: se[0].code.toUpperCase(),
41132
41184
  expandAll: !0
41133
- }, ae[0].title = se[0].name, ae[0].hasOwnProperty("type") || (ae[0].field = se[0].code.toUpperCase()), Z.type === "TREE_STRUCTURE" && (G.showHeader = !1, G.treeConfig.iconOpen = "vxe-icon-square-minus", G.treeConfig.iconClose = "vxe-icon-square-plus", G.toolbarConfig.custom = !1, G.treeConfig.accordion = !1, ae = ae.map((ce) => (ce.visible === !0 && (ce.visible = !1), ce)));
41185
+ }, ae[0].title = se[0].name, ae[0].hasOwnProperty("type") || (ae[0].field = se[0].code.toUpperCase(), se[0].format && Z.type === "TREE_STRUCTURE" && (ae[0].formatter = formatter, ae[0].type = "html", ae[0].editRender = {
41186
+ props: {
41187
+ format: se[0].format
41188
+ }
41189
+ })), Z.type === "TREE_STRUCTURE" && (G.showHeader = !1, G.treeConfig.iconOpen = "vxe-icon-square-minus", G.treeConfig.iconClose = "vxe-icon-square-plus", G.toolbarConfig.custom = !1, G.treeConfig.accordion = !1, ae = ae.map((ce) => (ce.visible === !0 && (ce.visible = !1), ce)), ae[0].type == "checkbox")) {
41190
+ G.checkboxConfig.labelField = "", ae[0].width = 130;
41191
+ let ce = ae.findIndex((he) => he.colId == "_operation_");
41192
+ const de = XEUtils$1.clone(ae[ce + 1]);
41193
+ de.visible = !0, de.fixed = "left", delete de.width, ae.splice(ce, 0, de);
41194
+ }
41134
41195
  }
41135
41196
  G.columns = ae, G.editRules = le;
41136
41197
  }
@@ -41539,7 +41600,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_d7ca317f_lang = "", _withSco
41539
41600
  ]);
41540
41601
  };
41541
41602
  }
41542
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-d7ca317f"]]);
41603
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-48568596"]]);
41543
41604
  WindowIndex.name = "slw-window-index";
41544
41605
  WindowIndex.install = (Q) => {
41545
41606
  Q.component(WindowIndex.name, WindowIndex);
@@ -124347,7 +124408,7 @@ function reConsole() {
124347
124408
  }
124348
124409
  }
124349
124410
  console.info(
124350
- "%cSLW %cVer 0.8.71",
124411
+ "%cSLW %cVer 0.8.73",
124351
124412
  "color:#409EFF;font-size: 22px;font-weight:bolder",
124352
124413
  "color:#999;font-size: 12px"
124353
124414
  );