slw 0.9.70 → 0.9.72

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.
@@ -1,5 +1,5 @@
1
1
  import { pushScopeId as P, popScopeId as V, createElementVNode as h, resolveComponent as g, openBlock as o, createElementBlock as p, createBlock as f, normalizeClass as T, normalizeStyle as A, withModifiers as R, withCtx as r, renderSlot as q, createCommentVNode as _, Fragment as B, createVNode as s, mergeProps as k, renderList as j, toDisplayString as E, normalizeProps as K, guardReactiveProps as Q, resolveDynamicComponent as Z, defineAsyncComponent as $, computed as F, unref as D, withDirectives as ee, vShow as te } from "vue";
2
- import { _ as x, d as S, a as L, u as N } from "./index-4fbe1fbb.js";
2
+ import { _ as x, d as S, a as L, u as N } from "./index-7fabc866.js";
3
3
  import "vue-router";
4
4
  const I = {
5
5
  computed: {},
@@ -8525,7 +8525,7 @@ PictureUpload.name = "slw-picture-upload";
8525
8525
  PictureUpload.install = (H) => {
8526
8526
  H.component(PictureUpload.name, PictureUpload);
8527
8527
  };
8528
- const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScopeId$8 = (H) => (pushScopeId("data-v-3e4e596d"), H = H(), popScopeId(), H), _hoisted_1$l1 = {
8528
+ const windowGrid_vue_vue_type_style_index_0_scoped_c7bc17e1_lang = "", _withScopeId$8 = (H) => (pushScopeId("data-v-c7bc17e1"), H = H(), popScopeId(), H), _hoisted_1$l1 = {
8529
8529
  class: "slw-window-grid-container",
8530
8530
  style: { height: "100%" }
8531
8531
  }, _hoisted_2$kY = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-main-area" }, null, -1)), _hoisted_3$hY = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-active-area" }, null, -1)), _hoisted_4$ay = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4Y = [
@@ -8538,7 +8538,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
8538
8538
  }, _hoisted_9$n = ["id"], _hoisted_10$q = /* @__PURE__ */ _withScopeId$8(() => /* @__PURE__ */ createElementVNode("i", {
8539
8539
  class: "iconfont icon-carryout",
8540
8540
  style: { cursor: "pointer", padding: "0" }
8541
- }, null, -1)), _hoisted_11$g = { style: { padding: "20px 0" } }, _sfc_main$d = {
8541
+ }, null, -1)), _hoisted_11$g = { style: { "font-size": "18px", "margin-right": "8px" } }, _hoisted_12$8 = { style: { padding: "20px 0" } }, _sfc_main$d = {
8542
8542
  __name: "window-grid",
8543
8543
  props: {
8544
8544
  gridData: {
@@ -8592,6 +8592,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
8592
8592
  });
8593
8593
  let checkedGridOptions = ref({});
8594
8594
  const computeCheckedData = computed(() => {
8595
+ if (!gridData.value.checkboxConfig.reserve)
8596
+ return;
8595
8597
  const H = getCheckedData();
8596
8598
  if ((H == null ? void 0 : H.length) > 0) {
8597
8599
  const Q = gridData.value.rowId;
@@ -8599,7 +8601,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
8599
8601
  let G = H.findIndex(
8600
8602
  (K) => K[Q] == removeCheckedRow.value[Q]
8601
8603
  );
8602
- G >= 0 && H.splice(G, 1);
8604
+ G >= 0 && H.splice(G, 1), removeCheckedRow.value = null;
8603
8605
  }
8604
8606
  let Z = [
8605
8607
  {
@@ -8630,22 +8632,24 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
8630
8632
  rowId: Q,
8631
8633
  columns: Z,
8632
8634
  toolbarConfig: {
8633
- buttons: [
8634
- {
8635
- name: $T("已勾选数据"),
8636
- buttonRender: { name: "toolBarTitle" }
8637
- }
8638
- ],
8635
+ slots: {
8636
+ buttons: "toolbar_buttons"
8637
+ },
8639
8638
  custom: !0
8640
8639
  },
8641
8640
  data: X
8642
8641
  }, !0;
8643
- }
8642
+ } else
8643
+ (H == null ? void 0 : H.length) == 0 && removeCheckedRow.value && (checkedGridOptions.value.data = []);
8644
8644
  return !1;
8645
8645
  });
