orion-design 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Form/FileInput/FileInput.vue.d.ts +1 -1
- package/dist/components/LovTable/LovPagetable.vue.d.ts +28 -0
- package/dist/components/LovTable/LovQuerytable.vue.d.ts +28 -0
- package/dist/components/LovTable/index.d.ts +28 -0
- package/dist/components/LovTable/index.js +22 -20
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Pagetable/Pagetable.d.ts +13 -0
- package/dist/components/Pagetable/index.d.ts +9 -0
- package/dist/components/Pagetable/index.js +131 -126
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Querytable/Querytable.d.ts +13 -0
- package/dist/components/Querytable/index.d.ts +9 -0
- package/dist/components/Querytable/index.js +85 -81
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +13 -0
- package/dist/components/RichTextEditor/index.d.ts +9 -0
- package/dist/components/RichTextEditor/index.js +20761 -0
- package/dist/components/RichTextEditor/index.js.map +1 -0
- package/dist/components/components.d.ts +2 -0
- package/dist/components/components.js +12 -10
- package/dist/components/components.js.map +1 -1
- package/dist/components/index.js +16 -14
- package/dist/components/index.js.map +1 -1
- package/dist/components-Cx2JsH63.js +74 -0
- package/dist/{components-0PErqPHo.js.map → components-Cx2JsH63.js.map} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +22 -20
- package/dist/index.js.map +1 -1
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +1 -1
- package/dist/version/version.js.map +1 -1
- package/global.d.ts +2 -0
- package/package.json +3 -1
- package/dist/components-0PErqPHo.js +0 -72
@@ -41,8 +41,8 @@ declare const _default: import('vue').DefineComponent<FileInputProps, {}, {}, {}
|
|
41
41
|
readonly id?: string | undefined;
|
42
42
|
readonly formatter?: Function | undefined;
|
43
43
|
readonly ariaLabel?: string | undefined;
|
44
|
-
readonly maxlength?: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
|
45
44
|
readonly placeholder?: string | undefined;
|
45
|
+
readonly maxlength?: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
|
46
46
|
readonly minlength?: import('element-plus/es/utils/index.mjs').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
|
47
47
|
readonly parser?: Function | undefined;
|
48
48
|
readonly suffixIcon?: import('element-plus/es/utils/index.mjs').EpPropMergeType<(new (...args: any[]) => (string | import('vue').Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions>) & {}) | (() => string | import('vue').Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions>) | ((new (...args: any[]) => (string | import('vue').Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions>) & {}) | (() => string | import('vue').Component<any, any, any, import('vue').ComputedOptions, import('vue').MethodOptions>))[], unknown, unknown> | undefined;
|
@@ -32,6 +32,10 @@ declare function __VLS_template(): {
|
|
32
32
|
type: BooleanConstructor;
|
33
33
|
default: boolean;
|
34
34
|
};
|
35
|
+
size: {
|
36
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
37
|
+
default: "" | "small" | "default" | "large";
|
38
|
+
};
|
35
39
|
}>> & Readonly<{
|
36
40
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
37
41
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -66,6 +70,10 @@ declare function __VLS_template(): {
|
|
66
70
|
type: BooleanConstructor;
|
67
71
|
default: boolean;
|
68
72
|
};
|
73
|
+
size: {
|
74
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
75
|
+
default: "" | "small" | "default" | "large";
|
76
|
+
};
|
69
77
|
}>> & Readonly<{
|
70
78
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
71
79
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -73,6 +81,7 @@ declare function __VLS_template(): {
|
|
73
81
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
74
82
|
}>, {
|
75
83
|
data: any[];
|
84
|
+
size: "" | "small" | "default" | "large";
|
76
85
|
pagination: {
|
77
86
|
currentPage?: number;
|
78
87
|
pageSize?: number;
|
@@ -117,6 +126,10 @@ declare function __VLS_template(): {
|
|
117
126
|
type: BooleanConstructor;
|
118
127
|
default: boolean;
|
119
128
|
};
|
129
|
+
size: {
|
130
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
131
|
+
default: "" | "small" | "default" | "large";
|
132
|
+
};
|
120
133
|
}>> & Readonly<{
|
121
134
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
122
135
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -124,6 +137,7 @@ declare function __VLS_template(): {
|
|
124
137
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
125
138
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
126
139
|
data: any[];
|
140
|
+
size: "" | "small" | "default" | "large";
|
127
141
|
pagination: {
|
128
142
|
currentPage?: number;
|
129
143
|
pageSize?: number;
|
@@ -185,6 +199,10 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
185
199
|
type: BooleanConstructor;
|
186
200
|
default: boolean;
|
187
201
|
};
|
202
|
+
size: {
|
203
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
204
|
+
default: "" | "small" | "default" | "large";
|
205
|
+
};
|
188
206
|
}>> & Readonly<{
|
189
207
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
190
208
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -219,6 +237,10 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
219
237
|
type: BooleanConstructor;
|
220
238
|
default: boolean;
|
221
239
|
};
|
240
|
+
size: {
|
241
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
242
|
+
default: "" | "small" | "default" | "large";
|
243
|
+
};
|
222
244
|
}>> & Readonly<{
|
223
245
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
224
246
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -226,6 +248,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
226
248
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
227
249
|
}>, {
|
228
250
|
data: any[];
|
251
|
+
size: "" | "small" | "default" | "large";
|
229
252
|
pagination: {
|
230
253
|
currentPage?: number;
|
231
254
|
pageSize?: number;
|
@@ -270,6 +293,10 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
270
293
|
type: BooleanConstructor;
|
271
294
|
default: boolean;
|
272
295
|
};
|
296
|
+
size: {
|
297
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
298
|
+
default: "" | "small" | "default" | "large";
|
299
|
+
};
|
273
300
|
}>> & Readonly<{
|
274
301
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
275
302
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -277,6 +304,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
277
304
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
278
305
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
279
306
|
data: any[];
|
307
|
+
size: "" | "small" | "default" | "large";
|
280
308
|
pagination: {
|
281
309
|
currentPage?: number;
|
282
310
|
pageSize?: number;
|
@@ -20,6 +20,10 @@ declare function __VLS_template(): {
|
|
20
20
|
type: BooleanConstructor;
|
21
21
|
default: boolean;
|
22
22
|
};
|
23
|
+
size: {
|
24
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
25
|
+
default: "" | "small" | "default" | "large";
|
26
|
+
};
|
23
27
|
}>> & Readonly<{
|
24
28
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
25
29
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -41,12 +45,17 @@ declare function __VLS_template(): {
|
|
41
45
|
type: BooleanConstructor;
|
42
46
|
default: boolean;
|
43
47
|
};
|
48
|
+
size: {
|
49
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
50
|
+
default: "" | "small" | "default" | "large";
|
51
|
+
};
|
44
52
|
}>> & Readonly<{
|
45
53
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
46
54
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
47
55
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
48
56
|
}>, {
|
49
57
|
data: any[];
|
58
|
+
size: "" | "small" | "default" | "large";
|
50
59
|
showRowNumber: boolean;
|
51
60
|
selectionMode: boolean;
|
52
61
|
currentRowMode: boolean;
|
@@ -74,12 +83,17 @@ declare function __VLS_template(): {
|
|
74
83
|
type: BooleanConstructor;
|
75
84
|
default: boolean;
|
76
85
|
};
|
86
|
+
size: {
|
87
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
88
|
+
default: "" | "small" | "default" | "large";
|
89
|
+
};
|
77
90
|
}>> & Readonly<{
|
78
91
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
79
92
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
80
93
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
81
94
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
82
95
|
data: any[];
|
96
|
+
size: "" | "small" | "default" | "large";
|
83
97
|
showRowNumber: boolean;
|
84
98
|
selectionMode: boolean;
|
85
99
|
currentRowMode: boolean;
|
@@ -110,6 +124,10 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
110
124
|
type: BooleanConstructor;
|
111
125
|
default: boolean;
|
112
126
|
};
|
127
|
+
size: {
|
128
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
129
|
+
default: "" | "small" | "default" | "large";
|
130
|
+
};
|
113
131
|
}>> & Readonly<{
|
114
132
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
115
133
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -131,12 +149,17 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
131
149
|
type: BooleanConstructor;
|
132
150
|
default: boolean;
|
133
151
|
};
|
152
|
+
size: {
|
153
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
154
|
+
default: "" | "small" | "default" | "large";
|
155
|
+
};
|
134
156
|
}>> & Readonly<{
|
135
157
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
136
158
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
137
159
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
138
160
|
}>, {
|
139
161
|
data: any[];
|
162
|
+
size: "" | "small" | "default" | "large";
|
140
163
|
showRowNumber: boolean;
|
141
164
|
selectionMode: boolean;
|
142
165
|
currentRowMode: boolean;
|
@@ -164,12 +187,17 @@ declare const __VLS_component: import('vue').DefineComponent<{
|
|
164
187
|
type: BooleanConstructor;
|
165
188
|
default: boolean;
|
166
189
|
};
|
190
|
+
size: {
|
191
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
192
|
+
default: "" | "small" | "default" | "large";
|
193
|
+
};
|
167
194
|
}>> & Readonly<{
|
168
195
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
169
196
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
170
197
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
171
198
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
172
199
|
data: any[];
|
200
|
+
size: "" | "small" | "default" | "large";
|
173
201
|
showRowNumber: boolean;
|
174
202
|
selectionMode: boolean;
|
175
203
|
currentRowMode: boolean;
|
@@ -22,6 +22,10 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
|
|
22
22
|
type: BooleanConstructor;
|
23
23
|
default: boolean;
|
24
24
|
};
|
25
|
+
size: {
|
26
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
27
|
+
default: "" | "small" | "default" | "large";
|
28
|
+
};
|
25
29
|
}>> & Readonly<{
|
26
30
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
27
31
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -43,12 +47,17 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
|
|
43
47
|
type: BooleanConstructor;
|
44
48
|
default: boolean;
|
45
49
|
};
|
50
|
+
size: {
|
51
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
52
|
+
default: "" | "small" | "default" | "large";
|
53
|
+
};
|
46
54
|
}>> & Readonly<{
|
47
55
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
48
56
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
49
57
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
50
58
|
}>, {
|
51
59
|
data: any[];
|
60
|
+
size: "" | "small" | "default" | "large";
|
52
61
|
showRowNumber: boolean;
|
53
62
|
selectionMode: boolean;
|
54
63
|
currentRowMode: boolean;
|
@@ -76,12 +85,17 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
|
|
76
85
|
type: BooleanConstructor;
|
77
86
|
default: boolean;
|
78
87
|
};
|
88
|
+
size: {
|
89
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
90
|
+
default: "" | "small" | "default" | "large";
|
91
|
+
};
|
79
92
|
}>> & Readonly<{
|
80
93
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
81
94
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
82
95
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
83
96
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
84
97
|
data: any[];
|
98
|
+
size: "" | "small" | "default" | "large";
|
85
99
|
showRowNumber: boolean;
|
86
100
|
selectionMode: boolean;
|
87
101
|
currentRowMode: boolean;
|
@@ -157,6 +171,10 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
|
|
157
171
|
type: BooleanConstructor;
|
158
172
|
default: boolean;
|
159
173
|
};
|
174
|
+
size: {
|
175
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
176
|
+
default: "" | "small" | "default" | "large";
|
177
|
+
};
|
160
178
|
}>> & Readonly<{
|
161
179
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
162
180
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -191,6 +209,10 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
|
|
191
209
|
type: BooleanConstructor;
|
192
210
|
default: boolean;
|
193
211
|
};
|
212
|
+
size: {
|
213
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
214
|
+
default: "" | "small" | "default" | "large";
|
215
|
+
};
|
194
216
|
}>> & Readonly<{
|
195
217
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
196
218
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -198,6 +220,7 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
|
|
198
220
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
199
221
|
}>, {
|
200
222
|
data: any[];
|
223
|
+
size: "" | "small" | "default" | "large";
|
201
224
|
pagination: {
|
202
225
|
currentPage?: number;
|
203
226
|
pageSize?: number;
|
@@ -242,6 +265,10 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
|
|
242
265
|
type: BooleanConstructor;
|
243
266
|
default: boolean;
|
244
267
|
};
|
268
|
+
size: {
|
269
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
270
|
+
default: "" | "small" | "default" | "large";
|
271
|
+
};
|
245
272
|
}>> & Readonly<{
|
246
273
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
247
274
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -249,6 +276,7 @@ declare const _default: import('../_util').SFCWithInstall<{}> & {
|
|
249
276
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
250
277
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
251
278
|
data: any[];
|
279
|
+
size: "" | "small" | "default" | "large";
|
252
280
|
pagination: {
|
253
281
|
currentPage?: number;
|
254
282
|
pageSize?: number;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { findIndex as P } from "lodash-es";
|
2
|
-
import { defineComponent as A, useTemplateRef as x, ref as
|
2
|
+
import { defineComponent as A, useTemplateRef as x, ref as v, watch as k, openBlock as y, createBlock as I, unref as L, withCtx as S, renderSlot as z } from "vue";
|
3
3
|
import { withInstall as U } from "../_util/vue/install.js";
|
4
4
|
import "element-plus";
|
5
5
|
import T from "../Querytable/index.js";
|
@@ -14,7 +14,7 @@ const B = /* @__PURE__ */ A({
|
|
14
14
|
data: {}
|
15
15
|
},
|
16
16
|
setup(e) {
|
17
|
-
const d = x("table"), i =
|
17
|
+
const d = x("table"), i = v(), s = v(), l = D();
|
18
18
|
l == null || l.registerKeydownHandler((a) => {
|
19
19
|
if (a == "ArrowUp") {
|
20
20
|
let o;
|
@@ -22,16 +22,16 @@ const B = /* @__PURE__ */ A({
|
|
22
22
|
} else if (a == "ArrowDown") {
|
23
23
|
let o;
|
24
24
|
i.value == e.data.length - 1 ? o = e.data[0] : o = e.data[i.value + 1], d.value.setCurrentRow(o), r(i.value);
|
25
|
-
} else a == "Enter" &&
|
25
|
+
} else a == "Enter" && s.value && (l == null || l.backfill(s.value));
|
26
26
|
});
|
27
27
|
const r = (a) => {
|
28
28
|
var t;
|
29
29
|
((t = d.value) == null ? void 0 : t.$el).querySelectorAll(".el-table__row")[a].scrollIntoViewIfNeeded();
|
30
|
-
},
|
30
|
+
}, f = (a) => {
|
31
31
|
l == null || l.backfill(a);
|
32
32
|
}, u = (a) => {
|
33
33
|
const o = P(e.data, a);
|
34
|
-
o == -1 ? (i.value = 0,
|
34
|
+
o == -1 ? (i.value = 0, s.value = e.data[0]) : (i.value = o, s.value = a);
|
35
35
|
};
|
36
36
|
return k(
|
37
37
|
() => e.data,
|
@@ -41,9 +41,10 @@ const B = /* @__PURE__ */ A({
|
|
41
41
|
), (a, o) => (y(), I(L(T), {
|
42
42
|
ref: "table",
|
43
43
|
data: a.data,
|
44
|
-
onRowClick:
|
44
|
+
onRowClick: f,
|
45
45
|
"current-row-mode": "",
|
46
|
-
onCurrentRowChange: u
|
46
|
+
onCurrentRowChange: u,
|
47
|
+
size: "small"
|
47
48
|
}, {
|
48
49
|
default: S(() => [
|
49
50
|
z(a.$slots, "default")
|
@@ -61,11 +62,11 @@ const B = /* @__PURE__ */ A({
|
|
61
62
|
},
|
62
63
|
emits: ["update:pagination"],
|
63
64
|
setup(e, { emit: d }) {
|
64
|
-
const i = d,
|
65
|
+
const i = d, s = (t) => {
|
65
66
|
i("update:pagination", t);
|
66
|
-
}, l = x("table"), r =
|
67
|
+
}, l = x("table"), r = v(), f = v(), u = D();
|
67
68
|
u == null || u.registerKeydownHandler((t) => {
|
68
|
-
var c, R,
|
69
|
+
var c, R, g, h, C, $;
|
69
70
|
if (t == "ArrowUp") {
|
70
71
|
let n;
|
71
72
|
r.value == 0 ? n = e.data[e.data.length - 1] : n = e.data[r.value - 1], l.value.setCurrentRow(n), a(r.value);
|
@@ -73,20 +74,20 @@ const B = /* @__PURE__ */ A({
|
|
73
74
|
let n;
|
74
75
|
r.value == e.data.length - 1 ? n = e.data[0] : n = e.data[r.value + 1], l.value.setCurrentRow(n), a(r.value);
|
75
76
|
} else if (t == "Enter")
|
76
|
-
|
77
|
+
f.value && (u == null || u.backfill(f.value));
|
77
78
|
else if (t == "ArrowLeft") {
|
78
|
-
const n = (c = e.pagination) == null ? void 0 : c.currentPage, w = (R = e.pagination) == null ? void 0 : R.pageSize,
|
79
|
-
if (!n || !w || !
|
79
|
+
const n = (c = e.pagination) == null ? void 0 : c.currentPage, w = (R = e.pagination) == null ? void 0 : R.pageSize, m = (g = e.pagination) == null ? void 0 : g.total;
|
80
|
+
if (!n || !w || !m)
|
80
81
|
return;
|
81
82
|
n > 1 && i("update:pagination", {
|
82
83
|
...e.pagination,
|
83
84
|
currentPage: n - 1
|
84
85
|
});
|
85
86
|
} else if (t == "ArrowRight") {
|
86
|
-
const n = (h = e.pagination) == null ? void 0 : h.currentPage, w = (C = e.pagination) == null ? void 0 : C.pageSize,
|
87
|
-
if (!n || !w || !
|
87
|
+
const n = (h = e.pagination) == null ? void 0 : h.currentPage, w = (C = e.pagination) == null ? void 0 : C.pageSize, m = ($ = e.pagination) == null ? void 0 : $.total;
|
88
|
+
if (!n || !w || !m)
|
88
89
|
return;
|
89
|
-
const Q = Math.ceil(
|
90
|
+
const Q = Math.ceil(m / w);
|
90
91
|
n < Q && i("update:pagination", {
|
91
92
|
...e.pagination,
|
92
93
|
currentPage: n + 1
|
@@ -94,13 +95,13 @@ const B = /* @__PURE__ */ A({
|
|
94
95
|
}
|
95
96
|
});
|
96
97
|
const a = (t) => {
|
97
|
-
var
|
98
|
-
((
|
98
|
+
var g;
|
99
|
+
((g = l.value) == null ? void 0 : g.$el).querySelectorAll(".el-table__row")[t].scrollIntoViewIfNeeded();
|
99
100
|
}, o = (t) => {
|
100
101
|
u == null || u.backfill(t);
|
101
102
|
}, b = (t) => {
|
102
103
|
const c = P(e.data, t);
|
103
|
-
c == -1 ? (r.value = 0,
|
104
|
+
c == -1 ? (r.value = 0, f.value = e.data[0]) : (r.value = c, f.value = t);
|
104
105
|
};
|
105
106
|
return k(
|
106
107
|
() => e.data,
|
@@ -114,7 +115,8 @@ const B = /* @__PURE__ */ A({
|
|
114
115
|
"current-row-mode": "",
|
115
116
|
onCurrentRowChange: b,
|
116
117
|
pagination: t.pagination,
|
117
|
-
"onUpdate:pagination":
|
118
|
+
"onUpdate:pagination": s,
|
119
|
+
size: "small"
|
118
120
|
}, {
|
119
121
|
default: S(() => [
|
120
122
|
z(t.$slots, "default")
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/LovTable/LovQuerytable.vue","../../../src/components/LovTable/LovPagetable.vue","../../../src/components/LovTable/index.ts"],"sourcesContent":["<template>\r\n <querytable ref=\"table\" :data=\"data\" @row-click=\"onRowClick\" current-row-mode @current-row-change=\"handleCurrentRowChange\"
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/LovTable/LovQuerytable.vue","../../../src/components/LovTable/LovPagetable.vue","../../../src/components/LovTable/index.ts"],"sourcesContent":["<template>\r\n <querytable ref=\"table\" :data=\"data\" @row-click=\"onRowClick\" current-row-mode @current-row-change=\"handleCurrentRowChange\" size=\"small\">\r\n <slot></slot>\r\n </querytable>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport { ref, useTemplateRef, watch } from 'vue'\r\nimport Querytable from '../Querytable'\r\nimport { useLov } from '../Form'\r\nimport { findIndex } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OLovQuerytable', inheritAttrs: true })\r\n\r\nconst { data } = defineProps<{ data: any[] }>()\r\nconst tableRef = useTemplateRef('table')\r\nconst currentRowIndex = ref()\r\nconst currentRowData = ref()\r\n\r\nconst lov = useLov()\r\nlov?.registerKeydownHandler((code) => {\r\n if (code == 'ArrowUp') {\r\n let nextRow: any\r\n if (currentRowIndex.value == 0) {\r\n nextRow = data[data.length - 1]\r\n } else {\r\n nextRow = data[currentRowIndex.value - 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'ArrowDown') {\r\n let nextRow: any\r\n if (currentRowIndex.value == data.length - 1) {\r\n nextRow = data[0]\r\n } else {\r\n nextRow = data[currentRowIndex.value + 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'Enter') {\r\n currentRowData.value && lov?.backfill(currentRowData.value)\r\n }\r\n})\r\n\r\nconst scrollToRow = (index: number) => {\r\n const $table = tableRef.value?.$el\r\n const $row = $table.querySelectorAll('.el-table__row')[index]\r\n $row.scrollIntoViewIfNeeded()\r\n}\r\n\r\nconst onRowClick = (row: any) => {\r\n lov?.backfill(row)\r\n}\r\n\r\nconst handleCurrentRowChange = (row: any) => {\r\n const index = findIndex(data, row)\r\n if (index == -1) {\r\n currentRowIndex.value = 0\r\n currentRowData.value = data[0]\r\n } else {\r\n currentRowIndex.value = index\r\n currentRowData.value = row\r\n }\r\n}\r\n\r\nwatch(\r\n () => data,\r\n () => {\r\n if (data.length > 0) {\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(data[0])\r\n }\r\n }\r\n)\r\n</script>\r\n","<template>\r\n <pagetable\r\n ref=\"table\"\r\n :data=\"data\"\r\n @row-click=\"onRowClick\"\r\n current-row-mode\r\n @current-row-change=\"handleCurrentRowChange\"\r\n :pagination=\"pagination\"\r\n @update:pagination=\"onUpdatePagination\"\r\n size=\"small\"\r\n >\r\n <slot></slot>\r\n </pagetable>\r\n</template>\r\n<script setup lang=\"ts\">\r\nimport Pagetable from '../Pagetable'\r\nimport { useLov } from '../Form'\r\nimport { ref, useTemplateRef, watch } from 'vue'\r\nimport { findIndex } from 'lodash-es'\r\n\r\ndefineOptions({ name: 'OLovPagetable', inheritAttrs: true })\r\n\r\nconst { data, pagination } = defineProps<{\r\n data: any[]\r\n pagination: {\r\n currentPage?: number\r\n pageSize?: number\r\n total?: number\r\n }\r\n}>()\r\n\r\nconst emits = defineEmits(['update:pagination'])\r\nconst onUpdatePagination = (data: any) => {\r\n emits('update:pagination', data)\r\n}\r\n\r\nconst tableRef = useTemplateRef('table')\r\nconst currentRowIndex = ref()\r\nconst currentRowData = ref()\r\n\r\nconst lov = useLov()\r\nlov?.registerKeydownHandler((code) => {\r\n if (code == 'ArrowUp') {\r\n let nextRow: any\r\n if (currentRowIndex.value == 0) {\r\n nextRow = data[data.length - 1]\r\n } else {\r\n nextRow = data[currentRowIndex.value - 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'ArrowDown') {\r\n let nextRow: any\r\n if (currentRowIndex.value == data.length - 1) {\r\n nextRow = data[0]\r\n } else {\r\n nextRow = data[currentRowIndex.value + 1]\r\n }\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(nextRow)\r\n scrollToRow(currentRowIndex.value)\r\n } else if (code == 'Enter') {\r\n currentRowData.value && lov?.backfill(currentRowData.value)\r\n } else if (code == 'ArrowLeft') {\r\n const currentPage = pagination?.currentPage\r\n const pageSize = pagination?.pageSize\r\n const total = pagination?.total\r\n if (!currentPage || !pageSize || !total) {\r\n return\r\n }\r\n if (currentPage > 1) {\r\n emits('update:pagination', {\r\n ...pagination,\r\n currentPage: currentPage - 1,\r\n })\r\n }\r\n } else if (code == 'ArrowRight') {\r\n const currentPage = pagination?.currentPage\r\n const pageSize = pagination?.pageSize\r\n const total = pagination?.total\r\n if (!currentPage || !pageSize || !total) {\r\n return\r\n }\r\n const totalPage = Math.ceil(total / pageSize)\r\n if (currentPage < totalPage) {\r\n emits('update:pagination', {\r\n ...pagination,\r\n currentPage: currentPage + 1,\r\n })\r\n }\r\n }\r\n})\r\n\r\nconst scrollToRow = (index: number) => {\r\n const $table = tableRef.value?.$el\r\n const $row = $table.querySelectorAll('.el-table__row')[index]\r\n $row.scrollIntoViewIfNeeded()\r\n}\r\n\r\nconst onRowClick = (row: any) => {\r\n lov?.backfill(row)\r\n}\r\n\r\nconst handleCurrentRowChange = (row: any) => {\r\n const index = findIndex(data, row)\r\n if (index == -1) {\r\n currentRowIndex.value = 0\r\n currentRowData.value = data[0]\r\n } else {\r\n currentRowIndex.value = index\r\n currentRowData.value = row\r\n }\r\n}\r\n\r\nwatch(\r\n () => data,\r\n () => {\r\n if (data.length > 0) {\r\n //@ts-ignore\r\n tableRef.value.setCurrentRow(data[0])\r\n }\r\n }\r\n)\r\n</script>\r\n","import { withInstall } from '../_util'\r\n\r\nimport LovQuerytable from './LovQuerytable.vue'\r\nimport LovPagetable from './LovPagetable.vue'\r\n\r\nexport default withInstall(\r\n {},\r\n {\r\n LovQuerytable,\r\n LovPagetable,\r\n }\r\n)\r\n"],"names":["tableRef","useTemplateRef","currentRowIndex","ref","currentRowData","lov","useLov","code","nextRow","__props","scrollToRow","index","_a","onRowClick","row","handleCurrentRowChange","findIndex","watch","emits","__emit","onUpdatePagination","data","currentPage","pageSize","_b","total","_c","_d","_e","_f","totalPage","withInstall","LovQuerytable","LovPagetable"],"mappings":";;;;;;;;;;;;;;;;AAcM,UAAAA,IAAWC,EAAe,OAAO,GACjCC,IAAkBC,KAClBC,IAAiBD,KAEjBE,IAAMC;AACP,IAAAD,KAAA,QAAAA,EAAA,uBAAuB,CAACE,MAAS;AACpC,UAAIA,KAAQ,WAAW;AACjB,YAAAC;AACA,QAAAN,EAAgB,SAAS,IAC3BM,IAAUC,EAAI,KAACA,EAAI,KAAC,SAAS,CAAC,IAE9BD,IAAUC,OAAKP,EAAgB,QAAQ,CAAC,GAGjCF,EAAA,MAAM,cAAcQ,CAAO,GACpCE,EAAYR,EAAgB,KAAK;AAAA,MAAA,WACxBK,KAAQ,aAAa;AAC1B,YAAAC;AACJ,QAAIN,EAAgB,SAASO,EAAI,KAAC,SAAS,IAC/BD,IAAAC,OAAK,CAAC,IAEhBD,IAAUC,OAAKP,EAAgB,QAAQ,CAAC,GAGjCF,EAAA,MAAM,cAAcQ,CAAO,GACpCE,EAAYR,EAAgB,KAAK;AAAA,MAAA,MACnC,CAAWK,KAAQ,WACjBH,EAAe,UAASC,KAAA,QAAAA,EAAK,SAASD,EAAe;AAAA,IACvD;AAGI,UAAAM,IAAc,CAACC,MAAkB;;AAGrC,QAFeC,IAAAZ,EAAS,UAAT,gBAAAY,EAAgB,KACX,iBAAiB,gBAAgB,EAAED,CAAK,EACvD,uBAAuB;AAAA,IAAA,GAGxBE,IAAa,CAACC,MAAa;AAC/B,MAAAT,KAAA,QAAAA,EAAK,SAASS;AAAA,IAAG,GAGbC,IAAyB,CAACD,MAAa;AAC3C,YAAMH,IAAQK,EAAUP,EAAI,MAAEK,CAAG;AACjC,MAAIH,KAAS,MACX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EACD;AAAA,IAAA,eACEC;AAAAA,IAAA,cACAC;AAAAA,EACF;AACF;"}
|
@@ -28,6 +28,10 @@ export declare const pagetableProps: () => {
|
|
28
28
|
type: BooleanConstructor;
|
29
29
|
default: boolean;
|
30
30
|
};
|
31
|
+
size: {
|
32
|
+
type: PropType<"" | "small" | "default" | "large">;
|
33
|
+
default: "" | "small" | "default" | "large";
|
34
|
+
};
|
31
35
|
};
|
32
36
|
export type PagetableProps = Partial<ExtractPropTypes<ReturnType<typeof pagetableProps>>>;
|
33
37
|
declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
|
@@ -59,6 +63,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
|
|
59
63
|
type: BooleanConstructor;
|
60
64
|
default: boolean;
|
61
65
|
};
|
66
|
+
size: {
|
67
|
+
type: PropType<"" | "small" | "default" | "large">;
|
68
|
+
default: "" | "small" | "default" | "large";
|
69
|
+
};
|
62
70
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("selectionChange" | "currentRowChange" | "update:pagination" | "rowClick")[], "selectionChange" | "currentRowChange" | "update:pagination" | "rowClick", import('vue').PublicProps, Readonly<ExtractPropTypes<{
|
63
71
|
data: {
|
64
72
|
type: PropType<any[]>;
|
@@ -88,6 +96,10 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
|
|
88
96
|
type: BooleanConstructor;
|
89
97
|
default: boolean;
|
90
98
|
};
|
99
|
+
size: {
|
100
|
+
type: PropType<"" | "small" | "default" | "large">;
|
101
|
+
default: "" | "small" | "default" | "large";
|
102
|
+
};
|
91
103
|
}>> & Readonly<{
|
92
104
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
93
105
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -95,6 +107,7 @@ declare const _default: import('vue').DefineComponent<ExtractPropTypes<{
|
|
95
107
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
96
108
|
}>, {
|
97
109
|
data: any[];
|
110
|
+
size: "" | "small" | "default" | "large";
|
98
111
|
pagination: {
|
99
112
|
currentPage?: number;
|
100
113
|
pageSize?: number;
|
@@ -38,6 +38,10 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
|
|
38
38
|
type: BooleanConstructor;
|
39
39
|
default: boolean;
|
40
40
|
};
|
41
|
+
size: {
|
42
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
43
|
+
default: "" | "small" | "default" | "large";
|
44
|
+
};
|
41
45
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("selectionChange" | "currentRowChange" | "update:pagination" | "rowClick")[], "selectionChange" | "currentRowChange" | "update:pagination" | "rowClick", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
42
46
|
data: {
|
43
47
|
type: import('vue').PropType<any[]>;
|
@@ -67,6 +71,10 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
|
|
67
71
|
type: BooleanConstructor;
|
68
72
|
default: boolean;
|
69
73
|
};
|
74
|
+
size: {
|
75
|
+
type: import('vue').PropType<"" | "small" | "default" | "large">;
|
76
|
+
default: "" | "small" | "default" | "large";
|
77
|
+
};
|
70
78
|
}>> & Readonly<{
|
71
79
|
onSelectionChange?: ((...args: any[]) => any) | undefined;
|
72
80
|
onCurrentRowChange?: ((...args: any[]) => any) | undefined;
|
@@ -74,6 +82,7 @@ declare const _default: import('../_util').SFCWithInstall<import('vue').DefineCo
|
|
74
82
|
onRowClick?: ((...args: any[]) => any) | undefined;
|
75
83
|
}>, {
|
76
84
|
data: any[];
|
85
|
+
size: "" | "small" | "default" | "large";
|
77
86
|
pagination: {
|
78
87
|
currentPage?: number;
|
79
88
|
pageSize?: number;
|