@cloudbase/weda-ui 2.0.12 → 2.0.26

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 (126) hide show
  1. package/package.json +36 -33
  2. package/src/configs/components/form/textarea.json +8 -0
  3. package/src/configs/components/graphicCard.json +1 -1
  4. package/src/configs/components/navLayout.json +2 -1
  5. package/src/configs/components/wedaVideo.json +12 -9
  6. package/src/mp/components/calendar/index.js +4 -1
  7. package/src/mp/components/calendar/index.json +2 -1
  8. package/src/mp/components/calendar/index.wxml +1 -1
  9. package/src/mp/components/calendar/index.wxss +17 -16
  10. package/src/mp/components/chart/statisticsCard/index.wxss +7 -10
  11. package/src/mp/components/form/checkbox/index.js +5 -1
  12. package/src/mp/components/form/input/index.js +1 -1
  13. package/src/mp/components/form/radio/index.js +5 -1
  14. package/src/mp/components/form/select/index.js +2 -2
  15. package/src/mp/components/form/textarea/index.js +6 -0
  16. package/src/mp/components/form/textarea/index.wxml +1 -1
  17. package/src/mp/components/graphicCard/index.wxss +6 -6
  18. package/src/mp/components/listView/index.wxss +2 -2
  19. package/src/mp/components/navLayout/index.wxss +10 -10
  20. package/src/mp/components/navigationBar/index.wxss +10 -10
  21. package/src/mp/components/richText/index.wxml +1 -1
  22. package/src/mp/components/richText/index.wxss +7 -5
  23. package/src/mp/components/tabs/index.wxss +1 -2
  24. package/src/mp/style/weda-ui.wxss +4 -2
  25. package/src/web/components/calendar/index.css +27 -40
  26. package/src/web/components/chart/statisticsCard/index.css +9 -8
  27. package/src/web/components/form/formcell/index.css +1 -14
  28. package/src/web/components/form/input/index.css +4 -0
  29. package/src/web/components/form/location/common/mapChoose.css +13 -11
  30. package/src/web/components/form/location/components/LocationH5/index.css +19 -19
  31. package/src/web/components/form/select/h5.tsx +1 -1
  32. package/src/web/components/form/select/index.tsx +1 -1
  33. package/src/web/components/form/textarea/index.tsx +12 -0
  34. package/src/web/components/form/uploader/index.css +10 -0
  35. package/src/web/components/form/uploader/uploader.h5.tsx +3 -6
  36. package/src/web/components/form/uploader/uploader.pc.tsx +3 -6
  37. package/src/web/components/form/uploaderFile/index.css +24 -23
  38. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +9 -4
  39. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +7 -4
  40. package/src/web/components/graphicCard/index.css +6 -6
  41. package/src/web/components/listView/index.css +8 -8
  42. package/src/web/components/lottery/index.tsx +1 -1
  43. package/src/web/components/navLayout/index.css +25 -25
  44. package/src/web/components/navigationBar/index.css +26 -26
  45. package/src/web/components/richTextView/index.css +7 -3
  46. package/src/web/components/tabs/index.css +1 -2
  47. package/src/web/components/wedaVideo/index.tsx +14 -4
  48. package/src/web/utils/platform.js +13 -0
  49. package/src/web/weda-ui.css +7 -9
  50. package/src/docs/common/format.tsx +0 -115
  51. package/src/docs/common/tableView.css +0 -164
  52. package/src/docs/common/tableView.tsx +0 -283
  53. package/src/docs/compsdocs/chart/Bar.mdx +0 -159
  54. package/src/docs/compsdocs/chart/Line.mdx +0 -100
  55. package/src/docs/compsdocs/chart/Pie.mdx +0 -83
  56. package/src/docs/compsdocs/chart/_category_.json +0 -1
  57. package/src/docs/compsdocs/chart/statisticsCard.mdx +0 -51
  58. package/src/docs/compsdocs/database/DataView.mdx +0 -33
  59. package/src/docs/compsdocs/database/ListView.mdx +0 -33
  60. package/src/docs/compsdocs/database/_category_.json +0 -1
  61. package/src/docs/compsdocs/form/Form.mdx +0 -35
  62. package/src/docs/compsdocs/form/FormCheckbox.mdx +0 -35
  63. package/src/docs/compsdocs/form/FormDate.mdx +0 -30
  64. package/src/docs/compsdocs/form/FormEmail.mdx +0 -30
  65. package/src/docs/compsdocs/form/FormImageUploader.mdx +0 -31
  66. package/src/docs/compsdocs/form/FormInput.mdx +0 -30
  67. package/src/docs/compsdocs/form/FormLocation.mdx +0 -64
  68. package/src/docs/compsdocs/form/FormPhone.mdx +0 -30
  69. package/src/docs/compsdocs/form/FormRadio.mdx +0 -35
  70. package/src/docs/compsdocs/form/FormRegion.mdx +0 -30
  71. package/src/docs/compsdocs/form/FormSelect.mdx +0 -35
  72. package/src/docs/compsdocs/form/FormSwitch.mdx +0 -30
  73. package/src/docs/compsdocs/form/FormTextarea.mdx +0 -30
  74. package/src/docs/compsdocs/form/FormTime.mdx +0 -30
  75. package/src/docs/compsdocs/form/FormUploadFile.mdx +0 -30
  76. package/src/docs/compsdocs/form/FormUrl.mdx +0 -30
  77. package/src/docs/compsdocs/form/_category_.json +0 -1
  78. package/src/docs/compsdocs/grid/Card.mdx +0 -31
  79. package/src/docs/compsdocs/grid/Container.mdx +0 -41
  80. package/src/docs/compsdocs/grid/Footer.mdx +0 -31
  81. package/src/docs/compsdocs/grid/GridLayout.mdx +0 -31
  82. package/src/docs/compsdocs/grid/Header.mdx +0 -31
  83. package/src/docs/compsdocs/grid/Layout.mdx +0 -25
  84. package/src/docs/compsdocs/grid/List.mdx +0 -31
  85. package/src/docs/compsdocs/grid/ScrollView.mdx +0 -37
  86. package/src/docs/compsdocs/grid/Swiper.mdx +0 -57
  87. package/src/docs/compsdocs/grid/_category_.json +0 -1
  88. package/src/docs/compsdocs/media/Icon.mdx +0 -31
  89. package/src/docs/compsdocs/media/Image.mdx +0 -55
  90. package/src/docs/compsdocs/media/_category_.json +0 -1
  91. package/src/docs/compsdocs/model/ModelCreate.mdx +0 -44
  92. package/src/docs/compsdocs/model/ModelDetail.mdx +0 -44
  93. package/src/docs/compsdocs/model/ModelTable.mdx +0 -156
  94. package/src/docs/compsdocs/model/ModelUpdate.mdx +0 -44
  95. package/src/docs/compsdocs/model/PageLayout.mdx +0 -21
  96. package/src/docs/compsdocs/model/_category_.json +0 -1
  97. package/src/docs/compsdocs/navmenu/Classification.mdx +0 -37
  98. package/src/docs/compsdocs/navmenu/NavBar.mdx +0 -52
  99. package/src/docs/compsdocs/navmenu/NavLayout.mdx +0 -29
  100. package/src/docs/compsdocs/navmenu/TabBar.mdx +0 -43
  101. package/src/docs/compsdocs/navmenu/TabBarItem.mdx +0 -29
  102. package/src/docs/compsdocs/navmenu/_category_.json +0 -1
  103. package/src/docs/compsdocs/senior/Lottery.mdx +0 -45
  104. package/src/docs/compsdocs/senior/Modal.mdx +0 -57
  105. package/src/docs/compsdocs/senior/SlotMachine.mdx +0 -49
  106. package/src/docs/compsdocs/senior/_category_.json +0 -1
  107. package/src/docs/compsdocs/show/Calendar.mdx +0 -29
  108. package/src/docs/compsdocs/show/Divider.mdx +0 -31
  109. package/src/docs/compsdocs/show/GraphicCard.mdx +0 -29
  110. package/src/docs/compsdocs/show/Item.mdx +0 -31
  111. package/src/docs/compsdocs/show/ItemList.mdx +0 -48
  112. package/src/docs/compsdocs/show/Media.mdx +0 -25
  113. package/src/docs/compsdocs/show/StatusTip.mdx +0 -25
  114. package/src/docs/compsdocs/show/Swiper.mdx +0 -33
  115. package/src/docs/compsdocs/show/Tabs.mdx +0 -37
  116. package/src/docs/compsdocs/show/_category_.json +0 -1
  117. package/src/docs/compsdocs/show/button.mdx +0 -25
  118. package/src/docs/compsdocs/text/Link.mdx +0 -43
  119. package/src/docs/compsdocs/text/RichTextView.mdx +0 -35
  120. package/src/docs/compsdocs/text/Text.mdx +0 -31
  121. package/src/docs/compsdocs/text/Title.mdx +0 -31
  122. package/src/docs/compsdocs/text/_category_.json +0 -1
  123. package/src/docs/compsdocs/wxOpen/Phone.mdx +0 -59
  124. package/src/docs/compsdocs/wxOpen/Share.mdx +0 -45
  125. package/src/docs/compsdocs/wxOpen/UserInfo.mdx +0 -59
  126. package/src/docs/compsdocs/wxOpen/_category_.json +0 -4
