@cloudbase/weda-ui 0.2.16 → 1.0.24

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.
Files changed (194) hide show
  1. package/README.md +41 -169
  2. package/package.json +23 -11
  3. package/src/configs/components/calendar.json +4 -1
  4. package/src/configs/components/chart/bar.json +724 -0
  5. package/src/configs/components/chart/line.json +679 -0
  6. package/src/configs/components/chart/pie.json +497 -0
  7. package/src/configs/components/chart/statisticsCard.json +61 -13
  8. package/src/configs/components/container.json +7 -2
  9. package/src/configs/components/dataView.json +21 -6
  10. package/src/configs/components/form/checkbox.json +97 -5
  11. package/src/configs/components/form/radio.json +96 -4
  12. package/src/configs/components/form/select.json +245 -11
  13. package/src/configs/components/graphicCard.json +84 -73
  14. package/src/configs/components/image.json +7 -2
  15. package/src/configs/components/link.json +19 -3
  16. package/src/configs/components/listView.json +65 -18
  17. package/src/configs/components/lottery.json +151 -0
  18. package/src/configs/components/modal.json +37 -5
  19. package/src/configs/components/navLayout.json +87 -75
  20. package/src/configs/components/navigationBar.json +59 -0
  21. package/src/configs/components/richtextview.json +4 -1
  22. package/src/configs/components/scrollVeiw.json +74 -22
  23. package/src/configs/components/swiper.json +4 -1
  24. package/src/configs/components/tabs.json +51 -8
  25. package/src/configs/components/text.json +33 -25
  26. package/src/configs/components/wxOpenApi/phone.json +141 -0
  27. package/src/configs/components/wxOpenApi/phoneCode.json +121 -0
  28. package/src/configs/components/wxOpenApi/share.json +167 -0
  29. package/src/configs/components/wxOpenApi/userInfo.json +174 -0
  30. package/src/configs/index.js +20 -0
  31. package/src/index.js +2 -0
  32. package/src/mp/components/button/index.wxml +1 -2
  33. package/src/mp/components/chart/bar/index.js +258 -0
  34. package/src/mp/components/chart/bar/index.json +6 -0
  35. package/src/mp/components/chart/bar/index.wxml +3 -0
  36. package/src/mp/components/chart/bar/index.wxss +9 -0
  37. package/src/mp/components/chart/common/config/bar.js +50 -0
  38. package/src/mp/components/chart/common/config/global.js +16 -0
  39. package/src/mp/components/chart/common/config/line.js +48 -0
  40. package/src/mp/components/chart/common/config/pie.js +36 -0
  41. package/src/mp/components/chart/common/core/eChartBar.js +263 -0
  42. package/src/mp/components/chart/common/core/eChartBase.js +375 -0
  43. package/src/mp/components/chart/common/core/eChartLine.js +229 -0
  44. package/src/mp/components/chart/common/core/eChartPie.js +166 -0
  45. package/src/mp/components/chart/common/lib/echarts.min.js +18 -0
  46. package/src/mp/components/chart/ec-canvas/ec-canvas.js +277 -0
  47. package/src/mp/components/chart/ec-canvas/ec-canvas.json +4 -0
  48. package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +4 -0
  49. package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +4 -0
  50. package/src/mp/components/chart/ec-canvas/wx-canvas.js +107 -0
  51. package/src/mp/components/chart/line/index.js +247 -0
  52. package/src/mp/components/chart/line/index.json +6 -0
  53. package/src/mp/components/chart/line/index.wxml +3 -0
  54. package/src/mp/components/chart/line/index.wxss +9 -0
  55. package/src/mp/components/chart/pie/index.js +182 -0
  56. package/src/mp/components/chart/pie/index.json +6 -0
  57. package/src/mp/components/chart/pie/index.wxml +4 -0
  58. package/src/mp/components/chart/pie/index.wxss +9 -0
  59. package/src/mp/components/chart/statisticsCard/index.js +33 -6
  60. package/src/mp/components/form/checkbox/index.js +41 -2
  61. package/src/mp/components/form/checkbox/index.wxml +1 -1
  62. package/src/mp/components/form/form/index.wxml +1 -2
  63. package/src/mp/components/form/input/index.js +1 -1
  64. package/src/mp/components/form/location/index.js +43 -2
  65. package/src/mp/components/form/radio/index.js +38 -0
  66. package/src/mp/components/form/select/index.js +348 -40
  67. package/src/mp/components/form/select/index.wxml +21 -6
  68. package/src/mp/components/form/select/region/index.js +101 -0
  69. package/src/mp/components/form/textarea/index.wxml +6 -5
  70. package/src/mp/components/form/uploader/index.js +76 -44
  71. package/src/mp/components/form/uploader/index.wxml +15 -3
  72. package/src/mp/components/form/uploaderFile/index.js +61 -29
  73. package/src/mp/components/graphicCard/index.js +26 -28
  74. package/src/mp/components/listView/index.js +52 -64
  75. package/src/mp/components/listView/index.wxml +2 -2
  76. package/src/mp/components/listView/index.wxss +5 -0
  77. package/src/mp/components/lottery/index.js +270 -0
  78. package/src/mp/components/lottery/index.json +4 -0
  79. package/src/mp/components/lottery/index.wxml +43 -0
  80. package/src/mp/components/lottery/index.wxss +317 -0
  81. package/src/mp/components/navLayout/index.js +3 -3
  82. package/src/mp/components/navigationBar/index.js +193 -0
  83. package/src/mp/components/navigationBar/index.json +6 -0
  84. package/src/mp/components/navigationBar/index.wxml +88 -0
  85. package/src/mp/components/navigationBar/index.wxss +1257 -0
  86. package/src/mp/components/tabs/index.js +7 -2
  87. package/src/mp/components/tabs/index.wxml +2 -1
  88. package/src/mp/components/text/index.js +0 -25
  89. package/src/mp/components/text/index.wxml +3 -3
  90. package/src/mp/components/wxOpenApi/phone/index.js +117 -0
  91. package/src/mp/components/wxOpenApi/phone/index.json +4 -0
  92. package/src/mp/components/wxOpenApi/phone/index.wxml +15 -0
  93. package/src/mp/components/wxOpenApi/phone/index.wxss +22 -0
  94. package/src/mp/components/wxOpenApi/phoneCode/index.js +89 -0
  95. package/src/mp/components/wxOpenApi/phoneCode/index.json +4 -0
  96. package/src/mp/components/wxOpenApi/phoneCode/index.wxml +15 -0
  97. package/src/mp/components/wxOpenApi/phoneCode/index.wxss +22 -0
  98. package/src/mp/components/wxOpenApi/share/index.js +117 -0
  99. package/src/mp/components/wxOpenApi/share/index.json +4 -0
  100. package/src/mp/components/wxOpenApi/share/index.wxml +15 -0
  101. package/src/mp/components/wxOpenApi/share/index.wxss +22 -0
  102. package/src/mp/components/wxOpenApi/userInfo/index.js +88 -0
  103. package/src/mp/components/wxOpenApi/userInfo/index.json +4 -0
  104. package/src/mp/components/wxOpenApi/userInfo/index.wxml +14 -0
  105. package/src/mp/components/wxOpenApi/userInfo/index.wxss +22 -0
  106. package/src/mp/index.json +10 -1
  107. package/src/mp/style/weda-ui.wxss +2 -0
  108. package/src/mp/utils/constant.js +15 -0
  109. package/src/mp/utils/destr.js +48 -0
  110. package/src/mp/utils/lodash.js +2 -0
  111. package/src/mp/utils/platform.js +25 -0
  112. package/src/mp/utils/tcb.js +44 -0
  113. package/src/setupTests.js +2 -1
  114. package/src/web/components/button/index.css +8 -1
  115. package/src/web/components/button/index.tsx +3 -2
  116. package/src/web/components/chart/bar/index.tsx +140 -0
  117. package/src/web/components/chart/common/config/bar.js +49 -0
  118. package/src/web/components/chart/common/config/global.js +16 -0
  119. package/src/web/components/chart/common/config/line.js +50 -0
  120. package/src/web/components/chart/common/config/pie.js +37 -0
  121. package/src/web/components/chart/common/core/eChartBar.js +265 -0
  122. package/src/web/components/chart/common/core/eChartBase.ts +383 -0
  123. package/src/web/components/chart/common/core/eChartLine.js +231 -0
  124. package/src/web/components/chart/common/core/eChartPie.js +170 -0
  125. package/src/web/components/chart/common/core/type.ts +34 -0
  126. package/src/web/components/chart/common/echart.css +106 -0
  127. package/src/web/components/chart/common/echarts.ts +33 -0
  128. package/src/web/components/chart/common/useChart.tsx +69 -0
  129. package/src/web/components/chart/line/index.tsx +136 -0
  130. package/src/web/components/chart/pie/index.tsx +99 -0
  131. package/src/web/components/chart/statisticsCard/index.tsx +29 -8
  132. package/src/web/components/form/checkbox/index.tsx +61 -23
  133. package/src/web/components/form/formcell/index.tsx +10 -5
  134. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +3 -3
  135. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +2 -2
  136. package/src/web/components/form/radio/index.tsx +90 -53
  137. package/src/web/components/form/select/h5.tsx +371 -72
  138. package/src/web/components/form/select/index.css +10 -0
  139. package/src/web/components/form/select/index.tsx +392 -145
  140. package/src/web/components/form/select/region/index.ts +122 -31
  141. package/src/web/components/form/select/time.jsx +90 -0
  142. package/src/web/components/form/select/year.tsx +170 -0
  143. package/src/web/components/form/tips/index.css +4 -0
  144. package/src/web/components/form/tips/index.tsx +4 -3
  145. package/src/web/components/form/uploader/uploader.h5.tsx +28 -19
  146. package/src/web/components/form/uploader/uploader.pc.tsx +17 -20
  147. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +48 -44
  148. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +28 -26
  149. package/src/web/components/graphicCard/index.css +1 -5
  150. package/src/web/components/graphicCard/index.tsx +4 -3
  151. package/src/web/components/image/image.tsx +1 -1
  152. package/src/web/components/image/index.tsx +1 -1
  153. package/src/web/components/index.js +13 -2
  154. package/src/web/components/link/index.tsx +6 -3
  155. package/src/web/components/listView/index.css +4 -0
  156. package/src/web/components/listView/index.tsx +10 -18
  157. package/src/web/components/lottery/index.css +327 -0
  158. package/src/web/components/lottery/index.tsx +567 -0
  159. package/src/web/components/lottery/lotteryUtil.ts +130 -0
  160. package/src/web/components/modal/index.tsx +3 -1
  161. package/src/web/components/navigationBar/chevron-right--double.svg +3 -0
  162. package/src/web/components/navigationBar/common.tsx +198 -0
  163. package/src/web/components/navigationBar/h5Menu.tsx +179 -0
  164. package/src/web/components/navigationBar/horizontalMenu.tsx +200 -0
  165. package/src/web/components/navigationBar/index.css +762 -0
  166. package/src/web/components/navigationBar/index.tsx +231 -0
  167. package/src/web/components/navigationBar/type.d.ts +111 -0
  168. package/src/web/components/navigationBar/verticalMenu.tsx +81 -0
  169. package/src/web/components/phone/index.css +0 -0
  170. package/src/web/components/phone/index.tsx +22 -0
  171. package/src/web/components/phoneCode/index.css +0 -0
  172. package/src/web/components/phoneCode/index.tsx +22 -0
  173. package/src/web/components/richTextView/index.tsx +3 -5
  174. package/src/web/components/share/index.css +0 -0
  175. package/src/web/components/share/index.tsx +38 -0
  176. package/src/web/components/tabs/index.tsx +2 -0
  177. package/src/web/components/tabs/tabs.h5.tsx +43 -33
  178. package/src/web/components/tabs/tabs.pc.tsx +23 -10
  179. package/src/web/components/text/index.tsx +6 -14
  180. package/src/web/components/userInfo/index.css +0 -0
  181. package/src/web/components/userInfo/index.tsx +30 -0
  182. package/src/web/utils/{constant.js → constant.ts} +17 -2
  183. package/src/web/utils/lodash.ts +2 -0
  184. package/src/web/utils/platform.js +10 -1
  185. package/src/web/utils/tcb.js +20 -6
  186. package/src/web/weda-ui.css +2 -0
  187. package/CHANGELOG.md +0 -240
  188. package/src/.DS_Store +0 -0
  189. package/src/configs/.DS_Store +0 -0
  190. package/src/mp/.gitignore +0 -10
  191. package/src/web/.DS_Store +0 -0
  192. package/src/web/components/form/select/region/cities.ts +0 -2410
  193. package/src/web/components/form/select/region/provinces.ts +0 -240
  194. package/src/web/components/form/select/region/regions.ts +0 -20645
