@cloudbase/weda-ui 0.2.16 → 0.2.17

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 (86) hide show
  1. package/README.md +39 -170
  2. package/package.json +17 -10
  3. package/src/configs/components/chart/bar.json +711 -0
  4. package/src/configs/components/chart/line.json +666 -0
  5. package/src/configs/components/chart/pie.json +487 -0
  6. package/src/configs/components/listView.json +2 -1
  7. package/src/configs/index.js +7 -0
  8. package/src/mp/components/chart/bar/index.js +254 -0
  9. package/src/mp/components/chart/bar/index.json +6 -0
  10. package/src/mp/components/chart/bar/index.wxml +3 -0
  11. package/src/mp/components/chart/bar/index.wxss +9 -0
  12. package/src/mp/components/chart/common/config/bar.js +50 -0
  13. package/src/mp/components/chart/common/config/global.js +16 -0
  14. package/src/mp/components/chart/common/config/line.js +48 -0
  15. package/src/mp/components/chart/common/config/pie.js +36 -0
  16. package/src/mp/components/chart/common/core/eChartBar.js +262 -0
  17. package/src/mp/components/chart/common/core/eChartBase.js +371 -0
  18. package/src/mp/components/chart/common/core/eChartLine.js +228 -0
  19. package/src/mp/components/chart/common/core/eChartPie.js +166 -0
  20. package/src/mp/components/chart/common/lib/echarts.min.js +18 -0
  21. package/src/mp/components/chart/ec-canvas/ec-canvas.js +277 -0
  22. package/src/mp/components/chart/ec-canvas/ec-canvas.json +4 -0
  23. package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +4 -0
  24. package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +4 -0
  25. package/src/mp/components/chart/ec-canvas/wx-canvas.js +107 -0
  26. package/src/mp/components/chart/line/index.js +243 -0
  27. package/src/mp/components/chart/line/index.json +6 -0
  28. package/src/mp/components/chart/line/index.wxml +3 -0
  29. package/src/mp/components/chart/line/index.wxss +9 -0
  30. package/src/mp/components/chart/pie/index.js +178 -0
  31. package/src/mp/components/chart/pie/index.json +6 -0
  32. package/src/mp/components/chart/pie/index.wxml +4 -0
  33. package/src/mp/components/chart/pie/index.wxss +9 -0
  34. package/src/mp/components/dataView/index.json +1 -1
  35. package/src/mp/components/form/radio/index.js +5 -0
  36. package/src/mp/components/form/select/index.wxml +4 -4
  37. package/src/mp/components/form/textarea/index.wxml +6 -5
  38. package/src/mp/components/form/uploader/index.js +42 -22
  39. package/src/mp/components/form/uploader/index.wxml +15 -3
  40. package/src/mp/components/form/uploaderFile/index.js +58 -30
  41. package/src/mp/components/graphicCard/index.js +26 -28
  42. package/src/mp/components/internals/listView/arrow-right-line.svg +3 -0
  43. package/src/mp/components/internals/listView/index.js +286 -0
  44. package/src/mp/components/internals/listView/index.json +4 -0
  45. package/src/mp/components/internals/listView/index.wxml +40 -0
  46. package/src/mp/components/internals/listView/index.wxss +150 -0
  47. package/src/mp/components/internals/listView/more-line.svg +3 -0
  48. package/src/mp/components/listView/index.js +17 -24
  49. package/src/mp/components/listView/index.wxml +1 -1
  50. package/src/mp/components/navLayout/index.js +3 -3
  51. package/src/mp/index.json +3 -0
  52. package/src/mp/utils/platform.js +15 -0
  53. package/src/setupTests.js +2 -1
  54. package/src/web/components/chart/bar/index.tsx +139 -0
  55. package/src/web/components/chart/common/config/bar.js +49 -0
  56. package/src/web/components/chart/common/config/global.js +16 -0
  57. package/src/web/components/chart/common/config/line.js +50 -0
  58. package/src/web/components/chart/common/config/pie.js +37 -0
  59. package/src/web/components/chart/common/core/eChartBar.js +264 -0
  60. package/src/web/components/chart/common/core/eChartBase.ts +379 -0
  61. package/src/web/components/chart/common/core/eChartLine.js +229 -0
  62. package/src/web/components/chart/common/core/eChartPie.js +170 -0
  63. package/src/web/components/chart/common/core/type.ts +34 -0
  64. package/src/web/components/chart/common/echart.css +106 -0
  65. package/src/web/components/chart/common/echarts.ts +33 -0
  66. package/src/web/components/chart/common/useChart.tsx +69 -0
  67. package/src/web/components/chart/line/index.tsx +135 -0
  68. package/src/web/components/chart/pie/index.tsx +99 -0
  69. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +3 -3
  70. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +2 -2
  71. package/src/web/components/form/select/h5.tsx +3 -1
  72. package/src/web/components/form/select/time.jsx +1 -0
  73. package/src/web/components/form/uploader/uploader.h5.tsx +19 -17
  74. package/src/web/components/form/uploader/uploader.pc.tsx +13 -16
  75. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +35 -37
  76. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +15 -21
  77. package/src/web/components/graphicCard/index.css +1 -5
  78. package/src/web/components/graphicCard/index.tsx +4 -3
  79. package/src/web/components/index.js +5 -2
  80. package/src/web/utils/platform.js +1 -1
  81. package/src/web/utils/tcb.js +3 -15
  82. package/CHANGELOG.md +0 -240
  83. package/src/.DS_Store +0 -0
  84. package/src/configs/.DS_Store +0 -0
  85. package/src/mp/.gitignore +0 -10
  86. package/src/web/.DS_Store +0 -0
