@yeeyoon/library 3.1.9 → 3.2.3

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.
@@ -16,7 +16,7 @@ const CommonTable = (props) => {
16
16
  rowKey={(record) => record[rowKey]}
17
17
  columns={mergeTableColumnCommonConfig(columns)}
18
18
  pagination={{
19
- position: ['bottomCenter'],
19
+ position: ['bottomRight'],
20
20
  pageSize: 10,
21
21
  }}
22
22
  options={false}
@@ -48,22 +48,22 @@ function InfoCart(props) {
48
48
  };
49
49
  useEffect(() => {
50
50
  getCardData();
51
- }, [baseMsg.userId]);
51
+ }, [baseMsg.userId, baseMsg.id]);
52
52
  const getCardData = async () => {
53
- const resp = await queryOidcUserCardData({ id: baseMsg.userId });
53
+ const resp = await queryOidcUserCardData({
54
+ id: baseMsg.userId || baseMsg?.id,
55
+ });
54
56
  const { success, data } = resp;
55
57
  if (success) {
56
58
  if (data.content.length > 0) {
57
59
  let monthContribute = data.content[0].last_month_contribute || '';
58
60
  setCardData(data.content[0]);
59
- Object.keys(monthContribute).length
60
- ? setChartData(
61
- monthContribute?.split(',').map((item) => ({
62
- 贡献数据数: parseInt(item.split(':')[1]),
63
- name: item.split(':')[0],
64
- }))
65
- )
66
- : setChartData([{ 贡献数据数: 0 }]);
61
+ setChartData(
62
+ monthContribute?.split(',').map((item) => ({
63
+ 贡献数据数: parseInt(item.split(':')[1]),
64
+ name: item.split(':')[0],
65
+ }))
66
+ );
67
67
  } else {
68
68
  setCardData(obj);
69
69
  }
@@ -77,12 +77,12 @@ function InfoCart(props) {
77
77
  height="50px"
78
78
  preview={false}
79
79
  style={{ borderRadius: '5px' }}
80
- src={baseMsg?.headUrl}
80
+ src={baseMsg?.headUrl || baseMsg?.icon}
81
81
  />
82
82
  <div className={styles['info-cart-np']}>
83
83
  <span>{baseMsg?.name}</span>
84
84
  <span style={{ marginTop: '6px', fontSize: '12px' }}>
85
- {(baseMsg?.mobile || '').replace(reg, '$1****$2')}
85
+ {(baseMsg?.mobile || baseMsg?.phone || '').replace(reg, '$1****$2')}
86
86
  </span>
87
87
  </div>
88
88
  </div>
@@ -120,9 +120,10 @@ function InfoCart(props) {
120
120
  type="monotone"
121
121
  dataKey="贡献数据数"
122
122
  stroke="#7367F0"
123
- strokeWidth="1.5"
123
+ strokeWidth="3"
124
+ dot={false}
124
125
  />
125
- <Tooltip />
126
+ <Tooltip cursor={false} />
126
127
  <XAxis dataKey="name" style={{ display: 'none' }} />
127
128
  </LineChart>
128
129
  </div>
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeeyoon/library",
3
- "version": "3.1.9",
3
+ "version": "3.2.3",
4
4
  "description": "宜云前端组件库和通用服务",
5
5
  "main": "index.js",
6
6
  "repository": {
package/src/global.css CHANGED
@@ -4,7 +4,7 @@ html, body, #root {
4
4
 
5
5
  body {
6
6
  margin: 0;
7
- /* background-color: #000 !important; */
7
+ background-color: #000 !important;
8
8
  }
9
9
 
10
10
  body * {
@@ -1,17 +1,14 @@
1
- import React from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import Header from '../../lib/components/Header/';
3
- import TenantSelector from '../../lib/components/TenantSelector';
4
3
 
5
4
  // eslint-disable-next-line react/display-name
6
5
  export default function () {
7
- return (
8
- <>
9
- <Header productName="bpm" slot={<div>nasa</div>} />
10
- <TenantSelector
11
- tenantId="b7b0e19414927b878814094f33b43543"
12
- appId="bbe5c8f0063711ecb0c00c42a1ff8370"
13
- tenantIdChangeCb={() => {}}
14
- />
15
- </>
16
- );
6
+ const [tenantId, setTenantId] = useState('');
7
+ useEffect(() => {
8
+ setTimeout(() => {
9
+ setTenantId('053a033a063711ecb0c00c42a1ff8370');
10
+ // setTenantId('f12a71b6063611ecb0c00c42a1ff8370');
11
+ }, 3000);
12
+ }, []);
13
+ return <Header productName="bpm" tenantId={tenantId} />;
17
14
  }