@zat-design/sisyphus-react 3.1.4 → 3.1.5-beta.10
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/.dumi/theme/builtins/Alert.tsx +19 -0
- package/.dumi/theme/builtins/Previewer.tsx +232 -0
- package/.dumi/theme/builtins/SourceCode.tsx +64 -0
- package/.dumi/theme/hooks/useCodeSandbox.tsx +197 -0
- package/.dumi/theme/hooks/useTheme.tsx +707 -0
- package/.dumi/theme/layouts/BasicLayout.tsx +88 -0
- package/.dumi/theme/layouts/components/Dark.less +157 -0
- package/.dumi/theme/layouts/components/Dark.tsx +78 -0
- package/.dumi/theme/layouts/components/Navbar.tsx +83 -0
- package/.dumi/theme/layouts/components/SideMenu.tsx +61 -0
- package/.dumi/theme/layouts/index.tsx +26 -0
- package/.dumi/theme/layouts/layout.less +87 -0
- package/.dumi/theme/typings.d.ts +7 -0
- package/dist/index.esm.css +122 -249
- package/es/ProAction/index.less +3 -2
- package/es/ProConfigProvider/index.d.ts +2 -0
- package/es/ProConfigProvider/index.js +18 -2
- package/es/ProDrawerForm/index.js +5 -3
- package/es/ProDrawerForm/style/index.less +15 -11
- package/es/ProEditLabel/style/index.less +2 -2
- package/es/ProEditTable/style/index.less +15 -8
- package/es/ProEditTable/utils/config.js +11 -4
- package/es/ProEnum/style/index.less +1 -1
- package/es/ProForm/components/base/RangePicker/index.js +0 -3
- package/es/ProForm/components/base/TextArea/index.less +1 -1
- package/es/ProForm/components/combination/Container/style/index.less +0 -1
- package/es/ProForm/components/combination/FormList/style/index.less +20 -19
- package/es/ProForm/components/combination/Group/index.js +2 -2
- package/es/ProForm/components/combination/ProAddressBar/index.js +81 -61
- package/es/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
- package/es/ProForm/components/combination/ProModalSelect/index.js +75 -13
- package/es/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +7 -8
- package/es/ProForm/components/render/RenderFields.js +10 -5
- package/es/ProForm/components/render/propsType.d.ts +5 -4
- package/es/ProForm/index.js +5 -0
- package/es/ProForm/style/index.less +55 -169
- package/es/ProForm/utils/useShouldUpdate.js +16 -16
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +2 -2
- package/es/ProLayout/components/ProCollapse/style/index.less +4 -4
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
- package/es/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/es/ProLayout/components/ProHeader/components/index.js +2 -1
- package/es/ProLayout/components/ProHeader/index.js +4 -2
- package/es/ProLayout/components/ProHeader/style/index.less +16 -7
- package/es/ProStep/style/index.less +0 -1
- package/es/ProTable/components/RenderColumn/index.d.ts +5 -5
- package/es/ProTable/components/RenderColumn/index.js +41 -25
- package/es/ProTable/index.js +3 -2
- package/es/ProTable/propsType.d.ts +2 -0
- package/es/ProTable/style/index.less +14 -1
- package/es/ProTable/utils.d.ts +1 -1
- package/es/ProTable/utils.js +258 -201
- package/es/ProTabs/style/index.less +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +1 -1
- package/es/ProThemeTools/component/PrdTools/style/index.less +3 -3
- package/es/ProThemeTools/index.d.ts +2 -2
- package/es/ProThemeTools/index.js +24 -17
- package/es/ProThemeTools/propsType.d.ts +8 -6
- package/es/ProThemeTools/style/index.less +2 -2
- package/es/ProThemeTools/utils/index.d.ts +7 -0
- package/es/ProThemeTools/utils/index.js +19 -1
- package/es/ProTree/components/ProTree.js +1 -1
- package/es/ProTree/components/SearchTitle.d.ts +2 -2
- package/es/ProTree/components/SearchTitle.js +11 -1
- package/es/ProTree/components/Tree.js +6 -1
- package/es/ProTree/style/index.less +193 -141
- package/es/ProTreeModal/style/index.less +2 -6
- package/es/ProUpload/style/index.less +41 -39
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/locale/en_US.d.ts +69 -0
- package/es/locale/en_US.js +68 -0
- package/es/locale/index.d.ts +7 -0
- package/es/locale/index.js +21 -0
- package/es/locale/zh_CN.d.ts +69 -0
- package/es/locale/zh_CN.js +68 -0
- package/es/old/ProEditableTable/style/index.less +1 -2
- package/es/style/components.less +0 -1
- package/es/style/core/normalize.less +1 -1
- package/es/style/theme/antd.less +3 -4
- package/es/style/theme/index.less +80 -79
- package/es/style/theme/tokens.less +1 -0
- package/lib/ProAction/index.less +3 -2
- package/lib/ProConfigProvider/index.d.ts +2 -0
- package/lib/ProConfigProvider/index.js +17 -2
- package/lib/ProDrawerForm/index.js +5 -3
- package/lib/ProDrawerForm/style/index.less +15 -11
- package/lib/ProEditLabel/style/index.less +2 -2
- package/lib/ProEditTable/style/index.less +15 -8
- package/lib/ProEditTable/utils/config.js +11 -4
- package/lib/ProEnum/style/index.less +1 -1
- package/lib/ProForm/components/base/RangePicker/index.js +0 -3
- package/lib/ProForm/components/base/TextArea/index.less +1 -1
- package/lib/ProForm/components/combination/Container/style/index.less +0 -1
- package/lib/ProForm/components/combination/FormList/style/index.less +20 -19
- package/lib/ProForm/components/combination/Group/index.js +2 -2
- package/lib/ProForm/components/combination/ProAddressBar/index.js +76 -58
- package/lib/ProForm/components/combination/ProAddressBar/propsType.d.ts +3 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.js +75 -13
- package/lib/ProForm/components/combination/ProModalSelect/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +3 -3
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +10 -5
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +1 -1
- package/lib/ProForm/components/old/EnumSelect/style/index.less +7 -8
- package/lib/ProForm/components/render/RenderFields.js +9 -4
- package/lib/ProForm/components/render/propsType.d.ts +5 -4
- package/lib/ProForm/index.js +5 -0
- package/lib/ProForm/style/index.less +55 -169
- package/lib/ProForm/utils/useShouldUpdate.js +16 -16
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +2 -2
- package/lib/ProLayout/components/ProCollapse/style/index.less +4 -4
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +21 -0
- package/lib/ProLayout/components/ProHeader/components/index.d.ts +1 -0
- package/lib/ProLayout/components/ProHeader/components/index.js +8 -1
- package/lib/ProLayout/components/ProHeader/index.js +4 -2
- package/lib/ProLayout/components/ProHeader/style/index.less +16 -7
- package/lib/ProStep/style/index.less +0 -1
- package/lib/ProTable/components/RenderColumn/index.d.ts +5 -5
- package/lib/ProTable/components/RenderColumn/index.js +38 -24
- package/lib/ProTable/index.js +3 -2
- package/lib/ProTable/propsType.d.ts +2 -0
- package/lib/ProTable/style/index.less +14 -1
- package/lib/ProTable/utils.d.ts +1 -1
- package/lib/ProTable/utils.js +258 -201
- package/lib/ProTabs/style/index.less +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +1 -1
- package/lib/ProThemeTools/component/PrdTools/style/index.less +3 -3
- package/lib/ProThemeTools/index.d.ts +2 -2
- package/lib/ProThemeTools/index.js +23 -16
- package/lib/ProThemeTools/propsType.d.ts +8 -6
- package/lib/ProThemeTools/style/index.less +2 -2
- package/lib/ProThemeTools/utils/index.d.ts +7 -0
- package/lib/ProThemeTools/utils/index.js +20 -2
- package/lib/ProTree/components/ProTree.js +1 -1
- package/lib/ProTree/components/SearchTitle.d.ts +2 -2
- package/lib/ProTree/components/SearchTitle.js +11 -1
- package/lib/ProTree/components/Tree.js +6 -1
- package/lib/ProTree/style/index.less +193 -141
- package/lib/ProTreeModal/style/index.less +2 -6
- package/lib/ProUpload/style/index.less +41 -39
- package/lib/index.d.ts +2 -1
- package/lib/index.js +13 -1
- package/lib/locale/en_US.d.ts +69 -0
- package/lib/locale/en_US.js +74 -0
- package/lib/locale/index.d.ts +7 -0
- package/lib/locale/index.js +28 -0
- package/lib/locale/zh_CN.d.ts +69 -0
- package/lib/locale/zh_CN.js +74 -0
- package/lib/old/ProEditableTable/style/index.less +1 -2
- package/lib/style/components.less +0 -1
- package/lib/style/core/normalize.less +1 -1
- package/lib/style/theme/antd.less +3 -4
- package/lib/style/theme/index.less +80 -79
- package/lib/style/theme/tokens.less +1 -0
- package/package.json +2 -2
- package/typings.d.ts +2 -0
- package/es/old/ProBackBtn/style/index.less +0 -19
- package/lib/old/ProBackBtn/style/index.less +0 -19
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
- /package/es/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.d.ts +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/index.js +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.d.ts +0 -0
- /package/lib/{old → ProLayout/components/ProHeader/components}/ProBackBtn/propsType.js +0 -0
package/es/index.d.ts
CHANGED
|
@@ -21,7 +21,8 @@ export { default as ProUpload } from './ProUpload';
|
|
|
21
21
|
export { default as ProThemeTools } from './ProThemeTools';
|
|
22
22
|
export { default as ProAction } from './ProAction';
|
|
23
23
|
export * from './ProConfigProvider';
|
|
24
|
-
export
|
|
24
|
+
export * from './locale';
|
|
25
|
+
export { default as ProBackBtn } from './ProLayout/components/ProHeader/components/ProBackBtn';
|
|
25
26
|
export { default as ProEditableTable } from './old/ProEditableTable';
|
|
26
27
|
export { default as ProCertValidity } from './old/ProCertValidity';
|
|
27
28
|
export * from './ProForm/propsType';
|
package/es/index.js
CHANGED
|
@@ -26,8 +26,9 @@ export { default as ProUpload } from './ProUpload';
|
|
|
26
26
|
export { default as ProThemeTools } from './ProThemeTools';
|
|
27
27
|
export { default as ProAction } from './ProAction';
|
|
28
28
|
export * from './ProConfigProvider';
|
|
29
|
+
export * from './locale';
|
|
29
30
|
// old 待废弃
|
|
30
|
-
export { default as ProBackBtn } from './
|
|
31
|
+
export { default as ProBackBtn } from './ProLayout/components/ProHeader/components/ProBackBtn';
|
|
31
32
|
export { default as ProEditableTable } from './old/ProEditableTable';
|
|
32
33
|
export { default as ProCertValidity } from './old/ProCertValidity';
|
|
33
34
|
// TS类型导出
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
common: {
|
|
3
|
+
save: string;
|
|
4
|
+
cancel: string;
|
|
5
|
+
};
|
|
6
|
+
demo: {
|
|
7
|
+
openDrawer: string;
|
|
8
|
+
openModal: string;
|
|
9
|
+
};
|
|
10
|
+
search: {
|
|
11
|
+
search: string;
|
|
12
|
+
reset: string;
|
|
13
|
+
collapsed: string;
|
|
14
|
+
expand: string;
|
|
15
|
+
};
|
|
16
|
+
dialog: {
|
|
17
|
+
modeAdd: string;
|
|
18
|
+
modeUpdate: string;
|
|
19
|
+
modeDetail: string;
|
|
20
|
+
modeCustom: string;
|
|
21
|
+
close: string;
|
|
22
|
+
confirm: string;
|
|
23
|
+
};
|
|
24
|
+
extra: {
|
|
25
|
+
refresh: string;
|
|
26
|
+
density: string;
|
|
27
|
+
densityLarger: string;
|
|
28
|
+
densityMiddle: string;
|
|
29
|
+
densitySmall: string;
|
|
30
|
+
fullScreen: string;
|
|
31
|
+
exitFullScreen: string;
|
|
32
|
+
moveUp: string;
|
|
33
|
+
moveDown: string;
|
|
34
|
+
rename: string;
|
|
35
|
+
columnSetting: string;
|
|
36
|
+
};
|
|
37
|
+
action: {
|
|
38
|
+
success: string;
|
|
39
|
+
deleteConfirm: string;
|
|
40
|
+
deleteSuccess: string;
|
|
41
|
+
noSelection: string;
|
|
42
|
+
deleteConfirmTitle: string;
|
|
43
|
+
deleteConfirmBefore: string;
|
|
44
|
+
deleteConfirmAfter: string;
|
|
45
|
+
deleteConfirmBatchSuccess: string;
|
|
46
|
+
};
|
|
47
|
+
tagGroup: {
|
|
48
|
+
all: string;
|
|
49
|
+
};
|
|
50
|
+
table: {
|
|
51
|
+
totalBefore: string;
|
|
52
|
+
totalAfter: string;
|
|
53
|
+
selectedTitle: string;
|
|
54
|
+
selectedBefore: string;
|
|
55
|
+
selectedAfter: string;
|
|
56
|
+
selectedClear: string;
|
|
57
|
+
};
|
|
58
|
+
form: {
|
|
59
|
+
pleaseInput: string;
|
|
60
|
+
pleaseInputAfter: string;
|
|
61
|
+
pleaseSelect: string;
|
|
62
|
+
pleaseSelectAfter: string;
|
|
63
|
+
requiredText: string;
|
|
64
|
+
startDate: string;
|
|
65
|
+
endDate: string;
|
|
66
|
+
dateTo: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
common: {
|
|
3
|
+
save: 'save',
|
|
4
|
+
cancel: 'cancel'
|
|
5
|
+
},
|
|
6
|
+
demo: {
|
|
7
|
+
openDrawer: 'open drawer',
|
|
8
|
+
openModal: 'open modal'
|
|
9
|
+
},
|
|
10
|
+
search: {
|
|
11
|
+
search: 'Search',
|
|
12
|
+
reset: 'Reset',
|
|
13
|
+
collapsed: 'More',
|
|
14
|
+
expand: 'Close'
|
|
15
|
+
},
|
|
16
|
+
dialog: {
|
|
17
|
+
modeAdd: 'Add',
|
|
18
|
+
modeUpdate: 'Update',
|
|
19
|
+
modeDetail: 'Detail',
|
|
20
|
+
modeCustom: 'Custom',
|
|
21
|
+
close: ' Close',
|
|
22
|
+
confirm: 'Confirm'
|
|
23
|
+
},
|
|
24
|
+
extra: {
|
|
25
|
+
refresh: 'refresh',
|
|
26
|
+
density: 'density',
|
|
27
|
+
densityLarger: 'default',
|
|
28
|
+
densityMiddle: 'middle',
|
|
29
|
+
densitySmall: 'small',
|
|
30
|
+
fullScreen: 'full screen',
|
|
31
|
+
exitFullScreen: 'exit full screen',
|
|
32
|
+
moveUp: 'move up',
|
|
33
|
+
moveDown: 'move down',
|
|
34
|
+
rename: 'new name',
|
|
35
|
+
columnSetting: 'column setting'
|
|
36
|
+
},
|
|
37
|
+
action: {
|
|
38
|
+
success: 'Successful',
|
|
39
|
+
deleteConfirm: 'Are you sure you want to delete this row?',
|
|
40
|
+
deleteSuccess: 'Deleted successfully',
|
|
41
|
+
noSelection: 'Please select a row',
|
|
42
|
+
deleteConfirmTitle: 'Confirm',
|
|
43
|
+
deleteConfirmBefore: 'You have selected ',
|
|
44
|
+
deleteConfirmAfter: 'rows, are you sure you want to delete them?',
|
|
45
|
+
deleteConfirmBatchSuccess: 'Batch delete successfully'
|
|
46
|
+
},
|
|
47
|
+
tagGroup: {
|
|
48
|
+
all: 'All'
|
|
49
|
+
},
|
|
50
|
+
table: {
|
|
51
|
+
totalBefore: 'Total',
|
|
52
|
+
totalAfter: 'items',
|
|
53
|
+
selectedTitle: 'Selection',
|
|
54
|
+
selectedBefore: 'Selected: ',
|
|
55
|
+
selectedAfter: 'items',
|
|
56
|
+
selectedClear: 'Remove All'
|
|
57
|
+
},
|
|
58
|
+
form: {
|
|
59
|
+
pleaseInput: 'input ',
|
|
60
|
+
pleaseInputAfter: '',
|
|
61
|
+
pleaseSelect: 'select ',
|
|
62
|
+
pleaseSelectAfter: '',
|
|
63
|
+
requiredText: '',
|
|
64
|
+
startDate: 'Start Date',
|
|
65
|
+
endDate: 'End date',
|
|
66
|
+
dateTo: 'To'
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import moment from 'moment';
|
|
2
|
+
import zhCN from './zh_CN';
|
|
3
|
+
import enUS from './en_US';
|
|
4
|
+
var activeLang = localStorage.getItem('locale') || 'zh-CN';
|
|
5
|
+
var langMap = {
|
|
6
|
+
'zh-CN': zhCN,
|
|
7
|
+
'en-US': enUS // en-US
|
|
8
|
+
};
|
|
9
|
+
/** 设置语言
|
|
10
|
+
* lang当前语言
|
|
11
|
+
* isReload 切换语言后是否刷新页面,一般在项目上使用都需要刷新
|
|
12
|
+
*/
|
|
13
|
+
export var setLanguage = function setLanguage(lang, isReload) {
|
|
14
|
+
activeLang = lang;
|
|
15
|
+
localStorage.setItem('locale', lang);
|
|
16
|
+
moment.locale(lang.toLowerCase());
|
|
17
|
+
if (isReload) {
|
|
18
|
+
window.location.reload();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export default langMap[activeLang];
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
common: {
|
|
3
|
+
save: string;
|
|
4
|
+
cancel: string;
|
|
5
|
+
};
|
|
6
|
+
demo: {
|
|
7
|
+
openDrawer: string;
|
|
8
|
+
openModal: string;
|
|
9
|
+
};
|
|
10
|
+
search: {
|
|
11
|
+
search: string;
|
|
12
|
+
reset: string;
|
|
13
|
+
collapsed: string;
|
|
14
|
+
expand: string;
|
|
15
|
+
};
|
|
16
|
+
dialog: {
|
|
17
|
+
modeAdd: string;
|
|
18
|
+
modeUpdate: string;
|
|
19
|
+
modeDetail: string;
|
|
20
|
+
modeCustom: string;
|
|
21
|
+
close: string;
|
|
22
|
+
confirm: string;
|
|
23
|
+
};
|
|
24
|
+
extra: {
|
|
25
|
+
refresh: string;
|
|
26
|
+
density: string;
|
|
27
|
+
densityLarger: string;
|
|
28
|
+
densityMiddle: string;
|
|
29
|
+
densitySmall: string;
|
|
30
|
+
fullScreen: string;
|
|
31
|
+
exitFullScreen: string;
|
|
32
|
+
moveUp: string;
|
|
33
|
+
moveDown: string;
|
|
34
|
+
rename: string;
|
|
35
|
+
columnSetting: string;
|
|
36
|
+
};
|
|
37
|
+
action: {
|
|
38
|
+
success: string;
|
|
39
|
+
deleteConfirm: string;
|
|
40
|
+
deleteSuccess: string;
|
|
41
|
+
noSelection: string;
|
|
42
|
+
deleteConfirmTitle: string;
|
|
43
|
+
deleteConfirmBefore: string;
|
|
44
|
+
deleteConfirmAfter: string;
|
|
45
|
+
deleteConfirmBatchSuccess: string;
|
|
46
|
+
};
|
|
47
|
+
tagGroup: {
|
|
48
|
+
all: string;
|
|
49
|
+
};
|
|
50
|
+
table: {
|
|
51
|
+
totalBefore: string;
|
|
52
|
+
totalAfter: string;
|
|
53
|
+
selectedTitle: string;
|
|
54
|
+
selectedBefore: string;
|
|
55
|
+
selectedAfter: string;
|
|
56
|
+
selectedClear: string;
|
|
57
|
+
};
|
|
58
|
+
form: {
|
|
59
|
+
pleaseInput: string;
|
|
60
|
+
pleaseInputAfter: string;
|
|
61
|
+
pleaseSelect: string;
|
|
62
|
+
pleaseSelectAfter: string;
|
|
63
|
+
requiredText: string;
|
|
64
|
+
startDate: string;
|
|
65
|
+
endDate: string;
|
|
66
|
+
dateTo: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
common: {
|
|
3
|
+
save: '保存',
|
|
4
|
+
cancel: '取消'
|
|
5
|
+
},
|
|
6
|
+
demo: {
|
|
7
|
+
openDrawer: '打开抽屉',
|
|
8
|
+
openModal: '打开弹框'
|
|
9
|
+
},
|
|
10
|
+
search: {
|
|
11
|
+
search: '查询',
|
|
12
|
+
reset: '重置',
|
|
13
|
+
collapsed: '展开',
|
|
14
|
+
expand: '收起'
|
|
15
|
+
},
|
|
16
|
+
dialog: {
|
|
17
|
+
modeAdd: '新增',
|
|
18
|
+
modeUpdate: '编辑',
|
|
19
|
+
modeDetail: '详情',
|
|
20
|
+
modeCustom: '自定义',
|
|
21
|
+
close: '关闭',
|
|
22
|
+
confirm: '确定'
|
|
23
|
+
},
|
|
24
|
+
extra: {
|
|
25
|
+
refresh: '刷新',
|
|
26
|
+
density: '密度',
|
|
27
|
+
densityLarger: '默认',
|
|
28
|
+
densityMiddle: '中等',
|
|
29
|
+
densitySmall: '紧凑',
|
|
30
|
+
fullScreen: '全屏',
|
|
31
|
+
exitFullScreen: '退出全屏',
|
|
32
|
+
moveUp: '上移',
|
|
33
|
+
moveDown: '下移',
|
|
34
|
+
rename: '请输入别名',
|
|
35
|
+
columnSetting: '设置展示列'
|
|
36
|
+
},
|
|
37
|
+
action: {
|
|
38
|
+
success: '成功',
|
|
39
|
+
deleteConfirm: '你确定要删除此行吗?',
|
|
40
|
+
deleteSuccess: '删除成功',
|
|
41
|
+
noSelection: '请选择一条数据',
|
|
42
|
+
deleteConfirmTitle: '确定',
|
|
43
|
+
deleteConfirmBefore: '您勾选了',
|
|
44
|
+
deleteConfirmAfter: '个,确定要删除吗?',
|
|
45
|
+
deleteConfirmBatchSuccess: '批量删除成功'
|
|
46
|
+
},
|
|
47
|
+
tagGroup: {
|
|
48
|
+
all: '全部'
|
|
49
|
+
},
|
|
50
|
+
table: {
|
|
51
|
+
totalBefore: '共',
|
|
52
|
+
totalAfter: '条',
|
|
53
|
+
selectedTitle: '已经选中的选项',
|
|
54
|
+
selectedBefore: '已选择:',
|
|
55
|
+
selectedAfter: '条',
|
|
56
|
+
selectedClear: '清空'
|
|
57
|
+
},
|
|
58
|
+
form: {
|
|
59
|
+
pleaseInput: '请输入',
|
|
60
|
+
pleaseInputAfter: '',
|
|
61
|
+
pleaseSelect: '请选择',
|
|
62
|
+
pleaseSelectAfter: '',
|
|
63
|
+
requiredText: '',
|
|
64
|
+
startDate: '开始日期',
|
|
65
|
+
endDate: '结束日期',
|
|
66
|
+
dateTo: '至'
|
|
67
|
+
}
|
|
68
|
+
};
|
package/es/style/components.less
CHANGED
package/es/style/theme/antd.less
CHANGED
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
&>.ant-form-item-required::after {
|
|
56
56
|
margin-top : 1px;
|
|
57
57
|
color : #ff4d4f;
|
|
58
|
-
font-size : 14px;
|
|
59
|
-
font-family: SimSun, sans-serif;
|
|
58
|
+
font-size : var(--zaui-font-size, 14px);
|
|
60
59
|
line-height: 1;
|
|
61
60
|
content : '*';
|
|
62
61
|
}
|
|
@@ -86,7 +85,7 @@
|
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
.ant-form-item {
|
|
89
|
-
margin-bottom:
|
|
88
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1)) !important;
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
|
|
@@ -332,7 +331,7 @@
|
|
|
332
331
|
}
|
|
333
332
|
|
|
334
333
|
.ant-tabs-nav {
|
|
335
|
-
margin-bottom: var(--zaui-space-size-md
|
|
334
|
+
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
336
335
|
}
|
|
337
336
|
|
|
338
337
|
.ant-tabs-nav .ant-tabs-tab-btn {
|
|
@@ -3,85 +3,86 @@
|
|
|
3
3
|
|
|
4
4
|
/* 兼容IE11 默认会生成2个值,默认值,var值。IE11下读取默认值 */
|
|
5
5
|
:root {
|
|
6
|
-
--zaui-global-bg: #ffffff;
|
|
7
|
-
--zaui-base-bg: #ffffff;
|
|
8
|
-
--zaui-brand: #006aff;
|
|
9
|
-
--zaui-brand-hover: #3387ff;
|
|
10
|
-
--zaui-brand-active: #005ad9;
|
|
11
|
-
--zaui-brand-disabled: #99c3ff;
|
|
12
|
-
--zaui-text: #343434;
|
|
13
|
-
--zaui-text-weak: #616161;
|
|
14
|
-
--zaui-aide-text: #909090;
|
|
15
|
-
--zaui-placeholder: #a0a0a0;
|
|
16
|
-
--zaui-link: var(--zaui-brand);
|
|
17
|
-
--zaui-link-light-active: var(--zaui-brand-active);
|
|
18
|
-
--zaui-line: #dcdcdc;
|
|
19
|
-
--zaui-dividing-line: #dcdcdc;
|
|
20
|
-
--zaui-area: #fafafa;
|
|
21
|
-
--zaui-shadow: rgba(56, 56, 56, 0.15);
|
|
22
|
-
--zaui-form-control-line: var(--zaui-line);
|
|
23
|
-
--zaui-form-control-line-hover: var(--zaui-brand-hover);
|
|
24
|
-
--zaui-form-control-line-active: var(--zaui-brand-active);
|
|
25
|
-
--zaui-list-item-active-bg: var(--zaui-brand);
|
|
26
|
-
--zaui-list-item-active-hover-bg: var(--zaui-brand);
|
|
27
|
-
--zaui-list-item-selected-bg: var(--zaui-brand);
|
|
6
|
+
--zaui-global-bg : #ffffff;
|
|
7
|
+
--zaui-base-bg : #ffffff;
|
|
8
|
+
--zaui-brand : #006aff;
|
|
9
|
+
--zaui-brand-hover : #3387ff;
|
|
10
|
+
--zaui-brand-active : #005ad9;
|
|
11
|
+
--zaui-brand-disabled : #99c3ff;
|
|
12
|
+
--zaui-text : #343434;
|
|
13
|
+
--zaui-text-weak : #616161;
|
|
14
|
+
--zaui-aide-text : #909090;
|
|
15
|
+
--zaui-placeholder : #a0a0a0;
|
|
16
|
+
--zaui-link : var(--zaui-brand);
|
|
17
|
+
--zaui-link-light-active : var(--zaui-brand-active);
|
|
18
|
+
--zaui-line : #dcdcdc;
|
|
19
|
+
--zaui-dividing-line : #dcdcdc;
|
|
20
|
+
--zaui-area : #fafafa;
|
|
21
|
+
--zaui-shadow : rgba(56, 56, 56, 0.15);
|
|
22
|
+
--zaui-form-control-line : var(--zaui-line);
|
|
23
|
+
--zaui-form-control-line-hover : var(--zaui-brand-hover);
|
|
24
|
+
--zaui-form-control-line-active : var(--zaui-brand-active);
|
|
25
|
+
--zaui-list-item-active-bg : var(--zaui-brand);
|
|
26
|
+
--zaui-list-item-active-hover-bg : var(--zaui-brand);
|
|
27
|
+
--zaui-list-item-selected-bg : var(--zaui-brand);
|
|
28
28
|
--zaui-list-item-selected-hover-bg: var(--zaui-brand);
|
|
29
|
-
--zaui-disabled-bg: #f2f2f2;
|
|
30
|
-
--zaui-disabled-text: #333333;
|
|
31
|
-
--zaui-feedback-overlay-bg: rgba(0, 0, 0, 0.7);
|
|
32
|
-
--zaui-feedback-overlay-text: #343434;
|
|
33
|
-
--zaui-primary: var(--zaui-brand);
|
|
34
|
-
--zaui-primary-hover: var(--zaui-brand-hover);
|
|
35
|
-
--zaui-primary-active: var(--zaui-brand-active);
|
|
36
|
-
--zaui-danger-line: var(--zaui-line);
|
|
37
|
-
--zaui-danger-bg: #fff2f0;
|
|
38
|
-
--zaui-warning-line: var(--zaui-line);
|
|
39
|
-
--zaui-warning-bg: #fffbe6;
|
|
40
|
-
--zaui-info-line: var(--zaui-line);
|
|
41
|
-
--zaui-info-bg: #e6f7ff;
|
|
42
|
-
--zaui-success-line: var(--zaui-line);
|
|
43
|
-
--zaui-success-bg: #f6ffed;
|
|
44
|
-
--zaui-danger: #ff5050;
|
|
45
|
-
--zaui-warning: #ec9131;
|
|
46
|
-
--zaui-success: #00ae4d;
|
|
47
|
-
--zaui-menu-top-bg: #ffffff;
|
|
48
|
-
--zaui-menu-left-bg: #1a202d;
|
|
49
|
-
--zaui-menu-second-bg: #ffffff;
|
|
50
|
-
--zaui-form-align: left;
|
|
51
|
-
--zaui-table-header-bg: #f2f3f5;
|
|
52
|
-
--zaui-table-strip-bg: #fafafa;
|
|
53
|
-
--zaui-table-hover-bg: #fafafa;
|
|
54
|
-
--zaui-table-selected-bg: var(--zaui-table-hover-bg); // 默认同悬停
|
|
55
|
-
--zaui-table-selected-hover-bg: var(--zaui-table-hover-bg); // 默认同悬停
|
|
56
|
-
--zaui-table-nested-bg: #fafcfe;
|
|
57
|
-
--zaui-
|
|
58
|
-
--zaui-
|
|
59
|
-
--zaui-border-radius
|
|
60
|
-
--zaui-
|
|
61
|
-
--zaui-font-size-
|
|
62
|
-
--zaui-font-size:
|
|
63
|
-
--zaui-font-size
|
|
64
|
-
--zaui-font-size-
|
|
65
|
-
--zaui-font-size-
|
|
66
|
-
--zaui-font-size-
|
|
67
|
-
--zaui-font-size-
|
|
68
|
-
--zaui-font-size-
|
|
69
|
-
--zaui-
|
|
70
|
-
--zaui-height-
|
|
71
|
-
--zaui-height-size-
|
|
72
|
-
--zaui-height-size-
|
|
73
|
-
--zaui-height-size-
|
|
74
|
-
--zaui-height-size-
|
|
75
|
-
--zaui-height-size-
|
|
76
|
-
--zaui-
|
|
77
|
-
--zaui-space-
|
|
78
|
-
--zaui-space-size-
|
|
79
|
-
--zaui-space-size-
|
|
80
|
-
--zaui-space-size-
|
|
81
|
-
--zaui-space-size-
|
|
82
|
-
--zaui-space-size-
|
|
29
|
+
--zaui-disabled-bg : #f2f2f2;
|
|
30
|
+
--zaui-disabled-text : #333333;
|
|
31
|
+
--zaui-feedback-overlay-bg : rgba(0, 0, 0, 0.7);
|
|
32
|
+
--zaui-feedback-overlay-text : #343434;
|
|
33
|
+
--zaui-primary : var(--zaui-brand);
|
|
34
|
+
--zaui-primary-hover : var(--zaui-brand-hover);
|
|
35
|
+
--zaui-primary-active : var(--zaui-brand-active);
|
|
36
|
+
--zaui-danger-line : var(--zaui-line);
|
|
37
|
+
--zaui-danger-bg : #fff2f0;
|
|
38
|
+
--zaui-warning-line : var(--zaui-line);
|
|
39
|
+
--zaui-warning-bg : #fffbe6;
|
|
40
|
+
--zaui-info-line : var(--zaui-line);
|
|
41
|
+
--zaui-info-bg : #e6f7ff;
|
|
42
|
+
--zaui-success-line : var(--zaui-line);
|
|
43
|
+
--zaui-success-bg : #f6ffed;
|
|
44
|
+
--zaui-danger : #ff5050;
|
|
45
|
+
--zaui-warning : #ec9131;
|
|
46
|
+
--zaui-success : #00ae4d;
|
|
47
|
+
--zaui-menu-top-bg : #ffffff;
|
|
48
|
+
--zaui-menu-left-bg : #1a202d;
|
|
49
|
+
--zaui-menu-second-bg : #ffffff;
|
|
50
|
+
--zaui-form-align : left;
|
|
51
|
+
--zaui-table-header-bg : #f2f3f5;
|
|
52
|
+
--zaui-table-strip-bg : #fafafa;
|
|
53
|
+
--zaui-table-hover-bg : #fafafa;
|
|
54
|
+
--zaui-table-selected-bg : var(--zaui-table-hover-bg); // 默认同悬停
|
|
55
|
+
--zaui-table-selected-hover-bg : var(--zaui-table-hover-bg); // 默认同悬停
|
|
56
|
+
--zaui-table-nested-bg : #fafcfe;
|
|
57
|
+
--zaui-contract-bg : #fffaa1; // 对比背景色
|
|
58
|
+
--zaui-form-label-width : 130px; // 8个全角字符宽度
|
|
59
|
+
--zaui-border-radius : 4px;
|
|
60
|
+
--zaui-border-radius-card : 2px;
|
|
61
|
+
--zaui-font-size-title : 16px;
|
|
62
|
+
--zaui-font-size-card-title : var(--zaui-font-size-title);
|
|
63
|
+
--zaui-font-size : 14px;
|
|
64
|
+
--zaui-font-size-sm : 12px;
|
|
65
|
+
--zaui-font-size-md : var(--zaui-font-size);
|
|
66
|
+
--zaui-font-size-lg : 16px;
|
|
67
|
+
--zaui-font-size-xl : 18px;
|
|
68
|
+
--zaui-font-size-xxl : 20px;
|
|
69
|
+
--zaui-font-size-lg-title : 24px;
|
|
70
|
+
--zaui-height-border : var(--zaui-height-size-md);
|
|
71
|
+
--zaui-height-card : var(--zaui-height-size-lg);
|
|
72
|
+
--zaui-height-size-xs : 4px;
|
|
73
|
+
--zaui-height-size-sm : 8px;
|
|
74
|
+
--zaui-height-size-md : 16px;
|
|
75
|
+
--zaui-height-size-lg : 32px;
|
|
76
|
+
--zaui-height-size-xl : 64px;
|
|
77
|
+
--zaui-space-border : var(--zaui-space-size-md); // 兼容1.1.35一下版本 变量
|
|
78
|
+
--zaui-space-card : var(--zaui-space-size-lg);
|
|
79
|
+
--zaui-space-size-xs : 4px;
|
|
80
|
+
--zaui-space-size-sm : 8px;
|
|
81
|
+
--zaui-space-size-md : 16px;
|
|
82
|
+
--zaui-space-size-lg : 32px;
|
|
83
|
+
--zaui-space-size-xl : 64px;
|
|
83
84
|
|
|
84
85
|
--zaui-line-height-base: 1.5;
|
|
85
|
-
--zaui-size: 1;
|
|
86
|
-
--zaui-base-font-size: 0px;
|
|
87
|
-
}
|
|
86
|
+
--zaui-size : 1;
|
|
87
|
+
--zaui-base-font-size : 0px;
|
|
88
|
+
}
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
@zaui-table-selected-bg: var(--zaui-table-hover-bg #fafafa);
|
|
53
53
|
@zaui-table-selected-hover-bg: var(--zaui-table-hover-bg #fafafa);
|
|
54
54
|
@zaui-table-nested-bg: var(--zaui-table-nested-bg #FAFCFE);
|
|
55
|
+
@zaui-contract-bg: var(--zaui-contract-bg; #fffaa1); // 对比背景色
|
|
55
56
|
@zaui-form-required-after: var(--zaui-form-required-after; inline);
|
|
56
57
|
@zaui-form-required-before: var(--zaui-form-required-before; none);
|
|
57
58
|
@zaui-form-label-width: var(--zaui-form-label-width; 130px);
|
package/lib/ProAction/index.less
CHANGED
|
@@ -4,6 +4,7 @@ import { ProModalSelectPropsType } from '../ProForm/components/combination/ProMo
|
|
|
4
4
|
import { AddressProps } from '../ProForm/components/combination/ProAddressBar/propsType';
|
|
5
5
|
import { ProEnumConfig } from '../ProEnum/propsType';
|
|
6
6
|
export interface ProConfigState {
|
|
7
|
+
locale?: string;
|
|
7
8
|
ProEnum?: Partial<ProEnumConfig>;
|
|
8
9
|
ProSelect?: Partial<PropSelectProps> & Record<string, any>;
|
|
9
10
|
ProModalSelect?: Partial<ProModalSelectPropsType> & Record<string, any>;
|
|
@@ -19,5 +20,6 @@ export declare function useProConfig(): ConfigContext;
|
|
|
19
20
|
export declare function useProConfig(name: keyof ConfigContext['state']): ConfigContext['state'][keyof ConfigContext['state']];
|
|
20
21
|
export declare const ProConfigProvider: FC<{
|
|
21
22
|
value: ProConfigState;
|
|
23
|
+
locale?: string;
|
|
22
24
|
}>;
|
|
23
25
|
export default ProConfigProvider;
|
|
@@ -11,8 +11,12 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
+
var _antd = require("antd");
|
|
15
|
+
var _zh_CN = _interopRequireDefault(require("antd/es/locale/zh_CN"));
|
|
16
|
+
var _en_US = _interopRequireDefault(require("antd/es/locale/en_US"));
|
|
14
17
|
var _merge = _interopRequireDefault(require("lodash/merge"));
|
|
15
18
|
var _useEnumRequest = _interopRequireDefault(require("../ProEnum/hooks/useEnumRequest"));
|
|
19
|
+
var _locale = require("../locale");
|
|
16
20
|
var ProConfigContext = exports.ProConfigContext = /*#__PURE__*/_react.default.createContext({
|
|
17
21
|
state: {
|
|
18
22
|
ProEnum: {
|
|
@@ -52,13 +56,24 @@ var ProConfigProvider = exports.ProConfigProvider = function ProConfigProvider(p
|
|
|
52
56
|
state = _useReducer2[0],
|
|
53
57
|
dispatch = _useReducer2[1];
|
|
54
58
|
(0, _useEnumRequest.default)((0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, state.ProEnum), props === null || props === void 0 ? void 0 : (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.ProEnum), props === null || props === void 0 ? void 0 : (_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.globalConfig), dispatch);
|
|
59
|
+
var cacheLang = localStorage.getItem('locale');
|
|
60
|
+
// 如果是用户切换了语言那么优先使用用户切换的,否则从缓存中取用户语言,在取默认值
|
|
61
|
+
var lang = (state === null || state === void 0 ? void 0 : state.locale) || cacheLang || (props === null || props === void 0 ? void 0 : props.locale);
|
|
62
|
+
// 如果缓存里没有语言,那么将配置的语言设置为当前系统语言
|
|
63
|
+
if (!(state === null || state === void 0 ? void 0 : state.locale) && !cacheLang && (props === null || props === void 0 ? void 0 : props.locale)) {
|
|
64
|
+
// 设置默认语言
|
|
65
|
+
(0, _locale.setLanguage)(props === null || props === void 0 ? void 0 : props.locale);
|
|
66
|
+
}
|
|
55
67
|
return (0, _jsxRuntime.jsx)(ProConfigContext.Provider, {
|
|
56
68
|
value: {
|
|
57
69
|
state: (0, _merge.default)(state, props.value),
|
|
58
70
|
dispatch: dispatch
|
|
59
71
|
},
|
|
60
|
-
children: (0, _jsxRuntime.
|
|
61
|
-
|
|
72
|
+
children: (0, _jsxRuntime.jsx)(_antd.ConfigProvider, {
|
|
73
|
+
locale: lang === 'en-US' ? _en_US.default : _zh_CN.default,
|
|
74
|
+
children: (0, _jsxRuntime.jsxs)("div", {
|
|
75
|
+
children: [" ", props.children]
|
|
76
|
+
})
|
|
62
77
|
})
|
|
63
78
|
});
|
|
64
79
|
};
|
|
@@ -12,8 +12,10 @@ var _react = require("react");
|
|
|
12
12
|
var _components = require("./components");
|
|
13
13
|
var _ProForm = _interopRequireDefault(require("../ProForm"));
|
|
14
14
|
var _utils = require("./utils");
|
|
15
|
+
var _locale = _interopRequireDefault(require("../locale"));
|
|
16
|
+
var _locale$common2;
|
|
15
17
|
var ProDrawerForm = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
16
|
-
var _okText;
|
|
18
|
+
var _okText, _locale$common;
|
|
17
19
|
var visible = props.visible,
|
|
18
20
|
showType = props.showType,
|
|
19
21
|
okText = props.okText,
|
|
@@ -28,7 +30,7 @@ var ProDrawerForm = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
28
30
|
children = props.children;
|
|
29
31
|
showType = mode || showType;
|
|
30
32
|
isView = isView || disabled;
|
|
31
|
-
okText = (_okText = okText) !== null && _okText !== void 0 ? _okText : showType === 'Drawer' ?
|
|
33
|
+
okText = (_okText = okText) !== null && _okText !== void 0 ? _okText : showType === 'Drawer' ? _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$common = _locale.default.common) === null || _locale$common === void 0 ? void 0 : _locale$common.save : _locale.default === null || _locale.default === void 0 ? void 0 : _locale.default.dialog.confirm;
|
|
32
34
|
visible = open !== null && open !== void 0 ? open : visible;
|
|
33
35
|
var width = props.width;
|
|
34
36
|
if (!width && size) {
|
|
@@ -90,7 +92,7 @@ ProDrawerForm.defaultProps = {
|
|
|
90
92
|
size: 'middle',
|
|
91
93
|
isConfirmClose: true,
|
|
92
94
|
maskClosable: false,
|
|
93
|
-
cancelText:
|
|
95
|
+
cancelText: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$common2 = _locale.default.common) === null || _locale$common2 === void 0 ? void 0 : _locale$common2.cancel,
|
|
94
96
|
proFormProps: {}
|
|
95
97
|
};
|
|
96
98
|
var _default = exports.default = ProDrawerForm;
|