orion-design 0.1.30 → 0.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/dist/components/Form/hooks/index.js +14 -11
  2. package/dist/components/Form/hooks/index.js.map +1 -1
  3. package/dist/components/LovTable/LovPagetable.vue.d.ts +492 -0
  4. package/dist/components/LovTable/index.d.ts +246 -0
  5. package/dist/components/LovTable/index.js +2 -1
  6. package/dist/components/LovTable/index.js.map +1 -1
  7. package/dist/components/Modal/index.js.map +1 -1
  8. package/dist/components/Modal/types.d.ts +1 -1
  9. package/dist/components/Modal/types.js.map +1 -1
  10. package/dist/components/Pagetable/Pagetable.d.ts +92 -1
  11. package/dist/components/Pagetable/columns/PagetableColumnButtongroup.d.ts +13 -0
  12. package/dist/components/Pagetable/columns/PagetableColumnDate.d.ts +13 -0
  13. package/dist/components/Pagetable/columns/PagetableColumnLink.d.ts +13 -0
  14. package/dist/components/Pagetable/columns/PagetableColumnMultiselect.d.ts +13 -0
  15. package/dist/components/Pagetable/columns/PagetableColumnNumber.d.ts +13 -0
  16. package/dist/components/Pagetable/columns/PagetableColumnSingleselect.d.ts +13 -0
  17. package/dist/components/Pagetable/columns/PagetableColumnString.d.ts +13 -0
  18. package/dist/components/Pagetable/hooks/useColumns.js +20 -15
  19. package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
  20. package/dist/components/Pagetable/index.d.ts +155 -0
  21. package/dist/components/Pagetable/index.js +509 -451
  22. package/dist/components/Pagetable/index.js.map +1 -1
  23. package/dist/version/version.d.ts +1 -1
  24. package/dist/version/version.js +1 -1
  25. package/dist/version/version.js.map +1 -1
  26. package/package.json +1 -1
@@ -9,6 +9,10 @@ export declare const pagetableColumnLinkProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -36,6 +40,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
36
40
  type: PropType<"center" | "left" | "right">;
37
41
  default: "center" | "left" | "right";
38
42
  };
43
+ bodyAlign: {
44
+ type: PropType<"center" | "left" | "right">;
45
+ default: "center" | "left" | "right";
46
+ };
39
47
  name: {
40
48
  type: PropType<string>;
41
49
  default: string;
@@ -61,6 +69,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
61
69
  type: PropType<"center" | "left" | "right">;
62
70
  default: "center" | "left" | "right";
63
71
  };
72
+ bodyAlign: {
73
+ type: PropType<"center" | "left" | "right">;
74
+ default: "center" | "left" | "right";
75
+ };
64
76
  name: {
65
77
  type: PropType<string>;
66
78
  default: string;
@@ -82,6 +94,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
82
94
  head: string;
83
95
  width: string | boolean;
84
96
  name: string;
97
+ bodyAlign: "center" | "left" | "right";
85
98
  tail: string | boolean;
86
99
  headAlign: "center" | "left" | "right";
87
100
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -9,6 +9,10 @@ export declare const pagetableColumnMultiselectProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -46,6 +50,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
46
50
  type: PropType<"center" | "left" | "right">;
47
51
  default: "center" | "left" | "right";
48
52
  };
53
+ bodyAlign: {
54
+ type: PropType<"center" | "left" | "right">;
55
+ default: "center" | "left" | "right";
56
+ };
49
57
  name: {
50
58
  type: PropType<string>;
51
59
  default: string;
@@ -81,6 +89,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
81
89
  type: PropType<"center" | "left" | "right">;
82
90
  default: "center" | "left" | "right";
83
91
  };
92
+ bodyAlign: {
93
+ type: PropType<"center" | "left" | "right">;
94
+ default: "center" | "left" | "right";
95
+ };
84
96
  name: {
85
97
  type: PropType<string>;
86
98
  default: string;
@@ -116,6 +128,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
116
128
  head: string;
117
129
  width: string | boolean;
118
130
  name: string;
131
+ bodyAlign: "center" | "left" | "right";
119
132
  tail: string | boolean;
120
133
  headAlign: "center" | "left" | "right";
121
134
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -9,6 +9,10 @@ export declare const pagetableColumnNumberProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -48,6 +52,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
48
52
  type: PropType<"center" | "left" | "right">;
49
53
  default: "center" | "left" | "right";
50
54
  };