@@ -2,8 +2,7 @@ import * as React from 'react';
2
2
  import * as PropTypes from 'prop-types';
3
3
  import weui from '../../../utils/weui';
4
4
  import { CommonFormPropsType } from '../types';
5
- import SparkMD5 from 'spark-md5';
6
-
5
+ import isObjectEqual from '../../../utils/isObjectEqual';
7
6
  import {
8
7
  Upload,
9
8
  ConfigProvider,
@@ -22,12 +21,11 @@ import {
22
21
  isHttpFileID,
23
22
  transSize,
24
23
  downloadFile,
25
- transFileCloudidToName
24
+ transFileCloudidToName,
26
25
  } from '../../../utils/platform';
27
26
  import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
28
27
  import classNames from '../../../utils/classnames';
29
28
  import { renderDecorator } from '../renderDecorator';
30
-
31
29
  // 默认组件类前缀
32
30
  const CLASS_PREFIX = 'weda-upload-file-mobile';
33
31
  // 默认图片类型
@@ -76,11 +74,18 @@ export function UploadFileH5({
76
74
  onChange = null,
77
75
  isEdit = true,
78
76
  }: IUploadFileH5) {
79
- const [fileIDList, setfileIDList] = React.useState(
80
- filterStrList([].concat(defaultValue, value))
81
- ); // 上传成功文件ID列表,fileID[]
77
+ const [fileIDList, setfileIDList] = React.useState(filterStrList([].concat(defaultValue, value))); // 上传成功文件ID列表,fileID[]
82
78
  const [fileList, setFileList] = React.useState([]); // 上传中的文件列表,file[],file为原始文件 + uuid属性
83
79
  const [fileSizeObj, setFileSizeObj] = React.useState({}); // 管理上传文件大小 {uuid:size}
80
+ // 两次默认值不同, 需要刷新
81
+ const prevDefaultRef = React.useRef<any>([]);
82
+ React.useMemo(()=>{
83
+ //有有效默认值时不刷新,解决初次渲染默认值不显示问题
84
+ if(defaultValue&&!isObjectEqual(prevDefaultRef.current,defaultValue)&&(JSON.stringify(prevDefaultRef.current)=='[]'||!prevDefaultRef.current)){
85
+ prevDefaultRef.current =defaultValue;
86
+ setfileIDList(filterStrList([].concat(defaultValue)));
87
+ }
88
+ },[defaultValue]);
84
89
  React.useEffect(() => {
85
90
  // 外部 onChange 事件
86
91
  const pureFileIDList = fileIDList.filter(
@@ -116,9 +121,9 @@ export function UploadFileH5({
116
121
  // 上传时新增事件
117
122
  if (type === 'add') {
118
123
  fileID && setFileSizeObj((obj) => ({ ...obj, [fileID]: size }));
119
- fileID && setfileIDList((list) => [...list, fileID]);
124
+ fileID && setfileIDList([...fileIDList, fileID]);
120
125
  } else {
121
- fileID && setfileIDList((list) => list.filter((f) => f !== fileID));
126
+ fileID && setfileIDList(fileIDList.filter((f) => f !== fileID));
122
127
  }
123
128
  uuid && setFileList((list) => list.filter((item) => uuid !== item?._uuid));
124
129
  };
@@ -371,25 +376,20 @@ const TcbFileUpload = ({
371
376
  const tcb = await getCloudInstance();
372
377
  try {
373
378
  setStatus('UPLOAD_STATUS_PENDING');
374
- const fileReader = new FileReader();
375
- fileReader.readAsBinaryString(file);
376
- fileReader.onload = async function (e) {
377
- const md5Path = SparkMD5.hashBinary(e.target.result);
378
- const { fileID } = await tcb.uploadFile({
379
- cloudPath: `${uploadPath}/${md5Path}-${file?.name}`,
380
- filePath: file,
381
- onUploadProgress: (progressEvent) => {
382
- let percent = 0;
383
- percent = Math.round(
384
- (progressEvent.loaded * 100) / progressEvent.total
385
- );
386
- setStatus('UPLOAD_STATUS_LOADING');
387
- setPercent(percent < 100 ? percent : 100);
388
- },
389
- });
390
- !cancleRef.current && onChange?.({ fileID, type: 'add', uuid, size });
391
- setStatus('UPLOAD_STATUS_SUCCESS');
392
- };
379
+ const { fileID } = await tcb.uploadFile({
380
+ cloudPath: `${uploadPath}/${uuid.replaceAll('-', '')}-${file?.name}`,
381
+ filePath: file,
382
+ onUploadProgress: (progressEvent) => {
383
+ let percent = 0;
384
+ percent = Math.round(
385
+ (progressEvent.loaded * 100) / progressEvent.total
386
+ );
387
+ setStatus('UPLOAD_STATUS_LOADING');
388
+ setPercent(percent < 100 ? percent : 100);
389
+ },
390
+ });
391
+ !cancleRef.current && onChange?.({ fileID, type: 'add', uuid, size });
392
+ setStatus('UPLOAD_STATUS_SUCCESS');
393
393
  } catch (err) {
394
394
  setStatus('UPLOAD_STATUS_ERROR');
395
395
  events?.error?.(err);
@@ -481,24 +481,28 @@ const UploadFileStatus = ({
481
481
  <Tooltip title={title}>
482
482
  <Text className={`${CLASS_PREFIX}__file-name`}>{title}</Text>
483
483
  </Tooltip>
484
- {isEdit &&
485
- <div className={`${CLASS_PREFIX}__file-status`}>
486
- <Icon
487
- type={
488
- statusMap[status]?.icon || statusMap['UPLOAD_STATUS_PENDING'].icon
489
- }
490
- ></Icon>
491
- <Text className={`${CLASS_PREFIX}__file-status--msg`}>
492
- {statusMap[status]?.title ||
493
- statusMap['UPLOAD_STATUS_PENDING'].title}
494
- </Text>
495
- </div>}
484
+ {isEdit && (
485
+ <div className={`${CLASS_PREFIX}__file-status`}>
486
+ <Icon
487
+ type={
488
+ statusMap[status]?.icon ||
489
+ statusMap['UPLOAD_STATUS_PENDING'].icon
490
+ }
491
+ ></Icon>
492
+ <Text className={`${CLASS_PREFIX}__file-status--msg`}>
493
+ {statusMap[status]?.title ||
494
+ statusMap['UPLOAD_STATUS_PENDING'].title}
495
+ </Text>
496
+ </div>
497
+ )}
496
498
  </div>
497
- {isEdit && <div className={`${CLASS_PREFIX}__file-foot`}>
498
- <div>
499
- <Text>{size}</Text>
499
+ {isEdit && (
500
+ <div className={`${CLASS_PREFIX}__file-foot`}>
501
+ <div>
502
+ <Text>{size}</Text>
503
+ </div>
500
504
  </div>
501
- </div>}
505
+ )}
502
506
  </>
503
507
  );
504
508
  };
@@ -8,7 +8,6 @@ import {
8
8
  Text,
9
9
  List,
10
10
  } from 'tea-component';
11
- import SparkMD5 from 'spark-md5';
12
11
  import { v4 } from 'uuid';
13
12
  import {
14
13
  filterStrList,
@@ -17,12 +16,13 @@ import {
17
16
  transSize,
18
17
  downloadFile,
19
18
  cutFileTitle,
20
- transFileCloudidToName
19
+ transFileCloudidToName,
21
20
  } from '../../../utils/platform';
22
21
  import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
23
22
  import classNames from '../../../utils/classnames';
24
23
  import { renderDecorator } from '../renderDecorator';
25
24
  import { CommonFormPropsType } from '../types';
25
+ import isObjectEqual from '../../../utils/isObjectEqual';
26
26
 
27
27
  // 默认组件类前缀
28
28
  const CLASS_PREFIX = 'weda-upload-file-pc';
@@ -68,12 +68,20 @@ export function UploadFilePc({
68
68
  onChange = null,
69
69
  isEdit = true,
70
70
  }: IUploaderFilePc) {
71
- const [fileIDList, setfileIDList] = React.useState(
72
- filterStrList([].concat(defaultValue, value))
73
- ); // 上传成功文件ID列表,fileID[]
71
+
72
+
73
+ const [fileIDList, setfileIDList] = React.useState(filterStrList([].concat(defaultValue, value))); // 上传成功文件ID列表,fileID[]
74
74
  const [fileList, setFileList] = React.useState([]); // 上传中的文件列表,file[],file为原始文件 + uuid属性
75
75
  const [fileSizeObj, setFileSizeObj] = React.useState({}); // 管理上传文件大小 {uuid:size}
76
-
76
+ // 两次默认值不同, 需要刷新
77
+ const prevDefaultRef = React.useRef<any>([]);
78
+ React.useMemo(()=>{
79
+ //有有效默认值时不刷新,解决初次渲染默认值不显示问题
80
+ if(defaultValue&&!isObjectEqual(prevDefaultRef.current,defaultValue)&&(JSON.stringify(prevDefaultRef.current)=='[]'||!prevDefaultRef.current)){
81
+ prevDefaultRef.current =defaultValue;
82
+ setfileIDList(filterStrList([].concat(defaultValue)));
83
+ }
84
+ },[defaultValue]);
77
85
  React.useEffect(() => {
78
86
  // 外部 onChange 事件
79
87
  const pureFileIDList = fileIDList.filter(
@@ -90,7 +98,6 @@ export function UploadFilePc({
90
98
  events?.success?.({ value: pureFileIDList });
91
99
  }
92
100
  }, [fileIDList]);
93
-
94
101
  // 外层组件类
95
102
  const cls = classNames({
96
103
  'weda-ui': true,
@@ -339,25 +346,20 @@ const TcbFileUpload = ({ file }: ITcbFileUpload) => {
339
346
  const tcb = await getCloudInstance();
340
347
  try {
341
348
  setStatus('0');
342
- const fileReader = new FileReader();
343
- fileReader.readAsBinaryString(file);
344
- fileReader.onload = async function (e) {
345
- const md5Path = SparkMD5.hashBinary(e.target.result);
346
- const { fileID } = await tcb.uploadFile({
347
- cloudPath: `${uploadPath}/${md5Path}-${file?.name}`,
348
- filePath: file,
349
- onUploadProgress: (progressEvent) => {
350
- let percent = 0;
351
- percent = Math.round(
352
- (progressEvent.loaded * 100) / progressEvent.total
353
- );
354
- setStatus('1');
355
- setPercent(percent < 100 ? percent : 100);
356
- },
357
- });
358
- !cancleRef.current && onChange?.({ fileID, type: 'add', uuid, size });
359
- setStatus('2');
360
- };
349
+ const { fileID } = await tcb.uploadFile({
350
+ cloudPath: `${uploadPath}/${uuid.replaceAll('-', '')}-${file?.name}`,
351
+ filePath: file,
352
+ onUploadProgress: (progressEvent) => {
353
+ let percent = 0;
354
+ percent = Math.round(
355
+ (progressEvent.loaded * 100) / progressEvent.total
356
+ );
357
+ setStatus('1');
358
+ setPercent(percent < 100 ? percent : 100);
359
+ },
360
+ });
361
+ !cancleRef.current && onChange?.({ fileID, type: 'add', uuid, size });
362
+ setStatus('2');
361
363
  } catch (e) {
362
364
  setStatus('3');
363
365
  events.error && events.error(e);
@@ -111,11 +111,7 @@
111
111
  margin-right: 8px;
112
112
  }
113
113
 
114
- .weda-graphic-card
115
- .weda-graphic-card__col
116
- .weda-graphic-card__btn
117
- .weda-graphic-card__btn--icon {
118
- transform: rotate(180deg);
114
+ .weda-graphic-card .weda-graphic-card__btn-icon {
119
115
  margin-bottom: 2px;
120
116
  }
121
117
 
@@ -4,6 +4,7 @@ import { CommonPropsType } from '../../types';
4
4
  import classNames from '../../utils/classnames';
5
5
  import { Row, Col, ConfigProvider, Button, Icon, Text } from 'tea-component';
6
6
  import { usePlatform } from '../../utils/platform';
7
+ import { IconFont } from 'tdesign-icons-react';
7
8
 
8
9
  const CLASS_PREFIX = 'weda-graphic-card';
9
10
 
@@ -288,9 +289,9 @@ export default function GraphicCard({
288
289
  <Text className={`${CLASS_PREFIX}__btn--text`}>
289
290
  {buttonText}
290
291
  </Text>
291
- <Icon
292
- type="btnback"
293
- className={`${CLASS_PREFIX}__btn--icon`}
292
+ <IconFont
293
+ name="arrow-right"
294
+ className={`${CLASS_PREFIX}__btn-icon`}
294
295
  />
295
296
  </Button>
296
297
  )}
@@ -184,4 +184,4 @@ export function ImageInner({
184
184
  </ConfigProvider>
185
185
  );
186
186
  }
187
- }
187
+ }
@@ -102,4 +102,4 @@ function getObjectFitByWxImageMode(mode: TMode): React.CSSProperties['objectFit'
102
102
  const item = array.find((item) => item.mode === mode);
103
103
  return item?.h5;
104
104
  }
105
-
105
+
@@ -1,6 +1,6 @@
1
1
  import '@tcwd/style-wedatheme/index.css';
2
- import loadable from '@loadable/component';
3
- import { fallback } from '../utils/loading-fallback';
2
+ // import loadable from '@loadable/component';
3
+ // import { fallback } from '../utils/loading-fallback';
4
4
 
5
5
  // export const Button = loadable(() => import('./button'), {fallback});
6
6
  // export const Text = loadable(() => import('./text'), {fallback});
@@ -72,10 +72,21 @@ export { default as NavLayout } from './navLayout';
72
72
 
73
73
  // Data Contaier
74
74
  export { default as ListView } from './listView';
75
+ export { default as NavigationBar } from './navigationBar';
76
+ export { default as Line } from './chart/line';
77
+ export { default as Bar } from './chart/bar';
78
+ export { default as Pie } from './chart/pie';
75
79
  export { default as DataView } from './dataView';
76
80
 
77
81
  export { default as StatisticsCard } from './chart/statisticsCard';
78
82
  export { default as GraphicCard } from './graphicCard';
83
+
84
+ export { default as UserInfo } from './userInfo';
85
+ export { default as Phone } from './phone';
86
+ export { default as PhoneCode } from './phoneCode';
87
+ export { default as Share } from './share';
88
+
89
+ export { default as Lottery } from './lottery';
79
90
  // open
80
91
  // import Auth from './auth';
81
92
 
@@ -17,6 +17,7 @@ export interface PropsType extends CommonPropsType {
17
17
  */
18
18
  params?: {key: string, value: string}[];
19
19
  contentSlot?: React.ReactNode;
20
+ isOpenInNewWindow: boolean;
20
21
  }
21
22
 
22
23
  // 所有绝对地址直接交由浏览器,新开窗口交由浏览器
@@ -28,7 +29,8 @@ export default function Link({
28
29
  style,
29
30
  className,
30
31
  contentSlot,
31
- params = [], // TODO 格式定义
32
+ params = [], // TODO 格式定义,
33
+ isOpenInNewWindow = false,
32
34
  }: PropsType) {
33
35
  url = url.trim();
34
36
  const cls = classNames({
@@ -91,6 +93,7 @@ export default function Link({
91
93
  <a
92
94
  style={{ ...style }}
93
95
  className={cls}
96
+ target={isOpenInNewWindow ? '_blank' : '_self'}
94
97
  href={href}
95
98
  onClick={(e) => {
96
99
  events.tap && events.tap({}, { originEvent: e });
@@ -107,10 +110,10 @@ export default function Link({
107
110
  }
108
111
  }
109
112
  }}
110
- rel="noreferrer"
113
+ rel='noopener noreferrer'
111
114
  >
112
115
  {contentSlot && <div className="weda-link-slot">{contentSlot}</div>}
113
116
  {content}
114
117
  </a>
115
118
  );
116
- }
119
+ }
@@ -60,6 +60,10 @@
60
60
  .weda-list-view__containor .weda-list-view__more {
61
61
  background-color: #fff;
62
62
  }
63
+ .weda-list-view__containor
64
+ .weda-list-view__more.weda-list-view__more-bottomLoad {
65
+ background-color: transparent;
66
+ }
63
67
  .weda-list-view__containor
64
68
  .weda-list-view__more
65
69
  .weda-list-view__more-pagination {
@@ -11,24 +11,11 @@ import { isInIde } from '../../utils/platform';
11
11
  import classNames from '../../utils/classnames';
12
12
  import isequal from 'lodash.isequal';
13
13
  import './index.css';
14
+ import { REL_DICT } from '../../utils/constant';
15
+ import { isNil } from '../../utils/lodash';
14
16
 
15
- const REL_DICT = {
16
- equal: 'eq', // 等于
17
- unequal: 'neq', // 不等于
18
- include: 'search', // 包含
19
- exclude: '_exclude', // 不包含
20
- begin_with: '_begin_with', // 开头是
21
- greater: 'gt', // 大于
22
- greater_or_equal: 'gte', // 大于等于
23
- bigger_or_equal: 'gte', //大于等于
24
- less: 'lt', // 小于
25
- less_or_equal: 'lte', // 小于等于
26
- in: 'in', // 多选值
27
- not_in: 'nin', // 不在多选值
28
- };
29
17
  const ORDERTYPE = ['asc', 'desc'];
30
18
  const BLOCK_NAME = 'weda-list-view';
31
- const isNull = (val) => [undefined, null].includes(val);
32
19
  const getIdeMockData = (length = 3) => Array.from({ length }).map((d) => ({}));
33
20
  const getWhereList = (where) => {
34
21
  let result = [];
@@ -45,7 +32,7 @@ const getWhereList = (where) => {
45
32
  rel = 'regex';
46
33
  val = `^((?!${val}).)*$`;
47
34
  }
48
- if (item2?.logic !== 'or' && item2?.key && rel && !isNull(val)) {
35
+ if (item2?.logic !== 'or' && item2?.key && rel && !isNil(val)) {
49
36
  result.push({ key: item2.key, rel, val });
50
37
  }
51
38
  });
@@ -185,7 +172,7 @@ export default function ListView(props: IListView) {
185
172
  const { orderBy, orderType, pageNo, pageSize, where } = params || {};
186
173
  const tcbParams = {};
187
174
  // tcb分页参数
188
- if (!isNull(pageNo) && !isNull(pageSize)) {
175
+ if (!isNil(pageNo) && !isNil(pageSize)) {
189
176
  tcbParams['pageNo'] = pageNo;
190
177
  tcbParams['pageSize'] = pageSize;
191
178
  }
@@ -344,7 +331,12 @@ export default function ListView(props: IListView) {
344
331
  {children}
345
332
  </div>
346
333
  )}
347
- <div className={classNames(`${BLOCK_NAME}__more`)}>
334
+ <div
335
+ className={classNames(
336
+ `${BLOCK_NAME}__more`,
337
+ `${BLOCK_NAME}__more-${pagination}`
338
+ )}
339
+ >
348
340
  {pagination === 'bottomLoad' && renderBottomLoad()}
349
341
  {pagination === 'loadMoreButton' && renderLoadMore()}
350
342
  {pagination === 'pagination' && renderPagination()}