@gsc-basic/components 1.0.2 → 1.0.3

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 (116) hide show
  1. package/dist/es/index.js +43 -29
  2. package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +15 -15
  3. package/dist/es/node_modules/@codemirror/commands/dist/index.js +5 -5
  4. package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +3 -3
  5. package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +8 -8
  6. package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +1 -1
  7. package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +1 -1
  8. package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +6 -6
  9. package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +3 -3
  10. package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +1 -1
  11. package/dist/es/node_modules/@codemirror/language/dist/index.js +1 -1
  12. package/dist/es/node_modules/@codemirror/lint/dist/index.js +7 -7
  13. package/dist/es/node_modules/@codemirror/search/dist/index.js +9 -9
  14. package/dist/es/node_modules/@codemirror/view/dist/index.js +7 -7
  15. package/dist/es/node_modules/@lezer/lr/dist/index.js +4 -2
  16. package/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +146 -142
  17. package/dist/es/node_modules/@tanstack/vue-table/build/lib/index.js +7 -7
  18. package/dist/es/node_modules/@vueuse/core/dist/index.js +1 -1
  19. package/dist/es/node_modules/codemirror/dist/index.js +3 -3
  20. package/dist/es/src/Button/index.js +6 -0
  21. package/dist/es/src/Button/src/Button.css +1 -0
  22. package/dist/es/src/Button/src/Button.vue.js +41 -0
  23. package/dist/es/src/Button/src/Button2.css +1 -0
  24. package/dist/es/src/CodeEditor/src/index.css +1 -1
  25. package/dist/es/src/CodeEditor/src/index.vue.js +54 -51
  26. package/dist/es/src/CodeEditor/src/index2.css +1 -1
  27. package/dist/es/src/ConfigProvider/index.js +1 -2
  28. package/dist/es/src/ConfigProvider/src/useGlobalConfig.js +9 -9
  29. package/dist/es/src/Form/index.js +6 -0
  30. package/dist/es/src/Form/src/Form.css +1 -0
  31. package/dist/es/src/Form/src/Form.vue.js +208 -0
  32. package/dist/es/src/Form/src/styles/form.css +1 -0
  33. package/dist/es/src/Grid/src/Grid.css +1 -1
  34. package/dist/es/src/Grid/src/Grid.vue.js +77 -83
  35. package/dist/es/src/Grid/src/components/ActionBar.css +1 -1
  36. package/dist/es/src/Grid/src/components/ActionBar.vue.js +43 -36
  37. package/dist/es/src/Grid/src/components/CellEditor.css +1 -1
  38. package/dist/es/src/Grid/src/components/CellEditor.vue.js +80 -69
  39. package/dist/es/src/Grid/src/components/CellEditor2.css +1 -1
  40. package/dist/es/src/Grid/src/components/ColumnFilter.css +1 -1
  41. package/dist/es/src/Grid/src/components/ColumnFilter.vue.js +45 -34
  42. package/dist/es/src/Grid/src/components/ColumnSettings.css +1 -1
  43. package/dist/es/src/Grid/src/components/ColumnSettings.vue.js +72 -49
  44. package/dist/es/src/Grid/src/components/DataTable.css +1 -1
  45. package/dist/es/src/Grid/src/components/DataTable.vue.js +251 -228
  46. package/dist/es/src/Grid/src/components/Pager.css +1 -1
  47. package/dist/es/src/Grid/src/components/Pager.vue.js +40 -31
  48. package/dist/es/src/Grid/src/components/QueryBar.css +1 -1
  49. package/dist/es/src/Grid/src/components/QueryBar.vue.js +119 -147
  50. package/dist/es/src/Grid/src/composables/useGridTable.js +45 -44
  51. package/dist/es/src/Grid/src/styles/table.css +1 -0
  52. package/dist/es/src/Overlay/index.js +61 -0
  53. package/dist/es/src/Overlay/src/Message.css +1 -0
  54. package/dist/es/src/Overlay/src/Message.vue.js +36 -0
  55. package/dist/es/src/Overlay/src/Message2.css +1 -0
  56. package/dist/es/src/Overlay/src/Modal.css +1 -0
  57. package/dist/es/src/Overlay/src/Modal.vue.js +67 -0
  58. package/dist/es/src/Overlay/src/Modal2.css +1 -0
  59. package/dist/es/src/Overlay/src/Notice.css +1 -0
  60. package/dist/es/src/Overlay/src/Notice.vue.js +37 -0
  61. package/dist/es/src/Overlay/src/Notice2.css +1 -0
  62. package/dist/es/src/ScaleScreen/src/index.vue.js +2 -2
  63. package/dist/es/src/VideoBackground/src/index.vue.js +8 -8
  64. package/dist/es/src/index.js +39 -25
  65. package/dist/es/src/styles/tokens.css +1 -1
  66. package/dist/lib/index.js +1 -1
  67. package/dist/lib/node_modules/@lezer/lr/dist/index.js +1 -1
  68. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FormApi.js +1 -1
  69. package/dist/lib/src/Button/index.js +1 -0
  70. package/dist/lib/src/Button/src/Button.css +1 -0
  71. package/dist/lib/src/Button/src/Button.vue.js +1 -0
  72. package/dist/lib/src/Button/src/Button2.css +1 -0
  73. package/dist/lib/src/CodeEditor/src/index.css +1 -1
  74. package/dist/lib/src/CodeEditor/src/index.vue.js +1 -1
  75. package/dist/lib/src/CodeEditor/src/index2.css +1 -1
  76. package/dist/lib/src/ConfigProvider/index.js +1 -1
  77. package/dist/lib/src/Form/index.js +1 -0
  78. package/dist/lib/src/Form/src/Form.css +1 -0
  79. package/dist/lib/src/Form/src/Form.vue.js +1 -0
  80. package/dist/lib/src/Form/src/styles/form.css +1 -0
  81. package/dist/lib/src/Grid/src/Grid.css +1 -1
  82. package/dist/lib/src/Grid/src/Grid.vue.js +1 -1
  83. package/dist/lib/src/Grid/src/components/ActionBar.css +1 -1
  84. package/dist/lib/src/Grid/src/components/ActionBar.vue.js +1 -1
  85. package/dist/lib/src/Grid/src/components/CellEditor.css +1 -1
  86. package/dist/lib/src/Grid/src/components/CellEditor.vue.js +1 -1
  87. package/dist/lib/src/Grid/src/components/CellEditor2.css +1 -1
  88. package/dist/lib/src/Grid/src/components/ColumnFilter.css +1 -1
  89. package/dist/lib/src/Grid/src/components/ColumnFilter.vue.js +1 -1
  90. package/dist/lib/src/Grid/src/components/ColumnSettings.css +1 -1
  91. package/dist/lib/src/Grid/src/components/ColumnSettings.vue.js +1 -1
  92. package/dist/lib/src/Grid/src/components/DataTable.css +1 -1
  93. package/dist/lib/src/Grid/src/components/DataTable.vue.js +1 -1
  94. package/dist/lib/src/Grid/src/components/Pager.css +1 -1
  95. package/dist/lib/src/Grid/src/components/Pager.vue.js +1 -1
  96. package/dist/lib/src/Grid/src/components/QueryBar.css +1 -1
  97. package/dist/lib/src/Grid/src/components/QueryBar.vue.js +1 -1
  98. package/dist/lib/src/Grid/src/composables/useGridTable.js +1 -1
  99. package/dist/lib/src/Grid/src/styles/table.css +1 -0
  100. package/dist/lib/src/Overlay/index.js +1 -0
  101. package/dist/lib/src/Overlay/src/Message.css +1 -0
  102. package/dist/lib/src/Overlay/src/Message.vue.js +1 -0
  103. package/dist/lib/src/Overlay/src/Message2.css +1 -0
  104. package/dist/lib/src/Overlay/src/Modal.css +1 -0
  105. package/dist/lib/src/Overlay/src/Modal.vue.js +1 -0
  106. package/dist/lib/src/Overlay/src/Modal2.css +1 -0
  107. package/dist/lib/src/Overlay/src/Notice.css +1 -0
  108. package/dist/lib/src/Overlay/src/Notice.vue.js +1 -0
  109. package/dist/lib/src/Overlay/src/Notice2.css +1 -0
  110. package/dist/lib/src/index.js +1 -1
  111. package/dist/lib/src/styles/tokens.css +1 -1
  112. package/package.json +9 -9
  113. package/dist/es/src/Grid/src/styles/antd.css +0 -1
  114. package/dist/es/src/Grid/src/utils/exportCsv.js +0 -15
  115. package/dist/lib/src/Grid/src/styles/antd.css +0 -1
  116. package/dist/lib/src/Grid/src/utils/exportCsv.js +0 -3
