@web-utils/form-ui 1.0.0-beta81 → 1.0.0-beta82

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 { t as e } from "./B1MSrc6f.mjs";
2
- import { t } from "./Cb7kjZa-.mjs";
2
+ import { t } from "./SLYmepqR.mjs";
3
3
  import { t as n } from "./mnqSaATq.mjs";
4
4
  import { t as r } from "./tzjUpVIj.mjs";
5
5
  import { n as i } from "./DzCIClcZ.mjs";
@@ -1,6 +1,6 @@
1
1
  import { commonAutoBindProps as e, commonManualBindProps as t } from "../props/common.mjs";
2
2
  import { n, o as r } from "./DzCIClcZ.mjs";
3
- import { n as i, t as a } from "./Dw36QZhr2.mjs";
3
+ import { n as i, t as a } from "./Brbt5iil2.mjs";
4
4
  import { createVNode as o, mergeProps as s, ref as c, useModel as l } from "vue";
5
5
  //#region src/components/table/form-table.ts
6
6
  var u = {
@@ -2,7 +2,7 @@ import { i as e } from "./ClVh1Lek.mjs";
2
2
  import { commonAutoBindProps as t, commonManualBindProps as n } from "../props/common.mjs";
3
3
  import { n as r, o as i } from "./DzCIClcZ.mjs";
4
4
  import { n as a } from "./CrFP0Lhs.mjs";
5
- import { n as o, t as s } from "./BZNDljpR2.mjs";
5
+ import { n as o, t as s } from "./BizQp-6k2.mjs";
6
6
  import { computed as c, createVNode as l, getCurrentInstance as u, mergeProps as d, useModel as f, useTemplateRef as p } from "vue";
7
7
  import { isArray as m, isString as h, trace as g, warning as _ } from "@web-utils/core";
8
8
  import { useEventBus as v } from "@web-utils/vue/hooks/useEventBus";
@@ -31,26 +31,26 @@ var P = /* @__PURE__ */ Object.assign({ name: "TableColumnSettingPanel" }, {
31
31
  },
32
32
  modelModifiers: {}
33
33
  }),
