slw 1.0.0-beta.5 → 1.0.0-beta.5.1

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-c2265d7c.js";
2
+ import { _ as x, d as S, a as L, u as N } from "./index-5d505e74.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 = (Q) => {
8526
8526
  Q.component(PictureUpload.name, PictureUpload);
8527
8527
  };
8528
- const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScopeId$9 = (Q) => (pushScopeId("data-v-f8c6bf36"), Q = Q(), popScopeId(), Q), _hoisted_1$l2 = {
8528
+ const windowGrid_vue_vue_type_style_index_0_scoped_e62f5f8c_lang = "", _withScopeId$9 = (Q) => (pushScopeId("data-v-e62f5f8c"), Q = Q(), popScopeId(), Q), _hoisted_1$l2 = {
8529
8529
  class: "slw-window-grid-container",
8530
8530
  style: { height: "100%" }
8531
8531
  }, _hoisted_2$kZ = /* @__PURE__ */ _withScopeId$9(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-main-area" }, null, -1)), _hoisted_3$hZ = /* @__PURE__ */ _withScopeId$9(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-active-area" }, null, -1)), _hoisted_4$az = /* @__PURE__ */ _withScopeId$9(() => /* @__PURE__ */ createElementVNode("span", { class: "vxe-table--cell-copy-area" }, null, -1)), _hoisted_5$4Z = [
@@ -8781,7 +8781,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScop
8781
8781
  }
8782
8782
  }, gridData.value.params.parentRegionId && (gridData.value.proxyConfig.autoLoad = !1);
8783
8783
  }, rowClick = (Q) => {
8784
- if (gridData.value.type === "TREE" || gridData.value.type === "TREE_STRUCTURE" || Q.rowIndex !== rowIndex.value ? rowClickCommon(Q.row, Q.rowIndex) : rowIndex.value = Q.rowIndex, gridData.value.rowConfig.keyField == "SYS_WINDOW_REGION_ID" && Q.column.field == "CODE")
8784
+ if (gridData.value.type === "TREE" || gridData.value.type === "TREE_STRUCTURE" || Q.rowIndex !== rowIndex.value ? rowClickCommon(Q.row, Q.rowIndex) : (rowIndex.value = Q.rowIndex, gridData.value.type == "EDIT_GRID" && getCurRegion().setEditRow(Q.row)), gridData.value.rowConfig.keyField == "SYS_WINDOW_REGION_ID" && Q.column.field == "CODE")
8785
8785
  try {
8786
8786
  navigator.clipboard.writeText(Q.row[Q.column.field]), $message.success("已复制区域编码到剪贴板");
8787
8787
  } catch (H) {
@@ -8853,6 +8853,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScop
8853
8853
  border: "inner",
8854
8854
  size: "small",
8855
8855
  columnConfig: {
8856
+ useKey: !0,
8856
8857
  isCurrent: !0,
8857
8858
  isHover: !0,
8858
8859
  resizable: !0
@@ -8931,7 +8932,15 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScop
8931
8932
  isHover: !0
8932
8933
  },
8933
8934
  type: "EDIT_GRID",
8934
- addListener: !0
8935
+ addListener: !0,
8936
+ pagerConfig: {
8937
+ currentPage: 1,
8938
+ pageSize: 10,
8939
+ pageSizes: [5, 10, 15, 20, 50, 100, 200, 500, 1e3],
8940
+ background: !0,
8941
+ enabled: !1,
8942
+ layouts: ["PrevJump", "PrevPage", "Number", "NextPage", "NextJump", "Sizes", "FullJump", "Total"]
8943
+ }
8935
8944
  }
8936
8945
  };
8937
8946
  });
@@ -9143,11 +9152,24 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScop
9143
9152
  height: gridData.value.params.editHeight ? gridData.value.params.editHeight : "",
9144
9153
  tableData: getCanEditData(),
9145
9154
  rowIndex: H