8646
8646
  let removeCheckedRow = ref(null);
8647
8647
  const removeRowEvent = (H) => {
8648
8648
  removeCheckedRow.value = H, getCurRegion().setCheckboxRow(H, !1);
8649
+ }, removeAllRowEvent = () => {
8650
+ getCheckedData().forEach((Q) => {
8651
+ removeRowEvent(Q);
8652
+ });
8649
8653
  };
8650
8654
  let checkedGridShowCols = ref(null);
8651
8655
  const setCheckedGridShowCols = (H) => {
@@ -8811,57 +8815,60 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
8811
8815
  ne
8812
8816
  );
8813
8817
  return oe.then((le) => {
8818
+ var ce, de;
8814
8819
  let se = {};
8815
8820
  if (le && le.data && le.data.result && le.data.data && le.data.data.length > 0) {
8816
- let ue = function(ge) {
8817
- ge.forEach((ve, me) => {
8818
- let $e = 0;
8819
- gridData.value.toolbarConfig.buttons.forEach((_e) => {
8820
- if (typeof _e.type < "u") {
8821
- _e.btnLoad[he] = !1;
8822
- const xe = _e.displayLogic ? displayLogic(_e.displayLogic, {
8823
- ...ve,
8821
+ let pe = function(me) {
8822
+ me.forEach(($e, _e) => {
8823
+ let xe = 0;
8824
+ gridData.value.toolbarConfig.buttons.forEach((we) => {
8825
+ if (typeof we.type < "u") {
8826
+ we.btnLoad[fe] = !1;
8827
+ const ye = we.displayLogic ? displayLogic(we.displayLogic, {
8828
+ ...$e,
8824
8829
  ...assembleParentData(gridData.value.params.parentData)
8825
- }) : !0, we = _e.showInGrid && xe, ye = !_e.showInGrid && xe;
8826
- if (_e.btnShowInGrid[he] = we, _e.btnShow[he] = ye, ce = ce || we, we)
8827
- if (_e.iconComponent)
8828
- $e = $e + 0.7;
8830
+ }) : !0, ke = we.showInGrid && ye, be = !we.showInGrid && ye;
8831
+ if (we.btnShowInGrid[fe] = ke, we.btnShow[fe] = be, he = he || ke, ke)
8832
+ if (we.iconComponent)
8833
+ xe = xe + 0.7;
8829
8834
  else {
8830
- let ke = _e.name.match(/[\u4e00-\u9fa5]/g);
8831
- if (ke) {
8832
- let be = Math.ceil(ke.length / 2);
8833
- $e += be;
8835
+ let Ce = we.name.match(/[\u4e00-\u9fa5]/g);
8836
+ if (Ce) {
8837
+ let Ee = Math.ceil(Ce.length / 2);
8838
+ xe += Ee;
8834
8839
  } else {
8835
- let be = Math.ceil(_e.name.length / 6);
8836
- $e += be;
8840
+ let Ee = Math.ceil(we.name.length / 6);
8841
+ xe += Ee;
8837
8842
  }
8838
8843
  }
8839
8844
  }
8840
- }), $e > de && (de = $e), ve._INDEX = he, he++, ve._CHILDS && ve._CHILDS.length > 0 && ue(ve._CHILDS);
8845
+ }), xe > ue && (ue = xe), $e._INDEX = fe, fe++, $e._CHILDS && $e._CHILDS.length > 0 && pe($e._CHILDS);
8841
8846
  });
8842
- }, ce = !1, de = 0, he = 0;
8843
- ue(le.data.data);
8844
- let fe = !1;
8845
- gridData.value.columns.forEach((ge) => {
8846
- if (ge.colId == "_operation_" && ge.title == "操作") {
8847
- ge.width != de * 60 && de * 60 >= 60 && (fe = !0, ge.width = de.toFixed(1) * 60);
8847
+ }, he = !1, ue = 0, fe = 0;
8848
+ pe(le.data.data);
8849
+ let ge = !1;
8850
+ gridData.value.columns.forEach((me) => {
8851
+ if (me.colId == "_operation_" && me.title == "操作") {
8852
+ me.width != ue * 60 && ue * 60 >= 60 && (ge = !0, me.width = ue.toFixed(1) * 60);
8848
8853
  return;
8849
8854
  }
8850
- }), fe && getCurRegion().loadColumn(gridData.value.columns), gridData.value.params.rowIndex != null && (rowIndex.value = gridData.value.params.rowIndex), le.data.data.length > rowIndex.value ? se = le.data.data[rowIndex.value] : se = le.data.data[0];
8851
- const pe = getCurRegion();
8852
- if (pe) {
8853
- const ge = pe.getColumnById("_operation_");
8854
- ge && ce && pe.showColumn(ge);
8855
+ }), ge && getCurRegion().loadColumn(gridData.value.columns), gridData.value.params.rowIndex != null && (rowIndex.value = gridData.value.params.rowIndex), le.data.data.length > rowIndex.value ? se = le.data.data[rowIndex.value] : se = le.data.data[0];
8856
+ const ve = getCurRegion();
8857
+ if (ve) {
8858
+ const me = ve.getColumnById("_operation_");
8859
+ me && he && ve.showColumn(me);
8855
8860
  }
8856
- !isEditGridInitData.value && gridData.value.type === "EDIT_GRID" && editGridInitData(se);
8861
+ !isEditGridInitData.value && gridData.value.type === "EDIT_GRID" && editGridInitData(se), ((de = (ce = checkedGridOptions.value) == null ? void 0 : ce.data) == null ? void 0 : de.length) > 0 && checkedGridOptions.value.data.forEach((me) => {
8862
+ getCurRegion().setCheckboxRow(me, !0);
8863
+ });
8857
8864
  }
8858
- rowClickCommon(se, rowIndex.value), queryAfterList && queryAfterList.length > 0 && queryAfterList.forEach((ce) => {
8859
- var de;
8860
- if (ce && typeof ce == "function")
8865
+ rowClickCommon(se, rowIndex.value), queryAfterList && queryAfterList.length > 0 && queryAfterList.forEach((he) => {
8866
+ var ue;
8867
+ if (he && typeof he == "function")
8861
8868
  try {
8862
- ce(((de = le == null ? void 0 : le.data) == null ? void 0 : de.data) || []);
8863
- } catch (he) {
8864
- console.error(he);
8869
+ he(((ue = le == null ? void 0 : le.data) == null ? void 0 : ue.data) || []);
8870
+ } catch (fe) {
8871
+ console.error(fe);
8865
8872
  }
8866
8873
  });
8867
8874
  }), typeof await oe > "u" ? {
@@ -9112,7 +9119,10 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
9112
9119
  $vxeReadFile({ types: ["xml"] }).then(({ file: ne }) => {
9113
9120
  const re = new FormData();
9114
9121
  re.append("file", ne), axios.upload("windowButton/importWindow", re).then((oe) => {
9115
- oe.status === 200 && ($message.success($T(oe.data.msg || $T("导入失败!")), "info"), oe.data.result && reload()), H.loading = !1;
9122
+ oe.status === 200 && ($message.success(
9123
+ $T(oe.data.msg || $T("导入失败!")),
9124
+ "info"
9125
+ ), oe.data.result && reload()), H.loading = !1;
9116
9126
  });
9117
9127
  }).catch((ne) => {
9118
9128
  console.error(ne), H.loading = !1;
@@ -9122,7 +9132,10 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
9122
9132
  }
9123
9133
  else if (te === "EXPORT" && gridData.value.params.code == "Window") {
9124
9134
  if (!Q || Q.length === 0) {
9125
- $message.success($T(response.data.msg || $T("请选择需要导出的窗口!")), "info"), H.loading = !1;
9135
+ $message.success(
9136
+ $T(response.data.msg || $T("请选择需要导出的窗口!")),
9137
+ "info"
9138
+ ), H.loading = !1;
9126
9139
  return;
9127
9140
  }
9128
9141
  Q.length > 0 && (Q = Q[0]), await axios.download("/windowButton/exportWindow", {
@@ -9168,7 +9181,11 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
9168
9181
  }
9169
9182
  );
9170
9183
  else if (H.windowId) {
9171
- if (beginEdit && await beginEdit(Q, gridData.value.rowConfig.keyField, curRegion.value) == !1)
9184
+ if (beginEdit && await beginEdit(
9185
+ Q,
9186
+ gridData.value.rowConfig.keyField,
9187
+ curRegion.value
9188
+ ) == !1)
9172
9189
  return;
9173
9190
  showPreView(H.windowId, H.name, Q, {
9174
9191
  width: H.openWidth,
@@ -9999,7 +10016,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
9999
10016
  if (H instanceof Object) {
10000
10017
  let Q = ["stripe", "border", "padding", "round", "size"];
10001
10018
  Object.keys(H).forEach((Z) => {
10002
- Q.includes(Z) && (gridData.value[Z] = H[Z]);
10019
+ Q.includes(Z) ? gridData.value[Z] = H[Z] : Z == "checkboxReserve" && (gridData.value.checkboxConfig.reserve = H[Z]);
10003
10020
  });
10004
10021
  }
10005
10022
  }, setCheckMethod = (H) => {
@@ -10225,13 +10242,22 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10225
10242
  ]),
10226
10243
  default: withCtx(() => [
10227
10244
  createVNode(te, normalizeProps(guardReactiveProps(unref(checkedGridOptions))), {
10245
+ toolbar_buttons: withCtx(() => [
10246
+ createElementVNode("b", _hoisted_11$g, toDisplayString(unref($T)("已勾选数据")), 1),
10247
+ createVNode(ee, {
10248
+ status: "danger",
10249
+ size: "mini",
10250
+ content: unref($T)("全部删除"),
10251
+ onClick: Q[0] || (Q[0] = (se) => removeAllRowEvent())
10252
+ }, null, 8, ["content"])
10253
+ ]),
10228
10254
  operate: withCtx(({ row: se }) => [
10229
10255
  createVNode(ee, {
10230
10256
  status: "danger",
10231
- content: "删除",
10257
+ content: unref($T)("删除"),
10232
10258
  size: "mini",
10233
10259
  onClick: (ce) => removeRowEvent(se)
10234
- }, null, 8, ["onClick"])
10260
+ }, null, 8, ["content", "onClick"])
10235
10261
  ]),
10236
10262
  _: 1
10237
10263
  }, 16)
@@ -10244,9 +10270,9 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10244
10270
  createVNode(le, {
10245
10271
  ref: "importModal",
10246
10272
  modelValue: unref(isImport),
10247
- "onUpdate:modelValue": Q[0] || (Q[0] = (se) => isRef(isImport) ? isImport.value = se : isImport = se),
10273
+ "onUpdate:modelValue": Q[1] || (Q[1] = (se) => isRef(isImport) ? isImport.value = se : isImport = se),
10248
10274
  visible: unref(isImport),
10249
- "onUpdate:visible": Q[1] || (Q[1] = (se) => isRef(isImport) ? isImport.value = se : isImport = se),
10275
+ "onUpdate:visible": Q[2] || (Q[2] = (se) => isRef(isImport) ? isImport.value = se : isImport = se),
10250
10276
  zIndex: 1e3,
10251
10277
  title: unref($T)("Excel导入"),
10252
10278
  width: "500px",
@@ -10296,7 +10322,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10296
10322
  "on-success": importSuccess
10297
10323
  }, {
10298
10324
  default: withCtx(() => [
10299
- createElementVNode("div", _hoisted_11$g, [
10325
+ createElementVNode("div", _hoisted_12$8, [
10300
10326
  createVNode(re, { width: 50 }),
10301
10327
  createElementVNode("p", null, toDisplayString(unref($T)("点击或拖文件到此处上传")), 1)
10302
10328
  ])
@@ -10310,7 +10336,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10310
10336
  ref: "pictureUploadModal",
10311
10337
  width: "20%",
10312
10338
  modelValue: unref(uploadConfig).show,
10313
- "onUpdate:modelValue": Q[2] || (Q[2] = (se) => unref(uploadConfig).show = se),
10339
+ "onUpdate:modelValue": Q[3] || (Q[3] = (se) => unref(uploadConfig).show = se),
10314
10340
  "z-index": 1e3,
10315
10341
  draggable: "",
10316
10342
  "append-to-body": "",
@@ -10327,7 +10353,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10327
10353
  ]);
10328
10354
  };
10329
10355
  }
10330
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-3e4e596d"]]);
10356
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-c7bc17e1"]]);
10331
10357
  WindowGrid.name = "slw-window-grid";
10332
10358
  WindowGrid.install = (H) => {
10333
10359
  H.component(WindowGrid.name, WindowGrid);
@@ -62437,7 +62463,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
62437
62463
  emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
62438
62464
  setup(H, { emit: Q }) {
62439
62465
  const Z = H, X = defineAsyncComponent(
62440
- () => import("./index-ff3f7764.js")
62466
+ () => import("./index-7cb98e43.js")
62441
62467
  );
62442
62468
  let G = useVModel(Z, "type", Q), K = useVModel(Z, "rootLayout", Q), ee = useVModel(Z, "viewData", Q), te = useVModel(Z, "rowData", Q), ne = ref(0), re = ref(null);
62443
62469
  re.value = createDesigner();
@@ -62522,7 +62548,7 @@ WindowDesigner.name = "slw-window-designer";
62522
62548
  WindowDesigner.install = (H) => {
62523
62549
  H.component(WindowDesigner.name, WindowDesigner);
62524
62550
  };
62525
- const windowIndex_vue_vue_type_style_index_0_scoped_6527a9d5_lang = "", _withScopeId = (H) => (pushScopeId("data-v-6527a9d5"), H = H(), popScopeId(), H), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
62551
+ const windowIndex_vue_vue_type_style_index_0_scoped_f5b3abee_lang = "", _withScopeId = (H) => (pushScopeId("data-v-f5b3abee"), H = H(), popScopeId(), H), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
62526
62552
  __name: "window-index",
62527
62553
  props: {
62528
62554
  windowId: {
@@ -62793,7 +62819,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_6527a9d5_lang = "", _withSco
62793
62819
  checkboxConfig: {
62794
62820
  trigger: "column",
62795
62821
  range: !0,
62796
- reserve: !0
62822
+ reserve: !1
62797
62823
  },
62798
62824
  printConfig: {
62799
62825
  modes: ["current", "selected", "all"]
@@ -63734,7 +63760,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_6527a9d5_lang = "", _withSco
63734
63760
  ]);
63735
63761
  };
63736
63762
  }
63737
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6527a9d5"]]);
63763
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f5b3abee"]]);
63738
63764
  WindowIndex.name = "slw-window-index";
63739
63765
  WindowIndex.install = (H) => {
63740
63766
  H.component(WindowIndex.name, WindowIndex);
@@ -147446,7 +147472,7 @@ function reConsole() {
147446
147472
  }
147447
147473
  }
147448
147474
  console.info(
147449
- `%cSLW %cVer 0.9.70%c
147475
+ `%cSLW %cVer 0.9.72%c
147450
147476
  %c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
147451
147477
  %c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
147452
147478
  "color:#409EFF;font-size: 22px;font-weight:bolder;text-shadow: 2px 2px 4px #84c1ff;",
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as m } from "./index-4fbe1fbb.js";
1
+ import { i as m } from "./index-7fabc866.js";
2
2
  import "vue";
3
3
  import "vue-router";
4
4
  export {