aldehyde 0.2.105 → 0.2.106
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/lib/controls/action/utils.js +1 -1
- package/lib/controls/action/utils.js.map +1 -1
- package/lib/controls/counting-tag/index.d.ts +2 -1
- package/lib/controls/counting-tag/index.d.ts.map +1 -1
- package/lib/controls/counting-tag/index.js +8 -7
- package/lib/controls/counting-tag/index.js.map +1 -1
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +3 -1
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/file-view/index.js +1 -1
- package/lib/controls/file-view/index.js.map +1 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +2 -1
- package/lib/controls/view-control.js.map +1 -1
- package/lib/layout/header/index.css +104 -78
- package/lib/layout/header/index.d.ts.map +1 -1
- package/lib/layout/header/index.js +34 -11
- package/lib/layout/header/index.js.map +1 -1
- package/lib/layout/menu/block.css +0 -4
- package/lib/layout/menu/l2menu-message-bar.d.ts +2 -2
- package/lib/layout/menu/l2menu-message-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.js +30 -23
- package/lib/layout/menu/l2menu-message-bar.js.map +1 -1
- package/lib/layout/menu/user-bar.d.ts.map +1 -1
- package/lib/layout/menu/user-bar.js +9 -5
- package/lib/layout/menu/user-bar.js.map +1 -1
- package/lib/locale/LocaleButton.d.ts +2 -1
- package/lib/locale/LocaleButton.d.ts.map +1 -1
- package/lib/locale/LocaleButton.js +9 -7
- package/lib/locale/LocaleButton.js.map +1 -1
- package/lib/login/router-login.js +1 -1
- package/lib/login/router-login.js.map +1 -1
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +2 -2
- package/lib/table/relation-table.js.map +1 -1
- package/lib/tree/tmpl-tree.js +1 -1
- package/lib/tree/tmpl-tree.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/utils.tsx +1 -1
- package/src/aldehyde/controls/counting-tag/index.tsx +9 -7
- package/src/aldehyde/controls/entity-select/entity-select.tsx +2 -1
- package/src/aldehyde/controls/file-view/index.tsx +1 -1
- package/src/aldehyde/controls/view-control.tsx +2 -1
- package/src/aldehyde/form/form-Item-group.tsx +1 -1
- package/src/aldehyde/layout/header/index.css +104 -78
- package/src/aldehyde/layout/header/index.tsx +82 -9
- package/src/aldehyde/layout/menu/block.css +0 -4
- package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +139 -108
- package/src/aldehyde/layout/menu/user-bar.tsx +30 -5
- package/src/aldehyde/locale/LocaleButton.tsx +23 -7
- package/src/aldehyde/login/router-login.tsx +1 -1
- package/src/aldehyde/table/relation-table.tsx +3 -1
- package/src/aldehyde/tree/tmpl-tree.tsx +1 -1
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { GlobalOutlined } from "@ant-design/icons";
|
|
2
|
-
import { Button, Dropdown, MenuProps } from "antd";
|
|
2
|
+
import { Button, ButtonProps, Dropdown, MenuProps, theme } from "antd";
|
|
3
3
|
import { useLocale } from "./useLocale";
|
|
4
4
|
import { LocaleType } from "./langMp";
|
|
5
5
|
import React from "react";
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const { useToken } = theme;
|
|
8
|
+
|
|
9
|
+
const LocaleButton = (props: ButtonProps) => {
|
|
10
|
+
const { token } = useToken();
|
|
11
|
+
const { getLocale, setLocale } = useLocale();
|
|
9
12
|
|
|
10
13
|
const onClick: MenuProps["onClick"] = ({ key }) => {
|
|
11
14
|
setLocale(key as LocaleType);
|
|
@@ -13,17 +16,30 @@ const LocaleButton = () => {
|
|
|
13
16
|
|
|
14
17
|
const items: MenuProps["items"] = [
|
|
15
18
|
{
|
|
16
|
-
label:
|
|
19
|
+
label: (
|
|
20
|
+
<span style={getLocale() === "zh" ? { color: token.colorPrimary } : {}}>
|
|
21
|
+
中文
|
|
22
|
+
</span>
|
|
23
|
+
),
|
|
17
24
|
key: "zh",
|
|
18
25
|
},
|
|
19
26
|
{
|
|
20
|
-
label:
|
|
27
|
+
label: (
|
|
28
|
+
<span style={getLocale() === "fr" ? { color: token.colorPrimary } : {}}>
|
|
29
|
+
fr
|
|
30
|
+
</span>
|
|
31
|
+
),
|
|
21
32
|
key: "fr",
|
|
22
33
|
},
|
|
23
34
|
];
|
|
24
35
|
return (
|
|
25
|
-
<Dropdown menu={{ items, onClick }}>
|
|
26
|
-
<Button
|
|
36
|
+
<Dropdown overlayClassName="localeButton" menu={{ items, onClick }}>
|
|
37
|
+
<Button
|
|
38
|
+
type="primary"
|
|
39
|
+
shape="circle"
|
|
40
|
+
icon={<GlobalOutlined />}
|
|
41
|
+
{...props}
|
|
42
|
+
/>
|
|
27
43
|
</Dropdown>
|
|
28
44
|
);
|
|
29
45
|
};
|
|
@@ -579,6 +579,7 @@ class RelationTable extends React.PureComponent<
|
|
|
579
579
|
const { translate } = this.context;
|
|
580
580
|
const { buttons, disabled } = fieldGroupConfig;
|
|
581
581
|
const { showRowEdit } = this.state;
|
|
582
|
+
|
|
582
583
|
const buttonDisabled: boolean = disabled
|
|
583
584
|
? disabled
|
|
584
585
|
: fieldGroupConfig.max
|
|
@@ -649,7 +650,7 @@ class RelationTable extends React.PureComponent<
|
|
|
649
650
|
{fieldGroupConfig.min && (!value || value.length <= 0) ? (
|
|
650
651
|
<Text style={{ color: "red" }}>
|
|
651
652
|
{translate("${请选择或添加}")}
|
|
652
|
-
{fieldGroupConfig.title}
|
|
653
|
+
{translate("${"+fieldGroupConfig.title +"}")}
|
|
653
654
|
</Text>
|
|
654
655
|
) : null}
|
|
655
656
|
<FormItem
|
|
@@ -670,6 +671,7 @@ class RelationTable extends React.PureComponent<
|
|
|
670
671
|
min={fieldGroupConfig.min + ""}
|
|
671
672
|
style={{ marginBottom: 10 }}
|
|
672
673
|
count={value ? value.length : 0}
|
|
674
|
+
value={value}
|
|
673
675
|
></CountingTag>
|
|
674
676
|
</FormItem>
|
|
675
677
|
</Space>
|
|
@@ -520,7 +520,7 @@ class TmplTree extends React.PureComponent<TmplTreeProps, TmplTreeState> {
|
|
|
520
520
|
</Button>
|
|
521
521
|
);
|
|
522
522
|
}
|
|
523
|
-
debugger
|
|
523
|
+
//debugger
|
|
524
524
|
if (ttmplNodeConfig.branchLTmplConfig) {
|
|
525
525
|
if (ttmplNodeConfig.rootLTmplConfig.buttons.indexOf("dtmplAdd") > 0) {
|
|
526
526
|
buttons.push(
|