slw 0.8.3 → 0.8.41

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,7 +8511,7 @@ 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_fee74758_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-fee74758"), Q = Q(), popScopeId(), Q), _hoisted_1$kW = {
8514
+ const windowGrid_vue_vue_type_style_index_0_scoped_f426c078_lang = "", _withScopeId$3 = (Q) => (pushScopeId("data-v-f426c078"), 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$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 = [
@@ -9791,6 +9791,12 @@ const windowGrid_vue_vue_type_style_index_0_scoped_fee74758_lang = "", _withScop
9791
9791
  )[0];
9792
9792
  G.fixed = H;
9793
9793
  }
9794
+ }, getQueryForm = (Q) => {
9795
+ let H = getCurRegion();
9796
+ if (Q && (H = getRegion(Q)), H) {
9797
+ const { form: X } = H.getProxyInfo();
9798
+ return X;
9799
+ }
9794
9800
  };
9795
9801
  return onMounted(async () => {
9796
9802
  gridData.value.addListener && getCurRegion() && addListener(), gridData.value.type === "TREE_STRUCTURE" && (gridData.value.menuConfig = {
@@ -9862,7 +9868,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_fee74758_lang = "", _withScop
9862
9868
  search(Q);
9863
9869
  }, curRegion.value.getCheckedData = () => getCheckedData(), curRegion.value.getSelectRecord = () => getSelectRecord(), curRegion.value.setChecked = (Q) => {
9864
9870
  setChecked(Q);
9865
- }, 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(), curRegion.value.setRowCellColor = () => setRowCellColor(), curRegion.value.setFormSelectOption = () => setFormSelectOption(), curRegion.value.getFormSelectOption = () => getFormSelectOption(), curRegion.value.setColumnFixed = () => setColumnFixed();
9871
+ }, 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(), curRegion.value.setRowCellColor = () => setRowCellColor(), curRegion.value.setFormSelectOption = () => setFormSelectOption(), curRegion.value.getFormSelectOption = () => getFormSelectOption(), curRegion.value.setColumnFixed = () => setColumnFixed(), curRegion.value.getQueryForm = () => getQueryForm();
9866
9872
  }), onUnmounted(() => {
9867
9873
  document.removeEventListener("mousedown", tableOutDestroyAreaBox), document.removeEventListener("mouseup", tbodymouseup), document.removeEventListener("paste", ctrlVPaste), document.removeEventListener("copy", ctrlCopyAndCut), document.removeEventListener("cut", ctrlCopyAndCut);
9868
9874
  }), __expose({ gridReload, reload }), (Q, H) => {
@@ -10032,7 +10038,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_fee74758_lang = "", _withScop
10032
10038
  ]);
10033
10039
  };
10034
10040
  }
10035
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-fee74758"]]);
10041
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f426c078"]]);
10036
10042
  WindowGrid.name = "slw-window-grid";
10037
10043
  WindowGrid.install = (Q) => {
10038
10044
  Q.component(WindowGrid.name, WindowGrid);
@@ -38869,7 +38875,7 @@ var js = js$1.exports;
38869
38875
  })(Q);
38870
38876
  })(js$1);
38871
38877
  var jsExports = js$1.exports;
