@douyinfe/semi-ui 2.15.2-alpha.0 → 2.16.1

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 (53) hide show
  1. package/_base/_story/a11y.jsx +2 -2
  2. package/avatar/__test__/avatar.test.js +3 -3
  3. package/avatar/interface.ts +1 -1
  4. package/button/buttonGroup.tsx +3 -2
  5. package/cascader/index.tsx +5 -1
  6. package/collapsible/_story/collapsible.stories.js +6 -6
  7. package/configProvider/_story/RTLDirection/RTLForm.jsx +1 -1
  8. package/dist/css/semi.css +118 -27
  9. package/dist/css/semi.min.css +1 -1
  10. package/dist/umd/semi-ui.js +582 -465
  11. package/dist/umd/semi-ui.js.map +1 -1
  12. package/dist/umd/semi-ui.min.js +1 -1
  13. package/dist/umd/semi-ui.min.js.map +1 -1
  14. package/iconButton/index.tsx +3 -0
  15. package/lib/cjs/avatar/interface.d.ts +1 -1
  16. package/lib/cjs/button/buttonGroup.d.ts +0 -2
  17. package/lib/cjs/button/buttonGroup.js +4 -3
  18. package/lib/cjs/cascader/index.d.ts +3 -0
  19. package/lib/cjs/cascader/index.js +5 -3
  20. package/lib/cjs/iconButton/index.js +3 -0
  21. package/lib/cjs/radio/radio.js +3 -5
  22. package/lib/cjs/slider/index.d.ts +1 -1
  23. package/lib/cjs/slider/index.js +84 -36
  24. package/lib/cjs/timePicker/TimePicker.js +1 -1
  25. package/lib/cjs/transfer/index.d.ts +5 -0
  26. package/lib/cjs/transfer/index.js +7 -17
  27. package/lib/es/avatar/interface.d.ts +1 -1
  28. package/lib/es/button/buttonGroup.d.ts +0 -2
  29. package/lib/es/button/buttonGroup.js +4 -3
  30. package/lib/es/cascader/index.d.ts +3 -0
  31. package/lib/es/cascader/index.js +5 -3
  32. package/lib/es/iconButton/index.js +3 -0
  33. package/lib/es/radio/radio.js +3 -5
  34. package/lib/es/slider/index.d.ts +1 -1
  35. package/lib/es/slider/index.js +84 -36
  36. package/lib/es/timePicker/TimePicker.js +1 -1
  37. package/lib/es/transfer/index.d.ts +5 -0
  38. package/lib/es/transfer/index.js +7 -17
  39. package/package.json +11 -11
  40. package/radio/_story/radio.stories.js +5 -5
  41. package/radio/radio.tsx +5 -3
  42. package/select/_story/select.stories.js +1 -1
  43. package/select/_story/select.stories.tsx +2 -2
  44. package/slider/_story/slider.stories.js +4 -2
  45. package/slider/index.tsx +63 -33
  46. package/table/_story/Perf/Render/complex.jsx +1 -1
  47. package/table/_story/Perf/Render/resizableSelection.jsx +1 -1
  48. package/tagInput/_story/tagInput.stories.js +2 -2
  49. package/timePicker/TimePicker.tsx +1 -1
  50. package/transfer/_story/transfer.stories.js +29 -0
  51. package/transfer/index.tsx +10 -10
  52. package/upload/__test__/upload.test.js +9 -9
  53. package/upload/_story/upload.stories.js +5 -5
package/slider/index.tsx CHANGED
@@ -51,6 +51,7 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
51
51
  showBoundary: PropTypes.bool,
52
52
  railStyle: PropTypes.object,
53
53
  verticalReverse: PropTypes.bool,
54
+ getAriaValueText: PropTypes.func,
54
55
  } as any;
55
56
 
