slw 0.9.70 → 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_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_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_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: {
@@ -8599,7 +8599,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
8599
8599
  let G = H.findIndex(
8600
8600
  (K) => K[Q] == removeCheckedRow.value[Q]
8601
8601
  );
8602
- G >= 0 && H.splice(G, 1);
8602
+ G >= 0 && H.splice(G, 1), removeCheckedRow.value = null;
8603
8603
  }
8604
8604
  let Z = [
8605
8605
  {
@@ -8630,22 +8630,24 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
8630
8630
  rowId: Q,
8631
8631
  columns: Z,
8632
8632
  toolbarConfig: {
8633
- buttons: [
8634
- {
8635
- name: $T("已勾选数据"),
8636
- buttonRender: { name: "toolBarTitle" }
8637
- }
8638
- ],
8633
+ slots: {
8634
+ buttons: "toolbar_buttons"
8635
+ },
8639
8636
  custom: !0
8640
8637
  },
8641
8638
  data: X
8642
8639
  }, !0;
8643
- }
8640
+ } else
8641
+ (H == null ? void 0 : H.length) == 0 && removeCheckedRow.value && (checkedGridOptions.value.data = []);
8644
8642
  return !1;
8645
8643
  });
8646
8644
  let removeCheckedRow = ref(null);
8647
8645
  const removeRowEvent = (H) => {
8648
8646
  removeCheckedRow.value = H, getCurRegion().setCheckboxRow(H, !1);
8647
+ }, removeAllRowEvent = () => {
8648
+ getCheckedData().forEach((Q) => {
8649
+ removeRowEvent(Q);
8650
+ });
8649
8651
  };
8650
8652
  let checkedGridShowCols = ref(null);
8651
8653
  const setCheckedGridShowCols = (H) => {
@@ -8811,57 +8813,60 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
8811
8813
  ne
8812
8814
  );
8813
8815
  return oe.then((le) => {
8816
+ var ce, de;
8814
8817
  let se = {};
8815
8818
  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,
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,
8824
8827
  ...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;
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;
8829
8832
  else {
8830
- let ke = _e.name.match(/[\u4e00-\u9fa5]/g);
8831
- if (ke) {
8832
- let be = Math.ceil(ke.length / 2);
8833
- $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;
8834
8837
  } else {
8835
- let be = Math.ceil(_e.name.length / 6);
8836
- $e += be;
8838
+ let Ee = Math.ceil(we.name.length / 6);
8839
+ xe += Ee;
8837
8840
  }
8838
8841
  }
8839
8842
  }
8840
- }), $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);
8841
8844
  });
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);
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);
8848
8851
  return;
8849
8852
  }
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);
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);
8855
8858
  }
8856
- !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
+ });
8857
8862
  }
8858
- rowClickCommon(se, rowIndex.value), queryAfterList && queryAfterList.length > 0 && queryAfterList.forEach((ce) => {
8859
- var de;
8860
- 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")
8861
8866
  try {
8862
- ce(((de = le == null ? void 0 : le.data) == null ? void 0 : de.data) || []);
8863
- } catch (he) {
8864
- console.error(he);
8867
+ he(((ue = le == null ? void 0 : le.data) == null ? void 0 : ue.data) || []);
8868
+ } catch (fe) {
8869
+ console.error(fe);
8865
8870
  }
8866
8871
  });
8867
8872
  }), typeof await oe > "u" ? {
@@ -9112,7 +9117,10 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
9112
9117
  $vxeReadFile({ types: ["xml"] }).then(({ file: ne }) => {
9113
9118
  const re = new FormData();
9114
9119
  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;
9120
+ oe.status === 200 && ($message.success(
9121
+ $T(oe.data.msg || $T("导入失败!")),
9122
+ "info"
9123
+ ), oe.data.result && reload()), H.loading = !1;
9116
9124
  });
9117
9125
  }).catch((ne) => {
9118
9126
  console.error(ne), H.loading = !1;
@@ -9122,7 +9130,10 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
9122
9130
  }
9123
9131
  else if (te === "EXPORT" && gridData.value.params.code == "Window") {
9124
9132
  if (!Q || Q.length === 0) {
9125
- $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;
9126
9137
  return;
9127
9138
  }
9128
9139
  Q.length > 0 && (Q = Q[0]), await axios.download("/windowButton/exportWindow", {
@@ -9168,7 +9179,11 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
9168
9179
  }
9169
9180
  );
9170
9181
  else if (H.windowId) {
9171
- 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)
9172
9187
  return;
9173
9188
  showPreView(H.windowId, H.name, Q, {
9174
9189
  width: H.openWidth,
@@ -9999,7 +10014,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
9999
10014
  if (H instanceof Object) {
10000
10015
  let Q = ["stripe", "border", "padding", "round", "size"];
10001
10016
  Object.keys(H).forEach((Z) => {
10002
- 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]);
10003
10018
  });
10004
10019
  }
10005
10020
  }, setCheckMethod = (H) => {
@@ -10225,13 +10240,22 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10225
10240
  ]),