34
- emits: ["update:modelValue"],
35
- setup(e, { expose: t }) {
36
- let n = A(e, "modelValue"), r = D({}), i = D({}), a = D({}), o = D({}), s = (e, t, n) => {
37
- n === "hide" ? r[t.prop] = e : n === "fixed" ? i[t.prop] = e : n === "filterable" ? a[t.prop] = e : n === "sortable" && (o[t.prop] = e);
34
+ emits: /* @__PURE__ */ C(["update:settings"], ["update:modelValue"]),
35
+ setup(e, { expose: t, emit: n }) {
36
+ let r = A(e, "modelValue"), i = n, a = D({
37
+ hideProps: {},
38
+ fixedProps: {},
39
+ filterableProps: {},
40
+ sortableProps: {}
41
+ }), o = (e, t, n) => {
42
+ n === "hide" ? a.hideProps[t.prop] = e : n === "fixed" ? a.fixedProps[t.prop] = e : n === "filterable" ? a.filterableProps[t.prop] = e : n === "sortable" && (a.sortableProps[t.prop] = e), i("update:settings", a);
38
43
  };
39
- return t({
40
- hideProps: r,
41
- fixedProps: i,
42
- filterableProps: a,
43
- sortableProps: o
44
- }), (t, r) => {
45
- let i = h, a = d, o = m, c = f;
44
+ return t({ settings: a }), (t, n) => {
45
+ let i = h, a = d, s = m, c = f;
46
46
  return T(), v(c, {
47
- modelValue: n.value,
48
- "onUpdate:modelValue": r[0] || (r[0] = (e) => n.value = e),
47
+ modelValue: r.value,
48
+ "onUpdate:modelValue": n[0] || (n[0] = (e) => r.value = e),
49
49
  class: "table-column-filter",
50
50
  title: "表格设置",
51
51
  "append-to-body": ""
52
52
  }, {
53
- default: N(() => [b(o, {
53
+ default: N(() => [b(s, {
54
54
  data: e.columns,
55
55
  border: ""
56
56
  }, {
@@ -63,21 +63,21 @@ var P = /* @__PURE__ */ Object.assign({ name: "TableColumnSettingPanel" }, {
63
63
  label: "隐藏",
64
64
  align: "center"
65
65
  }, {
66
- default: N(({ row: e }) => [b(a, { onChange: (t) => s(t, e, "hide") }, null, 8, ["onChange"])]),
66
+ default: N(({ row: e }) => [b(a, { onChange: (t) => o(t, e, "hide") }, null, 8, ["onChange"])]),
67
67
  _: 1
68
68
  }),
69
69
  b(i, {
70
70
  label: "冻结",
71
71
  align: "center"
72
72
  }, {
73
- default: N(({ row: e }) => [b(a, { onChange: (t) => s(t, e, "fixed") }, null, 8, ["onChange"])]),
73
+ default: N(({ row: e }) => [b(a, { onChange: (t) => o(t, e, "fixed") }, null, 8, ["onChange"])]),
74
74
  _: 1
75
75
  }),
76
76
  b(i, {
77
77
  label: "过滤",
78
78
  align: "center"
79
79
  }, {
80
- default: N(({ row: e }) => [b(a, { onChange: (t) => s(t, e, "filterable") }, null, 8, ["onChange"])]),
80
+ default: N(({ row: e }) => [b(a, { onChange: (t) => o(t, e, "filterable") }, null, 8, ["onChange"])]),
81
81
  _: 1
82
82
  }),
83
83
  b(i, {
@@ -87,7 +87,7 @@ var P = /* @__PURE__ */ Object.assign({ name: "TableColumnSettingPanel" }, {
87
87
  default: N(({ row: e }) => [b(a, {
88
88
  title: e.allowSort ? null : "该列不支持排序!",
89
89
  disabled: !e.allowSort,
90
- onChange: (t) => s(t, e, "sortable")
90
+ onChange: (t) => o(t, e, "sortable")
91
91
  }, null, 8, [
92
92
  "title",
93
93
  "disabled",
@@ -350,7 +350,12 @@ var R = {
350
350
  props: { ...I },
351
351
  setup(e, { emit: l, attrs: u, slots: d, expose: f }) {
352
352
  E(a, e.rowDbClick);
353
- let v = j("table"), x = j("settingPanel"), S = O(R.empty), C = O([]), T = O(null), D = O(!1), k = O([]), A = O({
353
+ let v = j("table"), x = O({
354
+ hideProps: {},
355
+ fixedProps: {},
356
+ filterableProps: {},
357
+ sortableProps: {}
358
+ }), S = O(R.empty), C = O([]), T = O(null), D = O(!1), k = O([]), A = O({
354
359
  total: 0,
355
360
  page: 1,
356
361
  limit: e.pageSize,
@@ -502,7 +507,7 @@ var R = {
502
507
  prop: o,
503
508
  allowSort: a !== !1
504
509
  };
505
- i && (l.headerSlot = i.header, l.defaultSlot = i.default, l.expandSlot = i.expand, l.iconSlot = i["filter-icon"]), t.push(l);
510
+ i && (l.headerSlot = i.header, l.defaultSlot = i.default, l.expandSlot = i.expand, l.iconSlot = i["filter-icon"]), l.hide = x.value.hideProps[o], l.filterable = x.value.filterableProps[o], l.sortable = x.value.sortableProps[o] === !0, l.fixed = s || x.value.fixedProps[o], t.push(l);
506
511
  }
507
512
  } else if (e.columns) for (let n = 0; n < e.columns.length; n++) {
508
513
  let { prop: r, sortable: i, fixed: a, ...o } = e.columns[n], s = {
@@ -510,7 +515,7 @@ var R = {
510
515
  prop: r,
511
516
  allowSort: i !== !1
512
517
  };
513
- x.value && (s.hide = x.value.hideProps[r], s.filterable = x.value.filterableProps[r], s.sortable = x.value.sortableProps[r] === !0, s.fixed = a || x.value.fixedProps[r]), t.push(s);
518
+ s.hide = x.value.hideProps[r], s.filterable = x.value.filterableProps[r], s.sortable = x.value.sortableProps[r] === !0, s.fixed = a || x.value.fixedProps[r], t.push(s);
514
519
  }
515
520
  return t;
516
521
  });
@@ -648,7 +653,8 @@ var R = {
648
653
  layout: "total, sizes, prev, pager, next, jumper"
649
654
  }, null),
650
655
  b(P, {
651
- ref: "settingPanel",
656
+ settings: x.value,
657
+ "onUpdate:settings": (e) => x.value = e,
652
658
  modelValue: D.value,
653
659
  "onUpdate:modelValue": (e) => D.value = e,
654
660
  columns: $.value
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "../chunks/B1MSrc6f.mjs";
2
2
  import { t } from "../chunks/V-Js6hNd.mjs";
3
- import { t as n } from "../chunks/Cb7kjZa-.mjs";
3
+ import { t as n } from "../chunks/SLYmepqR.mjs";
4
4
  import { ElButton as r, ElMessage as i } from "element-plus/es";
5
5
  import "element-plus/es/components/base/style/css";
6
6
  import { createBlock as a, createTextVNode as o, createVNode as s, openBlock as c, renderSlot as l, withCtx as u } from "vue";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CUaecRXx.mjs";
1
+ import { t as e } from "../chunks/BrSqLOi5.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BNe8qLhE2.mjs";
1
+ import { t as e } from "../chunks/DQFvmw1w2.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/CvlbrpKg2.mjs";
1
+ import { t as e } from "../chunks/P7ZAhYlk2.mjs";
2
2
  export { e as default };
package/index.mjs CHANGED
@@ -24,7 +24,7 @@ import y from "./data-progress/index.mjs";
24
24
  import { t as b } from "./chunks/Ctx93AFS.mjs";
25
25
  import { t as x } from "./chunks/V-Js6hNd.mjs";
26
26
  import S from "./element-resize-observer/index.mjs";
27
- import { t as C } from "./chunks/Cb7kjZa-.mjs";
27
+ import { t as C } from "./chunks/SLYmepqR.mjs";
28
28
  import { t as w } from "./chunks/mnqSaATq.mjs";
29
29
  import { t as T } from "./chunks/tzjUpVIj.mjs";
30
30
  import { t as E } from "./chunks/6eDDQWcr.mjs";
@@ -42,7 +42,7 @@ import { t as L } from "./chunks/CHmZyvFr.mjs";
42
42
  import { t as R } from "./chunks/SInS7QSL.mjs";
43
43
  import z from "./flex-scroll-area/index.mjs";
44
44
  import B from "./flex-scroller/index.mjs";
45
- import { t as V } from "./chunks/CUaecRXx.mjs";
45
+ import { t as V } from "./chunks/BrSqLOi5.mjs";
46
46
  import H from "./highlight-j-s/index.mjs";
47
47
  import U from "./flow-viewer/index.mjs";
48
48
  import W from "./form-advice/index.mjs";
@@ -77,10 +77,10 @@ import { t as Se } from "./chunks/DK4GzYEk2.mjs";
77
77
  import { t as Ce } from "./chunks/mm9J6HEd2.mjs";
78
78
  import we from "./table-column-def/index.mjs";
79
79
  import { t as Te } from "./chunks/DNaB9zOb2.mjs";
80
- import { t as Ee } from "./chunks/Dw36QZhr2.mjs";
81
- import { t as De } from "./chunks/BNe8qLhE2.mjs";
82
- import { t as Oe } from "./chunks/BZNDljpR2.mjs";
83
- import { t as ke } from "./chunks/CvlbrpKg2.mjs";
80
+ import { t as Ee } from "./chunks/Brbt5iil2.mjs";
81
+ import { t as De } from "./chunks/DQFvmw1w2.mjs";
82
+ import { t as Oe } from "./chunks/BizQp-6k2.mjs";
83
+ import { t as ke } from "./chunks/P7ZAhYlk2.mjs";
84
84
  import { t as Ae } from "./chunks/DIMxdcyy2.mjs";
85
85
  import { t as je } from "./chunks/B7vR8-_Y2.mjs";
86
86
  import { t as Me } from "./chunks/FZqu01np2.mjs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@web-utils/form-ui",
3
3
  "description": "form-ui",
4
- "version": "1.0.0-beta81",
4
+ "version": "1.0.0-beta82",
5
5
  "author": "Simple",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/Cb7kjZa-.mjs";
1
+ import { t as e } from "../chunks/SLYmepqR.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/Dw36QZhr2.mjs";
1
+ import { t as e } from "../chunks/Brbt5iil2.mjs";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../chunks/BZNDljpR2.mjs";
1
+ import { t as e } from "../chunks/BizQp-6k2.mjs";
2
2
  export { e as default };
@@ -1,6 +1,6 @@
1
1
  import { f as e, i as t } from "../chunks/ClVh1Lek.mjs";
2
2
  import { t as n } from "../chunks/B1MSrc6f.mjs";
3
- import { t as r } from "../chunks/Cb7kjZa-.mjs";
3
+ import { t as r } from "../chunks/SLYmepqR.mjs";
4
4
  import { processButtons as i, reloadTable as a } from "../api/index.mjs";
5
5
  import { cellClickHandlerContextKey as o, tableViewContextKey as s } from "../constants/index.mjs";
6
6
  import { t as c } from "../chunks/mnqSaATq.mjs";