@yeeyoon/library 3.2.6 → 3.2.7

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.
@@ -1,3 +1,6 @@
1
+ import React from 'react';
2
+ import UserAvatar from '../components/AvatarPackaged/';
3
+
1
4
  export function mergeTableColumnCommonConfig(config) {
2
5
  return config.map((item, index) => {
3
6
  let commonConfig = [{ align: 'left' }, { ellipsis: true }];
@@ -68,6 +71,27 @@ export function mergeTableColumnCommonConfig(config) {
68
71
  ...[{ width: 300 }, { ellipsis: false }],
69
72
  ];
70
73
  break;
74
+ case 'user':
75
+ commonConfig = [
76
+ ...commonConfig,
77
+ ...[
78
+ { width: 150 },
79
+ {
80
+ // eslint-disable-next-line react/display-name
81
+ render: (_, record) => {
82
+ const key = item.dataIndex;
83
+ let data;
84
+ if (key === 'creator') {
85
+ data = record.creator;
86
+ } else if (key === 'updater') {
87
+ data = record.updater;
88
+ }
89
+ return <UserAvatar data={data} showName={true} />;
90
+ },
91
+ },
92
+ ],
93
+ ];
94
+ break;
71
95
  }
72
96
  commonConfig.forEach((value) => {
73
97
  item = { ...item, ...value };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeeyoon/library",
3
- "version": "3.2.6",
3
+ "version": "3.2.7",
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,14 +1,17 @@
1
- import React, { useState, useEffect } from 'react';
1
+ import React from 'react';
2
2
  import Header from '../../lib/components/Header/';
3
+ import TenantSelector from '../../lib/components/TenantSelector';
3
4
 
4
5
  // eslint-disable-next-line react/display-name
5
6
  export default function () {
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} />;
7
+ return (
8
+ <>
9
+ <Header productName="bpm" slot={<div>nasa</div>} />
10
+ <TenantSelector
11
+ tenantId="b7b0e19414927b878814094f33b43543"
12
+ appId="bbe5c8f0063711ecb0c00c42a1ff8370"
13
+ tenantIdChangeCb={() => {}}
14
+ />
15
+ </>
16
+ );
14
17
  }