56
57
  static defaultProps: Partial<SliderProps> = {
@@ -77,7 +78,6 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
77
78
  private maxHanleEl: React.RefObject<HTMLDivElement>;
78
79
  private dragging: boolean[];
79
80
  private eventListenerSet: Set<() => void>;
80
- private chooseMovePos: 'min' | 'max';
81
81
  foundation: SliderFoundation;
82
82
 
83
83
  constructor(props: SliderProps) {
@@ -98,14 +98,14 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
98
98
  isDrag: false,
99
99
  clickValue: 0,
100
100
  showBoundary: false,
101
- isInRenderTree: true
101
+ isInRenderTree: true,
102
+ firstDotFocusVisible: false,
103
+ secondDotFocusVisible: false,
102
104
  };
103
105
  this.sliderEl = React.createRef();
104
106
  this.minHanleEl = React.createRef();
105
107
  this.maxHanleEl = React.createRef();
106
108
  this.dragging = [false, false];
107
- // this.chooseMovePos = 'min';
108
- // this.isDrag = false;
109
109
  this.foundation = new SliderFoundation(this.adapter);
110
110
  this.eventListenerSet = new Set();
111
111
  }
@@ -165,7 +165,6 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
165
165
  },
166
166
  getOverallVars: () => ({
167
167
  dragging: this.dragging,
168
- chooseMovePos: this.chooseMovePos,
169
168
  }),
