wok-ui-ext 0.1.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/LICENSE +21 -0
- package/README.en.md +75 -0
- package/README.md +75 -0
- package/dist/alert/index.d.ts +10 -0
- package/dist/alert/index.js +48 -0
- package/dist/alert/style.css +116 -0
- package/dist/avatar/index.d.ts +9 -0
- package/dist/avatar/index.js +30 -0
- package/dist/avatar/style.css +32 -0
- package/dist/badge/index.d.ts +32 -0
- package/dist/badge/index.js +61 -0
- package/dist/badge/style.css +68 -0
- package/dist/breadcrumb/index.d.ts +25 -0
- package/dist/breadcrumb/index.js +47 -0
- package/dist/breadcrumb/style.css +35 -0
- package/dist/button/index.d.ts +34 -0
- package/dist/button/index.js +57 -0
- package/dist/button/style.css +133 -0
- package/dist/card/index.d.ts +25 -0
- package/dist/card/index.js +29 -0
- package/dist/card/style.css +23 -0
- package/dist/collapse/index.d.ts +89 -0
- package/dist/collapse/index.js +213 -0
- package/dist/collapse/style.css +76 -0
- package/dist/context-menu/context-menu.d.ts +113 -0
- package/dist/context-menu/context-menu.js +150 -0
- package/dist/context-menu/index.d.ts +30 -0
- package/dist/context-menu/index.js +42 -0
- package/dist/context-menu/style.css +46 -0
- package/dist/date-picker/calendar-panel.d.ts +44 -0
- package/dist/date-picker/calendar-panel.js +180 -0
- package/dist/date-picker/date-picker.d.ts +29 -0
- package/dist/date-picker/date-picker.js +81 -0
- package/dist/date-picker/date-utils.d.ts +63 -0
- package/dist/date-picker/date-utils.js +130 -0
- package/dist/date-picker/index.d.ts +7 -0
- package/dist/date-picker/index.js +5 -0
- package/dist/date-picker/layer.d.ts +19 -0
- package/dist/date-picker/layer.js +36 -0
- package/dist/date-picker/range-picker.d.ts +30 -0
- package/dist/date-picker/range-picker.js +117 -0
- package/dist/date-picker/style.css +161 -0
- package/dist/description-list/index.d.ts +37 -0
- package/dist/description-list/index.js +145 -0
- package/dist/description-list/style.css +63 -0
- package/dist/divider/index.d.ts +29 -0
- package/dist/divider/index.js +29 -0
- package/dist/divider/style.css +50 -0
- package/dist/drawer/index.d.ts +51 -0
- package/dist/drawer/index.js +183 -0
- package/dist/drawer/style.css +100 -0
- package/dist/dropdown/index.d.ts +38 -0
- package/dist/dropdown/index.js +97 -0
- package/dist/dropdown/style.css +39 -0
- package/dist/empty/index.d.ts +11 -0
- package/dist/empty/index.js +20 -0
- package/dist/empty/style.css +19 -0
- package/dist/floating-layer/index.d.ts +109 -0
- package/dist/floating-layer/index.js +337 -0
- package/dist/floating-layer/style.css +5 -0
- package/dist/form/form-item/index.d.ts +26 -0
- package/dist/form/form-item/index.js +21 -0
- package/dist/form/form-item/style.css +33 -0
- package/dist/form/form-modal/index.d.ts +18 -0
- package/dist/form/form-modal/index.js +38 -0
- package/dist/form/form.d.ts +21 -0
- package/dist/form/form.js +28 -0
- package/dist/form/index.d.ts +4 -0
- package/dist/form/index.js +4 -0
- package/dist/form/select/index.d.ts +48 -0
- package/dist/form/select/index.js +94 -0
- package/dist/form/select/style.css +29 -0
- package/dist/global.css +71 -0
- package/dist/i18n/de-DE.d.ts +2 -0
- package/dist/i18n/de-DE.js +36 -0
- package/dist/i18n/en-US.d.ts +2 -0
- package/dist/i18n/en-US.js +36 -0
- package/dist/i18n/es-ES.d.ts +2 -0
- package/dist/i18n/es-ES.js +36 -0
- package/dist/i18n/fr-FR.d.ts +2 -0
- package/dist/i18n/fr-FR.js +36 -0
- package/dist/i18n/index.d.ts +12 -0
- package/dist/i18n/index.js +39 -0
- package/dist/i18n/ja-JP.d.ts +2 -0
- package/dist/i18n/ja-JP.js +36 -0
- package/dist/i18n/ko-KR.d.ts +2 -0
- package/dist/i18n/ko-KR.js +36 -0
- package/dist/i18n/messages.d.ts +40 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/wok-ui/de-DE.d.ts +2 -0
- package/dist/i18n/wok-ui/de-DE.js +20 -0
- package/dist/i18n/wok-ui/es-ES.d.ts +2 -0
- package/dist/i18n/wok-ui/es-ES.js +20 -0
- package/dist/i18n/wok-ui/fr-FR.d.ts +2 -0
- package/dist/i18n/wok-ui/fr-FR.js +20 -0
- package/dist/i18n/wok-ui/ja-JP.d.ts +2 -0
- package/dist/i18n/wok-ui/ja-JP.js +20 -0
- package/dist/i18n/wok-ui/ko-KR.d.ts +2 -0
- package/dist/i18n/wok-ui/ko-KR.js +20 -0
- package/dist/i18n/wok-ui/zh-TW.d.ts +2 -0
- package/dist/i18n/wok-ui/zh-TW.js +20 -0
- package/dist/i18n/zh-CN.d.ts +2 -0
- package/dist/i18n/zh-CN.js +36 -0
- package/dist/i18n/zh-TW.d.ts +2 -0
- package/dist/i18n/zh-TW.js +36 -0
- package/dist/icons.d.ts +88 -0
- package/dist/icons.js +176 -0
- package/dist/image/index.d.ts +38 -0
- package/dist/image/index.js +97 -0
- package/dist/image/style.css +72 -0
- package/dist/image-preview/index.d.ts +26 -0
- package/dist/image-preview/index.js +134 -0
- package/dist/image-preview/style.css +96 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.js +45 -0
- package/dist/list/index.d.ts +32 -0
- package/dist/list/index.js +42 -0
- package/dist/list/list-item.d.ts +27 -0
- package/dist/list/list-item.js +51 -0
- package/dist/list/style.css +20 -0
- package/dist/loading/index.d.ts +10 -0
- package/dist/loading/index.js +46 -0
- package/dist/loading/style.css +48 -0
- package/dist/menu/index.d.ts +38 -0
- package/dist/menu/index.js +62 -0
- package/dist/menu/leaf-item.d.ts +12 -0
- package/dist/menu/leaf-item.js +41 -0
- package/dist/menu/style.css +117 -0
- package/dist/menu/sub-menu.d.ts +21 -0
- package/dist/menu/sub-menu.js +85 -0
- package/dist/menu/types.d.ts +36 -0
- package/dist/menu/types.js +1 -0
- package/dist/menu/utils.d.ts +11 -0
- package/dist/menu/utils.js +24 -0
- package/dist/modal/index.d.ts +23 -0
- package/dist/modal/index.js +79 -0
- package/dist/modal/modal.d.ts +76 -0
- package/dist/modal/modal.js +188 -0
- package/dist/modal/style.css +90 -0
- package/dist/pagination/index.d.ts +31 -0
- package/dist/pagination/index.js +215 -0
- package/dist/pagination/style.css +50 -0
- package/dist/popconfirm/api.d.ts +43 -0
- package/dist/popconfirm/api.js +77 -0
- package/dist/popconfirm/component.d.ts +47 -0
- package/dist/popconfirm/component.js +48 -0
- package/dist/popconfirm/index.d.ts +3 -0
- package/dist/popconfirm/index.js +3 -0
- package/dist/popconfirm/style.css +22 -0
- package/dist/popover/api.d.ts +36 -0
- package/dist/popover/api.js +61 -0
- package/dist/popover/component.d.ts +38 -0
- package/dist/popover/component.js +51 -0
- package/dist/popover/index.d.ts +3 -0
- package/dist/popover/index.js +3 -0
- package/dist/popover/style.css +102 -0
- package/dist/progress/index.d.ts +34 -0
- package/dist/progress/index.js +70 -0
- package/dist/progress/style.css +37 -0
- package/dist/quick-input/index.d.ts +2 -0
- package/dist/quick-input/index.js +2 -0
- package/dist/quick-input/number.d.ts +35 -0
- package/dist/quick-input/number.js +68 -0
- package/dist/quick-input/text.d.ts +20 -0
- package/dist/quick-input/text.js +61 -0
- package/dist/result/index.d.ts +39 -0
- package/dist/result/index.js +71 -0
- package/dist/result/style.css +41 -0
- package/dist/search-box/index.d.ts +26 -0
- package/dist/search-box/index.js +60 -0
- package/dist/search-box/style.css +22 -0
- package/dist/segmented/index.d.ts +42 -0
- package/dist/segmented/index.js +61 -0
- package/dist/segmented/style.css +28 -0
- package/dist/skeleton/index.d.ts +22 -0
- package/dist/skeleton/index.js +68 -0
- package/dist/skeleton/style.css +31 -0
- package/dist/steps/index.d.ts +46 -0
- package/dist/steps/index.js +95 -0
- package/dist/steps/style.css +181 -0
- package/dist/switch/index.d.ts +32 -0
- package/dist/switch/index.js +74 -0
- package/dist/switch/style.css +52 -0
- package/dist/table/body.d.ts +21 -0
- package/dist/table/body.js +35 -0
- package/dist/table/column.d.ts +78 -0
- package/dist/table/column.js +113 -0
- package/dist/table/header.d.ts +13 -0
- package/dist/table/header.js +15 -0
- package/dist/table/index.d.ts +41 -0
- package/dist/table/index.js +84 -0
- package/dist/table/row.d.ts +25 -0
- package/dist/table/row.js +74 -0
- package/dist/table/style.css +98 -0
- package/dist/tabs/index.d.ts +49 -0
- package/dist/tabs/index.js +76 -0
- package/dist/tabs/style.css +41 -0
- package/dist/tag/index.d.ts +53 -0
- package/dist/tag/index.js +100 -0
- package/dist/tag/style.css +134 -0
- package/dist/text/index.d.ts +104 -0
- package/dist/text/index.js +143 -0
- package/dist/text/style.css +113 -0
- package/dist/theme/index.d.ts +14 -0
- package/dist/theme/index.js +94 -0
- package/dist/theme/themes.d.ts +3 -0
- package/dist/theme/themes.js +323 -0
- package/dist/theme/types.d.ts +58 -0
- package/dist/theme/types.js +1 -0
- package/dist/timeline/index.d.ts +28 -0
- package/dist/timeline/index.js +35 -0
- package/dist/timeline/style.css +53 -0
- package/dist/toast/index.d.ts +53 -0
- package/dist/toast/index.js +131 -0
- package/dist/toast/style.css +76 -0
- package/dist/tooltip/api.d.ts +44 -0
- package/dist/tooltip/api.js +103 -0
- package/dist/tooltip/component.d.ts +28 -0
- package/dist/tooltip/component.js +35 -0
- package/dist/tooltip/index.d.ts +3 -0
- package/dist/tooltip/index.js +3 -0
- package/dist/tooltip/style.css +46 -0
- package/dist/tree/dragging-img.d.ts +13 -0
- package/dist/tree/dragging-img.js +23 -0
- package/dist/tree/index.d.ts +180 -0
- package/dist/tree/index.js +385 -0
- package/dist/tree/node-info.d.ts +63 -0
- package/dist/tree/node-info.js +128 -0
- package/dist/tree/node.d.ts +132 -0
- package/dist/tree/node.js +264 -0
- package/dist/tree/style.css +99 -0
- package/dist/upload/index.d.ts +48 -0
- package/dist/upload/index.js +141 -0
- package/dist/upload/style.css +41 -0
- package/package.json +51 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ConvertibleModule, DivModule, SubModulesOpt } from 'wok-ui';
|
|
2
|
+
import './style.less';
|
|
3
|
+
/**
|
|
4
|
+
* 表单条目,水平布局,左边标题,右边是输入框
|
|
5
|
+
*/
|
|
6
|
+
export declare class FormItem extends DivModule {
|
|
7
|
+
private opts;
|
|
8
|
+
constructor(opts: {
|
|
9
|
+
/**
|
|
10
|
+
* 标题
|
|
11
|
+
*/
|
|
12
|
+
label: ConvertibleModule;
|
|
13
|
+
/**
|
|
14
|
+
* 标题宽度,单位像素
|
|
15
|
+
*/
|
|
16
|
+
labelWidth?: number;
|
|
17
|
+
/**
|
|
18
|
+
* 必填标识,如果为 true ,则会在标题上显示出一个红色星号来提示用户条目必填
|
|
19
|
+
*/
|
|
20
|
+
required?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 内容输入模块
|
|
23
|
+
*/
|
|
24
|
+
input: SubModulesOpt;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DivModule } from 'wok-ui';
|
|
2
|
+
import './style.css';
|
|
3
|
+
/**
|
|
4
|
+
* 表单条目,水平布局,左边标题,右边是输入框
|
|
5
|
+
*/
|
|
6
|
+
export class FormItem extends DivModule {
|
|
7
|
+
constructor(opts) {
|
|
8
|
+
super('wok-ui-ext-form-item');
|
|
9
|
+
this.opts = opts;
|
|
10
|
+
if (typeof opts.labelWidth === 'number') {
|
|
11
|
+
this.el.style.setProperty('--form-label-width', `${opts.labelWidth}px`);
|
|
12
|
+
}
|
|
13
|
+
this.addChild({
|
|
14
|
+
classNames: ['wok-ui-ext-form-label', opts.required ? 'required' : ''],
|
|
15
|
+
children: this.opts.label
|
|
16
|
+
}, {
|
|
17
|
+
classNames: ['wok-ui-ext-form-field'],
|
|
18
|
+
children: this.opts.input
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.wok-ui-ext-form-item {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 24px;
|
|
5
|
+
}
|
|
6
|
+
.wok-ui-ext-form-item > .wok-ui-ext-form-label {
|
|
7
|
+
width: var(--form-label-width, 120px);
|
|
8
|
+
flex-shrink: 0;
|
|
9
|
+
color: var(--text-secondary);
|
|
10
|
+
text-align: right;
|
|
11
|
+
}
|
|
12
|
+
.wok-ui-ext-form-item > .wok-ui-ext-form-label.required ::before {
|
|
13
|
+
content: "*";
|
|
14
|
+
color: var(--color-danger);
|
|
15
|
+
margin-right: 8px;
|
|
16
|
+
vertical-align: middle;
|
|
17
|
+
display: inline-block;
|
|
18
|
+
}
|
|
19
|
+
.wok-ui-ext-form-item > .wok-ui-ext-form-field {
|
|
20
|
+
flex-grow: 1;
|
|
21
|
+
max-width: 800px;
|
|
22
|
+
}
|
|
23
|
+
form.wok-ui-ext-form-label-top .wok-ui-ext-form-item {
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: stretch;
|
|
26
|
+
gap: 8px;
|
|
27
|
+
}
|
|
28
|
+
form.wok-ui-ext-form-label-top .wok-ui-ext-form-item > .wok-ui-ext-form-label {
|
|
29
|
+
text-align: left;
|
|
30
|
+
}
|
|
31
|
+
form.wok-ui-ext-form-label-bold .wok-ui-ext-form-item > .wok-ui-ext-form-label {
|
|
32
|
+
font-weight: var(--font-weight-semibold);
|
|
33
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SubModulesOpt } from 'wok-ui';
|
|
2
|
+
/**
|
|
3
|
+
* 显示带表单的模态框,如果是只有一个文本框的表单,请使用 quickInput 函数,更简洁高效
|
|
4
|
+
* @param opts
|
|
5
|
+
* @param opts.width 模态框宽度,默认500px
|
|
6
|
+
* @param opts.title 模态框标题
|
|
7
|
+
* @param opts.formContent 表单内容配置
|
|
8
|
+
* @param opts.handleSubmit 提交处理函数,如果没有异常,将会自动关闭模态框
|
|
9
|
+
* @param opts.confirmButtonText 确认按钮文本,默认为"确定"
|
|
10
|
+
*/
|
|
11
|
+
export declare function showFormModal(opts: {
|
|
12
|
+
width?: number;
|
|
13
|
+
title: string;
|
|
14
|
+
formContent: SubModulesOpt;
|
|
15
|
+
handleSubmit: () => Promise<void>;
|
|
16
|
+
onShown?: () => void;
|
|
17
|
+
confirmButtonText?: string;
|
|
18
|
+
}): void;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getWokUiExtI18n } from '../../i18n';
|
|
2
|
+
import { showModal } from '../../modal';
|
|
3
|
+
import { showWarning } from '../../toast';
|
|
4
|
+
import { Form } from '../form';
|
|
5
|
+
/**
|
|
6
|
+
* 显示带表单的模态框,如果是只有一个文本框的表单,请使用 quickInput 函数,更简洁高效
|
|
7
|
+
* @param opts
|
|
8
|
+
* @param opts.width 模态框宽度,默认500px
|
|
9
|
+
* @param opts.title 模态框标题
|
|
10
|
+
* @param opts.formContent 表单内容配置
|
|
11
|
+
* @param opts.handleSubmit 提交处理函数,如果没有异常,将会自动关闭模态框
|
|
12
|
+
* @param opts.confirmButtonText 确认按钮文本,默认为"确定"
|
|
13
|
+
*/
|
|
14
|
+
export function showFormModal(opts) {
|
|
15
|
+
let form;
|
|
16
|
+
const modal = showModal({
|
|
17
|
+
title: opts.title,
|
|
18
|
+
width: opts.width,
|
|
19
|
+
body: (form = new Form({
|
|
20
|
+
labelPosition: 'top',
|
|
21
|
+
children: opts.formContent,
|
|
22
|
+
onSubmit: () => {
|
|
23
|
+
opts
|
|
24
|
+
.handleSubmit()
|
|
25
|
+
.then(() => {
|
|
26
|
+
modal.close();
|
|
27
|
+
})
|
|
28
|
+
.catch(showWarning);
|
|
29
|
+
}
|
|
30
|
+
})),
|
|
31
|
+
buttons: {
|
|
32
|
+
confirm: opts.confirmButtonText || getWokUiExtI18n().buildMsg('form-modal-confirm'),
|
|
33
|
+
cancel: true
|
|
34
|
+
},
|
|
35
|
+
onShown: opts.onShown,
|
|
36
|
+
onConfirm: () => form.submit()
|
|
37
|
+
});
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Form as WokUIForm, FormOpts as WokUIFormOpts } from 'wok-ui';
|
|
2
|
+
export interface FormOpts extends WokUIFormOpts {
|
|
3
|
+
/**
|
|
4
|
+
* 输入框标题的宽度
|
|
5
|
+
*/
|
|
6
|
+
labelWidth?: string | number;
|
|
7
|
+
/**
|
|
8
|
+
* 输入框标题在上还是在左,默认在左
|
|
9
|
+
*/
|
|
10
|
+
labelPosition?: 'top' | 'left';
|
|
11
|
+
/**
|
|
12
|
+
* label 是否加粗,默认false
|
|
13
|
+
*/
|
|
14
|
+
labelBold?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 表单,在原 wok-ui 表单的基础上增加了输入框标题相关的选项,配合 FormItem 使用
|
|
18
|
+
*/
|
|
19
|
+
export declare class Form extends WokUIForm {
|
|
20
|
+
constructor(opt: FormOpts);
|
|
21
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Form as WokUIForm } from 'wok-ui';
|
|
2
|
+
/**
|
|
3
|
+
* 表单,在原 wok-ui 表单的基础上增加了输入框标题相关的选项,配合 FormItem 使用
|
|
4
|
+
*/
|
|
5
|
+
export class Form extends WokUIForm {
|
|
6
|
+
constructor(opt) {
|
|
7
|
+
super(opt);
|
|
8
|
+
let labelWidth = '120px';
|
|
9
|
+
if (opt.labelPosition === 'top') {
|
|
10
|
+
labelWidth = '100%';
|
|
11
|
+
}
|
|
12
|
+
else if (opt.labelWidth) {
|
|
13
|
+
if (typeof opt.labelWidth === 'number') {
|
|
14
|
+
labelWidth = `${opt.labelWidth}px`;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
labelWidth = opt.labelWidth;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
this.el.style.setProperty('--form-label-width', labelWidth);
|
|
21
|
+
if (opt.labelPosition === 'top') {
|
|
22
|
+
this.el.classList.add('wok-ui-ext-form-label-top');
|
|
23
|
+
}
|
|
24
|
+
if (opt.labelBold) {
|
|
25
|
+
this.el.classList.add('wok-ui-ext-form-label-bold');
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { FormInput } from 'wok-ui';
|
|
2
|
+
import './style.less';
|
|
3
|
+
export interface SelectOpts {
|
|
4
|
+
/**
|
|
5
|
+
* 尺寸
|
|
6
|
+
*/
|
|
7
|
+
size?: 'sm' | 'default' | 'lg';
|
|
8
|
+
/**
|
|
9
|
+
* 必填
|
|
10
|
+
*/
|
|
11
|
+
required?: boolean | string;
|
|
12
|
+
/**
|
|
13
|
+
* 是否禁用
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 默认值
|
|
18
|
+
*/
|
|
19
|
+
value?: string;
|
|
20
|
+
/**
|
|
21
|
+
* 选项
|
|
22
|
+
*/
|
|
23
|
+
options: Array<{
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
} | string>;
|
|
27
|
+
/**
|
|
28
|
+
* 变化监听
|
|
29
|
+
* @param val
|
|
30
|
+
*/
|
|
31
|
+
onChange?: (val: string) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* 下拉选择,用法与 wok-ui 的 Select 完全一致,可无缝替换。
|
|
35
|
+
*
|
|
36
|
+
* 与 wok-ui Select 的区别:
|
|
37
|
+
* 1. 下拉箭头使用主题色(跟随 --color-primary),而不是 wok-ui 的固定灰色箭头
|
|
38
|
+
* 2. 内部用一层 wrapper 只包裹原生 select,主题色箭头挂在 wrapper 上,
|
|
39
|
+
* 因此校验反馈(invalid-feedback)出现时,箭头不会因为容器被撑高而偏移
|
|
40
|
+
*/
|
|
41
|
+
export declare class Select extends FormInput {
|
|
42
|
+
private readonly opts;
|
|
43
|
+
private select;
|
|
44
|
+
constructor(opts: SelectOpts);
|
|
45
|
+
private __validate;
|
|
46
|
+
validate(): boolean;
|
|
47
|
+
setDisabled(disabled: boolean): void;
|
|
48
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { FormInput, getI18n, getSize } from 'wok-ui';
|
|
2
|
+
import './style.css';
|
|
3
|
+
/**
|
|
4
|
+
* 下拉选择,用法与 wok-ui 的 Select 完全一致,可无缝替换。
|
|
5
|
+
*
|
|
6
|
+
* 与 wok-ui Select 的区别:
|
|
7
|
+
* 1. 下拉箭头使用主题色(跟随 --color-primary),而不是 wok-ui 的固定灰色箭头
|
|
8
|
+
* 2. 内部用一层 wrapper 只包裹原生 select,主题色箭头挂在 wrapper 上,
|
|
9
|
+
* 因此校验反馈(invalid-feedback)出现时,箭头不会因为容器被撑高而偏移
|
|
10
|
+
*/
|
|
11
|
+
export class Select extends FormInput {
|
|
12
|
+
constructor(opts) {
|
|
13
|
+
super('wok-ui-ext-select');
|
|
14
|
+
this.opts = opts;
|
|
15
|
+
this.addChild({
|
|
16
|
+
classNames: ['wok-ui-ext-select-wrap'],
|
|
17
|
+
children: {
|
|
18
|
+
tag: 'select',
|
|
19
|
+
classNames: ['wok-ui-select'],
|
|
20
|
+
attrs: { disabled: !!opts.disabled },
|
|
21
|
+
postHandle: el => {
|
|
22
|
+
this.select = el;
|
|
23
|
+
if (opts.value) {
|
|
24
|
+
this.select.value = opts.value;
|
|
25
|
+
}
|
|
26
|
+
this.select.addEventListener('change', () => {
|
|
27
|
+
if (this.opts.onChange) {
|
|
28
|
+
this.opts.onChange(this.select.value);
|
|
29
|
+
}
|
|
30
|
+
this.validate();
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
children: opts.options.map(opt => {
|
|
34
|
+
if (typeof opt === 'string') {
|
|
35
|
+
return {
|
|
36
|
+
tag: 'option',
|
|
37
|
+
innerText: opt,
|
|
38
|
+
attrs: { value: opt }
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return {
|
|
43
|
+
tag: 'option',
|
|
44
|
+
innerText: opt.label,
|
|
45
|
+
attrs: { value: opt.value }
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
// 尺寸
|
|
52
|
+
const size = getSize();
|
|
53
|
+
switch (opts.size) {
|
|
54
|
+
case 'lg':
|
|
55
|
+
this.select.style.setProperty('--select-font-size', `${size.textLg}px`);
|
|
56
|
+
break;
|
|
57
|
+
case 'sm':
|
|
58
|
+
this.select.style.setProperty('--select-font-size', `${size.textSm}px`);
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
this.select.style.setProperty('--select-font-size', `${size.text}px`);
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
__validate(val) {
|
|
66
|
+
if (this.opts.required) {
|
|
67
|
+
if (!val) {
|
|
68
|
+
return {
|
|
69
|
+
valid: false,
|
|
70
|
+
msg: typeof this.opts.required === 'string'
|
|
71
|
+
? this.opts.required
|
|
72
|
+
: getI18n().buildMsg('form-err-required')
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return { valid: true };
|
|
77
|
+
}
|
|
78
|
+
validate() {
|
|
79
|
+
const validateRes = this.__validate(this.select.value);
|
|
80
|
+
// 根据是否有效,显示反馈信息
|
|
81
|
+
if (validateRes.valid) {
|
|
82
|
+
this.select.classList.remove('invalid');
|
|
83
|
+
this.hideInvalidFeedback();
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
this.select.classList.add('invalid');
|
|
87
|
+
this.showInvalidFeedback(validateRes.msg);
|
|
88
|
+
}
|
|
89
|
+
return validateRes.valid;
|
|
90
|
+
}
|
|
91
|
+
setDisabled(disabled) {
|
|
92
|
+
this.select.disabled = disabled;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.wok-ui-ext-select-wrap {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
.wok-ui-ext-select-wrap > select.wok-ui-select {
|
|
5
|
+
background-image: none;
|
|
6
|
+
}
|
|
7
|
+
.wok-ui-ext-select-wrap > select.wok-ui-select > option,
|
|
8
|
+
.wok-ui-ext-select-wrap > select.wok-ui-select > optgroup {
|
|
9
|
+
color: var(--text-primary);
|
|
10
|
+
}
|
|
11
|
+
.wok-ui-ext-select-wrap::after {
|
|
12
|
+
content: '';
|
|
13
|
+
position: absolute;
|
|
14
|
+
right: 18px;
|
|
15
|
+
top: 50%;
|
|
16
|
+
transform: translateY(-50%);
|
|
17
|
+
width: 10px;
|
|
18
|
+
height: 10px;
|
|
19
|
+
background-color: var(--color-primary);
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M3,5 L8,11 L13,5' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3e%3c/svg%3e");
|
|
22
|
+
mask-repeat: no-repeat;
|
|
23
|
+
mask-position: center;
|
|
24
|
+
mask-size: contain;
|
|
25
|
+
-webkit-mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M3,5 L8,11 L13,5' fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'/%3e%3c/svg%3e");
|
|
26
|
+
-webkit-mask-repeat: no-repeat;
|
|
27
|
+
-webkit-mask-position: center;
|
|
28
|
+
-webkit-mask-size: contain;
|
|
29
|
+
}
|
package/dist/global.css
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
* {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
font-family: var(--font-family);
|
|
6
|
+
}
|
|
7
|
+
*:focus-visible {
|
|
8
|
+
outline: var(--shadow-sm);
|
|
9
|
+
}
|
|
10
|
+
*:focus {
|
|
11
|
+
outline: none;
|
|
12
|
+
}
|
|
13
|
+
body,
|
|
14
|
+
html {
|
|
15
|
+
height: 100%;
|
|
16
|
+
width: 100%;
|
|
17
|
+
background: var(--bg-body);
|
|
18
|
+
font-size: var(--font-size-body);
|
|
19
|
+
}
|
|
20
|
+
.wok-ui-input,
|
|
21
|
+
select.wok-ui-select {
|
|
22
|
+
width: 100% !important;
|
|
23
|
+
padding: 9px 36px 9px 18px !important;
|
|
24
|
+
border: 1px solid var(--border-medium) !important;
|
|
25
|
+
border-radius: var(--radius-xl) !important;
|
|
26
|
+
font-size: var(--font-size-body) !important;
|
|
27
|
+
background-color: var(--bg-content) !important;
|
|
28
|
+
outline: none;
|
|
29
|
+
/* 对webkit内核浏览器设置placeholder颜色 */
|
|
30
|
+
/* 对Gecko内核浏览器(例如Firefox设置placeholder颜色 */
|
|
31
|
+
/* 对Webkit内核和Gecko内核浏览器设置placeholder颜色 */
|
|
32
|
+
/* 对所有浏览器设置placeholder颜色 */
|
|
33
|
+
}
|
|
34
|
+
.wok-ui-input:focus-visible,
|
|
35
|
+
select.wok-ui-select:focus-visible,
|
|
36
|
+
.wok-ui-input.focused,
|
|
37
|
+
select.wok-ui-select.focused {
|
|
38
|
+
border-color: var(--color-primary) !important;
|
|
39
|
+
box-shadow: var(--shadow-sm);
|
|
40
|
+
outline: none;
|
|
41
|
+
}
|
|
42
|
+
.wok-ui-input::-webkit-input-placeholder,
|
|
43
|
+
select.wok-ui-select::-webkit-input-placeholder {
|
|
44
|
+
color: var(--text-placeholder);
|
|
45
|
+
}
|
|
46
|
+
.wok-ui-input::-moz-placeholder,
|
|
47
|
+
select.wok-ui-select::-moz-placeholder {
|
|
48
|
+
color: var(--text-placeholder);
|
|
49
|
+
}
|
|
50
|
+
.wok-ui-input:-ms-input-placeholder,
|
|
51
|
+
select.wok-ui-select:-ms-input-placeholder {
|
|
52
|
+
color: var(--text-placeholder);
|
|
53
|
+
}
|
|
54
|
+
.wok-ui-input::placeholder,
|
|
55
|
+
select.wok-ui-select::placeholder {
|
|
56
|
+
color: var(--text-placeholder);
|
|
57
|
+
}
|
|
58
|
+
.wok-ui-link {
|
|
59
|
+
text-decoration: none;
|
|
60
|
+
color: var(--text-primary);
|
|
61
|
+
}
|
|
62
|
+
.wok-ui-link:hover {
|
|
63
|
+
color: var(--text-secondary);
|
|
64
|
+
text-decoration: underline;
|
|
65
|
+
}
|
|
66
|
+
.wok-ui-link:visited {
|
|
67
|
+
color: var(--color-primary) !important;
|
|
68
|
+
}
|
|
69
|
+
.wok-ui-radio:disabled {
|
|
70
|
+
opacity: 1 !important;
|
|
71
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const deDE = {
|
|
2
|
+
'alert-warning': 'Warnung',
|
|
3
|
+
'alert-ok': 'OK',
|
|
4
|
+
'empty-text': 'Keine Daten',
|
|
5
|
+
'file-picker-max-size': 'Datei {} überschreitet {}',
|
|
6
|
+
'form-modal-confirm': 'Bestätigen',
|
|
7
|
+
'img-picker-crop': 'Bild zuschneiden',
|
|
8
|
+
'img-picker-cancel': 'Abbrechen',
|
|
9
|
+
'img-picker-confirm': 'Bestätigen',
|
|
10
|
+
'img-picker-format-error': 'Nur Bilddateien sind erlaubt',
|
|
11
|
+
'img-picker-crop-failed': 'Zuschneiden fehlgeschlagen',
|
|
12
|
+
'loading-text': 'Laden...',
|
|
13
|
+
'modal-confirm': 'Bestätigen',
|
|
14
|
+
'modal-cancel': 'Abbrechen',
|
|
15
|
+
'modal-warning': 'Warnung',
|
|
16
|
+
'modal-close': 'Schließen',
|
|
17
|
+
'pagination-total': 'Insgesamt {} Einträge',
|
|
18
|
+
'pagination-prev-page': 'Vorherige Seite',
|
|
19
|
+
'pagination-next-page': 'Nächste Seite',
|
|
20
|
+
'pagination-page': 'Seite {}',
|
|
21
|
+
'pagination-simple-format': '{} / {}',
|
|
22
|
+
'search-box-placeholder': 'Suche',
|
|
23
|
+
'table-empty': 'Kein Inhalt',
|
|
24
|
+
'toast-close': 'Schließen',
|
|
25
|
+
'tree-max-selected': 'Sie können maximal {} Elemente auswählen',
|
|
26
|
+
'tree-max-level': 'Die Ebene darf {} nicht überschreiten',
|
|
27
|
+
'upload-hint': 'Klicken oder Dateien ziehen zum Hochladen',
|
|
28
|
+
'upload-hint-secondary': '',
|
|
29
|
+
'upload-max-size': 'Datei {} überschreitet {}',
|
|
30
|
+
'upload-max-count': 'Sie können maximal {} Dateien auswählen',
|
|
31
|
+
'upload-before-upload-rejected': 'Validierung vor dem Hochladen fehlgeschlagen',
|
|
32
|
+
'upload-type-not-allowed': 'Der Dateityp von {} wird nicht unterstützt',
|
|
33
|
+
'upload-size-b': '{} B',
|
|
34
|
+
'upload-size-kb': '{} KB',
|
|
35
|
+
'upload-size-mb': '{} MB'
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const enUS = {
|
|
2
|
+
'alert-warning': 'Warning',
|
|
3
|
+
'alert-ok': 'OK',
|
|
4
|
+
'empty-text': 'No data',
|
|
5
|
+
'file-picker-max-size': 'File {} exceeds {}',
|
|
6
|
+
'form-modal-confirm': 'Confirm',
|
|
7
|
+
'img-picker-crop': 'Crop image',
|
|
8
|
+
'img-picker-cancel': 'Cancel',
|
|
9
|
+
'img-picker-confirm': 'Confirm',
|
|
10
|
+
'img-picker-format-error': 'Only image files are allowed',
|
|
11
|
+
'img-picker-crop-failed': 'Crop failed',
|
|
12
|
+
'loading-text': 'Loading...',
|
|
13
|
+
'modal-confirm': 'Confirm',
|
|
14
|
+
'modal-cancel': 'Cancel',
|
|
15
|
+
'modal-warning': 'Warning',
|
|
16
|
+
'modal-close': 'Close',
|
|
17
|
+
'pagination-total': 'Total {} items',
|
|
18
|
+
'pagination-prev-page': 'Previous page',
|
|
19
|
+
'pagination-next-page': 'Next page',
|
|
20
|
+
'pagination-page': 'Page {}',
|
|
21
|
+
'pagination-simple-format': '{} / {}',
|
|
22
|
+
'search-box-placeholder': 'Search',
|
|
23
|
+
'table-empty': 'No data',
|
|
24
|
+
'toast-close': 'Close',
|
|
25
|
+
'tree-max-selected': 'You can select at most {} items',
|
|
26
|
+
'tree-max-level': 'Level cannot exceed {}',
|
|
27
|
+
'upload-hint': 'Click or drag files to upload',
|
|
28
|
+
'upload-hint-secondary': '',
|
|
29
|
+
'upload-max-size': 'File {} exceeds {}',
|
|
30
|
+
'upload-max-count': 'You can select at most {} files',
|
|
31
|
+
'upload-before-upload-rejected': 'Before upload validation failed',
|
|
32
|
+
'upload-type-not-allowed': 'File {} type is not supported',
|
|
33
|
+
'upload-size-b': '{} B',
|
|
34
|
+
'upload-size-kb': '{} KB',
|
|
35
|
+
'upload-size-mb': '{} MB'
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const esES = {
|
|
2
|
+
'alert-warning': 'Advertencia',
|
|
3
|
+
'alert-ok': 'Aceptar',
|
|
4
|
+
'empty-text': 'Sin datos',
|
|
5
|
+
'file-picker-max-size': 'El archivo {} supera {}',
|
|
6
|
+
'form-modal-confirm': 'Confirmar',
|
|
7
|
+
'img-picker-crop': 'Recortar imagen',
|
|
8
|
+
'img-picker-cancel': 'Cancelar',
|
|
9
|
+
'img-picker-confirm': 'Confirmar',
|
|
10
|
+
'img-picker-format-error': 'Solo se permiten archivos de imagen',
|
|
11
|
+
'img-picker-crop-failed': 'Error al recortar',
|
|
12
|
+
'loading-text': 'Cargando...',
|
|
13
|
+
'modal-confirm': 'Confirmar',
|
|
14
|
+
'modal-cancel': 'Cancelar',
|
|
15
|
+
'modal-warning': 'Advertencia',
|
|
16
|
+
'modal-close': 'Cerrar',
|
|
17
|
+
'pagination-total': 'Total {} elementos',
|
|
18
|
+
'pagination-prev-page': 'Página anterior',
|
|
19
|
+
'pagination-next-page': 'Página siguiente',
|
|
20
|
+
'pagination-page': 'Página {}',
|
|
21
|
+
'pagination-simple-format': '{} / {}',
|
|
22
|
+
'search-box-placeholder': 'Buscar',
|
|
23
|
+
'table-empty': 'Sin contenido',
|
|
24
|
+
'toast-close': 'Cerrar',
|
|
25
|
+
'tree-max-selected': 'Puede seleccionar como máximo {} elementos',
|
|
26
|
+
'tree-max-level': 'El nivel no puede exceder {}',
|
|
27
|
+
'upload-hint': 'Haga clic o arrastre archivos para subir',
|
|
28
|
+
'upload-hint-secondary': '',
|
|
29
|
+
'upload-max-size': 'El archivo {} supera {}',
|
|
30
|
+
'upload-max-count': 'Puede seleccionar como máximo {} archivos',
|
|
31
|
+
'upload-before-upload-rejected': 'La validación previa a la subida falló',
|
|
32
|
+
'upload-type-not-allowed': 'El tipo del archivo {} no es compatible',
|
|
33
|
+
'upload-size-b': '{} B',
|
|
34
|
+
'upload-size-kb': '{} KB',
|
|
35
|
+
'upload-size-mb': '{} MB'
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const frFR = {
|
|
2
|
+
'alert-warning': 'Avertissement',
|
|
3
|
+
'alert-ok': 'OK',
|
|
4
|
+
'empty-text': 'Aucune donnée',
|
|
5
|
+
'file-picker-max-size': 'Le fichier {} dépasse {}',
|
|
6
|
+
'form-modal-confirm': 'Confirmer',
|
|
7
|
+
'img-picker-crop': 'Recadrer l\'image',
|
|
8
|
+
'img-picker-cancel': 'Annuler',
|
|
9
|
+
'img-picker-confirm': 'Confirmer',
|
|
10
|
+
'img-picker-format-error': 'Seuls les fichiers image sont autorisés',
|
|
11
|
+
'img-picker-crop-failed': 'Échec du recadrage',
|
|
12
|
+
'loading-text': 'Chargement...',
|
|
13
|
+
'modal-confirm': 'Confirmer',
|
|
14
|
+
'modal-cancel': 'Annuler',
|
|
15
|
+
'modal-warning': 'Avertissement',
|
|
16
|
+
'modal-close': 'Fermer',
|
|
17
|
+
'pagination-total': 'Total {} éléments',
|
|
18
|
+
'pagination-prev-page': 'Page précédente',
|
|
19
|
+
'pagination-next-page': 'Page suivante',
|
|
20
|
+
'pagination-page': 'Page {}',
|
|
21
|
+
'pagination-simple-format': '{} / {}',
|
|
22
|
+
'search-box-placeholder': 'Rechercher',
|
|
23
|
+
'table-empty': 'Aucun contenu',
|
|
24
|
+
'toast-close': 'Fermer',
|
|
25
|
+
'tree-max-selected': 'Vous pouvez sélectionner au maximum {} éléments',
|
|
26
|
+
'tree-max-level': 'Le niveau ne peut pas dépasser {}',
|
|
27
|
+
'upload-hint': 'Cliquez ou glissez-déposez des fichiers pour uploader',
|
|
28
|
+
'upload-hint-secondary': '',
|
|
29
|
+
'upload-max-size': 'Le fichier {} dépasse {}',
|
|
30
|
+
'upload-max-count': 'Vous pouvez sélectionner au maximum {} fichiers',
|
|
31
|
+
'upload-before-upload-rejected': 'La validation avant upload a échoué',
|
|
32
|
+
'upload-type-not-allowed': "Le type du fichier {} n'est pas pris en charge",
|
|
33
|
+
'upload-size-b': '{} o',
|
|
34
|
+
'upload-size-kb': '{} Ko',
|
|
35
|
+
'upload-size-mb': '{} Mo'
|
|
36
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { I18n } from 'wok-ui';
|
|
2
|
+
import { WokUiExtI18nMessages } from './messages';
|
|
3
|
+
/**
|
|
4
|
+
* 获取 wok-ui-ext 的 i18n 实例。
|
|
5
|
+
*/
|
|
6
|
+
export declare function getWokUiExtI18n(): I18n<WokUiExtI18nMessages>;
|
|
7
|
+
/**
|
|
8
|
+
* 初始化 wok-ui-ext 的 i18n 实例,并切换到指定语言。
|
|
9
|
+
* @param lang 语言,可选值为 'zh-CN'、'en-US'、'ja-JP'、'ko-KR'、'fr-FR'、'de-DE'、'es-ES' 或 'zh-TW'。
|
|
10
|
+
*/
|
|
11
|
+
export declare function initWokUiExtI18n(lang?: string): Promise<void>;
|
|
12
|
+
export * from './messages';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { getI18n } from 'wok-ui';
|
|
2
|
+
import { enUS } from './en-US';
|
|
3
|
+
import { zhCN } from './zh-CN';
|
|
4
|
+
let wokUiExtI18n;
|
|
5
|
+
/**
|
|
6
|
+
* 获取 wok-ui-ext 的 i18n 实例。
|
|
7
|
+
*/
|
|
8
|
+
export function getWokUiExtI18n() {
|
|
9
|
+
if (wokUiExtI18n) {
|
|
10
|
+
return wokUiExtI18n;
|
|
11
|
+
}
|
|
12
|
+
const i18n = getI18n();
|
|
13
|
+
wokUiExtI18n = i18n.extend(enUS);
|
|
14
|
+
wokUiExtI18n.setMsgs('zh-CN', zhCN);
|
|
15
|
+
// wok-ui 基础语言扩展(异步加载)
|
|
16
|
+
i18n.setMsgs('zh-TW', () => import('./wok-ui/zh-TW').then(d => d.zhTW));
|
|
17
|
+
i18n.setMsgs('ja-JP', () => import('./wok-ui/ja-JP').then(d => d.jaJP));
|
|
18
|
+
i18n.setMsgs('ko-KR', () => import('./wok-ui/ko-KR').then(d => d.koKR));
|
|
19
|
+
i18n.setMsgs('fr-FR', () => import('./wok-ui/fr-FR').then(d => d.frFR));
|
|
20
|
+
i18n.setMsgs('de-DE', () => import('./wok-ui/de-DE').then(d => d.deDE));
|
|
21
|
+
i18n.setMsgs('es-ES', () => import('./wok-ui/es-ES').then(d => d.esES));
|
|
22
|
+
// wok-ui-ext 语言扩展(异步加载)
|
|
23
|
+
wokUiExtI18n.setMsgs('zh-TW', () => import('./zh-TW').then(d => d.zhTW));
|
|
24
|
+
wokUiExtI18n.setMsgs('ja-JP', () => import('./ja-JP').then(d => d.jaJP));
|
|
25
|
+
wokUiExtI18n.setMsgs('ko-KR', () => import('./ko-KR').then(d => d.koKR));
|
|
26
|
+
wokUiExtI18n.setMsgs('fr-FR', () => import('./fr-FR').then(d => d.frFR));
|
|
27
|
+
wokUiExtI18n.setMsgs('de-DE', () => import('./de-DE').then(d => d.deDE));
|
|
28
|
+
wokUiExtI18n.setMsgs('es-ES', () => import('./es-ES').then(d => d.esES));
|
|
29
|
+
return wokUiExtI18n;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* 初始化 wok-ui-ext 的 i18n 实例,并切换到指定语言。
|
|
33
|
+
* @param lang 语言,可选值为 'zh-CN'、'en-US'、'ja-JP'、'ko-KR'、'fr-FR'、'de-DE'、'es-ES' 或 'zh-TW'。
|
|
34
|
+
*/
|
|
35
|
+
export async function initWokUiExtI18n(lang) {
|
|
36
|
+
getWokUiExtI18n();
|
|
37
|
+
await getI18n().setLang(lang || 'en-US');
|
|
38
|
+
}
|
|
39
|
+
export * from './messages';
|