55
+ bodyAlign: {
56
+ type: PropType<"center" | "left" | "right">;
57
+ default: "center" | "left" | "right";
58
+ };
51
59
  name: {
52
60
  type: PropType<string>;
53
61
  default: string;
@@ -85,6 +93,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
85
93
  type: PropType<"center" | "left" | "right">;
86
94
  default: "center" | "left" | "right";
87
95
  };
96
+ bodyAlign: {
97
+ type: PropType<"center" | "left" | "right">;
98
+ default: "center" | "left" | "right";
99
+ };
88
100
  name: {
89
101
  type: PropType<string>;
90
102
  default: string;
@@ -118,6 +130,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
118
130
  head: string;
119
131
  width: string | boolean;
120
132
  name: string;
133
+ bodyAlign: "center" | "left" | "right";
121
134
  thousandsSeparator: boolean;
122
135
  tail: string | boolean;
123
136
  headAlign: "center" | "left" | "right";
@@ -9,6 +9,10 @@ export declare const pagetableColumnSingleselectProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -46,6 +50,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
46
50
  type: PropType<"center" | "left" | "right">;
47
51
  default: "center" | "left" | "right";
48
52
  };
53
+ bodyAlign: {
54
+ type: PropType<"center" | "left" | "right">;
55
+ default: "center" | "left" | "right";
56
+ };
49
57
  name: {
50
58
  type: PropType<string>;
51
59
  default: string;
@@ -81,6 +89,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
81
89
  type: PropType<"center" | "left" | "right">;
82
90
  default: "center" | "left" | "right";
83
91
  };