9146
- }, G.params.queryParams !== null && typeof G.params.queryParams < "u" && (G.params.queryParams.unQuery = !0), G.formData._button_id = gridData.value.params.edit_button_id, G._reload = () => reload(), rowDbClick(G);
9155
+ }, G.params.queryParams !== null && typeof G.params.queryParams < "u" && (G.params.queryParams.unQuery = !0), G.formData._button_id = gridData.value.params.edit_button_id, G._reload = (K) => reloadRow(K), rowDbClick(G);
9147
9156
  }, reload = () => {
9148
9157
  var Q;
9149
- (Q = getCurRegion()) == null || Q.commitProxy("reload"), rowIndex.value > 0 && nextTick(() => {
9150
- getCurRegion().scrollToRow(getData()[rowIndex.value]);
9158
+ (Q = getCurRegion()) == null || Q.commitProxy("reload");
9159
+ }, reloadRow = (Q) => {
9160
+ const { formData: H, tableData: X, rowConfig: G } = Q;
9161
+ X.forEach((K) => {
9162
+ if (K[G.keyField] == H[G.keyField]) {
9163
+ getCurRegion().reloadRow(K, H), queryAfterList && queryAfterList.length > 0 && queryAfterList.forEach((Z) => {
9164
+ if (Z && typeof Z == "function")
9165
+ try {
9166
+ Z(X || []);
9167
+ } catch (ee) {
9168
+ console.error(ee, gridData.value.params.windowTitle, "表格查询后方法");
9169
+ }
9170
+ }), rowClickCommon(K, rowIndex.value);
9171
+ return;
9172
+ }
9151
9173
  });
9152
9174
  }, clearGrid = () => {
9153
9175
  for (let Q in queryFormData.value)
@@ -9638,7 +9660,11 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScop
9638
9660
  G.find((te) => te[X.rowConfig.keyField] == ee) && (Z.style["background-color"] = H);
9639
9661
  }
9640
9662
  }, 400);
9641
- }, setRowCellColor = (Q, H, X, G = "#e6f7ff") => {
9663
+ }, setRowCellColor = (Q, H, X, G) => {
9664
+ if (!(G instanceof Object)) {
9665
+ console.error(" style 必须是个对象!");
9666
+ return;
9667
+ }
9642
9668
  let K = getCurRegion();
9643
9669
  Q && (K = getRegion(Q)), setTimeout(() => {
9644
9670
  let Z = K.$el.querySelector(".vxe-table--main-wrapper .vxe-table--body-wrapper table tbody");
@@ -9648,11 +9674,15 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScop
9648
9674
  if (X) {
9649
9675
  for (let te of ee.children)
9650
9676
  if (te.attributes.class.value.includes(X.toUpperCase())) {
9651
- te.style["background-color"] = G;
9677
+ Object.keys(G).forEach((ne) => {
9678
+ te.style.hasOwnProperty(ne) && (te.style[ne] = G[ne]);
9679
+ });
9652
9680
  return;
9653
9681
  }
9654
9682
  } else
9655
- ee.style["background-color"] = G;
9683
+ Object.keys(G).forEach((te) => {
9684
+ ee.style.hasOwnProperty(te) && (ee.style[te] = G[te]);
9685
+ });
9656
9686
  return;
9657
9687
  }
9658
9688
  }
@@ -9853,7 +9883,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScop
9853
9883
  });
9854
9884
  }
9855
9885
  }, setGridSlotsVuePath = async (Q, H) => {
9856
- gridData.value.params.slotsVuePath || (gridData.value.params.slotsVuePath = {}), H == "other_item" ? otherItemComponent.value = (await $components[`${$componentsPath}/${Q}`]()).default : H == "table_top" && (tableTopComponent.value = (await $components[`${$componentsPath}/${Q}`]()).default), (otherItemComponent.value || tableTopComponent.value) && (gridData.value.params.slotsVuePath[H] = Q, await nextTick(), regionMap.value[H + "-" + gridData.value.params.code + "-" + gridData.value.params.preTag] = H == "other_item" ? otherItem.value : tableTop.value, regionMap.value[H + "-" + gridData.value.params.code] = H == "other_item" ? otherItem.value : tableTop.value);
9886
+ gridData.value.params.slotsVuePath || (gridData.value.params.slotsVuePath = {}), H == "other_item" ? otherItemComponent.value = (await $components[`${$componentsPath}/${Q}`]()).default : H == "table_top" && (tableTopComponent.value = (await $components[`${$componentsPath}/${Q}`]()).default), (otherItemComponent.value || tableTopComponent.value) && (gridData.value.params.slotsVuePath[H] = Q, await nextTick(), regionMap.value[H + "-" + gridData.value.params.code + "-" + gridData.value.params.preTag] = H == "other_item" ? otherItem.value : tableTop.value, regionMap.value[H + "-" + gridData.value.params.code] = H == "other_item" ? otherItem.value : tableTop.value, getCurRegion().recalculate(!0));
9857
9887
  };
