slw 0.5.984 → 0.5.986

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
@@ -8511,17 +8511,17 @@ PictureUpload.name = "slw-picture-upload";
8511
8511
  PictureUpload.install = (Q) => {
8512
8512
  Q.component(PictureUpload.name, PictureUpload);
8513
8513
  };
8514
- const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-3dfea0dd"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
8514
+ const windowGrid_vue_vue_type_style_index_0_scoped_782e24fb_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-782e24fb"), 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$2(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-main-area" }, null, -1)), _hoisted_3$hT = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-active-area" }, null, -1)), _hoisted_4$au = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4U = [
8518
8518
  _hoisted_2$kS,
8519
8519
  _hoisted_3$hT,
8520
8520
  _hoisted_4$au
8521
- ], _hoisted_6$1_ = {
8521
+ ], _hoisted_6$1_ = ["onClick"], _hoisted_7$12 = {
8522
8522
  key: 0,
8523
8523
  style: { verticalAlign: "middle" }
8524
- }, _hoisted_7$12 = { style: { padding: "20px 0" } }, _sfc_main$6 = {
8524
+ }, _hoisted_8$F = { style: { padding: "20px 0" } }, _sfc_main$6 = {
8525
8525
  __name: "window-grid",
8526
8526
  props: {
8527
8527
  gridData: {
@@ -9678,7 +9678,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9678
9678
  openType: ""
9679
9679
  };
9680
9680
  }, headerProxyQuery = () => {
9681
- evalEvent(gridData.value.params.formEvents.dataInit);
9681
+ evalEvent(gridData.value.params.formEvents.regionInit);
9682
9682
  }, setCheckboxRowColor = (Q, H = "#e6f7ff") => {
9683
9683
  let G = getCurRegion();
9684
9684
  Q && (G = getRegion(Q));
@@ -9691,9 +9691,15 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9691
9691
  X.find((te) => te[G.rowId] == ee) && (K.style["background-color"] = H);
9692
9692
  }
9693
9693
  }, 500);
9694
+ }, onScanIconClick = (Q, H) => {
9695
+ const G = gridData.value.formConfig.items.filter((X) => X.field == H)[0];
9696
+ G.itemRender.props.clickFunction && evalEvent(G.itemRender.props.clickFunction, Q, H);
9697
+ }, setFormValue = (Q, H) => {
9698
+ let G = gridData.value.formConfig.items.filter((X) => X.field == Q)[0];
9699
+ G && (G.itemRender.defaultValue = H);
9694
9700
  };