@@ -87,7 +87,7 @@
87
87
 
88
88
  .weda-upload-file-pc .weda-upload-file-pc__btn-descripe {
89
89
  margin-left: 16px;
90
- font-size: 12px;
90
+ font-size: 0.75em;
91
91
  line-height: 20px;
92
92
  color: rgba(0, 0, 0, 0.4);
93
93
  }
@@ -103,13 +103,13 @@
103
103
 
104
104
  .weda-upload-file-pc .weda-upload-file-pc--item {
105
105
  display: flex;
106
- font-size: 14px;
106
+ font-size: 0.875em;
107
107
  }
108
108
 
109
109
  .weda-upload-file-pc .weda-upload-file-pc--item-header {
110
110
  border: 1px solid #e7e7e7;
111
- font-size: 14px;
112
- line-height: 22px;
111
+ font-size: 0.875em;
112
+ line-height: 1.375em;
113
113
  color: rgba(0, 0, 0, 0.4);
114
114
  margin-top: 16px;
115
115
  }
@@ -117,8 +117,8 @@
117
117
  .weda-upload-file-pc .weda-upload-file-pc--item-body {
118
118
  border-left: 1px dashed #e7e7e7;
119
119
  border-right: 1px dashed #e7e7e7;
120
- font-size: 14px;
121
- line-height: 22px;
120
+ font-size: 0.875em;
121
+ line-height: 1.375em;
122
122
  color: rgba(0, 0, 0, 0.9);
123
123
  }
