slw 0.9.69 → 0.9.71

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.
@@ -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_bd149a4a_lang = "", _withScopeId$8 = (H) => (pushScopeId("data-v-bd149a4a"), H = H(), popScopeId(), H), _hoisted_1$l1 = {
8528
+ const windowGrid_vue_vue_type_style_index_0_scoped_12a00471_lang = "", _withScopeId$8 = (H) => (pushScopeId("data-v-12a00471"), 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_bd149a4a_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: {
@@ -8596,11 +8596,30 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
8596
8596
  if ((H == null ? void 0 : H.length) > 0) {
8597
8597
  const Q = gridData.value.rowId;
8598
8598
  if (removeCheckedRow.value) {
8599
- let X = H.findIndex((G) => G[Q] == removeCheckedRow.value[Q]);
8600
- X >= 0 && H.splice(X, 1);
8599
+ let G = H.findIndex(
8600
+ (K) => K[Q] == removeCheckedRow.value[Q]
8601
+ );
8602
+ G >= 0 && H.splice(G, 1), removeCheckedRow.value = null;
8601
8603
  }
8602
- let Z = gridData.value.columns.filter((X) => X.field);
8603
- return Z.unshift({ title: "操作", width: 100, align: "center", slots: { default: "operate" } }), checkedGridOptions.value = {
8604
+ let Z = [
8605
+ {
8606
+ title: "操作",
8607
+ width: 100,
8608
+ align: "center",
8609
+ slots: { default: "operate" }
8610
+ }
8611
+ ];
8612
+ gridData.value.columns.forEach((G) => {
8613
+ if (G.field) {
8614
+ let K = XEUtils$1.clone(toRaw(G), !0);
8615
+ checkedGridShowCols.value && (checkedGridShowCols.value.includes(K.field.toLowerCase()) ? K.visible = !0 : K.visible = !1), Z.push(K);
8616
+ }
8617
+ });
8618
+ let X = XEUtils$1.clone(H, !0);
8619
+ return X.forEach((G) => {
8620
+ for (let K in G)
8621
+ G["_" + K + "_NAME"] && (G[K] = G["_" + K + "_NAME"]);
8622
+ }), checkedGridOptions.value = {
8604
8623
  border: !0,
8605
8624
  showOverflow: "title",
8606
8625
  showHeaderOverflow: !0,
@@ -8611,22 +8630,28 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
8611
8630
  rowId: Q,
8612
8631
  columns: Z,
8613
8632
  toolbarConfig: {
8614
- buttons: [
8615
- {
8616
- name: $T("已勾选数据"),
8617
- buttonRender: { name: "toolBarTitle" }
8618
- }
8619
- ],
8633
+ slots: {
8634
+ buttons: "toolbar_buttons"
8635
+ },
8620
8636
  custom: !0
8621
8637
  },
8622
- data: H
8638
+ data: X
8623
8639
  }, !0;
8624
- }
8640
+ } else
8641
+ (H == null ? void 0 : H.length) == 0 && removeCheckedRow.value && (checkedGridOptions.value.data = []);
8625
8642
  return !1;
8626
8643
  });
8627
8644
  let removeCheckedRow = ref(null);
8628
8645
  const removeRowEvent = (H) => {
8629
8646
  removeCheckedRow.value = H, getCurRegion().setCheckboxRow(H, !1);
8647
+ }, removeAllRowEvent = () => {
8648
+ getCheckedData().forEach((Q) => {
8649
+ removeRowEvent(Q);
8650
+ });
8651
+ };
8652
+ let checkedGridShowCols = ref(null);
8653
+ const setCheckedGridShowCols = (H) => {
8654
+ checkedGridShowCols.value = H;
8630
8655
  }, showButtons = (H, Q) => gridData.value.type === "TREE" || gridData.value.type === "TREE_STRUCTURE" ? gridData.value.toolbarConfig.buttons.filter(
8631
8656
  (Z) => Z.showInGrid && Z.btnShowInGrid[Q._INDEX]
8632
8657
  ) : gridData.value.toolbarConfig.buttons.filter(
@@ -8788,57 +8813,60 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
8788
8813
  ne
8789
8814
  );
8790
8815
  return oe.then((le) => {
8816
+ var ce, de;
8791
8817
  let se = {};
8792
8818
  if (le && le.data && le.data.result && le.data.data && le.data.data.length > 0) {
8793
- let ue = function(ge) {
8794
- ge.forEach((ve, me) => {
8795
- let $e = 0;
8796
- gridData.value.toolbarConfig.buttons.forEach((_e) => {
8797
- if (typeof _e.type < "u") {
8798
- _e.btnLoad[he] = !1;
8799
- const xe = _e.displayLogic ? displayLogic(_e.displayLogic, {
8800
- ...ve,
8819
+ let pe = function(me) {
8820
+ me.forEach(($e, _e) => {
8821
+ let xe = 0;
8822
+ gridData.value.toolbarConfig.buttons.forEach((we) => {
8823
+ if (typeof we.type < "u") {
8824
+ we.btnLoad[fe] = !1;
8825
+ const ye = we.displayLogic ? displayLogic(we.displayLogic, {
8826
+ ...$e,
8801
8827
  ...assembleParentData(gridData.value.params.parentData)
8802
- }) : !0, we = _e.showInGrid && xe, ye = !_e.showInGrid && xe;
8803
- if (_e.btnShowInGrid[he] = we, _e.btnShow[he] = ye, ce = ce || we, we)
8804
- if (_e.iconComponent)
8805
- $e = $e + 0.7;
8828
+ }) : !0, ke = we.showInGrid && ye, be = !we.showInGrid && ye;
8829
+ if (we.btnShowInGrid[fe] = ke, we.btnShow[fe] = be, he = he || ke, ke)
8830
+ if (we.iconComponent)
8831
+ xe = xe + 0.7;
8806
8832
  else {
8807
- let ke = _e.name.match(/[\u4e00-\u9fa5]/g);
8808
- if (ke) {
8809
- let be = Math.ceil(ke.length / 2);
8810
- $e += be;
8833
+ let Ce = we.name.match(/[\u4e00-\u9fa5]/g);
8834
+ if (Ce) {
8835
+ let Ee = Math.ceil(Ce.length / 2);
8836
+ xe += Ee;
8811
8837
  } else {
8812
- let be = Math.ceil(_e.name.length / 6);
8813
- $e += be;
8838
+ let Ee = Math.ceil(we.name.length / 6);
8839
+ xe += Ee;
8814
8840
  }
8815
8841
  }
8816
8842
  }
8817
- }), $e > de && (de = $e), ve._INDEX = he, he++, ve._CHILDS && ve._CHILDS.length > 0 && ue(ve._CHILDS);
8843
+ }), xe > ue && (ue = xe), $e._INDEX = fe, fe++, $e._CHILDS && $e._CHILDS.length > 0 && pe($e._CHILDS);
8818
8844
  });
8819
- }, ce = !1, de = 0, he = 0;
8820
- ue(le.data.data);
8821
- let fe = !1;
8822
- gridData.value.columns.forEach((ge) => {
8823
- if (ge.colId == "_operation_" && ge.title == "操作") {
8824
- ge.width != de * 60 && de * 60 >= 60 && (fe = !0, ge.width = de.toFixed(1) * 60);
8845
+ }, he = !1, ue = 0, fe = 0;
8846
+ pe(le.data.data);
8847
+ let ge = !1;
8848
+ gridData.value.columns.forEach((me) => {
8849
+ if (me.colId == "_operation_" && me.title == "操作") {
8850
+ me.width != ue * 60 && ue * 60 >= 60 && (ge = !0, me.width = ue.toFixed(1) * 60);
8825
8851
  return;
8826
8852
  }
8827
- }), 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];
8828
- const pe = getCurRegion();
8829
- if (pe) {
8830
- const ge = pe.getColumnById("_operation_");
8831
- ge && ce && pe.showColumn(ge);
8853
+ }), 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];
8854
+ const ve = getCurRegion();
8855
+ if (ve) {
8856
+ const me = ve.getColumnById("_operation_");
8857
+ me && he && ve.showColumn(me);
8832
8858
  }
8833
- !isEditGridInitData.value && gridData.value.type === "EDIT_GRID" && editGridInitData(se);
8859
+ !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) => {
8860
+ getCurRegion().setCheckboxRow(me, !0);
8861
+ });
8834
8862
  }
8835
- rowClickCommon(se, rowIndex.value), queryAfterList && queryAfterList.length > 0 && queryAfterList.forEach((ce) => {
8836
- var de;
8837
- if (ce && typeof ce == "function")
8863
+ rowClickCommon(se, rowIndex.value), queryAfterList && queryAfterList.length > 0 && queryAfterList.forEach((he) => {
8864
+ var ue;
8865
+ if (he && typeof he == "function")
8838
8866
  try {
8839
- ce(((de = le == null ? void 0 : le.data) == null ? void 0 : de.data) || []);
8840
- } catch (he) {
8841
- console.error(he);
8867
+ he(((ue = le == null ? void 0 : le.data) == null ? void 0 : ue.data) || []);
8868
+ } catch (fe) {
8869
+ console.error(fe);
8842
8870
  }
8843
8871
  });
8844
8872
  }), typeof await oe > "u" ? {
@@ -9089,7 +9117,10 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
9089
9117
  $vxeReadFile({ types: ["xml"] }).then(({ file: ne }) => {
9090
9118
  const re = new FormData();
9091
9119
  re.append("file", ne), axios.upload("windowButton/importWindow", re).then((oe) => {
9092
- oe.status === 200 && ($message.success($T(oe.data.msg || $T("导入失败!")), "info"), oe.data.result && reload()), H.loading = !1;
9120
+ oe.status === 200 && ($message.success(
9121
+ $T(oe.data.msg || $T("导入失败!")),
9122
+ "info"
9123
+ ), oe.data.result && reload()), H.loading = !1;
9093
9124
  });
9094
9125
  }).catch((ne) => {
9095
9126
  console.error(ne), H.loading = !1;
@@ -9099,7 +9130,10 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
9099
9130
  }
9100
9131
  else if (te === "EXPORT" && gridData.value.params.code == "Window") {
9101
9132
  if (!Q || Q.length === 0) {
9102
- $message.success($T(response.data.msg || $T("请选择需要导出的窗口!")), "info"), H.loading = !1;
9133
+ $message.success(
9134
+ $T(response.data.msg || $T("请选择需要导出的窗口!")),
9135
+ "info"
9136
+ ), H.loading = !1;
9103
9137
  return;
9104
9138
  }
9105
9139
  Q.length > 0 && (Q = Q[0]), await axios.download("/windowButton/exportWindow", {
@@ -9145,7 +9179,11 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
9145
9179
  }
9146
9180
  );
9147
9181
  else if (H.windowId) {
9148
- if (beginEdit && await beginEdit(Q, gridData.value.rowConfig.keyField, curRegion.value) == !1)
9182
+ if (beginEdit && await beginEdit(
9183
+ Q,
9184
+ gridData.value.rowConfig.keyField,
9185
+ curRegion.value
9186
+ ) == !1)
9149
9187
  return;
9150
9188
  showPreView(H.windowId, H.name, Q, {
9151
9189
  width: H.openWidth,
@@ -9976,7 +10014,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
9976
10014
  if (H instanceof Object) {
9977
10015
  let Q = ["stripe", "border", "padding", "round", "size"];
9978
10016
  Object.keys(H).forEach((Z) => {
9979
- Q.includes(Z) && (gridData.value[Z] = H[Z]);
10017
+ Q.includes(Z) ? gridData.value[Z] = H[Z] : Z == "checkboxReserve" && (gridData.value.checkboxConfig.reserve = H[Z]);
9980
10018
  });
9981
10019
  }
9982
10020
  }, setCheckMethod = (H) => {
@@ -10202,13 +10240,22 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
10202
10240
  ]),
10203
10241
  default: withCtx(() => [
10204
10242
  createVNode(te, normalizeProps(guardReactiveProps(unref(checkedGridOptions))), {
10243
+ toolbar_buttons: withCtx(() => [
10244
+ createElementVNode("b", _hoisted_11$g, toDisplayString(unref($T)("已勾选数据")), 1),
10245
+ createVNode(ee, {
10246
+ status: "danger",
10247
+ size: "mini",
10248
+ content: unref($T)("全部删除"),
10249
+ onClick: Q[0] || (Q[0] = (se) => removeAllRowEvent())
10250
+ }, null, 8, ["content"])
10251
+ ]),
10205
10252
  operate: withCtx(({ row: se }) => [
10206
10253
  createVNode(ee, {
10207
10254
  status: "danger",
10208
- content: "删除",
10255
+ content: unref($T)("删除"),
10209
10256
  size: "mini",
10210
10257
  onClick: (ce) => removeRowEvent(se)
10211
- }, null, 8, ["onClick"])
10258
+ }, null, 8, ["content", "onClick"])
10212
10259
  ]),
10213
10260
  _: 1
10214
10261
  }, 16)
@@ -10221,9 +10268,9 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
10221
10268
  createVNode(le, {
10222
10269
  ref: "importModal",
10223
10270
  modelValue: unref(isImport),
10224
- "onUpdate:modelValue": Q[0] || (Q[0] = (se) => isRef(isImport) ? isImport.value = se : isImport = se),
10271
+ "onUpdate:modelValue": Q[1] || (Q[1] = (se) => isRef(isImport) ? isImport.value = se : isImport = se),
10225
10272
  visible: unref(isImport),
10226
- "onUpdate:visible": Q[1] || (Q[1] = (se) => isRef(isImport) ? isImport.value = se : isImport = se),
10273
+ "onUpdate:visible": Q[2] || (Q[2] = (se) => isRef(isImport) ? isImport.value = se : isImport = se),
10227
10274
  zIndex: 1e3,
10228
10275
  title: unref($T)("Excel导入"),
10229
10276
  width: "500px",
@@ -10273,7 +10320,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
10273
10320
  "on-success": importSuccess
10274
10321
  }, {
10275
10322
  default: withCtx(() => [
10276
- createElementVNode("div", _hoisted_11$g, [
10323
+ createElementVNode("div", _hoisted_12$8, [
10277
10324
  createVNode(re, { width: 50 }),
10278
10325
  createElementVNode("p", null, toDisplayString(unref($T)("点击或拖文件到此处上传")), 1)
10279
10326
  ])
@@ -10287,7 +10334,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
10287
10334
  ref: "pictureUploadModal",
10288
10335
  width: "20%",
10289
10336
  modelValue: unref(uploadConfig).show,
10290
- "onUpdate:modelValue": Q[2] || (Q[2] = (se) => unref(uploadConfig).show = se),
10337
+ "onUpdate:modelValue": Q[3] || (Q[3] = (se) => unref(uploadConfig).show = se),
10291
10338
  "z-index": 1e3,
10292
10339
  draggable: "",
10293
10340
  "append-to-body": "",
@@ -10304,7 +10351,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_bd149a4a_lang = "", _withScop
10304
10351
  ]);
10305
10352
  };
10306
10353
  }
10307
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-bd149a4a"]]);
10354
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-12a00471"]]);
10308
10355
  WindowGrid.name = "slw-window-grid";
10309
10356
  WindowGrid.install = (H) => {
10310
10357
  H.component(WindowGrid.name, WindowGrid);
@@ -62414,7 +62461,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
62414
62461
  emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
62415
62462
  setup(H, { emit: Q }) {
62416
62463
  const Z = H, X = defineAsyncComponent(
62417
- () => import("./index-c0486e96.js")
62464
+ () => import("./index-2b01f933.js")
62418
62465
  );
62419
62466
  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);
62420
62467
  re.value = createDesigner();
@@ -62499,7 +62546,7 @@ WindowDesigner.name = "slw-window-designer";
62499
62546
  WindowDesigner.install = (H) => {
62500
62547
  H.component(WindowDesigner.name, WindowDesigner);
62501
62548
  };
62502
- 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 = {
62549
+ 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 = {
62503
62550
  __name: "window-index",
62504
62551
  props: {
62505
62552
  windowId: {
@@ -62770,7 +62817,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_6527a9d5_lang = "", _withSco
62770
62817
  checkboxConfig: {
62771
62818
  trigger: "column",
62772
62819
  range: !0,
62773
- reserve: !0
62820
+ reserve: !1
62774
62821
  },
62775
62822
  printConfig: {
62776
62823
  modes: ["current", "selected", "all"]
@@ -63711,7 +63758,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_6527a9d5_lang = "", _withSco
63711
63758
  ]);
63712
63759
  };
63713
63760
  }
63714
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6527a9d5"]]);
63761
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f5b3abee"]]);
63715
63762
  WindowIndex.name = "slw-window-index";
63716
63763
  WindowIndex.install = (H) => {
63717
63764
  H.component(WindowIndex.name, WindowIndex);
@@ -147423,7 +147470,7 @@ function reConsole() {
147423
147470
  }
147424
147471
  }
147425
147472
  console.info(
147426
- `%cSLW %cVer 0.9.69%c
147473
+ `%cSLW %cVer 0.9.71%c
147427
147474
  %c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
147428
147475
  %c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
147429
147476
  "color:#409EFF;font-size: 22px;font-weight:bolder;text-shadow: 2px 2px 4px #84c1ff;",
@@ -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-23d72455.js";
2
+ import { _ as x, d as S, a as L, u as N } from "./index-2712e53d.js";
3
3
  import "vue-router";
4
4
  const I = {
5
5
  computed: {},
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as m } from "./index-23d72455.js";
1
+ import { i as m } from "./index-2712e53d.js";
2
2
  import "vue";
3
3
  import "vue-router";
4
4
  export {