9695
- onMounted(() => {
9696
- gridData.value.addListener && getCurRegion() && addListener(), gridData.value.toolbarConfig.buttons.forEach((Q) => {
9701
+ return onMounted(() => {
9702
+ gridData.value.addListener && getCurRegion() && addListener(), evalEvent(gridData.value.params.formEvents.dataInit), gridData.value.toolbarConfig.buttons.forEach((Q) => {
9697
9703
  typeof Q.type < "u" && Q.type.toLowerCase() === "edit" && (editBtn.value = Q), typeof Q.type < "u" && Q.type.toLowerCase() === "export" && (exportButton.value = Q), Q.hasOwnProperty("buttonRender") || (Q.buttonRender = {
9698
9704
  name: "ElButton",
9699
9705
  props: {
@@ -9762,22 +9768,18 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9762
9768
  search(Q);
9763
9769
  }, curRegion.value.getCheckedData = () => getCheckedData(), curRegion.value.getSelectRecord = () => getSelectRecord(), curRegion.value.setChecked = (Q) => {
9764
9770
  setChecked(Q);
9765
- }, curRegion.value.getParentRegion = () => getParentRegion(), curRegion.value.exportData = () => exportData(), curRegion.value.removeRow = (Q) => removeRow(), curRegion.value.clearGrid = () => clearGrid(), curRegion.value.setCheckboxRowColor = () => setCheckboxRowColor();
9771
+ }, 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();
9766
9772
  }), onUnmounted(() => {
9767
9773
  document.removeEventListener("mousedown", tableOutDestroyAreaBox), document.removeEventListener("mouseup", tbodymouseup), document.removeEventListener("paste", ctrlVPaste), document.removeEventListener("copy", ctrlCopyAndCut), document.removeEventListener("cut", ctrlCopyAndCut);
9768
- });
9769
- const setValue = (Q, H) => {
9770
- gridData.value.formConfig.formData[Q.toUpperCase()] = H;
9771
- };
9772
- return __expose({ gridReload, reload }), (Q, H) => {
9773
- const G = resolveComponent("el-icon"), X = resolveComponent("el-tooltip"), Z = resolveComponent("el-button"), K = resolveComponent("vxe-grid"), ee = resolveComponent("cloud-upload"), te = resolveComponent("el-upload"), ne = resolveComponent("download-outline"), re = resolveComponent("el-dialog");
9774
+ }), __expose({ gridReload, reload }), (Q, H) => {
9775
+ const G = resolveComponent("el-input"), X = resolveComponent("el-icon"), Z = resolveComponent("el-tooltip"), K = resolveComponent("el-button"), ee = resolveComponent("vxe-grid"), te = resolveComponent("cloud-upload"), ne = resolveComponent("el-upload"), re = resolveComponent("download-outline"), oe = resolveComponent("el-dialog");
9774
9776
  return openBlock(), createElementBlock("div", _hoisted_1$kW, [
9775
9777
  createElementVNode("div", {
9776
9778
  class: "vxe-table--cell-area",
9777
9779
  ref_key: "cellarea",
9778
9780
  ref: cellarea
9779
9781
  }, _hoisted_5$4U, 512),
9780
- createVNode(K, mergeProps$1({
9782
+ createVNode(ee, mergeProps$1({
9781
9783
  ref_key: "curRegion",
9782
9784
  ref: curRegion,
9783
9785
  class: { "cell--area": unref(gridData).addListener },
@@ -9793,36 +9795,51 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9793
9795
  onCheckboxAll: headerCheckboxChange,
9794
9796
  onProxyQuery: headerProxyQuery
9795
9797
  }), {
9796
- operation: withCtx(({ row: oe, rowIndex: ae }) => [
9797
- (openBlock(!0), createElementBlock(Fragment, null, renderList(showButtons(ae), (le) => (openBlock(), createBlock(Z, {
9798
- key: le._button_id,
9799
- iconComponent: le.iconComponent,
9798
+ scan_item: withCtx(({ data: ae, property: le }) => [
9799
+ createVNode(G, {
9800
+ modelValue: ae[le],
9801
+ "onUpdate:modelValue": (se) => ae[le] = se
9802
+ }, {
9803
+ suffix: withCtx(() => [
9804
+ createElementVNode("i", {
9805
+ class: "iconfont icon-scan1",
9806
+ onClick: (se) => onScanIconClick(ae[le], le),
9807
+ style: { cursor: "pointer" }
9808
+ }, null, 8, _hoisted_6$1_)
9809
+ ]),
9810
+ _: 2
9811
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
9812
+ ]),
9813
+ operation: withCtx(({ row: ae, rowIndex: le }) => [
9814
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(showButtons(le), (se) => (openBlock(), createBlock(K, {
9815
+ key: se._button_id,
9816
+ iconComponent: se.iconComponent,
9800
9817
  "auto-insert-space": "",
9801
9818
  size: "small",
9802
- style: normalizeStyle({ ...le.css, marginLeft: "0px", padding: "5px" }),
9819
+ style: normalizeStyle({ ...se.css, marginLeft: "0px", padding: "5px" }),
9803
9820
  type: "primary",
9804
9821
  text: "",
9805
- onClick: (se) => toolBarButtonClick(le, oe, ae)
9822
+ onClick: (ce) => toolBarButtonClick(se, ae, le)
9806
9823
  }, createSlots({
9807
9824
  default: withCtx(() => [
9808
- !le.iconComponent || typeof le.iconComponent > "u" ? (openBlock(), createElementBlock("span", _hoisted_6$1_, toDisplayString(unref($T)(le.name)), 1)) : createCommentVNode("", !0)
9825
+ !se.iconComponent || typeof se.iconComponent > "u" ? (openBlock(), createElementBlock("span", _hoisted_7$12, toDisplayString(unref($T)(se.name)), 1)) : createCommentVNode("", !0)
9809
9826
  ]),
9810
9827
  _: 2
9811
9828
  }, [
9812
- le.iconComponent ? {
9829
+ se.iconComponent ? {
9813
9830
  name: "icon",
9814
9831
  fn: withCtx(() => [
9815
- createVNode(X, {
9816
- content: unref($T)(le.name),
9832
+ createVNode(Z, {
9833
+ content: unref($T)(se.name),
9817
9834
  placement: "top"
9818
9835
  }, {
9819
9836
  default: withCtx(() => [
9820
- createVNode(G, {
9837
+ createVNode(X, {
9821
9838
  size: "15",
9822
9839
  style: { verticalAlign: "middle" }
9823
9840
  }, {
9824
9841
  default: withCtx(() => [
9825
- (openBlock(), createBlock(resolveDynamicComponent(le.iconComponent)))
9842
+ (openBlock(), createBlock(resolveDynamicComponent(se.iconComponent)))
9826
9843
  ]),
9827
9844
  _: 2
9828
9845
  }, 1024)
@@ -9836,12 +9853,12 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9836
9853
  ]),
9837
9854
  _: 1
9838
9855
  }, 16, ["class"]),
9839
- createVNode(re, {
9856
+ createVNode(oe, {
9840
9857
  ref: "importModal",
9841
9858
  modelValue: unref(isImport),
9842
- "onUpdate:modelValue": H[0] || (H[0] = (oe) => isRef(isImport) ? isImport.value = oe : isImport = oe),
9859
+ "onUpdate:modelValue": H[0] || (H[0] = (ae) => isRef(isImport) ? isImport.value = ae : isImport = ae),
9843
9860
  visible: unref(isImport),
9844
- "onUpdate:visible": H[1] || (H[1] = (oe) => isRef(isImport) ? isImport.value = oe : isImport = oe),
9861
+ "onUpdate:visible": H[1] || (H[1] = (ae) => isRef(isImport) ? isImport.value = ae : isImport = ae),
9845
9862
  zIndex: 1e3,
9846
9863
  title: unref($T)("Excel导入"),
9847
9864
  width: "500px",
@@ -9857,19 +9874,19 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9857
9874
  "show-footer": ""
9858
9875
  }, {
9859
9876
  footer: withCtx(() => [
9860
- createVNode(Z, {
9877
+ createVNode(K, {
9861
9878
  "auto-insert-space": !0,
9862
9879
  type: "primary",
9863
9880
  onClick: downTemplate
9864
9881
  }, {
9865
9882
  default: withCtx(() => [
9866
9883
  createTextVNode(toDisplayString(unref($T)("模板")) + " ", 1),
9867
- createVNode(G, {
9884
+ createVNode(X, {
9868
9885
  size: "15",
9869
9886
  style: { verticalAlign: "middle" }
9870
9887
  }, {
9871
9888
  default: withCtx(() => [
9872
- createVNode(ne)
9889
+ createVNode(re)
9873
9890
  ]),
9874
9891
  _: 1
9875
9892
  })
@@ -9878,7 +9895,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9878
9895
  })
9879
9896
  ]),
9880
9897
  default: withCtx(() => [
9881
- createVNode(te, {
9898
+ createVNode(ne, {
9882
9899
  ref: "uploadExcel",
9883
9900
  type: "drag",
9884
9901
  drag: "",
@@ -9890,8 +9907,8 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9890
9907
  "on-success": importSuccess
9891
9908
  }, {
9892
9909
  default: withCtx(() => [
9893
- createElementVNode("div", _hoisted_7$12, [
9894
- createVNode(ee, { width: 50 }),
9910
+ createElementVNode("div", _hoisted_8$F, [
9911
+ createVNode(te, { width: 50 }),
9895
9912
  createElementVNode("p", null, toDisplayString(unref($T)("点击或拖文件到此处上传")), 1)
9896
9913
  ])
9897
9914
  ]),
@@ -9900,11 +9917,11 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9900
9917
  ]),
9901
9918
  _: 1
9902
9919
  }, 8, ["modelValue", "visible", "title"]),
9903
- createVNode(re, {
9920
+ createVNode(oe, {
9904
9921
  ref: "pictureUploadModal",
9905
9922
  width: "20%",
9906
9923
  modelValue: unref(uploadConfig).show,
9907
- "onUpdate:modelValue": H[2] || (H[2] = (oe) => unref(uploadConfig).show = oe),
9924
+ "onUpdate:modelValue": H[2] || (H[2] = (ae) => unref(uploadConfig).show = ae),
9908
9925
  "z-index": 1e3,
9909
9926
  draggable: "",
9910
9927
  "append-to-body": "",
@@ -9921,7 +9938,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_3dfea0dd_lang = "", _withScop
9921
9938
  ]);
9922
9939
  };
9923
9940
  }
9924
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-3dfea0dd"]]);
9941
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-782e24fb"]]);
9925
9942
  WindowGrid.name = "slw-window-grid";
9926
9943
  WindowGrid.install = (Q) => {
9927
9944
  Q.component(WindowGrid.name, WindowGrid);
@@ -38333,7 +38350,7 @@ _sfc_main$2.name = "slw-preview-modal";
38333
38350
  _sfc_main$2.install = (Q) => {
38334
38351
  Q.component(_sfc_main$2.name, _sfc_main$2);
38335
38352
  };
38336
- const windowIndex_vue_vue_type_style_index_0_scoped_efded3ce_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-efded3ce"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
38353
+ const windowIndex_vue_vue_type_style_index_0_scoped_adf36f9a_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-adf36f9a"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
38337
38354
  __name: "window-index",
38338
38355
  props: {
38339
38356
  windowId: {
@@ -38667,7 +38684,8 @@ const windowIndex_vue_vue_type_style_index_0_scoped_efded3ce_lang = "", _withSco
38667
38684
  filterable: !0,
38668
38685
  newLine: K[se].newLine,
38669
38686
  autocomplete: "off",
38670
- style: { width: "100%" }
38687
+ style: { width: "100%" },
38688
+ clickFunction: K[se].clickFunction
38671
38689
  },
38672
38690
  defaultValue: ce,
38673
38691
  // 取消获取本地存储localStorage内的表单值
@@ -38680,7 +38698,10 @@ const windowIndex_vue_vue_type_style_index_0_scoped_efded3ce_lang = "", _withSco
38680
38698
  attrs: { id: "query-" + K[se].columnName }
38681
38699
  },
38682
38700
  visible: !K[se].hide,
38683
- folding: se > 2
38701
+ folding: se > 2,
38702
+ events: {},
38703
+ canScan: K[se].canScan || !1
38704
+ // 支持扫码
38684
38705
  };
38685
38706
  switch (K[se].dataType) {
38686
38707
  case "LIST":
@@ -38740,7 +38761,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_efded3ce_lang = "", _withSco
38740
38761
  ue.itemRender.name = "ElInput", ue.itemRender.props.type = "textarea";
38741
38762
  break;
38742
38763
  }
38743
- ue.itemRender.props.clearable = !0, X.formConfig.items.push(ue), ae = ae && K[se].hide;
38764
+ ue.itemRender.props.clearable = !0, X.formConfig.items.push(ue), ae = ae && K[se].hide, ue.canScan && (ue.slots = { default: "scan_item" });
38744
38765
  }
38745
38766
  X.formConfig.items.push({
38746
38767
  align: "right",
@@ -39434,7 +39455,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_efded3ce_lang = "", _withSco
39434
39455
  ]);
39435
39456
  };
39436
39457
  }
39437
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-efded3ce"]]);
39458
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-adf36f9a"]]);
39438
39459
  WindowIndex.name = "slw-window-index";
39439
39460
  WindowIndex.install = (Q) => {
39440
39461
  Q.component(WindowIndex.name, WindowIndex);
@@ -122198,7 +122219,7 @@ function reConsole() {
122198
122219
  }
122199
122220
  }
122200
122221
  console.info(
122201
- "%cSLW %cVer 0.5.983",
122222
+ "%cSLW %cVer 0.5.986",
122202
122223
  "color:#409EFF;font-size: 22px;font-weight:bolder",
122203
122224
  "color:#999;font-size: 12px"
122204
122225
  );