124
124
 
@@ -166,7 +166,7 @@
166
166
  border-color: #dcdcdc;
167
167
  color: rgba(0, 0, 0, 0.9);
168
168
  width: 88px;
169
- font-size: 14px;
169
+ font-size: 0.875em;
170
170
  }
171
171
 
172
172
  .weda-upload-file-pc
@@ -187,8 +187,8 @@
187
187
  .weda-upload-file-pc--item
188
188
  .weda-upload-file-pc--item-action
189
189
  .wedatea2td-btn {
190
- font-size: 14px;
191
- line-height: 22px;
190
+ font-size: 0.875em;
191
+ line-height: 1.375em;
192
192
  color: #0052d9;
193
193
  margin-right: 12px;
194
194
  }
@@ -214,9 +214,9 @@
214
214
  .weda-upload-file-pc
215
215
  .weda-upload-file-pc--item-empty
216
216
  .weda-upload-file-pc--item {
217
- font-size: 14px;
217
+ font-size: 0.875em;
218
218
  color: rgba(0, 0, 0, 0.4);
219
- line-height: 22px;
219
+ line-height: 1.375em;
220
220
  }
221
221
 
222
222
  /* ----上传文件---- h5 */
@@ -236,8 +236,8 @@
236
236
  padding: 0 20px 8px 20px;
237
237
  }
