@kp-ui/lowcode 2.15.0-alpha.14 → 2.15.0-alpha.16

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.
Files changed (21) hide show
  1. package/package.json +1 -1
  2. package/src/components/FormRender/index.vue.js +5 -79
  3. package/src/components/FormRender/index.vue2.js +85 -2
  4. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue.js +3 -3
  5. package/src/components/form-designer/form-widget/container-widget/data-table-widget.vue2.js +36 -30
  6. package/src/components/form-designer/form-widget/container-widget/useTableWidget.js +58 -54
  7. package/src/components/form-designer/form-widget/field-widget/hooks/useSelect.js +16 -16
  8. package/src/components/form-designer/form-widget/field-widget/useField.js +117 -108
  9. package/src/components/form-designer/index.vue.js +60 -62
  10. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue.js +3 -3
  11. package/src/components/form-designer/setting-panel/property-editor/container-data-table/data-table-tableColumns-editor.vue2.js +49 -47
  12. package/src/components/form-designer/toolbar-panel/PreviewDialog.vue.js +1 -1
  13. package/src/components/form-designer/widget-panel/advanced/data-table.js +7 -19
  14. package/src/components/form-render/container-items/data-table-widget.vue.js +1 -1
  15. package/src/components/form-render/container-items/data-table-widget.vue2.js +57 -49
  16. package/src/components/form-render/dynamic-dialog.vue.js +91 -94
  17. package/src/components/public/CustomerModal/CustomerModal.vue2.js +16 -16
  18. package/src/hooks/useDataHttp.js +15 -12
  19. package/src/lang/zh-CN.js +4 -3
  20. package/stats.html +1 -1
  21. package/styles/style.css +1 -1
@@ -1,9 +1,9 @@
1
- import { defineComponent as N, getCurrentInstance as T, useAttrs as V, ref as f, computed as c, onMounted as M, createBlock as R, openBlock as B, unref as i, withCtx as n, createVNode as s, mergeProps as D, nextTick as L } from "vue";
1
+ import { defineComponent as N, getCurrentInstance as R, useAttrs as T, ref as f, computed as c, onMounted as $, createBlock as M, openBlock as B, unref as r, withCtx as n, createVNode as s, mergeProps as D, nextTick as L } from "vue";
2
2
  import { useLowcode as P } from "../../../hooks/useLowcode.js";
3
3
  import U from "../../form-render/SubmitButtonRender.vue.js";
4
4
  import A from "../../FormRender/index.vue.js";
5
- import { TpfConfigProvider as I, TpfModal as J } from "tmgc2-share";
6
- import { Skeleton as S } from "ant-design-vue";
5
+ import { TpfConfigProvider as F, TpfModal as I } from "tmgc2-share";
6
+ import { Skeleton as J } from "ant-design-vue";
7
7
  import "../../../utils/i18n.js";
