@titaui/pc 1.7.18 → 1.7.22
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/components/cascader/index.css +38 -11
- package/lib/components/cascader/index.js +10 -5
- package/lib/components/cascader/time.js +31 -0
- package/lib/components/create-okr-modal/index.js +6 -6
- package/lib/components/form/form-fields/group/index.js +2 -1
- package/lib/components/menus/components/menu-tree/index.css +4 -0
- package/lib/components/nav-top/components/user-own-menu/utils.js +1 -1
- package/lib/components/okr-detail/e-list/images/e-list-empty.png +0 -0
- package/lib/components/okr-detail/e-list/index.css +19 -1
- package/lib/components/okr-detail/e-list/index.js +32 -8
- package/lib/components/okr-detail/e-list/util.js +49 -22
- package/lib/components/scrollbar/index.js +13 -3
- package/lib/components/select-tags/index.css +51 -40
- package/lib/components/select-tags/index.js +8 -10
- package/lib/components/upvote/index.js +19 -14
- package/lib/index.js +8 -0
- package/lib/utils/bs-global.js +0 -7
- package/package.json +1 -1
- package/src/components/cascader/index.scss +50 -27
- package/src/components/cascader/index.tsx +18 -16
- package/src/components/cascader/time.js +13 -0
- package/src/components/create-okr-modal/index.tsx +6 -6
- package/src/components/form/form-fields/group/index.tsx +3 -3
- package/src/components/menus/components/menu-tree/index.scss +3 -0
- package/src/components/menus/export-modules/manage-menus/index.tsx +1 -1
- package/src/components/nav-top/components/user-own-menu/utils.ts +1 -1
- package/src/components/okr-detail/e-list/images/e-list-empty.png +0 -0
- package/src/components/okr-detail/e-list/index.js +121 -70
- package/src/components/okr-detail/e-list/index.scss +17 -2
- package/src/components/okr-detail/e-list/util.ts +44 -18
- package/src/components/scrollbar/index.tsx +2 -1
- package/src/components/select-tags/index.scss +129 -105
- package/src/components/select-tags/index.tsx +32 -32
- package/src/components/upvote/index.tsx +12 -9
- package/src/index.js +2 -1
- package/src/utils/bs-global.js +0 -10
|
@@ -22,7 +22,7 @@ interface Props {
|
|
|
22
22
|
suffix?:string;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const preCls = "titaui-select";
|
|
25
|
+
const preCls = "titaui-select-tags";
|
|
26
26
|
|
|
27
27
|
const SelectTags: FC<Props> = ({
|
|
28
28
|
selected = [],
|
|
@@ -39,43 +39,43 @@ const SelectTags: FC<Props> = ({
|
|
|
39
39
|
|
|
40
40
|
const [value, setValue] = useState(selected);
|
|
41
41
|
|
|
42
|
-
// useEffect(()=>{
|
|
43
|
-
// if(!selected) return
|
|
44
|
-
// setValue(selected)
|
|
45
|
-
// },[selected])
|
|
46
|
-
|
|
47
42
|
const onhandleChange = (value, options) => {
|
|
48
43
|
onChange && onChange(value, options,name);
|
|
49
44
|
setValue(value);
|
|
50
45
|
};
|
|
51
46
|
|
|
52
47
|
return (
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
48
|
+
<div className={preCls}>
|
|
49
|
+
<Select
|
|
50
|
+
className={classNames(className,{[`${preCls}-noborder`]: noBorder},)}
|
|
51
|
+
dropdownClassName={classNames(
|
|
52
|
+
`titaui-dropDown`,
|
|
53
|
+
{
|
|
54
|
+
[`${preCls}-hasSelectItem`]: mode === "multiple",
|
|
55
|
+
})}
|
|
56
|
+
value={value}
|
|
57
|
+
style={style}
|
|
58
|
+
mode={mode}
|
|
59
|
+
optionFilterProp="children"
|
|
60
|
+
optionLabelProp="children"
|
|
61
|
+
placeholder={placeholder}
|
|
62
|
+
onChange={onhandleChange}
|
|
63
|
+
showArrow={true}
|
|
64
|
+
removeIcon={<span className="tu-icon-cross"></span>}
|
|
65
|
+
inputIcon={<span className="tu-icon-caret-down" />}
|
|
66
|
+
menuItemSelectedIcon={<span className="tu-icon-finished" />}
|
|
67
|
+
{...restProps}
|
|
68
|
+
>
|
|
69
|
+
{data.map((item, key) => {
|
|
70
|
+
return (
|
|
71
|
+
<Option key={key} value={item.value}>
|
|
72
|
+
{item.label}
|
|
73
|
+
</Option>
|
|
74
|
+
);
|
|
75
|
+
})}
|
|
76
|
+
</Select>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
79
|
);
|
|
80
80
|
};
|
|
81
81
|
|
|
@@ -29,6 +29,16 @@ interface Props {
|
|
|
29
29
|
handleRequest?: (type: number) => Promise<any>;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
const getBackgroundImage = (type) => {
|
|
33
|
+
let selected = attitudeArr.find((a) => a.type == type);
|
|
34
|
+
if (selected) {
|
|
35
|
+
return {
|
|
36
|
+
backgroundImage: `url(${selected.img})`,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return {};
|
|
40
|
+
};
|
|
41
|
+
|
|
32
42
|
function UpvoteButton({
|
|
33
43
|
type,
|
|
34
44
|
count,
|
|
@@ -110,12 +120,7 @@ function UpvoteButton({
|
|
|
110
120
|
[buttonType]: buttonType && upvoteState.type == 0,
|
|
111
121
|
"feed-upvote-button": true,
|
|
112
122
|
})}
|
|
113
|
-
style={
|
|
114
|
-
backgroundImage: `url(${
|
|
115
|
-
(attitudeArr.find((a) => a.type == upvoteState.type) || {})
|
|
116
|
-
.img
|
|
117
|
-
})`,
|
|
118
|
-
}}
|
|
123
|
+
style={getBackgroundImage(upvoteState.type)}
|
|
119
124
|
/>
|
|
120
125
|
)}
|
|
121
126
|
</a>
|
|
@@ -156,9 +161,7 @@ export const UpvoteButtonForFeed = (props: Props) => {
|
|
|
156
161
|
"feed-upvote-button": true,
|
|
157
162
|
})}
|
|
158
163
|
style={{
|
|
159
|
-
|
|
160
|
-
(attitudeArr.find((a) => a.type == type) || { img: "" }).img
|
|
161
|
-
})`,
|
|
164
|
+
...getBackgroundImage(type),
|
|
162
165
|
marginRight: 4,
|
|
163
166
|
}}
|
|
164
167
|
/>
|
package/src/index.js
CHANGED
|
@@ -77,8 +77,9 @@ export { default as LikeRankingPage } from "./pages/like-ranking";
|
|
|
77
77
|
export { default as NewOkrListPage } from "./pages/new-okr-list";
|
|
78
78
|
export { default as PersonalInfoPage } from "./pages/personal-info";
|
|
79
79
|
export { default as ErrorBoundary } from "./components/error-boundary";
|
|
80
|
-
export { ERROR_LEVEL } from "./utils/error-level";
|
|
80
|
+
export { ERROR_LEVEL as ERROR_LEVEL } from "./utils/error-level";
|
|
81
81
|
export { default as SelectTags } from "./components/select-tags";
|
|
82
82
|
export { default as Cascader } from "./components/cascader";
|
|
83
83
|
export { default as requestApi } from "./utils/request";
|
|
84
84
|
export { default as PointDemo} from './components/point-demo'
|
|
85
|
+
export { default as Scrollbar } from './components/scrollbar'
|
package/src/utils/bs-global.js
CHANGED
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
import { BSGlobal } from "./mock-bsglobal";
|
|
2
1
|
|
|
3
2
|
export const getUserInfo = () => {
|
|
4
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1)
|
|
5
|
-
return BSGlobal.loginUserInfo;
|
|
6
3
|
return window.BSGlobal && window.BSGlobal.loginUserInfo;
|
|
7
4
|
};
|
|
8
5
|
|
|
9
6
|
export const getTenantInfo = () => {
|
|
10
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1)
|
|
11
|
-
return BSGlobal.tenantInfo;
|
|
12
7
|
return window.BSGlobal && window.BSGlobal.tenantInfo;
|
|
13
8
|
};
|
|
14
9
|
|
|
15
10
|
export const getBSGlobal = (key) => {
|
|
16
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1) return BSGlobal[key];
|
|
17
11
|
return window.BSGlobal[key];
|
|
18
12
|
};
|
|
19
13
|
|
|
20
14
|
export const getOkrAdvancedSetting = () => {
|
|
21
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1)
|
|
22
|
-
return BSGlobal["OkrAdvancedSetting"];
|
|
23
15
|
return window.BSGlobal["OkrAdvancedSetting"];
|
|
24
16
|
};
|
|
25
17
|
|
|
26
18
|
export const getVersion = () => {
|
|
27
19
|
// version 1 试用版
|
|
28
|
-
if (window.location.host.indexOf("127.0.0.1") !== -1)
|
|
29
|
-
return BSGlobal["tenantAuthentication"].Version;
|
|
30
20
|
return window.BSGlobal["tenantAuthentication"].Version;
|
|
31
21
|
};
|
|
32
22
|
|