@@ -1 +1 @@
1
- [data-v-8a0548c7],[data-v-8a0548c7]:before,[data-v-8a0548c7]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-8a0548c7]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.text-sm[data-v-8a0548c7]{font-size:.875rem;line-height:1.25rem}
1
+ [data-v-729972d8],[data-v-729972d8]:before,[data-v-729972d8]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-729972d8]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.text-sm[data-v-729972d8]{font-size:.875rem;line-height:1.25rem}
@@ -1,8 +1,9 @@
1
- import { computed as p, createElementBlock as n, openBlock as l, createElementVNode as s, toDisplayString as i, unref as u, Fragment as c, renderList as m } from "vue";
1
+ import { computed as v, openBlock as n, createElementBlock as l, createElementVNode as o, toDisplayString as r, unref as i, Fragment as f, renderList as z, createVNode as p, withCtx as c } from "vue";
2
2
  import { useLocale as b } from "../../../hooks/useLocale.js";
3
+ import { GscButton as m } from "../../../Button/index.js";
3
4
  import './Pager.css';/* empty css */
4
- import v from "../../../../_virtual/_plugin-vue_export-helper.js";
5
- const f = { class: "gsc-pager" }, y = { class: "text-sm gsc-text-secondary" }, z = ["value"], S = ["value"], N = ["disabled"], $ = { class: "gsc-pager-jumper text-sm" }, k = ["value"], h = { class: "gsc-text-secondary" }, x = ["disabled"], C = {
5
+ import y from "../../../../_virtual/_plugin-vue_export-helper.js";
6
+ const S = { class: "gsc-pager" }, N = { class: "text-sm gsc-text-secondary" }, $ = ["value"], k = ["value"], x = { class: "gsc-pager-jumper text-sm" }, C = ["value"], h = { class: "gsc-text-secondary" }, B = {
6
7
  __name: "Pager",
7
8
  props: {
8
9
  page: { type: Number, default: 1 },
@@ -12,44 +13,52 @@ const f = { class: "gsc-pager" }, y = { class: "text-sm gsc-text-secondary" }, z
12
13
  },
13
14
  emits: ["update:page", "update:pageSize"],
14
15
  setup(t) {
15
- const g = t, { t: r } = b(), d = p(() => Math.max(1, Math.ceil((g.total || 0) / (g.pageSize || 1))));
16
- return (o, e) => (l(), n("div", f, [
17
- s("div", y, i(u(r)("gsc.grid.pager.total", { total: t.total })), 1),
18
- s("select", {
16
+ const d = t, { t: u } = b(), g = v(() => Math.max(1, Math.ceil((d.total || 0) / (d.pageSize || 1))));
17
+ return (s, e) => (n(), l("div", S, [
18
+ o("div", N, r(i(u)("gsc.grid.pager.total", { total: t.total })), 1),
19
+ o("select", {
19
20
  class: "gsc-control gsc-control-auto",
20
21
  value: t.pageSize,
21
- onChange: e[0] || (e[0] = (a) => o.$emit("update:pageSize", Number(a.target.value)))
22
+ onChange: e[0] || (e[0] = (a) => s.$emit("update:pageSize", Number(a.target.value)))
22
23
  }, [
23
- (l(!0), n(c, null, m(t.pageSizeOptions, (a) => (l(), n("option", {
24
+ (n(!0), l(f, null, z(t.pageSizeOptions, (a) => (n(), l("option", {
24
25
  key: a,
25
26
  value: a
26
- }, i(u(r)("gsc.grid.pager.pageSize", { size: a })), 9, S))), 128))
27
- ], 40, z),
28
- s("button", {
29
- class: "gsc-btn gsc-btn-default gsc-btn-icon",
27
+ }, r(i(u)("gsc.grid.pager.pageSize", { size: a })), 9, k))), 128))
28
+ ], 40, $),
29
+ p(i(m), {
30
+ variant: "default",
31
+ size: "icon",
30
32
  disabled: t.page <= 1,
31
- onClick: e[1] || (e[1] = (a) => o.$emit("update:page", t.page - 1))
32
- }, [...e[4] || (e[4] = [
33
- s("span", { "aria-hidden": "true" }, "‹", -1)
34
- ])], 8, N),
35
- s("div", $, [
36
- s("input", {
33
+ onClick: e[1] || (e[1] = (a) => s.$emit("update:page", t.page - 1))
34
+ }, {
35
+ default: c(() => [...e[4] || (e[4] = [
36
+ o("span", { "aria-hidden": "true" }, "‹", -1)
37
+ ])]),
38
+ _: 1
39
+ }, 8, ["disabled"]),
40
+ o("div", x, [
41
+ o("input", {
37
42
  class: "gsc-control gsc-control-page gsc-control-center",
38
43
  value: t.page,
39
- onChange: e[2] || (e[2] = (a) => o.$emit("update:page", Number(a.target.value || 1)))
40
- }, null, 40, k),
41
- s("span", h, "/ " + i(d.value), 1)
44
+ onChange: e[2] || (e[2] = (a) => s.$emit("update:page", Number(a.target.value || 1)))
45
+ }, null, 40, C),
46
+ o("span", h, "/ " + r(g.value), 1)
42
47
  ]),
43
- s("button", {
44
- class: "gsc-btn gsc-btn-default gsc-btn-icon",
45
- disabled: t.page >= d.value,
46
- onClick: e[3] || (e[3] = (a) => o.$emit("update:page", t.page + 1))
47
- }, [...e[5] || (e[5] = [
48
- s("span", { "aria-hidden": "true" }, "›", -1)
49
- ])], 8, x)
48
+ p(i(m), {
49
+ variant: "default",
50
+ size: "icon",
51
+ disabled: t.page >= g.value,
52
+ onClick: e[3] || (e[3] = (a) => s.$emit("update:page", t.page + 1))
53
+ }, {
54
+ default: c(() => [...e[5] || (e[5] = [
55
+ o("span", { "aria-hidden": "true" }, "›", -1)
56
+ ])]),
57
+ _: 1
58
+ }, 8, ["disabled"])
50
59
  ]));
51
60
  }
52
- }, M = /* @__PURE__ */ v(C, [["__scopeId", "data-v-8a0548c7"]]);
61
+ }, V = /* @__PURE__ */ y(B, [["__scopeId", "data-v-729972d8"]]);
53
62
  export {
54
- M as default
63
+ V as default
55
64
  };
@@ -1 +1 @@
1
- [data-v-e3036b77],[data-v-e3036b77]:before,[data-v-e3036b77]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-e3036b77]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.grid-cols-1[data-v-e3036b77]{grid-template-columns:repeat(1,minmax(0,1fr))}@media(min-width:768px){.md\:grid-cols-2[data-v-e3036b77]{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:992px){.lg\:col-span-2[data-v-e3036b77]{grid-column:span 2/span 2}.lg\:col-span-3[data-v-e3036b77]{grid-column:span 3/span 3}.lg\:col-span-4[data-v-e3036b77]{grid-column:span 4/span 4}.lg\:grid-cols-3[data-v-e3036b77]{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:1200px){.xl\:col-span-4[data-v-e3036b77]{grid-column:span 4/span 4}.xl\:grid-cols-4[data-v-e3036b77]{grid-template-columns:repeat(4,minmax(0,1fr))}}
1
+ [data-v-366b3fad],[data-v-366b3fad]:before,[data-v-366b3fad]:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }[data-v-366b3fad]::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.container[data-v-366b3fad]{width:100%}@media(min-width:576px){.container[data-v-366b3fad]{max-width:576px}}@media(min-width:768px){.container[data-v-366b3fad]{max-width:768px}}@media(min-width:992px){.container[data-v-366b3fad]{max-width:992px}}@media(min-width:1200px){.container[data-v-366b3fad]{max-width:1200px}}@media(min-width:1600px){.container[data-v-366b3fad]{max-width:1600px}}@media(min-width:2000px){.container[data-v-366b3fad]{max-width:2000px}}.flex[data-v-366b3fad]{display:flex}.resize[data-v-366b3fad]{resize:both}.items-center[data-v-366b3fad]{align-items:center}.gap-2[data-v-366b3fad]{gap:.5rem}
@@ -1,23 +1,20 @@
1
- import { ref as z, computed as m, watch as D, createElementBlock as i, openBlock as o, createElementVNode as l, renderSlot as O, normalizeClass as k, Fragment as x, renderList as S, toDisplayString as g, createBlock as h, resolveDynamicComponent as _, unref as s, withCtx as b, createCommentVNode as w } from "vue";
2
- import { useForm as Q } from "../../../../node_modules/@tanstack/vue-form/dist/esm/useForm.js";
3
- import { useLocale as A } from "../../../hooks/useLocale.js";
1
+ import { ref as v, computed as s, onMounted as T, onBeforeUnmount as W, openBlock as N, createElementBlock as j, Fragment as I, createVNode as w, unref as r, withCtx as c, createElementVNode as g, normalizeStyle as L, createTextVNode as h, toDisplayString as x, createBlock as $, createCommentVNode as G, renderSlot as Q } from "vue";
2
+ import { useLocale as U } from "../../../hooks/useLocale.js";
3
+ import { GscForm as A } from "../../../Form/index.js";
4
+ import { GscButton as k } from "../../../Button/index.js";
4
5
  import './QueryBar.css';/* empty css */
5
- import G from "../../../../_virtual/_plugin-vue_export-helper.js";
6
- const H = { class: "gsc-card gsc-card-pad" }, J = ["title"], M = { class: "gsc-form-control" }, P = ["value", "onChange"], T = { value: "" }, U = ["value"], W = {
7
- key: 1,
8
- class: "gsc-range"
9
- }, X = ["value", "onInput"], Y = ["value", "onInput"], Z = ["placeholder", "value", "onInput"], ee = ["disabled"], te = ["disabled"], ae = {
6
+ import D from "../../../../_virtual/_plugin-vue_export-helper.js";
7
+ const O = { class: "actions-left" }, P = { class: "actions-right flex items-center gap-2" }, H = {
10
8
  __name: "QueryBar",
11
9
  props: {
12
10
  schema: { type: Array, default: () => [] },
13
11
  modelValue: { type: Object, default: () => ({}) },
14
- loading: { type: Boolean, default: !1 },
15
- collapsedCount: { type: Number, default: 4 }
12
+ loading: { type: Boolean, default: !1 }
16
13
  },
17
14
  emits: ["update:modelValue", "search", "reset"],
18
- setup(V, { emit: F }) {
19
- const u = V, p = F, { t: y } = A(), f = z(!0);
20
- function q(t = []) {
15
+ setup(f, { emit: _ }) {
16
+ const b = f, i = _, { t: u } = U(), d = v(!0), m = v(null);
17
+ function z(t = []) {
21
18
  return (t || []).filter(Boolean).map((e) => ({
22
19
  key: e.key,
23
20
  label: e.label ?? e.title ?? e.key,
@@ -27,158 +24,133 @@ const H = { class: "gsc-card gsc-card-pad" }, J = ["title"], M = { class: "gsc-f
27
24
  span: e.span,
28
25
  startKey: e.startKey,
29
26
  endKey: e.endKey,
27
+ showTime: e.showTime || e.withTime || !1,
30
28
  defaultValue: e.defaultValue
31
29
  })).filter((e) => e.type === "dateRange" ? !!(e.startKey && e.endKey) : !!e.key);
32
30
  }
33
- const v = m(() => q(u.schema));
31
+ const B = s(() => z(b.schema)), V = v(typeof window < "u" ? window.innerWidth : 1200);
34
32
  function C() {
35
- const t = {};
36
- return v.value.forEach((e) => {
37
- e.type === "dateRange" ? (t[e.startKey] = u.modelValue?.[e.startKey] ?? "", t[e.endKey] = u.modelValue?.[e.endKey] ?? "") : t[e.key] = u.modelValue?.[e.key] ?? e.defaultValue ?? "";
38
- }), t;
33
+ typeof window < "u" && (V.value = window.innerWidth);
39
34
  }
40
- const r = Q({
41
- defaultValues: C(),
42
- onSubmit: ({ value: t }) => {
43
- p("update:modelValue", t || {}), p("search", t || {});
44
- }
45
- }), K = r.useStore((t) => t.values);
46
- D(
47
- () => u.modelValue,
48
- (t) => {
49
- const e = t || {};
50
- Object.keys(e).forEach((a) => {
51
- try {
52
- r.setFieldValue(a, e[a], { dontValidate: !0, dontRunListeners: !0 });
53
- } catch {
54
- }
55
- });
56
- },
57
- { deep: !0 }
58
- );
59
- const B = m(() => v.value.length > u.collapsedCount), I = m(() => B.value && f.value ? v.value.slice(0, u.collapsedCount) : v.value), R = m(() => "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"), E = m(() => "lg:col-span-3 xl:col-span-4");
60
- function j(t) {
61
- const e = Number(t?.span || 0);
62
- return e === 2 ? "lg:col-span-2" : e === 3 ? "lg:col-span-3" : e === 4 ? "lg:col-span-4" : "";
35
+ T(() => {
36
+ typeof window < "u" && window.addEventListener("resize", C);
37
+ }), W(() => {
38
+ typeof window < "u" && window.removeEventListener("resize", C);
39
+ });
40
+ const p = s(() => {
41
+ const t = V.value || 1200;
42
+ return t >= 3840 ? 8 : t >= 2560 ? 7 : t >= 1920 ? 6 : t >= 1536 ? 5 : t >= 1280 ? 4 : t >= 1024 ? 3 : t >= 768 ? 2 : 1;
43
+ });
44
+ function S(t) {
45
+ if (!t)
46
+ return 1;
47
+ if (t.type === "dateRange")
48
+ return 2;
49
+ const e = Number(t.span || 0);
50
+ return e >= 1 ? e : 1;
63
51
  }
64
- function L(t) {
65
- return t.type === "dateRange" ? `${t.startKey}__${t.endKey}` : t.key;
52
+ function F(t, e) {
53
+ let n = 1, o = 0;
54
+ for (const l of t) {
55
+ const a = Math.min(S(l), e);
56
+ o + a > e ? (n += 1, o = a) : o += a;
57
+ }
58
+ return n;
66
59
  }
67
- function N() {
60
+ const K = s(() => {
61
+ const t = p.value;
62
+ return F(B.value, t) > 2;
63
+ }), R = s(() => {
64
+ const t = B.value, e = p.value;
65
+ if (!K.value || !d.value)
66
+ return t;
67
+ const n = [];
68
+ let o = 1, l = 0;
69
+ for (const a of t) {
70
+ const y = Math.min(S(a), e);
71
+ if (l + y > e ? (o += 1, l = y) : l += y, o > 2)
72
+ break;
73
+ n.push(a);
74
+ }
75
+ return n;
76
+ }), q = s(() => {
77
+ const t = p.value || 1;
78
+ return t <= 2 ? { gridColumn: "1 / -1", display: "flex", justifyContent: "flex-end", gap: "8px", alignItems: "center" } : { gridColumn: `${Math.max(1, t - 1)} / span 2`, display: "flex", justifyContent: "flex-end", gap: "6px", alignItems: "center" };
79
+ });
80
+ function E() {
68
81
  try {
69
- r.handleSubmit();
82
+ m.value?.submit();
70
83
  } catch {
71
- p("update:modelValue", K.value || {}), p("search", K.value || {});
72
84
  }
73
85
  }
74
- function $() {
75
- const t = C();
76
- Object.keys(t).forEach((e) => {
77
- try {
78
- r.setFieldValue(e, t[e], { dontValidate: !0, dontRunListeners: !0 });
79
- } catch {
80
- }
81
- }), p("update:modelValue", t), p("reset", t);
86
+ function M() {
87
+ try {
88
+ m.value?.reset();
89
+ } catch {
90
+ }
82
91
  }
83
- return (t, e) => (o(), i("div", H, [
84
- l("div", {
85
- class: k(["gsc-querybar", R.value])
86
- }, [
87
- (o(!0), i(x, null, S(I.value, (a) => (o(), i("div", {
88
- key: L(a),
89
- class: k(["gsc-form-item", j(a)])
90
- }, [
91
- l("div", {
92
- class: "gsc-form-label",
93
- title: a.label
94
- }, g(a.label), 9, J),
95
- l("div", M, [
96
- a.type === "select" ? (o(), h(_(s(r).Field), {
97
- key: 0,
98
- name: a.key
99
- }, {
100
- default: b(({ field: c, state: d }) => [
101
- l("select", {
102
- class: "gsc-control",
103
- value: d.value ?? "",
104
- onChange: (n) => c.setValue(n.target.value)
105
- }, [
106
- l("option", T, g(a.placeholder || s(y)("gsc.grid.queryBar.placeholder.select")), 1),
107
- (o(!0), i(x, null, S(a.options || [], (n) => (o(), i("option", {
108
- key: n.value,
109
- value: n.value
110
- }, g(n.label), 9, U))), 128))
111
- ], 40, P)
112
- ]),
113
- _: 2
114
- }, 1032, ["name"])) : a.type === "dateRange" ? (o(), i("div", W, [
115
- (o(), h(_(s(r).Field), {
116
- name: a.startKey
92
+ return (t, e) => (N(), j(I, null, [
93
+ w(r(A), {
94
+ ref_key: "innerForm",
95
+ ref: m,
96
+ schema: R.value,
97
+ "model-value": b.modelValue,
98
+ "show-actions": !1,
99
+ "onUpdate:modelValue": e[1] || (e[1] = (n) => i("update:modelValue", n)),
100
+ onSubmit: e[2] || (e[2] = (n) => {
101
+ i("update:modelValue", n), i("search", n);
102
+ }),
103
+ onReset: e[3] || (e[3] = (n) => {
104
+ i("update:modelValue", n), i("reset", n);
105
+ })
106
+ }, {
107
+ actions: c(() => [
108
+ g("div", {
109
+ class: "gsc-form-actions-unified",
110
+ style: L(q.value)
111
+ }, [
112
+ g("div", O, [
113
+ w(r(k), {
114
+ variant: "default",
115
+ disabled: f.loading,
116
+ onClick: M
117
+ }, {
118
+ default: c(() => [
119
+ h(x(r(u)("gsc.grid.queryBar.action.reset")), 1)
120
+ ]),
121
+ _: 1
122
+ }, 8, ["disabled"])
123
+ ]),
124
+ g("div", P, [
125
+ w(r(k), {
126
+ variant: "primary",
127
+ disabled: f.loading,
128
+ onClick: E
117
129
  }, {
118
- default: b(({ field: c, state: d }) => [
119
- l("input", {
120
- type: "date",
121
- class: "gsc-control",
122
- value: d.value ?? "",
123
- onInput: (n) => c.setValue(n.target.value)
124
- }, null, 40, X)
130
+ default: c(() => [
131
+ h(x(r(u)("gsc.grid.queryBar.action.search")), 1)
125
132
  ]),
126
133
  _: 1
127
- }, 8, ["name"])),
128
- e[1] || (e[1] = l("div", { class: "gsc-range-sep" }, " — ", -1)),
129
- (o(), h(_(s(r).Field), {
130
- name: a.endKey
134
+ }, 8, ["disabled"]),
135
+ K.value ? (N(), $(r(k), {
136
+ key: 0,
137
+ variant: "link",
138
+ onClick: e[0] || (e[0] = (n) => d.value = !d.value)
131
139
  }, {
132
- default: b(({ field: c, state: d }) => [
133
- l("input", {
134
- type: "date",
135
- class: "gsc-control",
136
- value: d.value ?? "",
137
- onInput: (n) => c.setValue(n.target.value)
138
- }, null, 40, Y)
140
+ default: c(() => [
141
+ h(x(d.value ? r(u)("gsc.grid.queryBar.action.expand") : r(u)("gsc.grid.queryBar.action.collapse")), 1)
139
142
  ]),
140
143
  _: 1
141
- }, 8, ["name"]))
142
- ])) : (o(), h(_(s(r).Field), {
143
- key: 2,
144
- name: a.key
145
- }, {
146
- default: b(({ field: c, state: d }) => [
147
- l("input", {
148
- class: "gsc-control",
149
- placeholder: a.placeholder || s(y)("gsc.grid.queryBar.placeholder.input"),
150
- value: d.value ?? "",
151
- onInput: (n) => c.setValue(n.target.value)
152
- }, null, 40, Z)
153
- ]),
154
- _: 2
155
- }, 1032, ["name"]))
156
- ])
157
- ], 2))), 128)),
158
- l("div", {
159
- class: k(["gsc-form-actions", E.value])
160
- }, [
161
- l("button", {
162
- class: "gsc-btn gsc-btn-default",
163
- disabled: V.loading,
164
- onClick: $
165
- }, g(s(y)("gsc.grid.queryBar.action.reset")), 9, ee),
166
- l("button", {
167
- class: "gsc-btn gsc-btn-primary",
168
- disabled: V.loading,
169
- onClick: N
170
- }, g(s(y)("gsc.grid.queryBar.action.search")), 9, te),
171
- B.value ? (o(), i("button", {
172
- key: 0,
173
- class: "gsc-btn gsc-btn-link",
174
- onClick: e[0] || (e[0] = (a) => f.value = !f.value)
175
- }, g(f.value ? s(y)("gsc.grid.queryBar.action.expand") : s(y)("gsc.grid.queryBar.action.collapse")), 1)) : w("", !0)
176
- ], 2)
177
- ], 2),
178
- O(t.$slots, "extra", {}, void 0, !0)
179
- ]));
144
+ })) : G("", !0)
145
+ ])
146
+ ], 4)
147
+ ]),
148
+ _: 1
149
+ }, 8, ["schema", "model-value"]),
150
+ Q(t.$slots, "extra", {}, void 0, !0)
151
+ ], 64));
180
152
  }
181
- }, ue = /* @__PURE__ */ G(ae, [["__scopeId", "data-v-e3036b77"]]);
153
+ }, ne = /* @__PURE__ */ D(H, [["__scopeId", "data-v-366b3fad"]]);
182
154
  export {
183
- ue as default
155
+ ne as default
184
156
  };
@@ -1,7 +1,7 @@
1
- import { ref as r, computed as v, watch as M } from "vue";
2
- import { useVueTable as H } from "../../../../node_modules/@tanstack/vue-table/build/lib/index.js";
3
- import { getPaginationRowModel as U, getFilteredRowModel as j, getSortedRowModel as B, getCoreRowModel as E, functionalUpdate as S } from "../../../../node_modules/@tanstack/table-core/build/lib/index.js";
4
- function A(f = []) {
1
+ import { ref as u, computed as g, watch as M } from "vue";
2
+ import { useVueTable as G } from "../../../../node_modules/@tanstack/vue-table/build/lib/index.js";
3
+ import { getPaginationRowModel as H, getFilteredRowModel as U, getSortedRowModel as B, getCoreRowModel as E, functionalUpdate as h } from "../../../../node_modules/@tanstack/table-core/build/lib/index.js";
4
+ function O(f = []) {
5
5
  return (f || []).map((t) => ({
6
6
  key: t.key,
7
7
  title: t.title ?? t.label ?? t.key,
@@ -18,7 +18,7 @@ function A(f = []) {
18
18
  }));
19
19
  }
20
20
  function J(f) {
21
- return v(() => A(f.value).map((l) => ({
21
+ return g(() => O(f.value).map((l) => ({
22
22
  id: l.key,
23
23
  accessorKey: l.key,
24
24
  header: l.title,
@@ -29,11 +29,11 @@ function J(f) {
29
29
  enableHiding: !0,
30
30
  enablePinning: !0,
31
31
  meta: { col: l },
32
- cell: (u) => {
33
- const d = u.getValue();
32
+ cell: (v) => {
33
+ const d = v.getValue();
34
34
  if (typeof l.formatter == "function")
35
35
  try {
36
- return l.formatter(d, { row: u.row.original, index: u.row.index });
36
+ return l.formatter(d, { row: v.row.original, index: v.row.index });
37
37
  } catch {
38
38
  return String(d ?? "");
39
39
  }
@@ -45,15 +45,15 @@ function Z(f = {}) {
45
45
  const {
46
46
  data: t = [],
47
47
  request: l,
48
- mode: u = "server",
48
+ mode: v = "server",
49
49
  pageSize: d = 10,
50
50
  initialQuery: T = {},
51
51
  columns: q = [],
52
52
  rowKey: D = "id",
53
53
  enableRowSelection: F = !1
54
- } = f, P = r(q || []), s = r(Array.isArray(t) ? (t || []).slice() : (t?.value || []).slice()), h = r({ ...T || {} }), c = r(0), z = r(!1), n = r({ pageIndex: 0, pageSize: d }), i = r([]), y = r({}), w = r({ left: [], right: [] }), b = r({}), N = J(P), o = v(() => u === "server" && typeof l == "function"), x = H({
54
+ } = f, P = u(q || []), r = u(Array.isArray(t) ? (t || []).slice() : (t?.value || []).slice()), S = u({ ...T || {} }), c = u(0), z = u(!1), n = u({ pageIndex: 0, pageSize: d }), i = u([]), y = u({}), w = u({ left: [], right: [] }), b = u({}), N = J(P), o = g(() => v === "server" && typeof l == "function"), x = G({
55
55
  get data() {
56
- return s.value;
56
+ return r.value;
57
57
  },
58
58
  get columns() {
59
59
  return N.value;
@@ -79,26 +79,27 @@ function Z(f = {}) {
79
79
  return b.value;
80
80
  }
81
81
  },
82
+ // 服务端排序变更时,重置到第一页
82
83
  onSortingChange: (e) => {
83
- i.value = S(e, i.value), o.value && (n.value = { ...n.value, pageIndex: 0 });
84
+ i.value = h(e, i.value), o.value && (n.value = { ...n.value, pageIndex: 0 });
84
85
  },
85
86
  onPaginationChange: (e) => {
86
- n.value = S(e, n.value);
87
+ n.value = h(e, n.value);
87
88
  },
88
89
  onColumnVisibilityChange: (e) => {
89
- y.value = S(e, y.value);
90
+ y.value = h(e, y.value);
90
91
  },
91
92
  onColumnPinningChange: (e) => {
92
- w.value = S(e, w.value);
93
+ w.value = h(e, w.value);
93
94
  },
94
95
  enableRowSelection: !!F,
95
96
  onRowSelectionChange: (e) => {
96
- b.value = S(e, b.value);
97
+ b.value = h(e, b.value);
97
98
  },
98
99
  manualPagination: o.value,
99
100
  manualSorting: o.value,
100
101
  manualFiltering: o.value,
101
- pageCount: v(() => {
102
+ pageCount: g(() => {
102
103
  const e = n.value.pageSize || 1;
103
104
  return Math.max(1, Math.ceil((c.value || 0) / e));
104
105
  }),
@@ -106,27 +107,27 @@ function Z(f = {}) {
106
107
  columnResizeMode: "onChange",
107
108
  getCoreRowModel: E(),
108
109
  getSortedRowModel: B(),
109
- getFilteredRowModel: j(),
110
- getPaginationRowModel: U()
111
- }), k = v({
110
+ getFilteredRowModel: U(),
111
+ getPaginationRowModel: H()
112
+ }), k = g({
112
113
  get: () => (n.value.pageIndex || 0) + 1,
113
114
  set: (e) => {
114
115
  const a = Math.max(1, Number(e || 1));
115
116
  n.value = { ...n.value, pageIndex: a - 1 };
116
117
  }
117
- }), I = v({
118
+ }), I = g({
118
119
  get: () => n.value.pageSize,
119
120
  set: (e) => {
120
121
  const a = Math.max(1, Number(e || d));
121
122
  n.value = { pageIndex: 0, pageSize: a };
122
123
  }
123
- }), R = v(() => {
124
+ }), R = g(() => {
124
125
  const e = i.value && i.value[0];
125
126
  return { id: e?.id ?? null, desc: !!e?.desc };
126
- }), W = v(() => (x.getRowModel()?.rows || []).map((a) => a.original));
127
+ }), W = g(() => (x.getRowModel()?.rows || []).map((a) => a.original));
127
128
  async function C() {
128
129
  if (!o.value) {
129
- c.value = s.value.length;
130
+ c.value = r.value.length;
130
131
  return;
131
132
  }
132
133
  z.value = !0;
@@ -134,31 +135,31 @@ function Z(f = {}) {
134
135
  const e = await l({
135
136
  page: k.value,
136
137
  pageSize: I.value,
137
- query: h.value,
138
- // Back-compat: keep single sort (first) and also provide multi-sort array.
138
+ query: S.value,
139
+ // 向后兼容:同时提供单列排序信息和多列排序数组。
139
140
  sort: R.value,
140
141
  sorts: i.value
141
142
  });
142
- s.value = (e?.records || []).slice(), c.value = Number(e?.total ?? s.value.length);
143
+ r.value = (e?.records || []).slice(), c.value = Number(e?.total ?? r.value.length);
143
144
  } finally {
144
145
  z.value = !1;
145
146
  }
146
147
  }
147
- function O(e = {}) {
148
- h.value = { ...e || {} }, o.value && (n.value = { ...n.value, pageIndex: 0 });
148
+ function j(e = {}) {
149
+ S.value = { ...e || {} }, o.value && (n.value = { ...n.value, pageIndex: 0 });
149
150
  }
150
151
  function V(e = []) {
151
- s.value = (e || []).slice(), o.value || (c.value = s.value.length);
152
+ r.value = (e || []).slice(), o.value || (c.value = r.value.length);
152
153
  }
153
- function Q(e = []) {
154
+ function A(e = []) {
154
155
  P.value = (e || []).slice();
155
156
  try {
156
- const a = A(e || []), m = a.filter((g) => g.fixed === "left").map((g) => g.key), p = a.filter((g) => g.fixed === "right").map((g) => g.key);
157
+ const a = O(e || []), m = a.filter((s) => s.fixed === "left").map((s) => s.key), p = a.filter((s) => s.fixed === "right").map((s) => s.key);
157
158
  x.setColumnPinning?.({ left: m, right: p });
158
159
  } catch {
159
160
  }
160
161
  }
161
- function G(e) {
162
+ function Q(e) {
162
163
  if (!e)
163
164
  return;
164
165
  const a = x.getColumn(e);
@@ -169,10 +170,10 @@ function Z(f = {}) {
169
170
  const m = i.value?.[0];
170
171
  m?.id === e ? i.value = [{ id: e, desc: !m.desc }] : i.value = [{ id: e, desc: !1 }];
171
172
  }
172
- return M(
173
- () => [t, u],
174
- () => {
175
- Array.isArray(t) && V(t);
173
+ return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "value") && M(
174
+ () => t.value,
175
+ (e) => {
176
+ V(e || []);
176
177
  },
177
178
  { deep: !0 }
178
179
  ), M(
@@ -181,30 +182,30 @@ function Z(f = {}) {
181
182
  o.value && C();
182
183
  }
183
184
  ), M(
184
- () => h.value,
185
+ () => S.value,
185
186
  () => {
186
187
  o.value && C();
187
188
  },
188
189
  { deep: !0 }
189
- ), o.value ? C() : c.value = s.value.length, {
190
+ ), o.value ? C() : c.value = r.value.length, {
190
191
  table: x,
191
192
  loading: z,
192
- query: h,
193
+ query: S,
193
194
  page: k,
194
195
  pageSize: I,
195
196
  total: c,
196
197
  rows: W,
197
- sort: G,
198
+ sort: Q,
198
199
  sortState: R,
199
200
  sorting: i,
200
201
  columnVisibility: y,
201
202
  columnPinning: w,
202
203
  rowSelection: b,
203
204
  load: C,
204
- setQuery: O,
205
+ setQuery: j,
205
206
  setData: V,
206
- setColumns: Q,
207
- mode: u
207
+ setColumns: A,
208
+ mode: v
208
209
  };
209
210
  }
210
211
  export {