9858
9888
  return onMounted(async () => {
9859
9889
  gridData.value.addListener && getCurRegion() && addListener(), gridData.value.type === "TREE_STRUCTURE" && (gridData.value.menuConfig = {
@@ -10195,7 +10225,7 @@ const windowGrid_vue_vue_type_style_index_0_scoped_f8c6bf36_lang = "", _withScop
10195
10225
  ]);
10196
10226
  };
10197
10227
  }
10198
- }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-f8c6bf36"]]);
10228
+ }, WindowGrid = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-e62f5f8c"]]);
10199
10229
  WindowGrid.name = "slw-window-grid";
10200
10230
  WindowGrid.install = (Q) => {
10201
10231
  Q.component(WindowGrid.name, WindowGrid);
@@ -59211,7 +59241,7 @@ const windowDesigner_vue_vue_type_style_index_0_scoped_a3ebe962_lang = "", _with
59211
59241
  emits: ["update:type", "update:rootLayout", "update:viewData", "update:rowData"],
59212
59242
  setup(Q, { emit: H }) {
59213
59243
  const X = Q, G = defineAsyncComponent(
59214
- () => import("./index-06dd9601.js")
59244
+ () => import("./index-32468f3d.js")
59215
59245
  );
59216
59246
  let K = useVModel(X, "type", H), Z = useVModel(X, "rootLayout", H), ee = useVModel(X, "viewData", H), te = useVModel(X, "rowData", H), ne = ref(0), oe = ref(null);
59217
59247
  oe.value = createDesigner();
@@ -59296,7 +59326,7 @@ WindowDesigner.name = "slw-window-designer";
59296
59326
  WindowDesigner.install = (Q) => {
59297
59327
  Q.component(WindowDesigner.name, WindowDesigner);
59298
59328
  };
59299
- const windowIndex_vue_vue_type_style_index_0_scoped_d0f1b138_lang = "", _withScopeId$1 = (Q) => (pushScopeId("data-v-d0f1b138"), Q = Q(), popScopeId(), Q), _hoisted_1$kS = { class: "slw-config-window-container" }, _hoisted_2$kR = { class: "child-table-p" }, _sfc_main$2 = {
59329
+ const windowIndex_vue_vue_type_style_index_0_scoped_23c28edc_lang = "", _withScopeId$1 = (Q) => (pushScopeId("data-v-23c28edc"), Q = Q(), popScopeId(), Q), _hoisted_1$kS = { class: "slw-config-window-container" }, _hoisted_2$kR = { class: "child-table-p" }, _sfc_main$2 = {
59300
59330
  __name: "window-index",
59301
59331
  props: {
59302
59332
  windowId: {
@@ -60195,7 +60225,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_d0f1b138_lang = "", _withSco
60195
60225
  ref: xForm,
60196
60226
  key: unref(formConfig).formData[unref(formConfig).rowConfig.keyField],
60197
60227
  onSaveLoadingChange: saveLoadingChange,
60198
- onGridReload: H[2] || (H[2] = () => unref(formConfig)._reload())
60228
+ onGridReload: H[2] || (H[2] = () => unref(formConfig)._reload(unref(formConfig)))
60199
60229
  }, null, 8, ["form-config"])),
60200
60230
  unref(formConfig).params.addChildData && unref(formConfig).childForm ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
60201
60231
  createElementVNode("p", _hoisted_2$kR, toDisplayString(unref($T)("[新增] 关联子表数据")), 1),
@@ -60425,7 +60455,7 @@ const windowIndex_vue_vue_type_style_index_0_scoped_d0f1b138_lang = "", _withSco
60425
60455
  ]);
60426
60456
  };
60427
60457
  }
60428
- }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d0f1b138"]]);
60458
+ }, WindowIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-23c28edc"]]);
60429
60459
  WindowIndex.name = "slw-window-index";
60430
60460
  WindowIndex.install = (Q) => {
60431
60461
  Q.component(WindowIndex.name, WindowIndex);
@@ -165711,7 +165741,7 @@ function reConsole() {
165711
165741
  }
165712
165742
  }
165713
165743
  console.info(
165714
- `%cSLW %cVer 1.0.0-beta.5%c
165744
+ `%cSLW %cVer 1.0.0-beta.5.1%c
165715
165745
  %c指引文档:%chttp://slwdoc.js.sforcecon.com:5900/%c
165716
165746
  %c启光文档:%chttp://docs.js.sforcecon.com:5900/notepad/view/592`,
165717
165747
  "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-c2265d7c.js";
1
+ import { i as m } from "./index-5d505e74.js";
2
2
  import "vue";
3
3
  import "vue-router";
4
4
  export {