92
+ bodyAlign: {
93
+ type: PropType<"center" | "left" | "right">;
94
+ default: "center" | "left" | "right";
95
+ };
84
96
  name: {
85
97
  type: PropType<string>;
86
98
  default: string;
@@ -116,6 +128,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
116
128
  head: string;
117
129
  width: string | boolean;
118
130
  name: string;
131
+ bodyAlign: "center" | "left" | "right";
119
132
  tail: string | boolean;
120
133
  headAlign: "center" | "left" | "right";
121
134
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -9,6 +9,10 @@ export declare const pagetableColumnStringProps: () => {
9
9
  type: PropType<"center" | "left" | "right">;
10
10
  default: "center" | "left" | "right";
11
11
  };
12
+ bodyAlign: {
13
+ type: PropType<"center" | "left" | "right">;
14
+ default: "center" | "left" | "right";
15
+ };
12
16
  name: {
13
17
  type: PropType<string>;
14
18
  default: string;
@@ -36,6 +40,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
36
40
  type: PropType<"center" | "left" | "right">;
37
41
  default: "center" | "left" | "right";
38
42
  };
43
+ bodyAlign: {
44
+ type: PropType<"center" | "left" | "right">;
45
+ default: "center" | "left" | "right";
46
+ };
39
47
  name: {
40
48
  type: PropType<string>;
41
49
  default: string;
@@ -61,6 +69,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
61
69
  type: PropType<"center" | "left" | "right">;
62
70
  default: "center" | "left" | "right";
63
71
  };
72
+ bodyAlign: {
73
+ type: PropType<"center" | "left" | "right">;
74
+ default: "center" | "left" | "right";
75
+ };
64
76
  name: {
65
77
  type: PropType<string>;
66
78
  default: string;
@@ -82,6 +94,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
82
94
  head: string;
83
95
  width: string | boolean;
84
96
  name: string;
97
+ bodyAlign: "center" | "left" | "right";
85
98
  tail: string | boolean;
86
99
  headAlign: "center" | "left" | "right";
87
100
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,13 +1,13 @@
1
- import { computed as f } from "vue";
2
- import g from "../../../error/OrionError.js";
3
- import { camelize as y } from "../../_util/util.js";
4
- import { filterEmpty as m } from "../../_util/props-util/index.js";
5
- function d(t) {
6
- return t == null ? void 0 : t.map((a) => {
7
- var n, i;
1
+ import { computed as g } from "vue";
2
+ import y from "../../../error/OrionError.js";
3
+ import { camelize as f } from "../../_util/util.js";
4
+ import { filterEmpty as d } from "../../_util/props-util/index.js";
5
+ function m(n) {
6
+ return n == null ? void 0 : n.map((a) => {
7
+ var t, i;
8
8
  const e = { ...a.props || {} };
9
9
  for (const [l, u] of Object.entries(e))
10
- delete e[l], e[y(l)] = u;
10
+ delete e[l], e[f(l)] = u;
11
11
  if (a.type.name === "OPagetableColumnIndex")
12
12
  return {
13
13
  type: a.type.name
@@ -17,6 +17,7 @@ function d(t) {
17
17
  type: a.type.name,
18
18
  head: e == null ? void 0 : e.head,
19
19
  headAlign: e == null ? void 0 : e.headAlign,
20
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
20
21
  name: e == null ? void 0 : e.name,
21
22
  width: e == null ? void 0 : e.width,
22
23
  fixed: e == null ? void 0 : e.fixed,
@@ -27,6 +28,7 @@ function d(t) {
27
28
  type: a.type.name,
28
29
  head: e == null ? void 0 : e.head,
29
30
  headAlign: e == null ? void 0 : e.headAlign,
31
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
30
32
  name: e == null ? void 0 : e.name,
31
33
  width: e == null ? void 0 : e.width,
32
34
  fixed: e == null ? void 0 : e.fixed,
@@ -40,6 +42,7 @@ function d(t) {
40
42
  type: a.type.name,
41
43
  head: e == null ? void 0 : e.head,
42
44
  headAlign: e == null ? void 0 : e.headAlign,
45
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
43
46
  name: e == null ? void 0 : e.name,
44
47
  width: e == null ? void 0 : e.width,
45
48
  fixed: e == null ? void 0 : e.fixed,
@@ -52,6 +55,7 @@ function d(t) {
52
55
  type: a.type.name,
53
56
  head: e == null ? void 0 : e.head,
54
57
  headAlign: e == null ? void 0 : e.headAlign,
58
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
55
59
  name: e == null ? void 0 : e.name,
56
60
  width: e == null ? void 0 : e.width,
57
61
  fixed: e == null ? void 0 : e.fixed,
@@ -63,6 +67,7 @@ function d(t) {
63
67
  type: a.type.name,
64
68
  head: e == null ? void 0 : e.head,
65
69
  headAlign: e == null ? void 0 : e.headAlign,
70
+ bodyAlign: e == null ? void 0 : e.bodyAlign,
66
71
  name: e == null ? void 0 : e.name,
67
72
  width: e == null ? void 0 : e.width,
68
73
  fixed: e == null ? void 0 : e.fixed,
@@ -74,7 +79,7 @@ function d(t) {
74
79
  type: a.type.name,
75
80
  head: e == null ? void 0 : e.head,
76
81
  headAlign: e == null ? void 0 : e.headAlign,
77
- children: d(m((i = (n = a.children) == null ? void 0 : n.default) == null ? void 0 : i.call(n)))
82
+ children: m(d((i = (t = a.children) == null ? void 0 : t.default) == null ? void 0 : i.call(t)))
78
83
  };
79
84
  if (a.type.name === "OPagetableColumnDiy")
80
85
  return {
@@ -87,17 +92,17 @@ function d(t) {
87
92
  tail: e == null ? void 0 : e.tail,
88
93
  children: a.children
89
94
  };
90
- throw new g(`OPagetable不能正确解析'${a.type.name}'子组件。`);
95
+ throw new y(`OPagetable不能正确解析'${a.type.name}'子组件。`);
91
96
  });
92
97
  }
93
- function A(t) {
94
- return f(() => {
98
+ function x(n) {
99
+ return g(() => {
95
100
  var i;
96
- const a = (i = t.default) == null ? void 0 : i.call(t), e = m(a);
97
- return d(e);
101
+ const a = (i = n.default) == null ? void 0 : i.call(n), e = d(a);
102
+ return m(e);
98
103
  });
99
104
  }
100
105
  export {
101
- A as default
106
+ x as default
102
107
  };
103
108
  //# sourceMappingURL=useColumns.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useColumns.js","sources":["../../../../src/components/Pagetable/hooks/useColumns.ts"],"sourcesContent":["import { computed } from 'vue'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\nimport { camelize } from '../../../components/_util/util'\r\nimport { filterEmpty } from '../../_util/props-util'\r\n\r\nfunction genColumns(children) {\r\n const tableColumns = children?.map((c) => {\r\n const props = { ...(c.props || {}) }\r\n for (const [k, v] of Object.entries(props)) {\r\n delete props[k]\r\n props[camelize(k)] = v\r\n }\r\n\r\n if (c.type.name === 'OPagetableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnString' || c.type.name === 'OPagetableColumnLink') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnNumber') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n thousandsSeparator: props?.thousandsSeparator,\r\n precision: Number(props?.precision),\r\n percentage: props?.percentage,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnDate') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnSingleselect' || c.type.name === 'OPagetableColumnMultiselect') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnButtongroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OPagetableColumngroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n\r\n children: genColumns(filterEmpty(c.children?.default?.())),\r\n }\r\n } else if (c.type.name === 'OPagetableColumnDiy') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OPagetable不能正确解析'${c.type.name}'子组件。`)\r\n }\r\n })\r\n\r\n return tableColumns\r\n}\r\n\r\nexport default function useColumns(slots) {\r\n const columns = computed(() => {\r\n const children = slots.default?.()\r\n\r\n const non_empty_children = filterEmpty(children)\r\n\r\n const tableColumns = genColumns(non_empty_children)\r\n\r\n return tableColumns\r\n })\r\n\r\n return columns\r\n}\r\n"],"names":["genColumns","children","c","props","k","v","camelize","filterEmpty","_b","_a","OrionError","useColumns","slots","computed","non_empty_children"],"mappings":";;;;AAMA,SAASA,EAAWC,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AF,gBAAAO,EAAY,YAAZ,gBAAAD,EAAA,KAAAC,EAAuB,CAAC;AAAA,MAAA;AAElD,QAAAP,EAAE,KAAK,SAAS;AAClB,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QAEb,MAAMC,KAAA,gBAAAA,EAAO;AAAA,QACb,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QACb,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QAEb,UAAUD,EAAE;AAAA,MAAA;AAGd,UAAM,IAAIQ,EAAW,oBAAoBR,EAAE,KAAK,IAAI,OAAO;AAAA,EAC7D;AAIJ;AAEA,SAAwBS,EAAWC,GAAO;AAWjC,SAVSC,EAAS,MAAM;;AACvB,UAAAZ,KAAWQ,IAAAG,EAAM,YAAN,gBAAAH,EAAA,KAAAG,IAEXE,IAAqBP,EAAYN,CAAQ;AAIxC,WAFcD,EAAWc,CAAkB;AAAA,EAE3C,CACR;AAGH;"}
1
+ {"version":3,"file":"useColumns.js","sources":["../../../../src/components/Pagetable/hooks/useColumns.ts"],"sourcesContent":["import { computed } from 'vue'\r\nimport OrionError from '../../../error/OrionError'\r\n\r\nimport { camelize } from '../../../components/_util/util'\r\nimport { filterEmpty } from '../../_util/props-util'\r\n\r\nfunction genColumns(children) {\r\n const tableColumns = children?.map((c) => {\r\n const props = { ...(c.props || {}) }\r\n for (const [k, v] of Object.entries(props)) {\r\n delete props[k]\r\n props[camelize(k)] = v\r\n }\r\n\r\n if (c.type.name === 'OPagetableColumnIndex') {\r\n return {\r\n type: c.type.name,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnString' || c.type.name === 'OPagetableColumnLink') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnNumber') {\r\n return {\r\n type: c.type.name,\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n thousandsSeparator: props?.thousandsSeparator,\r\n precision: Number(props?.precision),\r\n percentage: props?.percentage,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnDate') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n format: props?.format,\r\n sourceFormat: props?.sourceFormat,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnSingleselect' || c.type.name === 'OPagetableColumnMultiselect') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n code: props?.code,\r\n }\r\n } else if (c.type.name === 'OPagetableColumnButtongroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n bodyAlign: props?.bodyAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n children: c.children,\r\n }\r\n } else if (c.type.name === 'OPagetableColumngroup') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n\r\n children: genColumns(filterEmpty(c.children?.default?.())),\r\n }\r\n } else if (c.type.name === 'OPagetableColumnDiy') {\r\n return {\r\n type: c.type.name,\r\n\r\n head: props?.head,\r\n headAlign: props?.headAlign,\r\n name: props?.name,\r\n width: props?.width,\r\n fixed: props?.fixed,\r\n tail: props?.tail,\r\n\r\n children: c.children,\r\n }\r\n } else {\r\n throw new OrionError(`OPagetable不能正确解析'${c.type.name}'子组件。`)\r\n }\r\n })\r\n\r\n return tableColumns\r\n}\r\n\r\nexport default function useColumns(slots) {\r\n const columns = computed(() => {\r\n const children = slots.default?.()\r\n\r\n const non_empty_children = filterEmpty(children)\r\n\r\n const tableColumns = genColumns(non_empty_children)\r\n\r\n return tableColumns\r\n })\r\n\r\n return columns\r\n}\r\n"],"names":["genColumns","children","c","props","k","v","camelize","filterEmpty","_b","_a","OrionError","useColumns","slots","computed","non_empty_children"],"mappings":";;;;AAMA,SAASA,EAAWC,GAAU;AA4GrB,SA3GcA,KAAA,gBAAAA,EAAU,IAAI,CAACC,MAAM;;AACxC,UAAMC,IAAQ,EAAE,GAAID,EAAE,SAAS,CAAI,EAAA;AACnC,eAAW,CAACE,GAAGC,CAAC,KAAK,OAAO,QAAQF,CAAK;AACvC,aAAOA,EAAMC,CAAC,GACRD,EAAAG,EAASF,CAAC,CAAC,IAAIC;AAGnB,QAAAH,EAAE,KAAK,SAAS;AACX,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,MAAA;AAEjB,QAAWA,EAAE,KAAK,SAAS,4BAA4BA,EAAE,KAAK,SAAS;AAC9D,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QACb,MAAMC,KAAA,gBAAAA,EAAO;AAAA,QACb,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,WAAWA,KAAA,gBAAAA,EAAO;AAAA,QAClB,MAAMA,KAAA,gBAAAA,EAAO;AAAA,QACb,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,OAAOA,KAAA,gBAAAA,EAAO;AAAA,QACd,MAAMA,KAAA,gBAAAA,EAAO;AAAA,MAAA;AAEN,QAAAD,EAAE,KAAK,SAAS;AAClB,aAAA;AAAA,QACL,MAAMA,EAAE,KAAK;AAAA,QACb,MAAMC,KAAA,gB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,IAEXE,IAAqBP,EAAYN,CAAQ;AAIxC,WAFcD,EAAWc,CAAkB;AAAA,EAE3C,CACR;AAGH;"}
@@ -33,6 +33,10 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
33
33
  total?: number;
34
34
  };
35
35
  };
36
+ paginationTeleported: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
36
40
  showRowNumber: {
37
41
  type: BooleanConstructor;
38
42
  default: boolean;
@@ -49,6 +53,66 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
49
53
  type: import('vue').PropType<"" | "small" | "default" | "large">;
50
54
  default: "" | "small" | "default" | "large";
51
55
  };
56
+ rowClassName: {
57
+ type: import('vue').PropType<string | ((data: {
58
+ rowData: any;
59
+ rowIndex: number;
60
+ }) => string)>;
61
+ default: string | ((data: {
62
+ rowData: any;
63
+ rowIndex: number;
64
+ }) => string);
65
+ };
66
+ rowStyle: {
67
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
68
+ rowData: any;
69
+ rowIndex: number;
70
+ }) => import('vue').CSSProperties)>;
71
+ default: import('vue').CSSProperties | ((data: {
72
+ rowData: any;
73
+ rowIndex: number;
74
+ }) => import('vue').CSSProperties);
75
+ };
76
+ cellClassName: {
77
+ type: import('vue').PropType<string | ((data: {
78
+ rowData: any;
79
+ column: {
80
+ name: string;
81
+ head: string;
82
+ };
83
+ rowIndex: number;
84
+ columnIndex: number;
85
+ }) => string)>;
86
+ default: string | ((data: {
87
+ rowData: any;
88
+ column: {
89
+ name: string;
90
+ head: string;
91
+ };
92
+ rowIndex: number;
93
+ columnIndex: number;
94
+ }) => string);
95
+ };
96
+ cellStyle: {
97
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
98
+ rowData: any;
99
+ column: {
100
+ name: string;
101
+ head: string;
102
+ };
103
+ rowIndex: number;
104
+ columnIndex: number;
105
+ }) => import('vue').CSSProperties)>;
106
+ default: import('vue').CSSProperties | ((data: {
107
+ rowData: any;
108
+ column: {
109
+ name: string;
110
+ head: string;
111
+ };
112
+ rowIndex: number;
113
+ columnIndex: number;
114
+ }) => import('vue').CSSProperties);
115
+ };
52
116
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("selectionChange" | "currentRowChange" | "update:pagination" | "rowClick" | "rowDblclick" | "cellClick" | "cellDblclick")[], "selectionChange" | "currentRowChange" | "update:pagination" | "rowClick" | "rowDblclick" | "cellClick" | "cellDblclick", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
53
117
  data: {
54
118
  type: import('vue').PropType<any[]>;
@@ -72,6 +136,10 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
72
136
  total?: number;
73
137
  };
74
138
  };
139
+ paginationTeleported: {
140
+ type: BooleanConstructor;
141
+ default: boolean;
142
+ };
75
143
  showRowNumber: {
76
144
  type: BooleanConstructor;
77
145
  default: boolean;
@@ -88,6 +156,66 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
88
156
  type: import('vue').PropType<"" | "small" | "default" | "large">;
89
157
  default: "" | "small" | "default" | "large";
90
158
  };
159
+ rowClassName: {
160
+ type: import('vue').PropType<string | ((data: {
161
+ rowData: any;
162
+ rowIndex: number;
163
+ }) => string)>;
164
+ default: string | ((data: {
165
+ rowData: any;
166
+ rowIndex: number;
167
+ }) => string);
168
+ };
169
+ rowStyle: {
170
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
171
+ rowData: any;
172
+ rowIndex: number;
173
+ }) => import('vue').CSSProperties)>;
174
+ default: import('vue').CSSProperties | ((data: {
175
+ rowData: any;
176
+ rowIndex: number;
177
+ }) => import('vue').CSSProperties);
178
+ };
179
+ cellClassName: {
180
+ type: import('vue').PropType<string | ((data: {
181
+ rowData: any;
182
+ column: {
183
+ name: string;
184
+ head: string;
185
+ };
186
+ rowIndex: number;
187
+ columnIndex: number;
188
+ }) => string)>;
189
+ default: string | ((data: {
190
+ rowData: any;
191
+ column: {
192
+ name: string;
193
+ head: string;
194
+ };
195
+ rowIndex: number;
196
+ columnIndex: number;
197
+ }) => string);
198
+ };
199
+ cellStyle: {
200
+ type: import('vue').PropType<import('vue').CSSProperties | ((data: {
201
+ rowData: any;
202
+ column: {
203
+ name: string;
204
+ head: string;
205
+ };
206
+ rowIndex: number;
207
+ columnIndex: number;
208
+ }) => import('vue').CSSProperties)>;
209
+ default: import('vue').CSSProperties | ((data: {
210
+ rowData: any;
211
+ column: {
212
+ name: string;
213
+ head: string;
214
+ };
215
+ rowIndex: number;
216
+ columnIndex: number;
217
+ }) => import('vue').CSSProperties);
218
+ };
91
219
  }>> & Readonly<{
92
220
  onSelectionChange?: ((...args: any[]) => any) | undefined;
93
221
  onCurrentRowChange?: ((...args: any[]) => any) | undefined;
@@ -106,9 +234,36 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
106
234
  total?: number;
107
235
  };
108
236
  tailData: Record<string, any>;
237
+ paginationTeleported: boolean;
109
238
  showRowNumber: boolean;
110
239
  selectionMode: boolean;
111
240
  currentRowMode: boolean;
241
+ rowClassName: string | ((data: {
242
+ rowData: any;
243
+ rowIndex: number;
244
+ }) => string);
245
+ rowStyle: import('vue').CSSProperties | ((data: {
246
+ rowData: any;
247
+ rowIndex: number;
248
+ }) => import('vue').CSSProperties);
249
+ cellClassName: string | ((data: {
250
+ rowData: any;
251
+ column: {
252
+ name: string;
253
+ head: string;
254
+ };
255
+ rowIndex: number;
256
+ columnIndex: number;
257
+ }) => string);
258
+ cellStyle: import('vue').CSSProperties | ((data: {
259
+ rowData: any;
260
+ column: {
261
+ name: string;
262
+ head: string;
263
+ };
264
+ rowIndex: number;
265
+ columnIndex: number;
266
+ }) => import('vue').CSSProperties);
112
267
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>> & {
113
268
  PagetableColumnIndex: typeof PagetableColumnIndex;
114
269
  PagetableColumnString: typeof PagetableColumnString;