10226
10241
  default: withCtx(() => [
10227
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
+ ]),
10228
10252
  operate: withCtx(({ row: se }) => [
10229
10253
  createVNode(ee, {
10230
10254
  status: "danger",
10231
- content: "删除",
10255
+ content: unref($T)("删除"),
10232
10256
  size: "mini",
10233
10257
  onClick: (ce) => removeRowEvent(se)
10234
- }, null, 8, ["onClick"])
10258
+ }, null, 8, ["content", "onClick"])
10235
10259
  ]),
10236
10260
  _: 1
10237
10261
  }, 16)
@@ -10244,9 +10268,9 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10244
10268
  createVNode(le, {
10245
10269
  ref: "importModal",
10246
10270
  modelValue: unref(isImport),
10247
- "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),
10248
10272
  visible: unref(isImport),
10249
- "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),
10250
10274
  zIndex: 1e3,
10251
10275
  title: unref($T)("Excel导入"),
10252
10276
  width: "500px",
@@ -10296,7 +10320,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10296
10320
  "on-success": importSuccess
10297
10321
  }, {
10298
10322
  default: withCtx(() => [
10299
- createElementVNode("div", _hoisted_11$g, [
10323
+ createElementVNode("div", _hoisted_12$8, [
10300
10324
  createVNode(re, { width: 50 }),
10301
10325
  createElementVNode("p", null, toDisplayString(unref($T)("点击或拖文件到此处上传")), 1)
10302
10326
  ])
@@ -10310,7 +10334,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10310
10334
  ref: "pictureUploadModal",
10311
10335
  width: "20%",
10312
10336
  modelValue: unref(uploadConfig).show,
10313
- "onUpdate:modelValue": Q[2] || (Q[2] = (se) => unref(uploadConfig).show = se),
10337
+ "onUpdate:modelValue": Q[3] || (Q[3] = (se) => unref(uploadConfig).show = se),
10314
10338
  "z-index": 1e3,
10315
10339
  draggable: "",
10316
10340
  "append-to-body": "",
@@ -10327,7 +10351,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3e4e596d_lang = "", _withScop
10327
10351
  ]);
10328
10352
  };
10329
10353
  }
10330
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-3e4e596d"]]);
10354
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-12a00471"]]);
10331
10355
  WindowGrid.name = "slw-window-grid";
10332
10356
  WindowGrid.install = (H) => {
10333
10357
  H.component(WindowGrid.name, WindowGrid);
@@ -62437,7 +62461,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
62437
62461
  emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
62438
62462
  setup(H, { emit: Q }) {
62439
62463
  const Z = H, X = defineAsyncComponent(
62440
- () => import("./index-ff3f7764.js")
62464
+ () => import("./index-2b01f933.js")
62441
62465
  );
62442
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);
62443
62467
  re.value = createDesigner();
@@ -62522,7 +62546,7 @@ WindowDesigner.name = "slw-window-designer";
62522
62546
  WindowDesigner.install = (H) => {
62523
62547
  H.component(WindowDesigner.name, WindowDesigner);
62524
62548
  };
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 = {
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 = {
62526
62550
  __name: "window-index",
62527
62551
  props: {
62528
62552
  windowId: {
@@ -62793,7 +62817,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_6527a9d5_lang = "", _withSco
62793
62817
  checkboxConfig: {
62794
62818
  trigger: "column",
62795
62819
  range: !0,
62796
- reserve: !0
62820
+ reserve: !1
62797
62821
  },
62798
62822
  printConfig: {
62799
62823
  modes: ["current", "selected", "all"]
@@ -63734,7 +63758,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_6527a9d5_lang = "", _withSco
63734
63758
  ]);
63735
63759
  };
63736
63760
  }
63737
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-6527a9d5"]]);
63761
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f5b3abee"]]);
63738
63762
  WindowIndex.name = "slw-window-index";
63739
63763
  WindowIndex.install = (H) => {
63740
63764
  H.component(WindowIndex.name, WindowIndex);
@@ -147446,7 +147470,7 @@ function reConsole() {
147446
147470
  }
147447
147471
  }
147448
147472
  console.info(
147449
- `%cSLW %cVer 0.9.70%c
147473
+ `%cSLW %cVer 0.9.71%c
147450
147474
  %c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
147451
147475
  %c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
147452
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-4fbe1fbb.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-4fbe1fbb.js";
1
+ import { i as m } from "./index-2712e53d.js";
2
2
  import "vue";
3
3
  import "vue-router";
4
4
  export {