cosey 0.1.5 → 0.2.0
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/README.md +3 -1
- package/components/close/style/index.js +2 -2
- package/components/col/col.vue.js +1 -1
- package/components/col/style/index.js +3 -3
- package/components/config-provider/config-provider.d.ts +2 -0
- package/components/config-provider/config-provider.vue.js +13 -3
- package/components/context-menu/context-menu.vue.js +4 -4
- package/components/context-menu/context-sub-menu.vue.js +2 -2
- package/components/context-menu/style/index.js +2 -2
- package/components/editor/components/color-picker/color-picker.vue.js +15 -11
- package/components/editor/components/color-picker/useHistoryColor.js +3 -3
- package/components/editor/components/resize/resize.js +9 -9
- package/components/editor/components/resize/resize.style.js +20 -20
- package/components/editor/components/resize/resize.vue.js +2 -2
- package/components/editor/components/table-toolbar/table-toolbar.style.js +2 -2
- package/components/editor/components/table-toolbar/table-toolbar.vue.js +2 -2
- package/components/editor/components/toolbar/formats/font.vue.js +5 -1
- package/components/editor/components/toolbar/formats/header.vue.js +6 -2
- package/components/editor/components/toolbar/formats/link.vue.js +17 -13
- package/components/editor/components/toolbar/formats/size.vue.js +5 -1
- package/components/editor/components/toolbar/formats/source.vue.d.ts +2 -0
- package/components/editor/components/toolbar/formats/source.vue.js +78 -0
- package/components/editor/components/toolbar/formats/table.style.js +2 -2
- package/components/editor/components/toolbar/formats/video.vue.js +9 -5
- package/components/editor/components/toolbar/toolbar.vue.js +5 -0
- package/components/editor/formats/font.js +2 -2
- package/components/editor/formats/indent.js +1 -1
- package/components/editor/formats/kbd.d.ts +7 -0
- package/components/editor/formats/kbd.js +13 -0
- package/components/editor/modules/image-uploader/formats/image-loading.style.js +2 -2
- package/components/editor/quill.js +8 -6
- package/components/editor/style/index.js +25 -16
- package/components/field/components/autocomplete/autocomplete.vue.js +5 -1
- package/components/field/components/cascader/cascader.vue.js +5 -1
- package/components/field/components/checkbox-group/checkbox-group.vue.js +1 -1
- package/components/field/components/checkbox-group/panel.vue.js +10 -5
- package/components/field/components/date/date.vue.js +5 -1
- package/components/field/components/date-range/date-range.vue.js +6 -2
- package/components/field/components/date-time/date-time.vue.js +5 -1
- package/components/field/components/date-time-range/date-time-range.vue.js +6 -2
- package/components/field/components/dates/dates.vue.js +5 -1
- package/components/field/components/input/input.vue.js +5 -1
- package/components/field/components/input-tag/input-tag.vue.js +5 -1
- package/components/field/components/mention/mention.vue.js +5 -1
- package/components/field/components/month/month.vue.js +5 -1
- package/components/field/components/month-range/month-range.vue.js +6 -2
- package/components/field/components/months/months.vue.js +5 -1
- package/components/field/components/password/password.vue.js +5 -1
- package/components/field/components/select/select.d.ts +2 -2
- package/components/field/components/select/select.js +3 -3
- package/components/field/components/select/select.vue.js +5 -1
- package/components/field/components/select-v2/select-v2.d.ts +6 -3
- package/components/field/components/select-v2/select-v2.js +9 -0
- package/components/field/components/select-v2/select-v2.vue.js +21 -3
- package/components/field/components/textarea/textarea.vue.js +5 -1
- package/components/field/components/time/time.vue.js +5 -1
- package/components/field/components/time-range/time-range.vue.js +6 -2
- package/components/field/components/time-select/time-select.vue.js +5 -1
- package/components/field/components/tree-select/tree-select.vue.js +5 -1
- package/components/field/components/week/week.vue.js +6 -2
- package/components/field/components/year/year.vue.js +5 -1
- package/components/field/components/year-range/year-range.vue.js +6 -2
- package/components/field/components/years/years.vue.js +5 -1
- package/components/form/form-item.d.ts +1 -1
- package/components/form/form.d.ts +2 -0
- package/components/form/form.js +2 -2
- package/components/form/form.vue.d.ts +5 -0
- package/components/form/form.vue.js +6 -2
- package/components/form/index.d.ts +10 -1
- package/components/form/useBubbleTemplate.js +13 -5
- package/components/form-dialog/form-dialog.js +2 -2
- package/components/form-dialog/index.d.ts +4 -1552
- package/components/form-list/form-list.js +1 -1
- package/components/form-list/form-list.vue.js +5 -1
- package/components/form-list/index.d.ts +1 -1
- package/components/form-query/form-query.d.ts +2 -0
- package/components/form-query/form-query.vue.d.ts +5 -0
- package/components/form-query/form-query.vue.js +13 -7
- package/components/form-query/index.d.ts +9 -0
- package/components/highlight/style/index.js +2 -2
- package/components/horizontal-tree/horizontal-tree.vue.js +11 -6
- package/components/image-card/image-card.d.ts +1 -8
- package/components/image-card/image-card.vue.d.ts +4 -18
- package/components/image-card/index.d.ts +8 -29
- package/components/long-text/style/index.js +2 -2
- package/components/mask/style/index.js +2 -2
- package/components/row/row.vue.js +1 -1
- package/components/scroll-view/scroll-view.vue.js +1 -1
- package/components/scroll-view/style/index.js +9 -9
- package/components/table/index.d.ts +73 -78
- package/components/table/table-column/renderer.d.ts +2 -1
- package/components/table/table-column/renderer.js +2 -2
- package/components/table/table-column/table-column.d.ts +15 -15
- package/components/table/table-column/table-column.vue.d.ts +9 -5
- package/components/table/table-column/table-column.vue.js +5 -1
- package/components/table/table-column-editor/table-column-editor.vue.js +22 -14
- package/components/table/table-export/table-export.vue.js +31 -26
- package/components/table/table-query/table-query.d.ts +2 -0
- package/components/table/table-query/table-query.vue.d.ts +5 -0
- package/components/table/table.d.ts +22 -25
- package/components/table/table.vue.d.ts +45 -51
- package/components/table/table.vue.js +13 -9
- package/components/table/useTable.d.ts +2 -1
- package/components/table/useTable.js +2 -2
- package/components/table-action/index.d.ts +48 -6
- package/components/table-action/item.d.ts +16 -2
- package/components/table-action/item.vue.d.ts +34 -6
- package/components/table-action/item.vue.js +15 -9
- package/components/table-action/table-action.vue.d.ts +16 -2
- package/components/toggle/toggle.vue.js +5 -1
- package/components/upload/style/index.js +2 -2
- package/components/upload/upload-item.vue.d.ts +2 -2
- package/components/upload/upload-item.vue.js +16 -9
- package/components/upload/upload.vue.js +7 -1
- package/config/index.d.ts +1 -2
- package/config/index.js +2 -2
- package/config/nprogress.style.js +5 -5
- package/config/root-config-provider.vue.js +5 -5
- package/constant.d.ts +2 -2
- package/constant.js +2 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +2 -1
- package/hooks/useColorScheme.js +4 -4
- package/hooks/useDir.d.ts +2 -0
- package/hooks/useDir.js +20 -0
- package/hooks/useEcharts.d.ts +3 -2
- package/hooks/useEcharts.js +15 -3
- package/hooks/useLocale.d.ts +23 -371
- package/hooks/useLocale.js +26 -35
- package/hooks/useUpsert.d.ts +5 -3
- package/hooks/useUpsert.js +33 -25
- package/index.d.ts +1 -1
- package/index.js +4 -4
- package/layout/layout-auth/style/index.js +6 -6
- package/layout/layout-breadcrumb/layout-breadcrumb.vue.js +6 -2
- package/layout/layout-change-password/layout-change-password.vue.js +28 -22
- package/layout/layout-content/layout-content.vue.js +1 -1
- package/layout/layout-content/style/index.js +1 -1
- package/layout/layout-forbidden/layout-forbidden.vue.js +11 -6
- package/layout/layout-header/layout-header.vue.js +4 -4
- package/layout/layout-header/style/index.js +3 -3
- package/layout/layout-iframe/style/index.js +2 -2
- package/layout/layout-internal-server-error/layout-internal-server-error.vue.js +11 -6
- package/layout/layout-login/layout-login.vue.js +19 -14
- package/layout/layout-main/layout-main.vue.js +1 -1
- package/layout/layout-menu/layout-menu.vue.js +5 -1
- package/layout/layout-menu/style/index.js +1 -1
- package/layout/layout-not-found/layout-not-found.vue.js +11 -6
- package/layout/layout-search/layout-search.vue.js +22 -14
- package/layout/layout-sidebar/layout-sidebar.vue.js +8 -5
- package/layout/layout-sidebar/style/index.js +2 -2
- package/layout/layout-snug-aside/style/index.js +1 -1
- package/layout/layout-tabbar/layout-tabbar.vue.js +21 -13
- package/layout/layout-tabbar/style/index.js +1 -1
- package/layout/layout-top-snug-menu/layout-top-snug-menu.vue.js +24 -17
- package/layout/layout-user-menu/layout-user-menu.vue.js +10 -6
- package/locale/index.d.ts +10 -0
- package/locale/index.js +2 -0
- package/locale/lang/ar.d.ts +280 -0
- package/locale/lang/ar.js +129 -0
- package/locale/lang/en.d.ts +302 -0
- package/locale/lang/en.js +129 -0
- package/locale/lang/zh-cn.d.ts +301 -0
- package/locale/lang/zh-cn.js +129 -0
- package/package.json +10 -8
- package/request/useRequest.js +31 -23
- package/store/index.d.ts +1 -1
- package/store/index.js +6 -3
- package/store/layout.js +208 -190
- package/store/plugin.d.ts +9 -0
- package/store/plugin.js +22 -0
- package/store/user.d.ts +1 -1
- package/utils/css.d.ts +4 -0
- package/utils/css.js +5 -2
- package/utils/excel/bookFormats.js +5 -5
- package/utils/excel/xlsx.js +2 -2
- package/utils/index.js +1 -1
- package/utils/message-box.js +3 -1
- package/utils/tree.js +2 -2
- package/components/form-dialog/form-dialog.vue.d.ts +0 -675
|
@@ -13,6 +13,7 @@ import stdin_default$1 from './style/index.js';
|
|
|
13
13
|
import { useComponentConfig, useConfig } from '../config-provider/config-provider.js';
|
|
14
14
|
import { useFetch } from '../../hooks/useFetch.js';
|
|
15
15
|
import { useFullPage } from '../../hooks/useFullPage.js';
|
|
16
|
+
import { useLocale } from '../../hooks/useLocale.js';
|
|
16
17
|
import { addPxUnit } from '../../utils/css.js';
|
|
17
18
|
import { createMergedExpose } from '../../utils/vue.js';
|
|
18
19
|
import { walkTree } from '../../utils/tree.js';
|
|
@@ -41,6 +42,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
41
42
|
}) {
|
|
42
43
|
const props = __props;
|
|
43
44
|
const slots = useSlots();
|
|
45
|
+
const {
|
|
46
|
+
t
|
|
47
|
+
} = useLocale();
|
|
44
48
|
const {
|
|
45
49
|
prefixCls
|
|
46
50
|
} = useComponentConfig("table");
|
|
@@ -243,7 +247,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
243
247
|
key: 0,
|
|
244
248
|
class: normalizeClass(`${unref(prefixCls)}-toolbar-preset`)
|
|
245
249
|
}, [_ctx.toolbarConfig.reload ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_el_tooltip, {
|
|
246
|
-
content: "
|
|
250
|
+
content: unref(t)("co.common.reload"),
|
|
247
251
|
placement: "top",
|
|
248
252
|
"show-after": 200,
|
|
249
253
|
"hide-after": 0
|
|
@@ -264,8 +268,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
264
268
|
})]),
|
|
265
269
|
_: 1
|
|
266
270
|
/* STABLE */
|
|
267
|
-
})])) : createCommentVNode("v-if", true), _ctx.toolbarConfig.export ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_el_tooltip, {
|
|
268
|
-
content: "
|
|
271
|
+
}, 8, ["content"])])) : createCommentVNode("v-if", true), _ctx.toolbarConfig.export ? (openBlock(), createElementBlock("div", _hoisted_2, [createVNode(_component_el_tooltip, {
|
|
272
|
+
content: unref(t)("co.table.export"),
|
|
269
273
|
placement: "top",
|
|
270
274
|
"show-after": 200,
|
|
271
275
|
"hide-after": 0
|
|
@@ -283,14 +287,14 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
283
287
|
})]),
|
|
284
288
|
_: 1
|
|
285
289
|
/* STABLE */
|
|
286
|
-
}), createVNode(stdin_default$4, {
|
|
290
|
+
}, 8, ["content"]), createVNode(stdin_default$4, {
|
|
287
291
|
modelValue: exportVisible.value,
|
|
288
292
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => exportVisible.value = $event),
|
|
289
|
-
title: "
|
|
293
|
+
title: unref(t)("co.table.exportData"),
|
|
290
294
|
columns: renderedColumns.value,
|
|
291
295
|
data: tableData.value
|
|
292
|
-
}, null, 8, ["modelValue", "columns", "data"])])) : createCommentVNode("v-if", true), _ctx.toolbarConfig.fullScreen ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(_component_el_tooltip, {
|
|
293
|
-
content: unref(isFullPage) ? "
|
|
296
|
+
}, null, 8, ["modelValue", "title", "columns", "data"])])) : createCommentVNode("v-if", true), _ctx.toolbarConfig.fullScreen ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(_component_el_tooltip, {
|
|
297
|
+
content: unref(isFullPage) ? unref(t)("co.table.exitFullScreen") : unref(t)("co.table.fullScreen"),
|
|
294
298
|
placement: "top",
|
|
295
299
|
"show-after": 200,
|
|
296
300
|
"hide-after": 0
|
|
@@ -309,7 +313,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
309
313
|
_: 1
|
|
310
314
|
/* STABLE */
|
|
311
315
|
}, 8, ["content"])])) : createCommentVNode("v-if", true), _ctx.toolbarConfig.setting ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(_component_el_tooltip, {
|
|
312
|
-
content: "
|
|
316
|
+
content: unref(t)("co.table.columnSettings"),
|
|
313
317
|
placement: "top",
|
|
314
318
|
"show-after": 200,
|
|
315
319
|
"hide-after": 0
|
|
@@ -328,7 +332,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
328
332
|
/* NEED_PATCH */)]),
|
|
329
333
|
_: 1
|
|
330
334
|
/* STABLE */
|
|
331
|
-
}), createVNode(stdin_default$5, {
|
|
335
|
+
}, 8, ["content"]), createVNode(stdin_default$5, {
|
|
332
336
|
modelValue: renderedColumns.value,
|
|
333
337
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => renderedColumns.value = $event),
|
|
334
338
|
"virtual-ref": settingRef.value,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { MaybeRef } from 'vue';
|
|
1
2
|
import { type TableExpose, type TableProps } from './table';
|
|
2
3
|
export type UseTableProps = TableProps & {
|
|
3
4
|
[prop: PropertyKey]: any;
|
|
4
5
|
};
|
|
5
|
-
export declare function useTable(props: UseTableProps): [UseTableProps, TableExpose];
|
|
6
|
+
export declare function useTable(props: MaybeRef<UseTableProps>): [UseTableProps, TableExpose];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed, mergeProps } from 'vue';
|
|
1
|
+
import { computed, mergeProps, unref } from 'vue';
|
|
2
2
|
import { tableExposeKeys } from './table.js';
|
|
3
3
|
import { createMergedExpose } from '../../utils/vue.js';
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ function useTable(props) {
|
|
|
12
12
|
{
|
|
13
13
|
getExpose
|
|
14
14
|
},
|
|
15
|
-
props
|
|
15
|
+
unref(props)
|
|
16
16
|
);
|
|
17
17
|
});
|
|
18
18
|
const expose = createMergedExpose(tableExposeKeys, () => tableRef);
|
|
@@ -53,11 +53,25 @@ declare const _TableAction: {
|
|
|
53
53
|
} & {
|
|
54
54
|
readonly default: () => any;
|
|
55
55
|
};
|
|
56
|
-
plain:
|
|
56
|
+
plain: {
|
|
57
|
+
readonly type: import("vue").PropType<boolean>;
|
|
58
|
+
readonly required: false;
|
|
59
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
60
|
+
__epPropKey: true;
|
|
61
|
+
} & {
|
|
62
|
+
readonly default: undefined;
|
|
63
|
+
};
|
|
57
64
|
text: BooleanConstructor;
|
|
58
65
|
bg: BooleanConstructor;
|
|
59
66
|
autofocus: BooleanConstructor;
|
|
60
|
-
round:
|
|
67
|
+
round: {
|
|
68
|
+
readonly type: import("vue").PropType<boolean>;
|
|
69
|
+
readonly required: false;
|
|
70
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
71
|
+
__epPropKey: true;
|
|
72
|
+
} & {
|
|
73
|
+
readonly default: undefined;
|
|
74
|
+
};
|
|
61
75
|
circle: BooleanConstructor;
|
|
62
76
|
color: StringConstructor;
|
|
63
77
|
dark: BooleanConstructor;
|
|
@@ -138,11 +152,25 @@ declare const _TableAction: {
|
|
|
138
152
|
} & {
|
|
139
153
|
readonly default: () => any;
|
|
140
154
|
};
|
|
141
|
-
plain:
|
|
155
|
+
plain: {
|
|
156
|
+
readonly type: import("vue").PropType<boolean>;
|
|
157
|
+
readonly required: false;
|
|
158
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
159
|
+
__epPropKey: true;
|
|
160
|
+
} & {
|
|
161
|
+
readonly default: undefined;
|
|
162
|
+
};
|
|
142
163
|
text: BooleanConstructor;
|
|
143
164
|
bg: BooleanConstructor;
|
|
144
165
|
autofocus: BooleanConstructor;
|
|
145
|
-
round:
|
|
166
|
+
round: {
|
|
167
|
+
readonly type: import("vue").PropType<boolean>;
|
|
168
|
+
readonly required: false;
|
|
169
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
170
|
+
__epPropKey: true;
|
|
171
|
+
} & {
|
|
172
|
+
readonly default: undefined;
|
|
173
|
+
};
|
|
146
174
|
circle: BooleanConstructor;
|
|
147
175
|
color: StringConstructor;
|
|
148
176
|
dark: BooleanConstructor;
|
|
@@ -220,11 +248,25 @@ declare const _TableAction: {
|
|
|
220
248
|
} & {
|
|
221
249
|
readonly default: () => any;
|
|
222
250
|
};
|
|
223
|
-
plain:
|
|
251
|
+
plain: {
|
|
252
|
+
readonly type: import("vue").PropType<boolean>;
|
|
253
|
+
readonly required: false;
|
|
254
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
255
|
+
__epPropKey: true;
|
|
256
|
+
} & {
|
|
257
|
+
readonly default: undefined;
|
|
258
|
+
};
|
|
224
259
|
text: BooleanConstructor;
|
|
225
260
|
bg: BooleanConstructor;
|
|
226
261
|
autofocus: BooleanConstructor;
|
|
227
|
-
round:
|
|
262
|
+
round: {
|
|
263
|
+
readonly type: import("vue").PropType<boolean>;
|
|
264
|
+
readonly required: false;
|
|
265
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
266
|
+
__epPropKey: true;
|
|
267
|
+
} & {
|
|
268
|
+
readonly default: undefined;
|
|
269
|
+
};
|
|
228
270
|
circle: BooleanConstructor;
|
|
229
271
|
color: StringConstructor;
|
|
230
272
|
dark: BooleanConstructor;
|
|
@@ -52,11 +52,25 @@ export declare const tableActionItemProps: {
|
|
|
52
52
|
} & {
|
|
53
53
|
readonly default: () => any;
|
|
54
54
|
};
|
|
55
|
-
plain:
|
|
55
|
+
plain: {
|
|
56
|
+
readonly type: PropType<boolean>;
|
|
57
|
+
readonly required: false;
|
|
58
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
59
|
+
__epPropKey: true;
|
|
60
|
+
} & {
|
|
61
|
+
readonly default: undefined;
|
|
62
|
+
};
|
|
56
63
|
text: BooleanConstructor;
|
|
57
64
|
bg: BooleanConstructor;
|
|
58
65
|
autofocus: BooleanConstructor;
|
|
59
|
-
round:
|
|
66
|
+
round: {
|
|
67
|
+
readonly type: PropType<boolean>;
|
|
68
|
+
readonly required: false;
|
|
69
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
70
|
+
__epPropKey: true;
|
|
71
|
+
} & {
|
|
72
|
+
readonly default: undefined;
|
|
73
|
+
};
|
|
60
74
|
circle: BooleanConstructor;
|
|
61
75
|
color: StringConstructor;
|
|
62
76
|
dark: BooleanConstructor;
|
|
@@ -50,11 +50,25 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
50
50
|
} & {
|
|
51
51
|
readonly default: () => any;
|
|
52
52
|
};
|
|
53
|
-
plain:
|
|
53
|
+
plain: {
|
|
54
|
+
readonly type: import("vue").PropType<boolean>;
|
|
55
|
+
readonly required: false;
|
|
56
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
57
|
+
__epPropKey: true;
|
|
58
|
+
} & {
|
|
59
|
+
readonly default: undefined;
|
|
60
|
+
};
|
|
54
61
|
text: BooleanConstructor;
|
|
55
62
|
bg: BooleanConstructor;
|
|
56
63
|
autofocus: BooleanConstructor;
|
|
57
|
-
round:
|
|
64
|
+
round: {
|
|
65
|
+
readonly type: import("vue").PropType<boolean>;
|
|
66
|
+
readonly required: false;
|
|
67
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
68
|
+
__epPropKey: true;
|
|
69
|
+
} & {
|
|
70
|
+
readonly default: undefined;
|
|
71
|
+
};
|
|
58
72
|
circle: BooleanConstructor;
|
|
59
73
|
color: StringConstructor;
|
|
60
74
|
dark: BooleanConstructor;
|
|
@@ -126,11 +140,25 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
126
140
|
} & {
|
|
127
141
|
readonly default: () => any;
|
|
128
142
|
};
|
|
129
|
-
plain:
|
|
143
|
+
plain: {
|
|
144
|
+
readonly type: import("vue").PropType<boolean>;
|
|
145
|
+
readonly required: false;
|
|
146
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
147
|
+
__epPropKey: true;
|
|
148
|
+
} & {
|
|
149
|
+
readonly default: undefined;
|
|
150
|
+
};
|
|
130
151
|
text: BooleanConstructor;
|
|
131
152
|
bg: BooleanConstructor;
|
|
132
153
|
autofocus: BooleanConstructor;
|
|
133
|
-
round:
|
|
154
|
+
round: {
|
|
155
|
+
readonly type: import("vue").PropType<boolean>;
|
|
156
|
+
readonly required: false;
|
|
157
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
158
|
+
__epPropKey: true;
|
|
159
|
+
} & {
|
|
160
|
+
readonly default: undefined;
|
|
161
|
+
};
|
|
134
162
|
circle: BooleanConstructor;
|
|
135
163
|
color: StringConstructor;
|
|
136
164
|
dark: BooleanConstructor;
|
|
@@ -157,12 +185,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
157
185
|
text: boolean;
|
|
158
186
|
circle: boolean;
|
|
159
187
|
disabled: boolean;
|
|
160
|
-
type: "text" | "
|
|
188
|
+
type: "text" | "warning" | "success" | "primary" | "info" | "danger";
|
|
161
189
|
link: boolean;
|
|
162
190
|
tag: string | import("vue").Component;
|
|
191
|
+
loading: boolean;
|
|
163
192
|
plain: boolean;
|
|
164
193
|
nativeType: "button" | "reset" | "submit";
|
|
165
|
-
loading: boolean;
|
|
166
194
|
loadingIcon: string | import("vue").Component;
|
|
167
195
|
bg: boolean;
|
|
168
196
|
autofocus: boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, resolveComponent, createElementBlock, createCommentVNode, openBlock, Fragment, createBlock, normalizeProps, mergeProps, withCtx, createVNode, unref, createTextVNode,
|
|
1
|
+
import { defineComponent, computed, ref, resolveComponent, createElementBlock, createCommentVNode, openBlock, Fragment, createBlock, normalizeProps, mergeProps, withCtx, createVNode, unref, createTextVNode, toDisplayString, normalizeStyle } from 'vue';
|
|
2
2
|
import { omit } from 'lodash-es';
|
|
3
3
|
import { ElButton } from 'element-plus';
|
|
4
4
|
import { tableActionItemProps } from './item.js';
|
|
5
5
|
import stdin_default$1 from '../icon/icon.vue.js';
|
|
6
6
|
import { useToken } from '../theme/util/useToken.js';
|
|
7
|
+
import { useLocale } from '../../hooks/useLocale.js';
|
|
7
8
|
|
|
8
9
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
9
10
|
...{
|
|
@@ -14,6 +15,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
14
15
|
props: tableActionItemProps,
|
|
15
16
|
setup(__props) {
|
|
16
17
|
const props = __props;
|
|
18
|
+
const {
|
|
19
|
+
t
|
|
20
|
+
} = useLocale();
|
|
17
21
|
const {
|
|
18
22
|
token
|
|
19
23
|
} = useToken();
|
|
@@ -49,7 +53,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
49
53
|
key: 0,
|
|
50
54
|
name: _ctx.icon,
|
|
51
55
|
style: normalizeStyle({
|
|
52
|
-
|
|
56
|
+
marginInlineEnd: unref(token).marginXXS + "px"
|
|
53
57
|
})
|
|
54
58
|
}, null, 8, ["name", "style"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(_ctx.label), 1
|
|
55
59
|
/* TEXT */)]),
|
|
@@ -64,18 +68,20 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
64
68
|
size: "small",
|
|
65
69
|
onClick: event => onCancel(event, cancel)
|
|
66
70
|
}, {
|
|
67
|
-
default: withCtx(() =>
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.common.no")), 1
|
|
72
|
+
/* TEXT */)]),
|
|
73
|
+
_: 2
|
|
74
|
+
/* DYNAMIC */
|
|
70
75
|
}, 1032, ["onClick"]), createVNode(unref(ElButton), {
|
|
71
76
|
type: "danger",
|
|
72
77
|
size: "small",
|
|
73
78
|
loading: loading.value,
|
|
74
79
|
onClick: event => onConfirm(event, confirm)
|
|
75
80
|
}, {
|
|
76
|
-
default: withCtx(() =>
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.common.yes")), 1
|
|
82
|
+
/* TEXT */)]),
|
|
83
|
+
_: 2
|
|
84
|
+
/* DYNAMIC */
|
|
79
85
|
}, 1032, ["loading", "onClick"])]),
|
|
80
86
|
_: 1
|
|
81
87
|
/* STABLE */
|
|
@@ -91,7 +97,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
91
97
|
key: 0,
|
|
92
98
|
name: _ctx.icon,
|
|
93
99
|
style: normalizeStyle({
|
|
94
|
-
|
|
100
|
+
marginInlineEnd: unref(token).marginXXS + "px"
|
|
95
101
|
})
|
|
96
102
|
}, null, 8, ["name", "style"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(_ctx.label), 1
|
|
97
103
|
/* TEXT */)]),
|
|
@@ -52,11 +52,25 @@ declare const _default: import("vue").DefineComponent<TableActionProps, {}, {},
|
|
|
52
52
|
} & {
|
|
53
53
|
readonly default: () => any;
|
|
54
54
|
};
|
|
55
|
-
plain:
|
|
55
|
+
plain: {
|
|
56
|
+
readonly type: import("vue").PropType<boolean>;
|
|
57
|
+
readonly required: false;
|
|
58
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
59
|
+
__epPropKey: true;
|
|
60
|
+
} & {
|
|
61
|
+
readonly default: undefined;
|
|
62
|
+
};
|
|
56
63
|
text: BooleanConstructor;
|
|
57
64
|
bg: BooleanConstructor;
|
|
58
65
|
autofocus: BooleanConstructor;
|
|
59
|
-
round:
|
|
66
|
+
round: {
|
|
67
|
+
readonly type: import("vue").PropType<boolean>;
|
|
68
|
+
readonly required: false;
|
|
69
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
70
|
+
__epPropKey: true;
|
|
71
|
+
} & {
|
|
72
|
+
readonly default: undefined;
|
|
73
|
+
};
|
|
60
74
|
circle: BooleanConstructor;
|
|
61
75
|
color: StringConstructor;
|
|
62
76
|
dark: BooleanConstructor;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, ref, watch, computed, createBlock, openBlock, unref, withCtx, createTextVNode, createVNode, toDisplayString } from 'vue';
|
|
2
2
|
import { ElButton } from 'element-plus';
|
|
3
3
|
import stdin_default$1 from '../icon/icon.vue.js';
|
|
4
|
+
import { useLocale } from '../../hooks/useLocale.js';
|
|
4
5
|
|
|
5
6
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
6
7
|
...{
|
|
@@ -19,12 +20,15 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
19
20
|
}) {
|
|
20
21
|
const props = __props;
|
|
21
22
|
const emit = __emit;
|
|
23
|
+
const {
|
|
24
|
+
t
|
|
25
|
+
} = useLocale();
|
|
22
26
|
const innerValue = ref(props.modelValue);
|
|
23
27
|
watch(() => props.modelValue, () => {
|
|
24
28
|
innerValue.value = props.modelValue;
|
|
25
29
|
});
|
|
26
30
|
const text = computed(() => {
|
|
27
|
-
return innerValue.value ? "
|
|
31
|
+
return innerValue.value ? t("co.toggle.unfold") : t("co.toggle.fold");
|
|
28
32
|
});
|
|
29
33
|
const handleClick = () => {
|
|
30
34
|
innerValue.value = !innerValue.value;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type UploadItemProps } from './upload';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<UploadItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
3
3
|
cancel: () => any;
|
|
4
|
-
remove: () => any;
|
|
5
4
|
"re-upload": () => any;
|
|
5
|
+
remove: () => any;
|
|
6
6
|
}, string, import("vue").PublicProps, Readonly<UploadItemProps> & Readonly<{
|
|
7
7
|
onCancel?: (() => any) | undefined;
|
|
8
|
-
onRemove?: (() => any) | undefined;
|
|
9
8
|
"onRe-upload"?: (() => any) | undefined;
|
|
9
|
+
onRemove?: (() => any) | undefined;
|
|
10
10
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
export default _default;
|
|
@@ -3,6 +3,7 @@ import { ElButton } from 'element-plus';
|
|
|
3
3
|
import { MediaCard as _MediaCard } from '../media-card/index.js';
|
|
4
4
|
import stdin_default$1 from '../icon/icon.vue.js';
|
|
5
5
|
import { useComponentConfig } from '../config-provider/config-provider.js';
|
|
6
|
+
import { useLocale } from '../../hooks/useLocale.js';
|
|
6
7
|
import { isString } from '../../utils/is.js';
|
|
7
8
|
|
|
8
9
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
@@ -33,6 +34,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
33
34
|
const {
|
|
34
35
|
prefixCls
|
|
35
36
|
} = useComponentConfig("upload");
|
|
37
|
+
const {
|
|
38
|
+
t
|
|
39
|
+
} = useLocale();
|
|
36
40
|
const progressStatus = {
|
|
37
41
|
success: "success",
|
|
38
42
|
error: "exception"
|
|
@@ -90,9 +94,10 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
90
94
|
type: "primary",
|
|
91
95
|
onClick: _cache[0] || (_cache[0] = $event => emit("cancel"))
|
|
92
96
|
}, {
|
|
93
|
-
default: withCtx(() =>
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.upload.cancelUpload")), 1
|
|
98
|
+
/* TEXT */)]),
|
|
99
|
+
_: 1
|
|
100
|
+
/* STABLE */
|
|
96
101
|
})) : createCommentVNode("v-if", true), _ctx.file.status === "error" ? (openBlock(), createBlock(unref(ElButton), {
|
|
97
102
|
key: 1,
|
|
98
103
|
link: "",
|
|
@@ -103,9 +108,10 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
103
108
|
},
|
|
104
109
|
onClick: _cache[1] || (_cache[1] = $event => emit("re-upload"))
|
|
105
110
|
}, {
|
|
106
|
-
default: withCtx(() =>
|
|
107
|
-
|
|
108
|
-
|
|
111
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.upload.reUpload")), 1
|
|
112
|
+
/* TEXT */)]),
|
|
113
|
+
_: 1
|
|
114
|
+
/* STABLE */
|
|
109
115
|
})) : createCommentVNode("v-if", true), createVNode(unref(ElButton), {
|
|
110
116
|
link: "",
|
|
111
117
|
size: "small",
|
|
@@ -115,9 +121,10 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
115
121
|
},
|
|
116
122
|
onClick: _cache[2] || (_cache[2] = $event => emit("remove"))
|
|
117
123
|
}, {
|
|
118
|
-
default: withCtx(() =>
|
|
119
|
-
|
|
120
|
-
|
|
124
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.common.delete")), 1
|
|
125
|
+
/* TEXT */)]),
|
|
126
|
+
_: 1
|
|
127
|
+
/* STABLE */
|
|
121
128
|
})], 2
|
|
122
129
|
/* CLASS */)], 2
|
|
123
130
|
/* CLASS */)) : createCommentVNode("v-if", true)]),
|
|
@@ -8,6 +8,7 @@ import stdin_default$3 from '../icon/icon.vue.js';
|
|
|
8
8
|
import stdin_default$1 from './style/index.js';
|
|
9
9
|
import { useUpload } from '../upload-context.js';
|
|
10
10
|
import { getFileType, chooseFiles } from '../../utils/file.js';
|
|
11
|
+
import { useLocale } from '../../hooks/useLocale.js';
|
|
11
12
|
import { useComponentConfig } from '../config-provider/config-provider.js';
|
|
12
13
|
import { uuid } from '../../utils/string.js';
|
|
13
14
|
import { getBasename } from '../../utils/path.js';
|
|
@@ -71,6 +72,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
71
72
|
}) {
|
|
72
73
|
const props = __props;
|
|
73
74
|
const emit = __emit;
|
|
75
|
+
const {
|
|
76
|
+
t
|
|
77
|
+
} = useLocale();
|
|
74
78
|
const {
|
|
75
79
|
prefixCls
|
|
76
80
|
} = useComponentConfig("upload");
|
|
@@ -130,7 +134,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
130
134
|
});
|
|
131
135
|
if (mergedLimit.value && fileList.value.length + files.length > mergedLimit.value) {
|
|
132
136
|
emit("exceed");
|
|
133
|
-
ElMessage.warning(
|
|
137
|
+
ElMessage.warning(t("co.upload.maxUpload", {
|
|
138
|
+
num: mergedLimit.value
|
|
139
|
+
}));
|
|
134
140
|
return;
|
|
135
141
|
}
|
|
136
142
|
files.forEach(rawFile => {
|
package/config/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { type LayoutConfig, type RequiredLayoutConfig } from './layout';
|
|
|
4
4
|
import { type SiteConfig, type RequiredSiteConfig } from './site';
|
|
5
5
|
import { type RequiredHttpConfig, type HttpConfig } from './http';
|
|
6
6
|
import { type RequiredApiConfig, type ApiConfig } from './api';
|
|
7
|
-
import Persist from '@gunny/persist';
|
|
8
7
|
import { type App, type Component, type VNodeChild } from 'vue';
|
|
9
8
|
import { type CoseyRouterOptions } from '../router';
|
|
10
9
|
import { type RouteRecordRaw } from 'vue-router';
|
|
@@ -38,6 +37,7 @@ export interface LayoutComponents {
|
|
|
38
37
|
notFound?: string | Component;
|
|
39
38
|
internalServerError?: string | Component;
|
|
40
39
|
empty?: string | Component;
|
|
40
|
+
locale?: string | Component;
|
|
41
41
|
}
|
|
42
42
|
export interface LayoutSlots {
|
|
43
43
|
topbarRight?: () => VNodeChild;
|
|
@@ -57,7 +57,6 @@ export type CoseyOptions = {
|
|
|
57
57
|
slots?: LayoutSlots;
|
|
58
58
|
};
|
|
59
59
|
export interface GlobalConfig {
|
|
60
|
-
persist?: Persist;
|
|
61
60
|
router: RequiredRouterConfig;
|
|
62
61
|
http: RequiredHttpConfig;
|
|
63
62
|
layout: RequiredLayoutConfig;
|
package/config/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { defaultHttpConfig } from './http.js';
|
|
|
6
6
|
import { defaultApiConfig } from './api.js';
|
|
7
7
|
import { defaultsDeep } from 'lodash-es';
|
|
8
8
|
import { inject } from 'vue';
|
|
9
|
-
import { createPersist } from '../hooks/usePersist.js';
|
|
9
|
+
import { persistContextKey, createPersist } from '../hooks/usePersist.js';
|
|
10
10
|
|
|
11
11
|
const globalConfigContextKey = Symbol("globalConfigContext");
|
|
12
12
|
function provideGlobalConfig(app, options) {
|
|
@@ -23,8 +23,8 @@ function provideGlobalConfig(app, options) {
|
|
|
23
23
|
slots = {}
|
|
24
24
|
} = options;
|
|
25
25
|
const persistConfig = defaultsDeep(persist, defaultPersistConfig);
|
|
26
|
+
app.provide(persistContextKey, createPersist(persistConfig.name, persistConfig.type));
|
|
26
27
|
app.provide(globalConfigContextKey, {
|
|
27
|
-
persist: createPersist(persistConfig.name, persistConfig.type),
|
|
28
28
|
router: defaultsDeep({ homePath, loginPath, changePasswordPath }, defaultRouterConfig),
|
|
29
29
|
http: defaultsDeep(http, defaultHttpConfig),
|
|
30
30
|
layout: defaultsDeep(layout, defaultLayoutConfig),
|
|
@@ -7,8 +7,8 @@ var stdin_default = getGlobalStyleHook("NProgress", (token) => {
|
|
|
7
7
|
pointerEvents: "none",
|
|
8
8
|
".bar": {
|
|
9
9
|
position: "fixed",
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
insetBlockStart: 0,
|
|
11
|
+
insetInlineStart: 0,
|
|
12
12
|
zIndex: 1030,
|
|
13
13
|
width: "100%",
|
|
14
14
|
height: "2px",
|
|
@@ -17,7 +17,7 @@ var stdin_default = getGlobalStyleHook("NProgress", (token) => {
|
|
|
17
17
|
".peg": {
|
|
18
18
|
display: "block",
|
|
19
19
|
position: "absolute",
|
|
20
|
-
|
|
20
|
+
insetInlineEnd: 0,
|
|
21
21
|
width: 100,
|
|
22
22
|
height: "100%",
|
|
23
23
|
boxShadow: `0 0 10px ${token.colorPrimary}, 0 0 5px ${token.colorPrimary}`,
|
|
@@ -26,8 +26,8 @@ var stdin_default = getGlobalStyleHook("NProgress", (token) => {
|
|
|
26
26
|
},
|
|
27
27
|
".spinner": {
|
|
28
28
|
position: "fixed",
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
insetBlockStart: 15,
|
|
30
|
+
insetInlineEnd: 15,
|
|
31
31
|
zIndex: 1030,
|
|
32
32
|
display: "block"
|
|
33
33
|
},
|
|
@@ -6,7 +6,6 @@ import stdin_default$1 from './nprogress.style.js';
|
|
|
6
6
|
import 'element-plus/dist/index.css';
|
|
7
7
|
import 'element-plus/theme-chalk/dark/css-vars.css';
|
|
8
8
|
import { useColorSchemeProvide } from '../hooks/useColorScheme.js';
|
|
9
|
-
import { useLocaleProvide } from '../hooks/useLocale.js';
|
|
10
9
|
import { useUploadProvide } from '../components/upload-context.js';
|
|
11
10
|
import { containerContextKey } from '../components/container/container.js';
|
|
12
11
|
import { ConfigProvider as _ConfigProvider } from '../components/config-provider/index.js';
|
|
@@ -28,6 +27,10 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
28
27
|
table: {
|
|
29
28
|
type: Object,
|
|
30
29
|
required: false
|
|
30
|
+
},
|
|
31
|
+
locale: {
|
|
32
|
+
type: Object,
|
|
33
|
+
required: false
|
|
31
34
|
}
|
|
32
35
|
},
|
|
33
36
|
setup(__props) {
|
|
@@ -48,9 +51,6 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
48
51
|
theme: themeConfig.value
|
|
49
52
|
};
|
|
50
53
|
});
|
|
51
|
-
const {
|
|
52
|
-
locale
|
|
53
|
-
} = useLocaleProvide();
|
|
54
54
|
const apiConfig = useGlobalConfig()?.api;
|
|
55
55
|
if (apiConfig) {
|
|
56
56
|
const uploadApi = apiConfig.upload?.();
|
|
@@ -66,7 +66,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
66
66
|
const _component_ElConfigProvider = resolveComponent("ElConfigProvider");
|
|
67
67
|
return openBlock(), createBlock(unref(_ConfigProvider), normalizeProps(guardReactiveProps(mergedConfigProviderProps.value)), {
|
|
68
68
|
default: withCtx(() => [createVNode(_component_ElConfigProvider, {
|
|
69
|
-
locale:
|
|
69
|
+
locale: _ctx.locale
|
|
70
70
|
}, {
|
|
71
71
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
72
72
|
_: 3
|
package/constant.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const TOKEN_NAME = "token";
|
|
2
|
-
export declare const ROUTER_TO = "routerTo";
|
|
1
|
+
export declare const TOKEN_NAME = "Cosey:token";
|
|
2
|
+
export declare const ROUTER_TO = "Cosey:routerTo";
|
package/constant.js
CHANGED
package/hooks/index.d.ts
CHANGED