8
8
  const H = /* @__PURE__ */ N({
9
9
  __name: "CustomerModal",
@@ -15,14 +15,14 @@ const H = /* @__PURE__ */ N({
15
15
  setup(v, {
16
16
  expose: g
17
17
  }) {
18
- const u = T(), r = V() || {}, l = f(!1), e = v, C = c(() => {
18
+ const u = R(), i = T() || {}, l = f(!1), e = v, C = c(() => {
19
19
  var t, o;
20
20
  return {
21
21
  $router: u.proxy.$router,
22
- _id: ((o = (t = r == null ? void 0 : r.row) == null ? void 0 : t.record) == null ? void 0 : o._id) || null,
22
+ _id: ((o = (t = i == null ? void 0 : i.row) == null ? void 0 : t.record) == null ? void 0 : o._id) || null,
23
23
  type: e.type,
24
24
  instance: u,
25
- ...r
25
+ ...i
26
26
  };
27
27
  }), d = f(!1), {
28
28
  vfdRef: p,
@@ -33,19 +33,19 @@ const H = /* @__PURE__ */ N({
33
33
  formCode: e.formCode,
34
34
  type: e.type
35
35
  }), m = f(null), _ = c(() => e.title ? e.title : e.type === "add" ? "新增" : e.type === "edit" ? "编辑" : e.type === "view" ? "查看" : "新增"), w = async () => {
36
- l.value = !0, await L(), await x([]), console.log("attrs", r);
36
+ l.value = !0, await L(), await x([]), console.log("attrs", i);
37
37
  }, k = (t) => {
38
38
  m.value = t;
39
- }, $ = (t) => {
39
+ }, V = (t) => {
40
40
  d.value = t;
41
41
  };
42
- return M(() => {
42
+ return $(() => {
43
43
  w();
44
44
  }), g({
45
- setDisabled: $,
45
+ setDisabled: V,
46
46
  setleftText: k
47
- }), (t, o) => (B(), R(i(I), null, {
48
- default: n(() => [s(i(J), D({
47
+ }), (t, o) => (B(), M(r(F), null, {
48
+ default: n(() => [s(r(I), D({
49
49
  visible: l.value,
50
50
  "onUpdate:visible": o[1] || (o[1] = (a) => l.value = a)
51
51
  }, t.$attrs, {
@@ -56,12 +56,12 @@ const H = /* @__PURE__ */ N({
56
56
  disabled: d.value,
57
57
  dialogVisible: l.value,
58
58
  "onUpdate:dialogVisible": o[0] || (o[0] = (a) => l.value = a),
59
- options: i(b),
60
- ctx: i(p)
59
+ options: r(b),
60
+ ctx: r(p)
61
61
  }, null, 8, ["disabled", "dialogVisible", "options", "ctx"])]),
62
- default: n(() => [s(i(S), {
62
+ default: n(() => [s(r(J), {
63
63
  active: "",
64
- loading: i(y)
64
+ loading: r(y)
65
65
  }, {
66
66
  default: n(() => [s(A, {
67
67
  vfCtx: C.value,
@@ -1,24 +1,27 @@
1
- import { ref as u } from "vue";
2
- import { useI18n as d } from "../utils/i18n.js";
3
- import { useExecFunction as l } from "tmgc2-share";
4
- function p({ props: e }) {
5
- const { http: n, dataHandlerCode: r, dataReqHandlerCode: a } = e.field.options, { i18nt: i } = d(), { execHttpFunction: c } = l(), o = u({
6
- ...e.widget.options.pagination,
1
+ import { ref as l } from "vue";
2
+ import { useI18n as s } from "../utils/i18n.js";
3
+ import { useExecFunction as d } from "tmgc2-share";
4
+ function w({ props: o }) {
5
+ const { http: n, dataHandlerCode: a, dataReqHandlerCode: r } = o.field.options, { i18nt: i } = s(), { execHttpFunction: c } = d(), e = l({
6
+ ...o.widget.options.pagination,
7
+ onShowSizeChange: (t, u) => {
8
+ o.field.options.pagination.pageSize = u, o.field.options.pagination.current = 1, e.value.current = 1, console.log(e.value);
9
+ },
7
10
  showTotal: (t) => i("designer.showTotal", { total: t })
8
11
  });
9
12
  return {
10
- pagintion: o,
13
+ pagintion: e,
11
14
  setPagination: (t) => {
12
- t.current !== void 0 && (o.value.current = t.current, e.field.options.pagination.current = t.current), t.pageSize !== void 0 && (o.value.pageSize = t.pageSize, e.field.options.pagination.current = t.pageSize), t.total !== void 0 && (o.value.total = t.total, e.field.options.pagination.current = t.total);
15
+ t.current !== void 0 && (e.value.current = t.current, o.field.options.pagination.current = t.current), t.total !== void 0 && (e.value.total = t.total, o.field.options.pagination.total = t.total);
13
16
  },
14
- getPagination: () => o.value,
17
+ getPagination: () => e.value,
15
18
  loadataSource: async () => {
16
19
  try {
17
20
  return await c(
18
21
  {
19
22
  http: n,
20
- dataHandlerCode: r,
21
- dataReqHandlerCode: a
23
+ dataHandlerCode: a,
24
+ dataReqHandlerCode: r
22
25
  },
23
26
  {}
24
27
  );
@@ -29,5 +32,5 @@ function p({ props: e }) {
29
32
  };
30
33
  }
31
34
  export {
32
- p as useDataHttp
35
+ w as useDataHttp
33
36
  };
package/src/lang/zh-CN.js CHANGED
@@ -203,7 +203,9 @@ const e = {
203
203
  showSizeChanger: "是否展示 pageSize 切换器",
204
204
  position: "分页器位置",
205
205
  hasRowSelection: "启用左侧勾选设置",
206
- fixedLeft: "固定在左边",
206
+ fixedLeft: "",
207
+ fixedRight: "右",
208
+ fixedNull: "中",
207
209
  preserveSelectedRowKeys: "当数据被删除时仍然保留选项的 key",
208
210
  customColumnWidth: "自定义列表选择框宽度",
209
211
  customColumnTitle: "自定义列表选择框标题",
@@ -303,8 +305,6 @@ const e = {
303
305
  addColumn: "增加栅格",
304
306
  responsive: "响应式布局",
305
307
  customRender: "自定义渲染",
306
- fixed: "固定位置",
307
- fixedRight: "固定在右边",
308
308
  labelBefore: "标签前面",
309
309
  labelAfter: "标签后面",
310
310
  tabPaneSetting: "选项卡设置",
@@ -418,6 +418,7 @@ const e = {
418
418
  columnWidth: "列宽(px)",
419
419
  visibleColumn: "是否显示",
420
420
  sortableColumn: "是否排序",
421
+ fixed: "固定位置",
421
422
  fixedColumn: "固定方式",
422
423
  autoHeight: "自动高度",
423
424
  alignTypeOfColumn: "对齐方式",