238
238
  .weda-upload-file-mobile .weda-upload-file-mobile__title {
239
- font-size: 14px;
240
- line-height: 20px;
239
+ font-size: 0.875em;
240
+ line-height: 1.25em;
241
241
  color: #000;
242
242
  margin-right: 20px;
243
243
  padding-top: 6px;
@@ -246,18 +246,18 @@
246
246
  .weda-upload-file-mobile .weda-upload-file-mobile__btn--weak {
247
247
  width: 88px;
248
248
  padding: 0 16px;
249
- font-size: 14px;
249
+ font-size: 0.875em;
250
250
  color: rgba(0, 0, 0, 0.9);
251
251
  border: 1px solid #dcdcdc;
252
252
  border-radius: 3px;
253
- line-height: 22px;
253
+ line-height: 1.375em;
254
254
  }
255
255
 
256
256
  .weda-upload-file-mobile .weda-upload-file-mobile__tips {
257
257
  display: block;
258
258
  margin-top: 8px;
259
- font-size: 12px;
260
- line-height: 20px;
259
+ font-size: 0.75em;
260
+ line-height: 1.25em;
261
261
  color: rgba(0, 0, 0, 0.4);
262
262
  }
263
263
 
@@ -331,8 +331,8 @@
331
331
  .weda-upload-file-mobile
332
332
  .weda-upload-file-mobile__item
333
333
  .weda-upload-file-mobile__file-name {
334
- font-size: 14px;
335
- line-height: 22px;
334
+ font-size: 0.875em;
335
+ line-height: 1.375em;
336
336
  color: rgba(0, 0, 0, 0.9);
337
337
  max-width: 6.5rem;
338
338
  overflow: hidden;
@@ -373,16 +373,16 @@
373
373
  .weda-upload-file-mobile__file-status--msg {
374
374
  width: 4.2rem;
375
375
  margin-left: 4px;
376
- font-size: 12px;
377
- line-height: 20px;
376
+ font-size: 0.75em;
377
+ line-height: 1.25em;
378
378
  color: rgba(0, 0, 0, 0.9);
379
379
  }
380
380
 
381
381
  .weda-upload-file-mobile
382
382
  .weda-upload-file-mobile__item
383
383
  .weda-upload-file-mobile__file-foot {
384
- font-size: 12px;
385
- line-height: 20px;
384
+ font-size: 0.75em;
385
+ line-height: 1.25em;
386
386
  color: rgba(0, 0, 0, 0.4);
387
387
  margin-top: 8px;
388
388
  display: flex;
@@ -415,6 +415,7 @@
415
415
  }
416
416
  .weda-upload-file-mobile .weui-uploader-mobile__input {
417
417
  position: absolute;
418
+ font-size: 1em;
418
419
  opacity: 0;
419
420
  width: 92px;
420
421
  height: 32px;
@@ -11,7 +11,6 @@ import {
11
11
  Progress,
12
12
  Tooltip,
13
13
  } from 'tea-component';
14
- import { v4 } from 'uuid';
15
14
  import {
16
15
  filterStrList,
17
16
  isCloudFileID,
@@ -19,6 +18,7 @@ import {
19
18
  transSize,
20
19
  downloadFile,
21
20
  transFileCloudidToName,
21
+ randomUuid,
22
22
  } from '../../../utils/platform';
23
23
  import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
24
24
  import classNames from '../../../utils/classnames';
@@ -78,6 +78,7 @@ export function UploadFileH5({
78
78
  const [fileSizeObj, setFileSizeObj] = React.useState({}); // 管理上传文件大小 {uuid:size}
79
79
  // 两次默认值不同, 需要刷新
80
80
  const prevDefaultRef = React.useRef<any>([]);
81
+ const fileRef = React.useRef(fileIDList);
81
82
  React.useMemo(() => {
82
83
  //有有效默认值时不刷新,解决初次渲染默认值不显示问题
83
84
  if (
@@ -103,7 +104,10 @@ export function UploadFileH5({
103
104
  onChange && onChange(pureFileIDList);
104
105
  events?.change?.({ value: pureFileIDList });
105
106
  }
106
- events?.success?.({ value: pureFileIDList });
107
+ if (!isObjectEqual(fileRef.current, fileIDList)) {
108
+ events?.success?.({ value: pureFileIDList });
109
+ fileRef.current = fileIDList;
110
+ }
107
111
  }, [fileIDList]);
108
112
 
109
113
  // 外层组件类
@@ -206,13 +210,14 @@ export function UploadFileH5({
206
210
  weui.alert(`请上传不超过1024M的文件`);
207
211
  return false;
208
212
  }
209
- fileList.forEach((f) => (f['_uuid'] = v4()));
213
+ fileList.forEach((f) => (f['_uuid'] = randomUuid()));
210
214
  setFileList((list) => [...list, ...fileList]);
211
215
  }}
212
216
  />
213
217
  <a
214
218
  type="weak"
215
219
  className="wedatea2td-btn wedatea2td-btn--weak"
220
+ style={{ fontSize: '1em' }}
216
221
  >
217
222
  点击上传
218
223
  </a>
@@ -381,7 +386,7 @@ const TcbFileUpload = ({
381
386
  try {
382
387
  setStatus('UPLOAD_STATUS_PENDING');
383
388
  const { fileID } = await tcb.uploadFile({
384
- cloudPath: `${uploadPath}/${uuid.replaceAll('-', '')}-${file?.name}`,
389
+ cloudPath: `${uploadPath}/${randomUuid()}-${file?.name}`,
385
390
  filePath: file,
386
391
  onUploadProgress: (progressEvent) => {
387
392
  let percent = 0;
@@ -8,7 +8,6 @@ import {
8
8
  Text,
9
9
  List,
10
10
  } from 'tea-component';
11
- import { v4 } from 'uuid';
12
11
  import {
13
12
  filterStrList,
14
13
  isCloudFileID,
@@ -17,6 +16,7 @@ import {
17
16
  downloadFile,
18
17
  cutFileTitle,
19
18
  transFileCloudidToName,
19
+ randomUuid,
20
20
  } from '../../../utils/platform';
21
21
  import { getCloudInstance, getTempFileURL } from '../../../utils/tcb';
22
22
  import classNames from '../../../utils/classnames';
@@ -75,6 +75,7 @@ export function UploadFilePc({
75
75
  const [fileSizeObj, setFileSizeObj] = React.useState({}); // 管理上传文件大小 {uuid:size}
76
76
  // 两次默认值不同, 需要刷新
77
77
  const prevDefaultRef = React.useRef<any>([]);
78
+ const fileRef = React.useRef(fileIDList);
78
79
  React.useMemo(() => {
79
80
  //有有效默认值时不刷新,解决初次渲染默认值不显示问题
80
81
  if (
@@ -96,11 +97,13 @@ export function UploadFilePc({
96
97
  const file = pureFileIDList[0] || '';
97
98
  onChange?.(file);
98
99
  events?.change?.({ value: file });
99
- events?.success?.({ value: file });
100
100
  } else {
101
101
  onChange?.(pureFileIDList);
102
102
  events?.change?.({ value: pureFileIDList });
103
+ }
104
+ if (!isObjectEqual(fileRef.current, fileIDList)) {
103
105
  events?.success?.({ value: pureFileIDList });
106
+ fileRef.current = fileIDList;
104
107
  }
105
108
  }, [fileIDList]);
106
109
  // 外层组件类
@@ -128,7 +131,7 @@ export function UploadFilePc({
128
131
  } catch (e) {}
129
132
  return false;
130
133
  }
131
- file['_uuid'] = v4();
134
+ file['_uuid'] = randomUuid();
132
135
  setFileList((list) => [...list, file]);
133
136
  return false;
134
137
  };
@@ -352,7 +355,7 @@ const TcbFileUpload = ({ file }: ITcbFileUpload) => {
352
355
  try {
353
356
  setStatus('0');
354
357
  const { fileID } = await tcb.uploadFile({
355
- cloudPath: `${uploadPath}/${uuid.replaceAll('-', '')}-${file?.name}`,
358
+ cloudPath: `${uploadPath}/${randomUuid()}-${file?.name}`,
356
359
  filePath: file,
357
360
  onUploadProgress: (progressEvent) => {
358
361
  let percent = 0;
@@ -81,8 +81,8 @@
81
81
  }
82
82
 
83
83
  .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__title {
84
- font-size: 16px;
85
- line-height: 24px;
84
+ font-size: 1.1428em;
85
+ line-height: 1.71428em;
86
86
  text-align: center;
87
87
  color: rgba(0, 0, 0, 0.9);
88
88
  display: -webkit-box;
@@ -93,8 +93,8 @@
93
93
  }
94
94
 
95
95
  .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__desc {
96
- font-size: 14px;
97
- line-height: 22px;
96
+ font-size: 1em;
97
+ line-height: 1.5714em;
98
98
  color: rgba(0, 0, 0, 0.4);
99
99
  text-align: center;
100
100
  display: -webkit-box;
@@ -105,8 +105,8 @@
105
105
  }
106
106
 
107
107
  .weda-graphic-card .weda-graphic-card__col .weda-graphic-card__btn--text {
108
- font-size: 14px;
109
- line-height: 22px;
108
+ font-size: 1em;
109
+ line-height: 1.5714em;
110
110
  color: #0052d9;
111
111
  margin-right: 8px;
112
112
  }
@@ -22,8 +22,8 @@
22
22
  .weda-list-view__containor .weda-list-view__more .weda-list-view__more-text {
23
23
  padding-top: 10px;
24
24
  padding-bottom: 14px;
25
- font-size: 12px;
26
- line-height: 22px;
25
+ font-size: 0.85714em;
26
+ line-height: 0.85714em;
27
27
  color: rgba(0, 0, 0, 0.4);
28
28
  text-align: center;
29
29
  box-sizing: border-box;
@@ -81,8 +81,8 @@
81
81
  .weda-list-view__containor
82
82
  .weda-list-view__more
83
83
  .weda-list-view__pagination-next {
84
- font-size: 12px;
85
- line-height: 24px;
84
+ font-size: 0.85714em;
85
+ line-height: 1.71428em;
86
86
  color: rgba(0, 0, 0, 0.4);
87
87
  padding: 0 24px;
88
88
  cursor: pointer;
@@ -105,8 +105,8 @@
105
105
  .weda-list-view__pagination-next::after {
106
106
  position: absolute;
107
107
  content: '';
108
- width: 24px;
109
- height: 24px;
108
+ width: 1.71428em;
109
+ height: 1.71428em;
110
110
  top: 10px;
111
111
  opacity: 0.2;
112
112
  background-image: url(arrow-right-line.svg);
@@ -137,7 +137,7 @@
137
137
  .weda-list-view__containor
138
138
  .weda-list-view__more
139
139
  .weda-list-view__pagination-text {
140
- font-size: 12px;
141
- line-height: 22px;
140
+ font-size: 0.85714em;
141
+ line-height: 1.71428em;
142
142
  color: rgba(0, 0, 0, 0.4);
143
143
  }
@@ -3,7 +3,7 @@ import React, { useState, useEffect } from 'react';
3
3
  import { usePlatform } from '../../utils/platform';
4
4
  import classNames from '../../utils/classnames';
5
5
  import './index.css';
6
- import { CommonPropsType } from '../../types';
6
+ import type { CommonPropsType } from '../../types';
7
7
  import { ConfigProvider } from 'tea-component';
8
8
  import LotteryAction from './lotteryUtil';
9
9
 
@@ -156,36 +156,36 @@
156
156
  }
157
157
 
158
158
  .weda-grid-navigation .weda-grid-navigation__col .weda-grid-navigation__icon {
159
- width: 56px;
160
- height: 56px;
159
+ width: 4em;
160
+ height: 4em;
161
161
  }
162
162
  .weda-grid-navigation
163
163
  .weda-grid-navigation__col
164
164
  .weda-grid-navigation__fonticon {
165
- font-size: 56px;
165
+ font-size: 4em;
166
166
  }
167
167
  .weda-grid-navigation
168
168
  .weda-grid-navigation__col--small
169
169
  .weda-grid-navigation__icon {
170
- width: 48px;
171
- height: 48px;
170
+ width: 3.428571em;
171
+ height: 3.428571em;
172
172
  }
173
173
  .weda-grid-navigation
174
174
  .weda-grid-navigation__col--small
175
175
  .weda-grid-navigation__fonticon {
176
- font-size: 48px;
176
+ font-size: 3.428571em;
177
177
  }
178
178
 
179
179
  .weda-grid-navigation
180
180
  .weda-grid-navigation__col--big
181
181
  .weda-grid-navigation__icon {
182
- width: 72px;
183
- height: 72px;
182
+ width: 5.14285em;
183
+ height: 5.14285em;
184
184
  }
185
185
  .weda-grid-navigation
186
186
  .weda-grid-navigation__col--big
187
187
  .weda-grid-navigation__fonticon {
188
- font-size: 72px;
188
+ font-size: 5.14285em;
189
189
  }
190
190
 
191
191
  .weda-grid-navigation .weda-grid-navigation__img {
@@ -194,7 +194,7 @@
194
194
  }
195
195
 
196
196
  .weda-grid-navigation .weda-grid-navigation__col .weda-grid-navigation__text {
197
- font-size: 16px;
197
+ font-size: 1.142857em;
198
198
  /* line-height: 24px; */
199
199
  text-align: center;
200
200
  color: rgba(0, 0, 0, 0.6);
@@ -215,15 +215,15 @@
215
215
  .weda-grid-navigation
216
216
  .weda-grid-navigation__col--small
217
217
  .weda-grid-navigation__text {
218
- font-size: 14px;
219
- line-height: 22px;
218
+ font-size: 1em;
219
+ line-height: 1.5714em;
220
220
  }
221
221
 
222
222
  .weda-grid-navigation
223
223
  .weda-grid-navigation__col--big
224
224
  .weda-grid-navigation__text {
225
- font-size: 20px;
226
- line-height: 28px;
225
+ font-size: 1.42857em;
226
+ line-height: 2em;
227
227
  }
228
228
 
229
229
  /* h5 style */
@@ -280,36 +280,36 @@
280
280
  .weda-grid-navigation-mobile
281
281
  .weda-grid-navigation__col
282
282
  .weda-grid-navigation__icon {
283
- width: 36px;
284
- height: 36px;
283
+ width: 2.57142em;
284
+ height: 2.57142em;
285
285
  }
286
286
  .weda-grid-navigation-mobile
287
287
  .weda-grid-navigation__col
288
288
  .weda-grid-navigation__fonticon {
289
- font-size: 36px;
289
+ font-size: 2.57142em;
290
290
  }
291
291
 
292
292
  .weda-grid-navigation-mobile
293
293
  .weda-grid-navigation__col--small
294
294
  .weda-grid-navigation__icon {
295
- width: 32px;
296
- height: 32px;
295
+ width: 2.285714em;
296
+ height: 2.285714em;
297
297
  }
298
298
  .weda-grid-navigation-mobile
299
299
  .weda-grid-navigation__col--small
300
300
  .weda-grid-navigation__fonticon {
301
- font-size: 32px;
301
+ font-size: 2.285714em;
302
302
  }
303
303
  .weda-grid-navigation-mobile
304
304
  .weda-grid-navigation__col--big
305
305
  .weda-grid-navigation__fonticon {
306
- font-size: 40px;
306
+ font-size: 2.857142em;
307
307
  }
308
308
  .weda-grid-navigation-mobile
309
309
  .weda-grid-navigation__col--big
310
310
  .weda-grid-navigation__icon {
311
- width: 40px;
312
- height: 40px;
311
+ width: 2.85714em;
312
+ height: 2.85714em;
313
313
  }
314
314
  .weda-grid-navigation-mobile
315
315
  .weda-grid-navigation__col
@@ -320,8 +320,8 @@
320
320
  .weda-grid-navigation-mobile
321
321
  .weda-grid-navigation__col--small
322
322
  .weda-grid-navigation__text {
323
- font-size: 12px;
324
- line-height: 20px;
323
+ font-size: 0.85714em;
324
+ line-height: 1.42857em;
325
325
  margin-top: 4px;
326
326
  }
327
327
 
@@ -50,8 +50,8 @@
50
50
  .wedatea2td-menu__title
51
51
  .wedatea2td-menu__title-icon {
52
52
  display: block;
53
- width: 32px;
54
- height: 32px;
53
+ width: 2.28571em;
54
+ height: 2.28571em;
55
55
  margin-right: 12px;
56
56
  }
57
57
 
@@ -60,8 +60,8 @@
60
60
  .weda-menu__menu-content
61
61
  .wedatea2td-menu__title
62
62
  .wedatea2td-h2 {
63
- font-size: 16px;
64
- line-height: 18px;
63
+ font-size: 1.1428571em;
64
+ line-height: 1.28571em;
65
65
  color: #000000;
66
66
  margin-top: 0;
67
67
  font-weight: normal;
@@ -85,8 +85,8 @@
85
85
  .wedatea2td-menu__body
86
86
  .wedatea2td-menu__item
87
87
  .wedatea2td-menu__list-icon {
88
- width: 20px;
89
- height: 20px;
88
+ width: 1.42857em;
89
+ height: 1.42857em;
90
90
  margin-top: 0;
91
91
  }
92
92
 
@@ -96,8 +96,8 @@
96
96
  .wedatea2td-menu__item
97
97
  .wedatea2td-menu__text {
98
98
  font-weight: normal;
99
- font-size: 14px;
100
- line-height: 22px;
99
+ font-size: 1em;
100
+ line-height: 1.5714em;
101
101
  color: rgba(0, 0, 0, 0.9);
102
102
  padding: 0;
103
103
  }
@@ -298,7 +298,7 @@
298
298
 
299
299
  .weda-menu-horizontal .weda-menu__nav .weda-menu__nav-title .weda-menu__title {
300
300
  font-weight: normal;
301
- font-size: 16px;
301
+ font-size: 1.14285em;
302
302
  line-height: 18px;
303
303
  color: #000000;
304
304
  margin-left: 12px;
@@ -410,8 +410,8 @@
410
410
 
411
411
  .weda-menu-horizontal .wedatea2td-dropdown .wedatea2td-dropdown__value {
412
412
  font-weight: 400;
413
- font-size: 14px;
414
- line-height: 22px;
413
+ font-size: 1em;
414
+ line-height: 1.5714em;
415
415
  color: #000000;
416
416
  white-space: nowrap;
417
417
  }
@@ -437,8 +437,8 @@
437
437
  .weda-menu__dropdown
438
438
  .wedatea2td-dropdown__value {
439
439
  font-weight: normal;
440
- font-size: 14px;
441
- line-height: 22px;
440
+ font-size: 1em;
441
+ line-height: 1.5714em;
442
442
  color: #000000;
443
443
  padding: 0;
444
444
  white-space: nowrap;
@@ -450,7 +450,7 @@
450
450
  .wedatea2td-dropdown__header {
451
451
  padding-left: 0;
452
452
  padding-right: 23px;
453
- height: 22px;
453
+ height: 21.5714em;
454
454
  }
455
455
 
456
456
  .weda-menu-horizontal
@@ -515,8 +515,8 @@
515
515
  margin-bottom: 4px;
516
516
  color: rgba(0, 0, 0, 0.9);
517
517
  font-weight: 400;
518
- font-size: 14px;
519
- line-height: 22px;
518
+ font-size: 1em;
519
+ line-height: 1.5714em;
520
520
  }
521
521
 
522
522
  .weda-menu__dropdown-menu-list .weda-menu__dropdown-list-item:last-child {
@@ -543,7 +543,7 @@
543
543
  align-items: center;
544
544
  justify-content: space-between;
545
545
  padding: 0 20px 0 16px;
546
- height: 64px;
546
+ height: 4.5714em;
547
547
  background-color: #fff;
548
548
  position: relative;
549
549
  box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.05);
@@ -557,8 +557,8 @@
557
557
 
558
558
  .weda-menu-mobile .weda-menu__bar-main .weda-menu__main-logo {
559
559
  font-weight: normal;
560
- font-size: 18px;
561
- line-height: 18px;
560
+ font-size: 1.28571em;
561
+ line-height: 1.28571em;
562
562
  color: #000000;
563
563
  text-decoration: none;
564
564
  display: flex;
@@ -566,8 +566,8 @@
566
566
  }
567
567
 
568
568
  .weda-menu-mobile .weda-menu__bar-main .weda-menu__main-icon {
569
- width: 32px;
570
- height: 32px;
569
+ width: 2.2857em;
570
+ height: 2.2857em;
571
571
  margin-right: 12px;
572
572
  }
573
573
 
@@ -579,8 +579,8 @@
579
579
 
580
580
  .weda-menu-mobile .weda-menu__bar-extra .weda-menu__bar-btn,
581
581
  .weda-menu-mobile .weda-menu__bar-extra .weda-menu__bar-btn--close {
582
- width: 24px;
583
- height: 24px;
582
+ width: 1.71428em;
583
+ height: 1.71428em;
584
584
  }
585
585
 
586
586
  .weda-menu__drawer {
@@ -676,8 +676,8 @@
676
676
  .wedatea2td-menu__submenu
677
677
  .wedatea2td-menu__list
678
678
  .wedatea2td-menu__text {
679
- font-size: 16px;
680
- line-height: 20px;
679
+ font-size: 1.14285em;
680
+ line-height: 1.142857em;
681
681
  color: rgba(0, 0, 0, 0.9);
682
682
  padding: 0;
683
683
  max-width: 100%;
@@ -719,7 +719,7 @@
719
719
  .weda-menu__fonticon.lcap-icon,
720
720
  .weda-menu__fonticon.t-icon {
721
721
  margin: 0 4px 0 0;
722
- font-size: 14px;
722
+ font-size: 1em;
723
723
  }
724
724
  .weda-menu__fonticon.lcap-icon:hover {
725
725
  background-color: unset;
@@ -1,3 +1,6 @@
1
+ .weda-RichTextView {
2
+ font-size: 14px;
3
+ }
1
4
  .weda-RichTextView blockquote {
2
5
  margin: 0 0 10px;
3
6
  padding: 15px 20px;
@@ -17,9 +20,10 @@
17
20
  border-radius: 3px;
18
21
  color: #666;
19
22
  font-family: monospace;
20
- font-size: 14px;
21
- font-weight: 400;
22
- line-height: 16px;
23
+ font-size: 1em;
24
+ /* font-weight: 400; */
25
+ font-weight: inherit;
26
+ line-height: 1.14285px;
23
27
  word-wrap: break-word;
24
28
  white-space: pre-wrap;
25
29
  }
@@ -11,7 +11,6 @@
11
11
  align-items: center;
12
12
  background-color: #fff;
13
13
  position: relative;
14
- font-size: 0;
15
14
  white-space: nowrap;
16
15
  border-bottom: 1px solid #eee;
17
16
  overflow-x: auto;
@@ -30,7 +29,7 @@
30
29
  flex-basis: 0;
31
30
  flex-grow: 1;
32
31
  height: 100%;
33
- font-size: 14px;
32
+ font-size: 1em;
34
33
  color: #000;
35
34
  box-sizing: border-box;
36
35
  padding: 0 16px;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import videojs from 'video.js';
3
3
  import 'video.js/dist/video-js.css';
4
4
  import './index.css';
5
- import { usePlatform, isCloudFileID } from '../../utils/platform';
5
+ import { usePlatform, isCloudFileID, isInIde } from '../../utils/platform';
6
6
  import { getTempFileURL } from '../../utils/tcb';
7
7
  import classNames from '../../utils/classnames';
8
8
  import type { CommonPropsType } from '../../types';
@@ -154,9 +154,19 @@ const WedaVideo: React.FC<WedaVideoProps> = ({
154
154
  setVideoErrMsg('');
155
155
  });
156
156
  players.on('error', function () {
157
- setVideoErrMsg(
158
- `视频资源加载出错,错误信息:${players?.error().message}`
159
- );
157
+ let errorMsg = `视频资源加载出错,错误信息:${
158
+ players?.error().message
159
+ }`;
160
+ let pattern = new RegExp('^(((https?)://)|/resources/)[^\\s]+$');
161
+ if (
162
+ isInIde() &&
163
+ !pattern.test(videoDataSource) &&
164
+ !isCloudFileID(videoDataSource)
165
+ ) {
166
+ errorMsg = '请在预览区查看视频效果';
167
+ }
168
+ console.log('player error', errorMsg);
169
+ setVideoErrMsg(errorMsg);
160
170
  setVideoModalStatus(true);
161
171
  });
162
172
  }