38872
- const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_34e379b0_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-34e379b0"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
38878
+ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_vue_vue_type_style_index_0_scoped_cabeb728_lang = "", _withScopeId$2 = (Q) => (pushScopeId("data-v-cabeb728"), Q = Q(), popScopeId(), Q), _hoisted_1$kV = { class: "slw-window-form" }, _hoisted_2$kR = {
38873
38879
  key: 0,
38874
38880
  style: { "text-align": "left", "font-size": "18px", "line-height": "30px", "font-weight": "bold", padding: "5px 30px 0 15px" }
38875
38881
  }, _hoisted_3$hS = ["onClick"], _sfc_main$5 = {
@@ -38888,7 +38894,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
38888
38894
  const props = __props, componentMapping = inject("$componentMapping"), axios = inject("$axios"), hiprint = inject("$hiprint"), serverPrint = inject("$serverPrint"), showPreView = inject("$showPreView"), showPreViewClose = inject("$showPreViewClose"), preViewCloseCallback = inject("$preViewCloseCallback"), $Modal = inject("$modal"), $qs = inject("$qs"), $vxeMessage = inject("$vxeMessage"), base64Encode = inject("$base64Encode"), base64Decode = inject("$base64Decode"), $vxeConfirm = inject("$vxeConfirm"), $T = inject("$t"), openModal = inject("$openModal"), closeModal = inject("$closeModal"), focusInput = inject("$focusInput"), evalDefaultValue = inject("$evalDefaultValue");
38889
38895
  let regionMap = inject("$regionMap");
38890
38896
  const ElMessageBox = inject("$ElMessageBox"), addOnActivatedFun = inject("$addOnActivatedFun"), debounce = inject("$debounce");
38891
- let formConfig = useVModel(props, "formConfig", emits), gridData = formConfig.value, formData = ref({}), fieldColumnMap = ref({}), formDataClone = ref({}), formLoading = ref(!1), queryTimeout = ref(null);
38897
+ let formConfig = useVModel(props, "formConfig", emits), gridData = ref(formConfig.value), formData = ref({}), fieldColumnMap = ref({}), formDataClone = ref({}), formLoading = ref(!1), queryTimeout = ref(null);
38892
38898
  const $modal = $Modal;
38893
38899
  let uploadConfig = ref({
38894
38900
  show: !1,
@@ -38999,6 +39005,9 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
38999
39005
  var H;
39000
39006
  if (formConfig.value.openType === "view" && ((H = Q.itemRender) == null ? void 0 : H.name) !== "ElInput")
39001
39007
  return "item-readonly";
39008
+ }), computeItemTitle = computed(() => (Q) => {
39009
+ const H = Q.match(/([^()]+)\(/);
39010
+ return $T(H ? H[1] : Q);
39002
39011
  });
39003
39012
  onMounted(async () => {
39004
39013
  var H, X, G;
@@ -39546,7 +39555,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39546
39555
  ne.colType !== "showInGrid" ? (openBlock(), createBlock(G, {
39547
39556
  key: 0,
39548
39557
  field: ne.field,
39549
- title: unref($T)(ne.title),
39558
+ title: computeItemTitle.value(ne.title),
39550
39559
  "title-overflow": "tooltip",
39551
39560
  span: computeSpan.value(ne),
39552
39561
  "item-render": ne.itemRender,
@@ -39684,7 +39693,7 @@ const index$n = /* @__PURE__ */ getDefaultExportFromCjs(jsExports), windowForm_v
39684
39693
  ]);
39685
39694
  };
39686
39695
  }
39687
- }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-34e379b0"]]);
39696
+ }, WindowForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-cabeb728"]]);
39688
39697
  WindowForm.name = "slw-window-form";
39689
39698
  WindowForm.install = (Q) => {
39690
39699
  Q.component(WindowForm.name, WindowForm);
@@ -40317,7 +40326,7 @@ _sfc_main$2.name = "slw-preview-modal";
40317
40326
  _sfc_main$2.install = (Q) => {
40318
40327
  Q.component(_sfc_main$2.name, _sfc_main$2);
40319
40328
  };
40320
- const windowIndex_vue_vue_type_style_index_0_scoped_7185bce2_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-7185bce2"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
40329
+ const windowIndex_vue_vue_type_style_index_0_scoped_4b6e1351_lang = "", _withScopeId = (Q) => (pushScopeId("data-v-4b6e1351"), Q = Q(), popScopeId(), Q), _hoisted_1$kR = { class: "slw-config-window-container" }, _hoisted_2$kQ = { class: "child-table-p" }, _sfc_main$1 = {
40321
40330
  __name: "window-index",
40322
40331
  props: {
40323
40332
  windowId: {
@@ -40416,7 +40425,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_7185bce2_lang = "", _withSco
40416
40425
  }
40417
40426
  regionIdRegionMap.value[ne.id] = ne, layoutIdRegionMap.value[ne.layoutId] = ne;
40418
40427
  }), G.layouts.map((ne) => {
40419
- parentLayoutIdLayoutMap.value[ne.parentId] ? parentLayoutIdLayoutMap.value[ne.parentId].push(ne) : parentLayoutIdLayoutMap.value[ne.parentId] = [ne];
40428
+ !isNaN(ne.height) || ne.height.indexOf("px") > 0 ? ne.height = parseFloat(ne.height) : (ne.height.indexOf("%") > 0 || ne.height.indexOf("vh") > 0) && (ne.height = parseFloat(ne.height) / 100 * K), parentLayoutIdLayoutMap.value[ne.parentId] ? parentLayoutIdLayoutMap.value[ne.parentId].push(ne) : parentLayoutIdLayoutMap.value[ne.parentId] = [ne];
40420
40429
  });
40421
40430
  let ee = 0.5;
40422
40431
  G.layout === "V" ? G.layouts.length > 1 && G.layouts[0].height ? (ee = Math.round(G.layouts[0].height / K * 100) / 100, ee < 0.2 && (ee = 0.2)) : G.layouts.length === 1 && (ee = 1) : ee = G.layouts.length > 0 && G.layouts[0].width && G.layouts[0].width / 12 < 1 ? G.layouts[0].width / 12 : 0.5;
@@ -41445,7 +41454,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_7185bce2_lang = "", _withSco
41445
41454
  ]);
41446
41455
  };
41447
41456
  }
41448
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-7185bce2"]]);
41457
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4b6e1351"]]);
41449
41458
  WindowIndex.name = "slw-window-index";
41450
41459
  WindowIndex.install = (Q) => {
41451
41460
  Q.component(WindowIndex.name, WindowIndex);
@@ -124244,7 +124253,7 @@ function reConsole() {
124244
124253
  }
124245
124254
  }
124246
124255
  console.info(
124247
- "%cSLW %cVer 0.8.3",
124256
+ "%cSLW %cVer 0.8.41",
124248
124257
  "color:#409EFF;font-size: 22px;font-weight:bolder",
124249
124258
  "color:#999;font-size: 12px"
124250
124259
  );