@@ -93,6 +93,7 @@ export default function Select({
93
93
  !!endDate && (options.end = decodeIsoDatetime(endDate, 'date'));
94
94
 
95
95
  weui.datePicker({
96
+ id: String(Date.now()),
96
97
  ...options,
97
98
  onConfirm(result) {
98
99
  const value = moment()
@@ -129,6 +130,7 @@ export default function Select({
129
130
 
130
131
  const onSelect = function () {
131
132
  weui.picker(range, {
133
+ id: String(Date.now()),
132
134
  defaultValue: [selectedValue || range[0].value],
133
135
  onConfirm(result) {
134
136
  const item = result[0];
@@ -246,7 +248,7 @@ export function decodeIsoDatetime(isoStringOrTimesnap, type) {
246
248
  } else {
247
249
  return moment(isoStringOrTimesnap).format('HH:mm');
248
250
  }
249
- } else {
251
+ } else {
250
252
  return moment(isoStringOrTimesnap).format('YYYY-MM-DD');
251
253
  }
252
254
  }
@@ -48,6 +48,7 @@ export function timePicker(options) {
48
48
  ];
49
49
  weui.picker(hours, {
50
50
  ...options,
51
+ id: String(Date.now()),
51
52
  start: [startHour, startMin],
52
53
  end: [endHour, endMin],
53
54
  defaultValue,
@@ -7,7 +7,7 @@ import { useSyncValue } from '../../../utils/useSyncValue';
7
7
  import { isCloudFileID } from '../../../utils/platform';
8
8
  import { IMAGE_TYPES } from './uploader.pc';
9
9
  import { CommonFormPropsType } from '../types';
10
- import SparkMD5 from 'spark-md5';
10
+ import { v4 } from 'uuid';
11
11
 
12
12
  const uploadPath = 'weda-uploader';
13
13
  /**
@@ -40,7 +40,12 @@ export function ImageUploaderH5({
40
40
  //上传进度
41
41
  const [progress, setProgress] = React.useState(0);
42
42
  const [inputValue, setInputValue] = useSyncValue(defaultValue, isObjectEqual);
43
+
43
44
  const fileIdList = React.useMemo(() => {
45
+ //兼容h5默认值为空时情况
46
+ if (inputValue === null) {
47
+ setInputValue('');
48
+ }
44
49
  if (typeof inputValue === 'string') {
45
50
  // single = true 传入的是字符串
46
51
  return [inputValue].filter((i) => i.length > 0); // 排除空串
@@ -67,7 +72,7 @@ export function ImageUploaderH5({
67
72
  React.useEffect(() => {
68
73
  if (single) {
69
74
  const file = fileIdList[0] || '';
70
- file && onChange && onChange(file);
75
+ onChange && onChange(file);
71
76
  events.change && events.change({ value: file });
72
77
  } else {
73
78
  onChange && onChange(fileIdList);
@@ -88,21 +93,18 @@ export function ImageUploaderH5({
88
93
  setUploading(true);
89
94
  getCloudInstance().then(async (tcb) => {
90
95
  try {
91
- const fileReader = new FileReader();
92
- fileReader.readAsBinaryString(file);
93
- fileReader.onload = async function (e) {
94
- const md5Path = SparkMD5.hashBinary(e.target.result);
95
- const fileType = file.type.split('/')?.[1];
96
- const cloudPath = `${uploadPath}/${md5Path}-${file?.name}`;
97
- const { fileID } = await tcb.uploadFile({
98
- cloudPath,
99
- filePath: file,
100
- onUploadProgress: onProgress,
101
- });
102
- // @ts-expect-error TODO
103
- fileID && setInputValue((list) => [...list, fileID]);
104
- fileID && events.success && events.success({ value: fileID, file });
105
- };
96
+ const fileType = file.type.split('/')?.[1];
97
+ const cloudPath = `${uploadPath}/${v4().replaceAll('-', '')}-${
98
+ file?.name
99
+ }`;
100
+ const { fileID } = await tcb.uploadFile({
101
+ cloudPath,
102
+ filePath: file,
103
+ onUploadProgress: onProgress,
104
+ });
105
+ // @ts-expect-error TODO
106
+ fileID && setInputValue((list) => [...list, fileID]);
107
+ fileID && events.success && events.success({ value: fileID, file });
106
108
  } catch (err) {
107
109
  events.error && events.error(err);
108
110
  } finally {
@@ -8,12 +8,12 @@ import {
8
8
  ImagePreview,
9
9
  ConfigProvider,
10
10
  } from 'tea-component';
11
+ import { v4 } from 'uuid';
11
12
  import classNames from '../../../utils/classnames';
12
13
  import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
13
14
  import { isCloudFileID } from '../../../utils/platform';
14
15
  import isObjectEqual from '../../../utils/isObjectEqual';
15
16
  import { H5UploaderProps } from './uploader.h5';
16
- import SparkMD5 from 'spark-md5';
17
17
  // 默认组件类前缀
18
18
  export const CLASS_PREFIX = 'weda-uploader-pc';
19
19
  // 默认图片类型
@@ -96,7 +96,7 @@ export function UploaderPCInner(props) {
96
96
  if (!isObjectEqual(fileRef.current, fileIDList)) {
97
97
  if (single) {
98
98
  const file = fileIDList[0] || '';
99
- file && onChange && onChange(file);
99
+ onChange && onChange(file);
100
100
  events.change && events.change({ value: file });
101
101
  } else {
102
102
  onChange && onChange(fileIDList);
@@ -130,20 +130,17 @@ export function UploaderPCInner(props) {
130
130
  setUploading(true);
131
131
  getCloudInstance().then(async (tcb) => {
132
132
  try {
133
- const fileReader = new FileReader();
134
- fileReader.readAsBinaryString(file);
135
- fileReader.onload = async function (e) {
136
- const md5Path = SparkMD5.hashBinary(e.target.result);
137
- const fileType = file.type.split('/')?.[1];
138
- const cloudPath = `${uploadPath}/${md5Path}-${file?.name}`;
139
- const { fileID } = await tcb.uploadFile({
140
- cloudPath,
141
- filePath: file,
142
- onUploadProgress: onProgress,
143
- });
144
- fileID && setfileIDList((list) => [...list, fileID]);
145
- fileID && events.success && events.success({ value: fileID, file });
146
- };
133
+ const fileType = file.type.split('/')?.[1];
134
+ const cloudPath = `${uploadPath}/${v4().replaceAll('-', '')}-${
135
+ file?.name
136
+ }`;
137
+ const { fileID } = await tcb.uploadFile({
138
+ cloudPath,
139
+ filePath: file,
140
+ onUploadProgress: onProgress,
141
+ });
142
+ fileID && setfileIDList((list) => [...list, fileID]);
143
+ fileID && events.success && events.success({ value: fileID, file });
147
144
  } catch (e) {
148
145
  events.error && events.error({ value: e, file });
149
146
  } finally {
@@ -2,7 +2,6 @@ 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
 
7
6
  import {
8
7
  Upload,
@@ -22,7 +21,7 @@ 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';
@@ -371,25 +370,20 @@ const TcbFileUpload = ({
371
370
  const tcb = await getCloudInstance();
372
371
  try {
373
372
  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
- };
373
+ const { fileID } = await tcb.uploadFile({
374
+ cloudPath: `${uploadPath}/${uuid.replaceAll('-', '')}-${file?.name}`,
375
+ filePath: file,
376
+ onUploadProgress: (progressEvent) => {
377
+ let percent = 0;
378
+ percent = Math.round(
379
+ (progressEvent.loaded * 100) / progressEvent.total
380
+ );
381
+ setStatus('UPLOAD_STATUS_LOADING');
382
+ setPercent(percent < 100 ? percent : 100);
383
+ },
384
+ });
385
+ !cancleRef.current && onChange?.({ fileID, type: 'add', uuid, size });
386
+ setStatus('UPLOAD_STATUS_SUCCESS');
393
387
  } catch (err) {
394
388
  setStatus('UPLOAD_STATUS_ERROR');
395
389
  events?.error?.(err);
@@ -481,24 +475,28 @@ const UploadFileStatus = ({
481
475
  <Tooltip title={title}>
482
476
  <Text className={`${CLASS_PREFIX}__file-name`}>{title}</Text>
483
477
  </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>}
478
+ {isEdit && (
479
+ <div className={`${CLASS_PREFIX}__file-status`}>
480
+ <Icon
481
+ type={
482
+ statusMap[status]?.icon ||
483
+ statusMap['UPLOAD_STATUS_PENDING'].icon
484
+ }
485
+ ></Icon>
486
+ <Text className={`${CLASS_PREFIX}__file-status--msg`}>
487
+ {statusMap[status]?.title ||
488
+ statusMap['UPLOAD_STATUS_PENDING'].title}
489
+ </Text>
490
+ </div>
491
+ )}
496
492
  </div>
497
- {isEdit && <div className={`${CLASS_PREFIX}__file-foot`}>
498
- <div>
499
- <Text>{size}</Text>
493
+ {isEdit && (
494
+ <div className={`${CLASS_PREFIX}__file-foot`}>
495
+ <div>
496
+ <Text>{size}</Text>
497
+ </div>
500
498
  </div>
501
- </div>}
499
+ )}
502
500
  </>
503
501
  );
504
502
  };
@@ -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,7 +16,7 @@ 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';
@@ -339,25 +338,20 @@ const TcbFileUpload = ({ file }: ITcbFileUpload) => {
339
338
  const tcb = await getCloudInstance();
340
339
  try {
341
340
  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
- };
341
+ const { fileID } = await tcb.uploadFile({
342
+ cloudPath: `${uploadPath}/${uuid.replaceAll('-', '')}-${file?.name}`,
343
+ filePath: file,
344
+ onUploadProgress: (progressEvent) => {
345
+ let percent = 0;
346
+ percent = Math.round(
347
+ (progressEvent.loaded * 100) / progressEvent.total
348
+ );
349
+ setStatus('1');
350
+ setPercent(percent < 100 ? percent : 100);
351
+ },
352
+ });
353
+ !cancleRef.current && onChange?.({ fileID, type: 'add', uuid, size });
354
+ setStatus('2');
361
355
  } catch (e) {
362
356
  setStatus('3');
363
357
  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
  )}
@@ -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,6 +72,9 @@ export { default as NavLayout } from './navLayout';
72
72
 
73
73
  // Data Contaier
74
74
  export { default as ListView } from './listView';
75
+ export { default as Line } from './chart/line';
76
+ export { default as Bar } from './chart/bar';
77
+ export { default as Pie } from './chart/pie';
75
78
  export { default as DataView } from './dataView';
76
79
 
77
80
  export { default as StatisticsCard } from './chart/statisticsCard';
@@ -126,7 +126,7 @@ export const isInIde = () => !!window?.app?.cloud?.IS_WEDA_IDE;
126
126
  * cloudid和文件名转换
127
127
  */
128
128
  export const transFileCloudidToName = (fileID) => {
129
- const uuidReg = /(file-)?[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}-/;
129
+ const uuidReg = /(file-)?[0-9a-f]{8}((-)?[0-9a-f]{4}){3}(-)?[0-9a-f]{12}-/;
130
130
  const lastIndex = `${fileID}`.lastIndexOf('/');
131
131
  const name = `${fileID}`.slice(lastIndex + 1);
132
132
  const title = name.replace(uuidReg, '');
@@ -54,19 +54,7 @@ export async function callDataSource(param) {
54
54
  }
55
55
  }
56
56
 
57
- /**
58
- * 调用微搭后端API服务
59
- */
60
- export async function callWedaApi(param) {
61
- const { data, action } = param;
62
- try {
63
- const res = await window?.app?.cloud?.callWedaApi?.({
64
- action,
65
- data,
66
- });
67
- return res;
68
- } catch (error) {
69
- console.error('错误', error);
70
- return {};
71
- }
57
+
58
+ export function callWedaApi(...args) {
59
+ return window.app.cloud.callWedaApi(...args);
72
60
  }
package/CHANGELOG.md DELETED
@@ -1,240 +0,0 @@
1
- > 为了更好的区分组件类型,仅在更新日志中进行如下约定:低码组件使用大驼峰命名,源码组件使用小驼峰命名。
2
-
3
- ## [1.2] - 2021-08-24
4
-
5
- ### Changed
6
-
7
- - swiper 轮播
8
-
9
- - 添加示例图片
10
-
11
- ## [1.1] - 2021-08-09
12
-
13
- ### Added
14
-
15
- - text 文本
16
-
17
- - 新增事件 `tap`
18
-
19
- - modal 模态弹窗
20
-
21
- - 新增组件 `modal`, web 使用 tea 样式用于 PC 样式响应式。
22
-
23
- - showModal 显示弹窗
24
-
25
- - 新增动作 `showModal`,用于平台方法的 PC 大屏响应式版本,小程序对齐 wx.showModal api。
26
-
27
- - FormTextarea 表单多行输入
28
-
29
- - 新增组件 `FormTextarea`, 用以替代被移除的 `Textarea` 组件
30
-
31
- - link 链接
32
-
33
- - 新增组件 `link`,可通过插槽来配置自定义内容
34
-
35
- ### Changed
36
-
37
- - button 按钮
38
-
39
- - 添加响应式样式,屏幕宽度大于 **1024px** 时显示为方角
40
-
41
- - swiper 轮播
42
-
43
- - 添加响应式样式,屏幕宽度大于 1024px 时显示为方角
44
-
45
- - FormRadio 表单单选
46
-
47
- - 修复多个单选组件并存导致的选中问题
48
-
49
- - FormCheckbox 表单复选
50
-
51
- - 修复多个复选组件并存导致的选中问题
52
-
53
- - 所有组件:
54
- - 表单组件的默认背景色,统一配置为透明
55
- - 组件最外层容器统一添加 `weda-ui` 类名,组件库级别重置样式及公共样式都限制在 `weda-ui` 类名下,防止污染
56
- - 规范了组件事件的触发方式
57
-
58
- ## [1.0] - 2021-06-10
59
-
60
- ### Added
61
-
62
- - text 文本:
63
-
64
- - 新增属性 `maxLines` 最大显示行数
65
-
66
- - FormRegion 表单区域选择:
67
-
68
- - 新增组件 `FormRegion`, 用以替代被移除的 `RegionPicker` 组件
69
-
70
- ### Removed
71
-
72
- - swiper 轮播:
73
-
74
- - 移除属性 `displayMultipleItems`, `nextMargin`, `previousMargin`, `updated`
75
- - 移除 `transition` 和 `animationfinished` 事件
76
-
77
- - text 文本:
78
-
79
- - 移除属性 `decode` 是否解码
80
- - 移除 `tap` 事件
81
-
82
- - image 图片:
83
-
84
- - 移除属性 `webp` 能否解析 webp 格式
85
-
86
- - button 按钮:
87
-
88
- - 移除属性 `plain` 镂空
89
- - 移除属性 `openType` 微信开放能力的 `获取用户信息` 选项
90
-
91
- - FormInput 表单输入:
92
-
93
- - 移除属性 `requiredFlag` 是否需要必填星号
94
- - 移除属性 `underline` 是否需要底部下划线
95
-
96
- - FormRadio 表单单选:
97
-
98
- - 移除属性 `validateTrigger` 字段触发校验类型
99
- - 移除属性 `validateStatus` 校验状态
100
- - 移除属性 `requiredFlag` 是否需要必填星号
101
- - 移除属性 `underline` 是否需要底部下划线
102
-
103
- - FormCheckbox 表单复选:
104
-
105
- - 移除属性 `validateTrigger` 字段触发校验类型
106
- - 移除属性 `validateStatus` 校验状态
107
- - 移除属性 `requiredFlag` 是否需要必填星号
108
- - 移除属性 `underline` 是否需要底部下划线
109
-
110
- - FormSwitch 表单开关:
111
-
112
- - 移除属性 `type` 显示类型
113
- - 移除属性 `checkedIcon` 选中图标
114
- - 移除属性 `uncheckedIcon` 非选中图标
115
- - 移除属性 `requiredFlag` 是否需要必填星号
116
- - 移除属性 `underline` 是否需要底部下划线
117
-
118
- - FormDate 表单日期:
119
-
120
- - 移除属性 `suffixType` 操作尾部样式类型
121
- - 移除属性 `suffixText` 操作尾部文案
122
- - 移除属性 `requiredFlag` 是否需要必填星号
123
- - 移除属性 `underline` 是否需要底部下划线
124
-
125
- - FormTime 表单时间:
126
-
127
- - 移除属性 `suffixType` 操作尾部样式类型
128
- - 移除属性 `suffixText` 操作尾部文案
129
- - 移除属性 `requiredFlag` 是否需要必填星号
130
- - 移除属性 `underline` 是否需要底部下划线
131
-
132
- - FormSelect 表单选择:
133
-
134
- - 移除属性 `suffixType` 操作尾部样式类型
135
- - 移除属性 `suffixText` 操作尾部文案
136
- - 移除属性 `validateTrigger` 字段触发校验类型
137
- - 移除属性 `validateStatus` 校验状态
138
- - 移除属性 `rules` 校验规则
139
- - 移除属性 `requiredFlag` 是否需要必填星号
140
- - 移除属性 `underline` 是否需要底部下划线
141
-
142
- - FormPhone 表单手机号码:
143
-
144
- - 移除属性 `maxLength` 最大输入长度
145
- - 移除属性 `rules` 校验规则
146
- - 移除属性 `requiredFlag` 是否需要必填星号
147
- - 移除属性 `underline` 是否需要底部下划线
148
-
149
- - FormEmail 表单邮件地址:
150
-
151
- - 移除属性 `rules` 校验规则
152
- - 移除属性 `requiredFlag` 是否需要必填星号
153
- - 移除属性 `underline` 是否需要底部下划线
154
-
155
- - FormUrl 表单邮件地址:
156
-
157
- - 移除属性 `rules` 校验规则
158
- - 移除属性 `requiredFlag` 是否需要必填星号
159
- - 移除属性 `underline` 是否需要底部下划线
160
-
161
- - FormItem 表单元素:
162
-
163
- - 移除组件
164
-
165
- - FormCell 表单表格:
166
-
167
- - 移除组件
168
-
169
- - RegionPicker 地域选择:
170
-
171
- - 移除组件
172
-
173
- - Textarea 多行输入:
174
-
175
- - 移除组件, 待优化后重新上架
176
-
177
- ### Changed
178
-
179
- - image 图片:
180
-
181
- - 默认大小由 320\*240 rpx 调整为 240\*240 rpx
182
-
183
- - text 文本:
184
-
185
- - 跟随小程序定义,`selectabble` 变更为 `userSelect`
186
- - 样式调整:默认布局模式从 `inline` 编程 `block`
187
-
188
- - button 按钮:
189
-
190
- - 样式调整:从默认宽度 `100%` 调整为默认 `184px`
191
-
192
- - Form 表单容器:
193
-
194
- - 样式优化
195
-
196
- - FormInput 表单输入:
197
-
198
- - 样式优化
199
-
200
- - FormRadio 表单单选:
201
-
202
- - 属性 `name` 表单字段名称,默认值由 `thisIsRadioKey` 改为 `formRadio`
203
- - 样式优化
204
-
205
- - FormCheckbox 表单复选:
206
-
207
- - 属性 `name` 表单字段名称,默认值由 `thisIsCheckboxKey` 改为 `formCheckbox`
208
- - 样式优化
209
-
210
- - FormSwitch 表单开关:
211
-
212
- - 属性 `name` 表单字段名称,默认值由 `thisIsSelectKey` 改为 `formSwitch`
213
- - 样式优化
214
-
215
- - FormDate 表单日期:
216
-
217
- - 属性 `name` 表单字段名称,默认值由 `thisIsDateKey` 改为 `formDate`
218
- - 样式优化
219
-
220
- - FormTime 表单时间:
221
-
222
- - 属性 `name` 表单字段名称,默认值由 `thisIsTimeKey` 改为 `formTime`
223
- - 样式优化
224
-
225
- - FormSelect 表单选择:
226
-
227
- - 属性 `name` 表单字段名称,默认值由 `thisIsSelectKey` 改为 `formSelect`
228
- - 样式优化
229
-
230
- - FormPhone 表单手机号码:
231
-
232
- - 样式优化
233
-
234
- - FormEmail 表单邮件地址:
235
-
236
- - 样式优化
237
-
238
- - FormUrl 表单邮件地址:
239
-
240
- - 样式优化
package/src/.DS_Store DELETED
Binary file
Binary file
package/src/mp/.gitignore DELETED
@@ -1,10 +0,0 @@
1
- /.yarn/*
2
- !/.yarn/patches
3
- !/.yarn/plugins
4
- !/.yarn/releases
5
- !/.yarn/sdks
6
-
7
- # Swap the comments on the following lines if you don't wish to use zero-installs
8
- # Documentation here: https://yarnpkg.com/features/zero-installs
9
- !/.yarn/cache
10
- #/.pnp.*
package/src/web/.DS_Store DELETED
Binary file