170
169
  updateDisabled: (disabled: boolean) => {
171
170
  this.setState({ disabled });
@@ -189,8 +188,6 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
189
188
  getMinHandleEl: () => this.minHanleEl,
190
189
  getMaxHandleEl: () => this.maxHanleEl,
191
190
  onHandleDown: (e: React.MouseEvent) => {
192
- e.stopPropagation();
193
- e.preventDefault();
194
191
  this._addEventListener(document.body, 'mousemove', this.foundation.onHandleMove, false);
195
192
  this._addEventListener(document.body, 'mouseup', this.foundation.onHandleUp, false);
196
193
  this._addEventListener(document.body, 'touchmove', this.foundation.onHandleTouchMove, false);
@@ -287,7 +284,7 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
287
284
 
288
285
  renderHandle = () => {
289
286
  const { vertical, range, tooltipVisible, tipFormatter, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, 'aria-valuetext': ariaValueText, getAriaValueText, disabled } = this.props;
290
- const { chooseMovePos, isDrag, isInRenderTree } = this.state;
287
+ const { chooseMovePos, isDrag, isInRenderTree, firstDotFocusVisible, secondDotFocusVisible } = this.state;
291
288
  const stylePos = vertical ? 'top' : 'left';
292
289
  const percentInfo = this.foundation.getMinAndMaxPercent(this.state.currentValue);
293
290
  const minPercent = percentInfo.min;
@@ -307,7 +304,7 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
307
304
  const { min, max, currentValue } = this.state;
308
305
 
309
306
  const commonAria = {
310
- 'aria-label': ariaLabel,
307
+ 'aria-label': ariaLabel ?? (disabled ? 'Disabled Slider' : undefined),
311
308
  'aria-labelledby': ariaLabelledby,
312
309
  'aria-disabled': disabled
313
310
  };
@@ -319,7 +316,7 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
319
316
  position="top"
320
317
  trigger="custom"
321
318
  rePosKey={minPercent}
322
- visible={isInRenderTree && tipVisible.min}
319
+ visible={isInRenderTree && (tipVisible.min || firstDotFocusVisible)}
323
320
  className={`${cssClasses.HANDLE}-tooltip`}
324
321
  >
325
322
  <span
@@ -352,24 +349,32 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
352
349
  onTouchEnd={e => {
353
350
  this.foundation.onHandleUp(e);
354
351
  }}
355
- onFocus={e => this.foundation.onFocus(e, 'min')}
352
+ onKeyDown={(e)=>{
353
+ this.foundation.handleKeyDown(e, 'min');
354
+ }}
355
+ onFocus={e => {
356
+ this.foundation.onFocus(e, 'min');
357
+ }}
358
+ onBlur={(e) => {
359
+ this.foundation.onBlur(e, 'min');
360
+ }}
356
361
  role="slider"
357
- tabIndex={0}
362
+ aria-valuetext={getAriaValueText ? getAriaValueText(currentValue as number, 0) : ariaValueText}
363
+ tabIndex={disabled ? -1 : 0}
358
364
  {...commonAria}
359
365
  aria-valuenow={currentValue as number}
360
366
  aria-valuemax={max}
361
367
  aria-valuemin={min}
362
- aria-valuetext={getAriaValueText ? getAriaValueText(currentValue as number) : ariaValueText}
363
368
  />
364
369
  </Tooltip>
365
370
  ) : (
366
371
  <React.Fragment>
367
- <Tooltip
372
+ <Tooltip
368
373
  content={tipChildren.min}
369
374
  position="top"
370
375
  trigger="custom"
371
376
  rePosKey={minPercent}
372
- visible={isInRenderTree && tipVisible.min}
377
+ visible={isInRenderTree && (tipVisible.min || firstDotFocusVisible)}
373
378
  className={`${cssClasses.HANDLE}-tooltip`}
374
379
  >
375
380
  <span
@@ -401,12 +406,20 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
401
406
  onTouchEnd={e => {
402
407
  this.foundation.onHandleUp(e);
403
408
  }}
404
- onFocus={e => this.foundation.onFocus(e, 'min')}
409
+ onKeyDown={(e)=>{
410
+ this.foundation.handleKeyDown(e, 'min');
411
+ }}
412
+ onFocus={e => {
413
+ this.foundation.onFocus(e, 'min');
414
+ }}
415
+ onBlur={(e) => {
416
+ this.foundation.onBlur(e, 'min');
417
+ }}
405
418
  role="slider"
406
- tabIndex={0}
419
+ tabIndex={disabled ? -1 : 0}
407
420
  {...commonAria}
421
+ aria-valuetext={getAriaValueText ? getAriaValueText(currentValue[0], 0) : ariaValueText}
408
422
  aria-valuenow={currentValue[0]}
409
- aria-valuetext={getAriaValueText ? getAriaValueText(currentValue[0]) : ariaValueText}
410
423
  aria-valuemax={currentValue[1]}
411
424
  aria-valuemin={min}
412
425
  />
@@ -416,7 +429,7 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
416
429
  position="top"
417
430
  trigger="custom"
418
431
  rePosKey={maxPercent}
419
- visible={isInRenderTree && tipVisible.max}
432
+ visible={isInRenderTree && (tipVisible.max || secondDotFocusVisible)}
420
433
  className={`${cssClasses.HANDLE}-tooltip`}
421
434
  >
422
435
  <span
@@ -448,12 +461,20 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
448
461
  onTouchEnd={e => {
449
462
  this.foundation.onHandleUp(e);
450
463
  }}
451
- onFocus={e => this.foundation.onFocus(e, 'min')}
464
+ onKeyDown={e =>{
465
+ this.foundation.handleKeyDown(e, 'max');
466
+ }}
467
+ onFocus={e => {
468
+ this.foundation.onFocus(e, 'max');
469
+ }}
470
+ onBlur={(e) => {
471
+ this.foundation.onBlur(e, 'max');
472
+ }}
452
473
  role="slider"
453
- tabIndex={0}
474
+ tabIndex={disabled ? -1 : 0}
454
475
  {...commonAria}
476
+ aria-valuetext={getAriaValueText ? getAriaValueText(currentValue[1], 1) : ariaValueText}
455
477
  aria-valuenow={currentValue[1]}
456
- aria-valuetext={getAriaValueText ? getAriaValueText(currentValue[1]) : ariaValueText}
457
478
  aria-valuemax={max}
458
479
  aria-valuemin={currentValue[0]}
459
480
  />
@@ -538,29 +559,38 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
538
559
  return labelContent;
539
560
  };
540
561
 
562
+ _getAriaValueText = (value: number, index?: number) => {
563
+ const { getAriaValueText } = this.props;
564
+ return getAriaValueText ? getAriaValueText(value, index) : value;
565
+ }
566
+
541
567
 
542
568
  render() {
569
+ const { disabled, currentValue, min, max } = this.state;
570
+ const { vertical, verticalReverse, style, railStyle, range, className } = this.props;
543
571
  const wrapperClass = cls(
544
572
  `${prefixCls}-wrapper`,
545
573
  {
546
- [`${prefixCls}-disabled`]: this.state.disabled,
547
- [`${cssClasses.VERTICAL}-wrapper`]: this.props.vertical,
548
- [`${prefixCls}-reverse`]: this.props.vertical && this.props.verticalReverse
574
+ [`${prefixCls}-disabled`]: disabled,
575
+ [`${cssClasses.VERTICAL}-wrapper`]: vertical,
576
+ [`${prefixCls}-reverse`]: vertical && verticalReverse
549
577
  },
550
- this.props.className
578
+ className
551
579
  );
552
580
  const boundaryClass = cls(`${prefixCls}-boundary`, {
553
581
  [`${prefixCls}-boundary-show`]: this.props.showBoundary && this.state.showBoundary,
554
582
  });
555
583
  const sliderCls = cls({
556
- [`${prefixCls}`]: !this.props.vertical,
557
- [cssClasses.VERTICAL]: this.props.vertical,
584
+ [`${prefixCls}`]: !vertical,
585
+ [cssClasses.VERTICAL]: vertical,
558
586
  });
587
+ const ariaLabel = range ? `Range: ${this._getAriaValueText(currentValue[0], 0)} to ${this._getAriaValueText(currentValue[1], 1)}` : undefined;
559
588
  const slider = (
560
589
  <div
561
590
  className={wrapperClass}
562
- style={this.props.style}
591
+ style={style}
563
592
  ref={this.sliderEl}
593
+ aria-label={ariaLabel}
564
594
  onMouseEnter={() => this.foundation.handleWrapperEnter()}
565
595
  onMouseLeave={() => this.foundation.handleWrapperLeave()}
566
596
  >
@@ -568,7 +598,7 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
568
598
  <div
569
599
  className={`${prefixCls}-rail`}
570
600
  onClick={this.foundation.handleWrapClick}
571
- style={this.props.railStyle}
601
+ style={railStyle}
572
602
  />
573
603
  }
574
604
  {this.renderTrack()}
@@ -576,12 +606,12 @@ export default class Slider extends BaseComponent<SliderProps, SliderState> {
576
606
  <div>{this.renderHandle()}</div>
577
607
  {this.renderLabel()}
578
608
  <div className={boundaryClass}>
579
- <span className={`${prefixCls}-boundary-min`}>{this.state.min}</span>
580
- <span className={`${prefixCls}-boundary-max`}>{this.state.max}</span>
609
+ <span className={`${prefixCls}-boundary-min`}>{min}</span>
610
+ <span className={`${prefixCls}-boundary-max`}>{max}</span>
581
611
  </div>
582
612
  </div>
583
613
  );
584
- if (!this.props.vertical) {
614
+ if (!vertical) {
585
615
  return <div className={sliderCls}>{slider}</div>;
586
616
  }
587
617
  return slider;
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { Table, Typography, Tag, Popover } from '../../../../index';
4
4
 
5
5
  const { Text } = Typography;
6
- const src = 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg';
6
+ const src = 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg';
7
7
 
8
8
  class App extends React.Component {
9
9
  constructor(props) {
@@ -3,7 +3,7 @@ import React from 'react';
3
3
  import { Table, Typography, Tag, Popover } from '../../../../index';
4
4
 
5
5
  const { Text } = Typography;
6
- const src = 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg';
6
+ const src = 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg';
7
7
 
8
8
  class App extends React.Component {
9
9
  constructor(props) {
@@ -331,7 +331,7 @@ class CustomRender extends React.Component {
331
331
  name: 'semi',
332
332
  email: 'semi@byte.com',
333
333
  avatar:
334
- 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg',
334
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
335
335
  },
336
336
  ],
337
337
  };
@@ -367,7 +367,7 @@ class CustomRender extends React.Component {
367
367
  const item = {};
368
368
  item.name = v.name || v;
369
369
  item.email = `${item.name}@byte.com`;
370
- item.avatar = `https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg`;
370
+ item.avatar = `https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg`;
371
371
  return item;
372
372
  });
373
373
  this.setState({
@@ -248,7 +248,7 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
248
248
  this.timePickerRef.current.contains(e.target as Node);
249
249
  if (!isInTimepicker && !isInPanel) {
250
250
  const clickedOutside = true;
251
- this.foundation.hanldePanelClose(clickedOutside, e);
251
+ this.foundation.handlePanelClose(clickedOutside, e);
252
252
  }
253
253
  };
254
254
  document.addEventListener('mousedown', this.clickOutSideHandler);
@@ -166,6 +166,35 @@ TransferDraggable.story = {
166
166
  name: 'Transfer draggable',
167
167
  };
168
168
 
169
+ export const TransferDraggableAndDisabled = () => {
170
+ const data = Array.from({ length: 30 }, (v, i) => {
171
+ return {
172
+ label: `选项名称 ${i}`,
173
+ value: i,
174
+ key: i,
175
+ disabled: true,
176
+ };
177
+ });
178
+ return (
179
+ <>
180
+ <div>Transfer设置draggable, 并且左侧面板中的选项disabled </div>
181
+ <div>符合预期的行为: 右侧面板hover不会出现删除按钮,因此不可以点击删除,但是可以拖拽 </div>
182
+ <Transfer
183
+ style={{ width: 568, height: 416 }}
184
+ dataSource={data}
185
+ defaultValue={[2, 4]}
186
+ draggable
187
+ onChange={(values, items) => console.log(values, items)}
188
+ />
189
+ </>
190
+ );
191
+ };
192
+
193
+ TransferDraggableAndDisabled.story = {
194
+ name: 'transfer draggable and disabled',
195
+ }
196
+
197
+
169
198
  const ControledTransfer = () => {
170
199
  const [value, setValue] = useState([2, 3]);
171
200
 
@@ -102,6 +102,12 @@ export interface ResolvedDataItem extends DataItem {
102
102
  _optionKey?: string | number;
103
103
  }
104
104
 
105
+ export interface DraggableResolvedDataItem {
106
+ key?: string | number;
107
+ index?: number;
108
+ item?: ResolvedDataItem;
109
+ }
110
+
105
111
  export type DataSource = Array<DataItem> | Array<GroupItem> | Array<TreeItem>;
106
112
 
107
113
  interface HeaderConfig {
@@ -511,12 +517,7 @@ class Transfer extends BaseComponent<TransferProps, TransferState> {
511
517
 
512
518
  renderRightItem(item: ResolvedDataItem): React.ReactNode {
513
519
  const { renderSelectedItem, draggable, type, showPath } = this.props;
514
- let newItem = item;
515
- if (draggable) {
516
- newItem = { ...item, key: item._optionKey };
517
- delete newItem._optionKey;
518
- }
519
- const onRemove = () => this.foundation.handleSelectOrRemove(newItem);
520
+ const onRemove = () => this.foundation.handleSelectOrRemove(item);
520
521
  const rightItemCls = cls({
521
522
  [`${prefixcls}-item`]: true,
522
523
  [`${prefixcls}-right-item`]: true,
@@ -536,7 +537,7 @@ class Transfer extends BaseComponent<TransferProps, TransferState> {
536
537
 
537
538
  return (
538
539
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
539
- <div role="listitem" className={rightItemCls} key={newItem.key}>
540
+ <div role="listitem" className={rightItemCls} key={item.key}>
540
541
  {draggable ? <DragHandle /> : null}
541
542
  <div className={`${prefixcls}-right-item-text`}>{label}</div>
542
543
  <IconClose
@@ -562,14 +563,13 @@ class Transfer extends BaseComponent<TransferProps, TransferState> {
562
563
  renderRightSortableList(selectedData: Array<ResolvedDataItem>) {
563
564
  // when choose some items && draggable is true
564
565
  const SortableItem = SortableElement((
565
- (item: ResolvedDataItem) => this.renderRightItem(item)) as React.FC<ResolvedDataItem>
566
+ (props: DraggableResolvedDataItem) => this.renderRightItem(props.item)) as React.FC<DraggableResolvedDataItem>
566
567
  );
567
568
  const SortableList = SortableContainer(({ items }: { items: Array<ResolvedDataItem> }) => (
568
569
  <div className={`${prefixcls}-right-list`} role="list" aria-label="Selected list">
569
570
  {items.map((item, index: number) => (
570
- // sortableElement will take over the property 'key', so use another '_optionKey' to pass
571
571
  // @ts-ignore skip SortableItem type check
572
- <SortableItem key={item.label} index={index} {...item} _optionKey={item.key} />
572
+ <SortableItem key={item.label} index={index} item={item} />
573
573
  ))}
574
574
  </div>
575
575
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -45,7 +45,7 @@ const defaultFileList = [
45
45
  status: 'success',
46
46
  size: '130KB',
47
47
  preview: true,
48
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/dbf7351bb779433d17c4f50478cf42f7.jpg',
48
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
49
49
  },
50
50
  {
51
51
  uid: '2',
@@ -53,7 +53,7 @@ const defaultFileList = [
53
53
  status: 'uploadFail',
54
54
  size: '222KB',
55
55
  preview: false,
56
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/dbf7351bb779433d17c4f50478cf42f7.jpg',
56
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
57
57
  },
58
58
  ];
59
59
 
@@ -448,7 +448,7 @@ describe('Upload', () => {
448
448
  size: '222KB',
449
449
  preview: true,
450
450
  fileInstance,
451
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/dbf7351bb779433d17c4f50478cf42f7.jpg',
451
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
452
452
  };
453
453
  const props = {
454
454
  fileList: [file],
@@ -502,7 +502,7 @@ describe('Upload', () => {
502
502
  size: '222KB',
503
503
  preview: true,
504
504
  fileInstance,
505
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/dbf7351bb779433d17c4f50478cf42f7.jpg',
505
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
506
506
  };
507
507
  let props = {
508
508
  defaultFileList: [file],
@@ -535,7 +535,7 @@ describe('Upload', () => {
535
535
  status: 'error',
536
536
  size: '222KB',
537
537
  preview: true,
538
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/dbf7351bb779433d17c4f50478cf42f7.jpg',
538
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
539
539
  },
540
540
  ],
541
541
  };
@@ -756,7 +756,7 @@ describe('Upload', () => {
756
756
  status: 'success',
757
757
  size: '130KB',
758
758
  preview: true,
759
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/dbf7351bb779433d17c4f50478cf42f7.jpg',
759
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
760
760
  },
761
761
  ],
762
762
  showReplace: true,
@@ -786,7 +786,7 @@ describe('Upload', () => {
786
786
  status: 'success',
787
787
  size: '130KB',
788
788
  preview: true,
789
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/dbf7351bb779433d17c4f50478cf42f7.jpg',
789
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
790
790
  },
791
791
  ],
792
792
  };
@@ -839,7 +839,7 @@ describe('Upload', () => {
839
839
  status: 'success',
840
840
  size: '130KB',
841
841
  preview: true,
842
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/dbf7351bb779433d17c4f50478cf42f7.jpg',
842
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
843
843
  },
844
844
  ],
845
845
  };
@@ -933,7 +933,7 @@ describe('Upload', () => {
933
933
  name: 'jiafang1.jpeg',
934
934
  status: 'success',
935
935
  size: '130kb',
936
- url: 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg',
936
+ url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
937
937
  },
938
938
  ],
939
939
  showPicInfo: true,
@@ -258,7 +258,7 @@ const defaultFileList = [
258
258
  status: 'success',
259
259
  size: '130kb',
260
260
  url:
261
- 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg',
261
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
262
262
  },
263
263
  {
264
264
  uid: '2',
@@ -266,7 +266,7 @@ const defaultFileList = [
266
266
  status: 'uploadFail',
267
267
  size: '222kb',
268
268
  url:
269
- 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg',
269
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
270
270
  },
271
271
  {
272
272
  uid: '3',
@@ -275,7 +275,7 @@ const defaultFileList = [
275
275
  percent: 50,
276
276
  size: '222kb',
277
277
  url:
278
- 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg',
278
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
279
279
  },
280
280
  {
281
281
  uid: '4',
@@ -284,7 +284,7 @@ const defaultFileList = [
284
284
  validateMessage: '文件过大',
285
285
  size: '222kb',
286
286
  url:
287
- 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg',
287
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
288
288
  },
289
289
  {
290
290
  uid: '5',
@@ -293,7 +293,7 @@ const defaultFileList = [
293
293
  validateMessage: '校验中',
294
294
  size: '222kb',
295
295
  url:
296
- 'https://sf6-cdn-tos.douyinstatic.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bf8647bffab13c38772c9ff94bf91a9d.jpg',
296
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg',
297
297
  },
298
298
  ];
299
299