cosey 0.4.19 → 0.4.21
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.
- package/components/field/components/tree-select/tree-select.d.ts +1 -1
- package/components/form-query/form-query.d.ts +4 -3
- package/components/form-query/form-query.js +4 -0
- package/components/form-query/form-query.vue.d.ts +8 -6
- package/components/form-query/form-query.vue.js +3 -2
- package/components/form-query/index.d.ts +12 -9
- package/components/table/index.d.ts +8 -6
- package/components/table/table-column/renderer.d.ts +1 -1
- package/components/table/table-column/renderer.js +3 -3
- package/components/table/table-query/table-query.d.ts +4 -3
- package/components/table/table-query/table-query.vue.d.ts +8 -6
- package/components/table/table.vue.js +2 -2
- package/locale/lang/ar.d.ts +1 -0
- package/locale/lang/ar.js +3 -2
- package/locale/lang/en.d.ts +1 -0
- package/locale/lang/en.js +3 -2
- package/locale/lang/zh-cn.d.ts +1 -0
- package/locale/lang/zh-cn.js +3 -2
- package/package.json +1 -1
- package/utils/date.js +3 -0
- package/utils/vue.js +8 -2
|
@@ -34,7 +34,7 @@ export declare const elTreeProps: {
|
|
|
34
34
|
};
|
|
35
35
|
defaultCheckedKeys: ArrayConstructor;
|
|
36
36
|
defaultExpandedKeys: ArrayConstructor;
|
|
37
|
-
currentNodeKey: (
|
|
37
|
+
currentNodeKey: (NumberConstructor | StringConstructor)[];
|
|
38
38
|
renderContent: FunctionConstructor;
|
|
39
39
|
showCheckbox: {
|
|
40
40
|
type: BooleanConstructor;
|
|
@@ -33,6 +33,10 @@ export declare const formQueryProps: {
|
|
|
33
33
|
type: BooleanConstructor;
|
|
34
34
|
default: boolean;
|
|
35
35
|
};
|
|
36
|
+
hideReset: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
36
40
|
width: {
|
|
37
41
|
type: PropType<import("..").FormItemWidth>;
|
|
38
42
|
};
|
|
@@ -66,9 +70,6 @@ export declare const formQueryProps: {
|
|
|
66
70
|
hideSubmit: {
|
|
67
71
|
type: BooleanConstructor;
|
|
68
72
|
};
|
|
69
|
-
hideReset: {
|
|
70
|
-
type: BooleanConstructor;
|
|
71
|
-
};
|
|
72
73
|
model: ObjectConstructor;
|
|
73
74
|
rules: {
|
|
74
75
|
readonly type: PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -24,6 +24,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
24
24
|
type: BooleanConstructor;
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
27
|
+
hideReset: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
27
31
|
width: {
|
|
28
32
|
type: import("vue").PropType<import("..").FormItemWidth>;
|
|
29
33
|
};
|
|
@@ -57,9 +61,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
57
61
|
hideSubmit: {
|
|
58
62
|
type: BooleanConstructor;
|
|
59
63
|
};
|
|
60
|
-
hideReset: {
|
|
61
|
-
type: BooleanConstructor;
|
|
62
|
-
};
|
|
63
64
|
model: ObjectConstructor;
|
|
64
65
|
rules: {
|
|
65
66
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -171,6 +172,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
171
172
|
type: BooleanConstructor;
|
|
172
173
|
default: boolean;
|
|
173
174
|
};
|
|
175
|
+
hideReset: {
|
|
176
|
+
type: BooleanConstructor;
|
|
177
|
+
default: boolean;
|
|
178
|
+
};
|
|
174
179
|
width: {
|
|
175
180
|
type: import("vue").PropType<import("..").FormItemWidth>;
|
|
176
181
|
};
|
|
@@ -204,9 +209,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
204
209
|
hideSubmit: {
|
|
205
210
|
type: BooleanConstructor;
|
|
206
211
|
};
|
|
207
|
-
hideReset: {
|
|
208
|
-
type: BooleanConstructor;
|
|
209
|
-
};
|
|
210
212
|
model: ObjectConstructor;
|
|
211
213
|
rules: {
|
|
212
214
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -120,14 +120,15 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
120
120
|
/* TEXT */)]),
|
|
121
121
|
_: 1
|
|
122
122
|
/* STABLE */
|
|
123
|
-
}, 8, ["loading"]),
|
|
123
|
+
}, 8, ["loading"]), !_ctx.hideReset ? (openBlock(), createBlock(unref(ElButton), {
|
|
124
|
+
key: 0,
|
|
124
125
|
onClick: unref(reset)
|
|
125
126
|
}, {
|
|
126
127
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.form.reset")), 1
|
|
127
128
|
/* TEXT */)]),
|
|
128
129
|
_: 1
|
|
129
130
|
/* STABLE */
|
|
130
|
-
}, 8, ["onClick"])]), showToggle.value ? (openBlock(), createBlock(unref(_Toggle), {
|
|
131
|
+
}, 8, ["onClick"])) : createCommentVNode("v-if", true)]), showToggle.value ? (openBlock(), createBlock(unref(_Toggle), {
|
|
131
132
|
key: 0,
|
|
132
133
|
modelValue: unref(innerCollapsed),
|
|
133
134
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => isRef(innerCollapsed) ? innerCollapsed.value = $event : null)
|
|
@@ -24,6 +24,10 @@ declare const _FormQuery: {
|
|
|
24
24
|
type: BooleanConstructor;
|
|
25
25
|
default: boolean;
|
|
26
26
|
};
|
|
27
|
+
hideReset: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
27
31
|
width: {
|
|
28
32
|
type: import("vue").PropType<import("..").FormItemWidth>;
|
|
29
33
|
};
|
|
@@ -57,9 +61,6 @@ declare const _FormQuery: {
|
|
|
57
61
|
hideSubmit: {
|
|
58
62
|
type: BooleanConstructor;
|
|
59
63
|
};
|
|
60
|
-
hideReset: {
|
|
61
|
-
type: BooleanConstructor;
|
|
62
|
-
};
|
|
63
64
|
model: ObjectConstructor;
|
|
64
65
|
rules: {
|
|
65
66
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -204,6 +205,10 @@ declare const _FormQuery: {
|
|
|
204
205
|
type: BooleanConstructor;
|
|
205
206
|
default: boolean;
|
|
206
207
|
};
|
|
208
|
+
hideReset: {
|
|
209
|
+
type: BooleanConstructor;
|
|
210
|
+
default: boolean;
|
|
211
|
+
};
|
|
207
212
|
width: {
|
|
208
213
|
type: import("vue").PropType<import("..").FormItemWidth>;
|
|
209
214
|
};
|
|
@@ -237,9 +242,6 @@ declare const _FormQuery: {
|
|
|
237
242
|
hideSubmit: {
|
|
238
243
|
type: BooleanConstructor;
|
|
239
244
|
};
|
|
240
|
-
hideReset: {
|
|
241
|
-
type: BooleanConstructor;
|
|
242
|
-
};
|
|
243
245
|
model: ObjectConstructor;
|
|
244
246
|
rules: {
|
|
245
247
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -378,6 +380,10 @@ declare const _FormQuery: {
|
|
|
378
380
|
type: BooleanConstructor;
|
|
379
381
|
default: boolean;
|
|
380
382
|
};
|
|
383
|
+
hideReset: {
|
|
384
|
+
type: BooleanConstructor;
|
|
385
|
+
default: boolean;
|
|
386
|
+
};
|
|
381
387
|
width: {
|
|
382
388
|
type: import("vue").PropType<import("..").FormItemWidth>;
|
|
383
389
|
};
|
|
@@ -411,9 +417,6 @@ declare const _FormQuery: {
|
|
|
411
417
|
hideSubmit: {
|
|
412
418
|
type: BooleanConstructor;
|
|
413
419
|
};
|
|
414
|
-
hideReset: {
|
|
415
|
-
type: BooleanConstructor;
|
|
416
|
-
};
|
|
417
420
|
model: ObjectConstructor;
|
|
418
421
|
rules: {
|
|
419
422
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -54,6 +54,10 @@ declare const _Table: {
|
|
|
54
54
|
type: BooleanConstructor;
|
|
55
55
|
default: boolean;
|
|
56
56
|
};
|
|
57
|
+
hideReset: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
57
61
|
width: {
|
|
58
62
|
type: import("vue").PropType<import("..").FormItemWidth>;
|
|
59
63
|
};
|
|
@@ -87,9 +91,6 @@ declare const _Table: {
|
|
|
87
91
|
hideSubmit: {
|
|
88
92
|
type: BooleanConstructor;
|
|
89
93
|
};
|
|
90
|
-
hideReset: {
|
|
91
|
-
type: BooleanConstructor;
|
|
92
|
-
};
|
|
93
94
|
model: ObjectConstructor;
|
|
94
95
|
rules: {
|
|
95
96
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -389,6 +390,10 @@ declare const _Table: {
|
|
|
389
390
|
type: BooleanConstructor;
|
|
390
391
|
default: boolean;
|
|
391
392
|
};
|
|
393
|
+
hideReset: {
|
|
394
|
+
type: BooleanConstructor;
|
|
395
|
+
default: boolean;
|
|
396
|
+
};
|
|
392
397
|
width: {
|
|
393
398
|
type: import("vue").PropType<import("..").FormItemWidth>;
|
|
394
399
|
};
|
|
@@ -422,9 +427,6 @@ declare const _Table: {
|
|
|
422
427
|
hideSubmit: {
|
|
423
428
|
type: BooleanConstructor;
|
|
424
429
|
};
|
|
425
|
-
hideReset: {
|
|
426
|
-
type: BooleanConstructor;
|
|
427
|
-
};
|
|
428
430
|
model: ObjectConstructor;
|
|
429
431
|
rules: {
|
|
430
432
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type LinkProps, SwitchProps, type TableColumnCtx } from 'element-plus';
|
|
1
|
+
import { type LinkProps, type SwitchProps, type TableColumnCtx } from 'element-plus';
|
|
2
2
|
import { type TableColumnProps } from './table-column';
|
|
3
3
|
import { type LongTextProps } from '../../long-text';
|
|
4
4
|
import { type MediaCardProps } from '../../media-card';
|
|
@@ -5,7 +5,7 @@ import { LongText as _LongText } from '../../long-text/index.js';
|
|
|
5
5
|
import { MediaCard as _MediaCard } from '../../media-card/index.js';
|
|
6
6
|
import { MediaCardGroup as _MediaCardGroup } from '../../media-card-group/index.js';
|
|
7
7
|
import { isEmpty, isString } from '../../../utils/is.js';
|
|
8
|
-
import { Scope } from '../../../utils/vue.js';
|
|
8
|
+
import { Scope, getVNodeText } from '../../../utils/vue.js';
|
|
9
9
|
import { formatToDate, formatToDateTime } from '../../../utils/date.js';
|
|
10
10
|
import { toArray } from '../../../utils/array.js';
|
|
11
11
|
|
|
@@ -113,10 +113,10 @@ function renderer({
|
|
|
113
113
|
}
|
|
114
114
|
function exportRenderer(row, column, cellValue, index) {
|
|
115
115
|
if (column.formatter) {
|
|
116
|
-
return column.formatter(row, column, cellValue, index);
|
|
116
|
+
return getVNodeText(column.formatter(row, column, cellValue, index));
|
|
117
117
|
}
|
|
118
118
|
if (column.format) {
|
|
119
|
-
return column.format(cellValue, row, column, index);
|
|
119
|
+
return getVNodeText(column.format(cellValue, row, column, index));
|
|
120
120
|
}
|
|
121
121
|
if (isEmpty(cellValue)) {
|
|
122
122
|
return "";
|
|
@@ -36,6 +36,10 @@ export declare const tableQueryProps: {
|
|
|
36
36
|
type: BooleanConstructor;
|
|
37
37
|
default: boolean;
|
|
38
38
|
};
|
|
39
|
+
hideReset: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
39
43
|
width: {
|
|
40
44
|
type: PropType<import("../..").FormItemWidth>;
|
|
41
45
|
};
|
|
@@ -69,9 +73,6 @@ export declare const tableQueryProps: {
|
|
|
69
73
|
hideSubmit: {
|
|
70
74
|
type: BooleanConstructor;
|
|
71
75
|
};
|
|
72
|
-
hideReset: {
|
|
73
|
-
type: BooleanConstructor;
|
|
74
|
-
};
|
|
75
76
|
model: ObjectConstructor;
|
|
76
77
|
rules: {
|
|
77
78
|
readonly type: PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -28,6 +28,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
28
28
|
type: BooleanConstructor;
|
|
29
29
|
default: boolean;
|
|
30
30
|
};
|
|
31
|
+
hideReset: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
31
35
|
width: {
|
|
32
36
|
type: import("vue").PropType<import("../..").FormItemWidth>;
|
|
33
37
|
};
|
|
@@ -61,9 +65,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
61
65
|
hideSubmit: {
|
|
62
66
|
type: BooleanConstructor;
|
|
63
67
|
};
|
|
64
|
-
hideReset: {
|
|
65
|
-
type: BooleanConstructor;
|
|
66
|
-
};
|
|
67
68
|
model: ObjectConstructor;
|
|
68
69
|
rules: {
|
|
69
70
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -182,6 +183,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
182
183
|
type: BooleanConstructor;
|
|
183
184
|
default: boolean;
|
|
184
185
|
};
|
|
186
|
+
hideReset: {
|
|
187
|
+
type: BooleanConstructor;
|
|
188
|
+
default: boolean;
|
|
189
|
+
};
|
|
185
190
|
width: {
|
|
186
191
|
type: import("vue").PropType<import("../..").FormItemWidth>;
|
|
187
192
|
};
|
|
@@ -215,9 +220,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
215
220
|
hideSubmit: {
|
|
216
221
|
type: BooleanConstructor;
|
|
217
222
|
};
|
|
218
|
-
hideReset: {
|
|
219
|
-
type: BooleanConstructor;
|
|
220
|
-
};
|
|
221
223
|
model: ObjectConstructor;
|
|
222
224
|
rules: {
|
|
223
225
|
readonly type: import("vue").PropType<Partial<Record<string, import("element-plus").FormItemRule | import("element-plus").FormItemRule[]>>>;
|
|
@@ -17,12 +17,12 @@ import stdin_default$3 from './table-stats/table-stats.vue.js';
|
|
|
17
17
|
import { uniqid } from '../../utils/string.js';
|
|
18
18
|
import { useComponentConfig, useConfig } from '../config-provider/config-provider.js';
|
|
19
19
|
import { flatColumns } from '../../utils/excel/index.js';
|
|
20
|
-
import { getVNodeText, createMergedExpose } from '../../utils/vue.js';
|
|
21
20
|
import { useFetch } from '../../hooks/useFetch.js';
|
|
22
21
|
import { useFullPage } from '../../hooks/useFullPage.js';
|
|
23
22
|
import { useLocale } from '../../hooks/useLocale.js';
|
|
24
23
|
import { addPxUnit } from '../../utils/css.js';
|
|
25
24
|
import { isNullish, isObject, isFunction } from '../../utils/is.js';
|
|
25
|
+
import { getVNodeText, createMergedExpose } from '../../utils/vue.js';
|
|
26
26
|
import { useResizeObserver } from '../../hooks/useResizeObserver.js';
|
|
27
27
|
import { walkTree } from '../../utils/tree.js';
|
|
28
28
|
|
|
@@ -419,7 +419,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
419
419
|
_: 1
|
|
420
420
|
/* STABLE */
|
|
421
421
|
}, 8, ["content"])])) : createCommentVNode("v-if", true), mergedToolbarConfig.value.export ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_el_tooltip, {
|
|
422
|
-
content: unref(t)("co.table.
|
|
422
|
+
content: unref(t)("co.table.exportThisPage"),
|
|
423
423
|
placement: "top",
|
|
424
424
|
"show-after": 200,
|
|
425
425
|
"hide-after": 0
|
package/locale/lang/ar.d.ts
CHANGED
package/locale/lang/ar.js
CHANGED
|
@@ -56,8 +56,9 @@ var stdin_default = {
|
|
|
56
56
|
video: "\u0641\u064A\u062F\u064A\u0648"
|
|
57
57
|
},
|
|
58
58
|
table: {
|
|
59
|
-
export: "\u0635\u062F\
|
|
60
|
-
|
|
59
|
+
export: "\u062A\u0635\u062F\u064A\u0631",
|
|
60
|
+
exportThisPage: "\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062D\u0627\u0644\u064A\u0629",
|
|
61
|
+
exportData: "\u062A\u0635\u062F\u064A\u0631 \u0627\u0644\u0628\u064A\u0627\u0646\u0627\u062A",
|
|
61
62
|
exitFullScreen: "\u0627\u0644\u062E\u0631\u0648\u062C \u0645\u0646 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
62
63
|
fullScreen: "\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
63
64
|
columnSettings: "\u0625\u0639\u062F\u0627\u062F\u0627\u062A \u0627\u0644\u0623\u0639\u0645\u062F\u0629",
|
package/locale/lang/en.d.ts
CHANGED
package/locale/lang/en.js
CHANGED
|
@@ -56,8 +56,9 @@ var stdin_default = {
|
|
|
56
56
|
video: "Video"
|
|
57
57
|
},
|
|
58
58
|
table: {
|
|
59
|
-
export: "Export
|
|
60
|
-
|
|
59
|
+
export: "Export",
|
|
60
|
+
exportThisPage: "Export current page",
|
|
61
|
+
exportData: "Export data",
|
|
61
62
|
exitFullScreen: "Exit full screen",
|
|
62
63
|
fullScreen: "Full screen",
|
|
63
64
|
columnSettings: "Column Settings",
|
package/locale/lang/zh-cn.d.ts
CHANGED
package/locale/lang/zh-cn.js
CHANGED
|
@@ -56,8 +56,9 @@ var stdin_default = {
|
|
|
56
56
|
video: "\u89C6\u9891"
|
|
57
57
|
},
|
|
58
58
|
table: {
|
|
59
|
-
export: "\u5BFC\u51FA
|
|
60
|
-
|
|
59
|
+
export: "\u5BFC\u51FA",
|
|
60
|
+
exportThisPage: "\u5BFC\u51FA\u5F53\u524D\u9875",
|
|
61
|
+
exportData: "\u5BFC\u51FA\u6570\u636E",
|
|
61
62
|
exitFullScreen: "\u9000\u51FA\u5168\u5C4F",
|
|
62
63
|
fullScreen: "\u5168\u5C4F",
|
|
63
64
|
columnSettings: "\u5217\u8BBE\u7F6E",
|
package/package.json
CHANGED
package/utils/date.js
CHANGED
|
@@ -6,6 +6,9 @@ const DATE_FORMAT = MONTH_FORMAT + "-DD";
|
|
|
6
6
|
const TIME_FORMAT = "HH:mm:ss";
|
|
7
7
|
const DATE_TIME_FORMAT = DATE_FORMAT + " " + TIME_FORMAT;
|
|
8
8
|
function getDayjs(date) {
|
|
9
|
+
if (typeof date === "string" && Number.isFinite(+date)) {
|
|
10
|
+
date = +date;
|
|
11
|
+
}
|
|
9
12
|
if (typeof date === "number" && String(date).length === 10) {
|
|
10
13
|
date = date * 1e3;
|
|
11
14
|
}
|
package/utils/vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode } from 'vue';
|
|
2
|
-
import { isObject } from './is.js';
|
|
2
|
+
import { isObject, isPlainObject, isFunction } from './is.js';
|
|
3
3
|
|
|
4
4
|
function defineTemplate(callback) {
|
|
5
5
|
return {
|
|
@@ -45,9 +45,15 @@ function getVNodeText(vnode) {
|
|
|
45
45
|
if (Array.isArray(vnode)) {
|
|
46
46
|
return vnode.map(getVNodeText).join("");
|
|
47
47
|
}
|
|
48
|
-
if (isObject(vnode)
|
|
48
|
+
if (isObject(vnode)) {
|
|
49
|
+
if (isPlainObject(vnode.children)) {
|
|
50
|
+
return Object.values(vnode.children).map((slot) => getVNodeText(slot)).join("");
|
|
51
|
+
}
|
|
49
52
|
return getVNodeText(vnode.children);
|
|
50
53
|
}
|
|
54
|
+
if (isFunction(vnode)) {
|
|
55
|
+
return getVNodeText(vnode());
|
|
56
|
+
}
|
|
51
57
|
return "";
|
|
52
58
|
}
|
|
53
59
|
|