@titaui/pc 1.13.2-beta.20 → 1.13.2-beta.23

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.
@@ -358,7 +358,7 @@ var DialogQQDocs = function DialogQQDocs(_ref) {
358
358
  };
359
359
 
360
360
  function createCheckListData(list) {
361
- return list.map(function (docItem) {
361
+ return list.map(function (docItem, i) {
362
362
  return _objectSpread({
363
363
  component: /*#__PURE__*/_react["default"].createElement(_filePreview["default"], {
364
364
  onClickTitle: function onClickTitle() {
@@ -368,7 +368,8 @@ var DialogQQDocs = function DialogQQDocs(_ref) {
368
368
  secondTitle: isSearch ? docItem.lastModifyTime : docItem.createTime,
369
369
  type: docItem.type
370
370
  }),
371
- isFolder: docItem.type === _filePreview.DocType.FOLDER
371
+ isFolder: docItem.type === _filePreview.DocType.FOLDER,
372
+ checked: checkListData[i] && checkListData[i].checked
372
373
  }, docItem);
373
374
  });
374
375
  } // 文件列表数据更新后,同步更新 checkListData
@@ -398,7 +399,12 @@ var DialogQQDocs = function DialogQQDocs(_ref) {
398
399
  var onChangeCheckBoxListHandler = (0, _react.useCallback)(function (dataList, idx, item) {
399
400
  // 判断点击的是否是文件夹
400
401
  if (item.isFolder) {
401
- // 如果是在搜索模式下,缓存搜索内容,清空搜索框
402
+ setCheckListData(checkListData.map(function (item) {
403
+ return _objectSpread(_objectSpread({}, item), {}, {
404
+ checked: false
405
+ });
406
+ })); // 如果是在搜索模式下,缓存搜索内容,清空搜索框
407
+
402
408
  if (searchContent) {
403
409
  catchSearchContent = searchContent;
404
410
  setSearchContent('');
@@ -409,7 +415,7 @@ var DialogQQDocs = function DialogQQDocs(_ref) {
409
415
  }
410
416
 
411
417
  setCheckListData(dataList);
412
- }, [changeNavPath]);
418
+ }, [changeNavPath, checkListData]);
413
419
  var onSearchHandler = (0, _react.useCallback)(function (e) {
414
420
  if (searchContent === e) return; // 清空搜索后,恢复到搜索前的状态
415
421
 
@@ -74,7 +74,7 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
74
74
  return _doc["default"];
75
75
  }
76
76
 
77
- if (/^(xls|xlsx)$/.test(fileType.toLowerCase())) {
77
+ if (/^(xls|xlsx|sheet)$/.test(fileType.toLowerCase())) {
78
78
  return _xls["default"];
79
79
  }
80
80
 
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>文件夹-icon</title>
4
+ <defs>
5
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
6
+ <stop stop-color="#FFC03F" offset="0%"></stop>
7
+ <stop stop-color="#E69F00" offset="100%"></stop>
8
+ </linearGradient>
9
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
10
+ <stop stop-color="#FFDCA4" offset="0%"></stop>
11
+ <stop stop-color="#FFB112" offset="100%"></stop>
12
+ </linearGradient>
13
+ <filter x="-34.5%" y="-70.4%" width="169.1%" height="240.7%" filterUnits="objectBoundingBox" id="filter-3">
14
+ <feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
15
+ <feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
16
+ <feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.521568627 0 0 0 0 0 0 0 0 0.8 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
17
+ <feMerge>
18
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
19
+ <feMergeNode in="SourceGraphic"></feMergeNode>
20
+ </feMerge>
21
+ </filter>
22
+ </defs>
23
+ <g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
24
+ <g id="附件图标" transform="translate(-121.000000, -2257.000000)">
25
+ <g id="caret-left" transform="translate(100.000000, 2236.000000)">
26
+ <g id="文件夹-icon" transform="translate(21.000000, 21.451613)">
27
+ <rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
28
+ <g id="编组-2" transform="translate(3.000000, 4.000000)">
29
+ <path d="M15.9650836,2 L6,2 L8.77205113,6.06216846 C9.14163521,6.6037576 9.75321174,6.92979558 10.408869,6.93477353 L19,7 L19,7 L19,5.05359586 C19,3.3506359 17.6240805,2 15.9650836,2 Z" id="路径" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
30
+ <path d="M6.04598201,0 L2.57236384,0 C1.15168652,0 0,1.16658056 0,2.60563061 L0,16.3943694 C0,17.8334194 1.15168652,19 2.57236384,19 L19.4259356,19 C20.1081689,19 20.7624597,18.725479 21.2448715,18.2368285 C21.7272833,17.7481779 21.9982995,17.0854256 21.9982995,16.3943694 L22,7.44078957 L21.9889926,7.20659221 C21.8694704,5.89527292 20.7924377,4.86679244 19.4711935,4.84814641 L10.8954901,4.77831357 L8.46091772,1.49939662 C7.94002451,0.624382478 7.06938277,0 6.04598201,0 Z" id="路径" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
31
+ <g id="编组-22" filter="url(#filter-3)" transform="translate(5.439785, 9.493548)">
32
+ <path d="M0.7,4 L6.3,4 C6.68659932,4 7,4.31340068 7,4.7 C7,5.08659932 6.68659932,5.4 6.3,5.4 L0.7,5.4 C0.313400675,5.4 4.73447626e-17,5.08659932 0,4.7 C-4.73447626e-17,4.31340068 0.313400675,4 0.7,4 Z" id="path-5" fill="#FFDA9E" transform="translate(3.500000, 4.700000) rotate(-180.000000) translate(-3.500000, -4.700000) "></path>
33
+ <path d="M0.7,0 L10.3,0 C10.6865993,-1.82039446e-16 11,0.313400675 11,0.7 C11,1.08659932 10.6865993,1.4 10.3,1.4 L0.7,1.4 C0.313400675,1.4 4.73447626e-17,1.08659932 0,0.7 C-4.73447626e-17,0.313400675 0.313400675,7.10171439e-17 0.7,0 Z" id="path-5" fill="#FFFFFF" transform="translate(5.500000, 0.700000) rotate(-180.000000) translate(-5.500000, -0.700000) "></path>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </g>
39
+ </g>
40
+ </svg>
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>PPT-icon</title>
4
+ <defs>
5
+ <linearGradient x1="100%" y1="29.7818714%" x2="83.6208606%" y2="29.7818714%" id="linearGradient-1">
6
+ <stop stop-color="#F0A326" offset="0%"></stop>
7
+ <stop stop-color="#D68500" offset="100%"></stop>
8
+ </linearGradient>
9
+ <linearGradient x1="50%" y1="99.3480785%" x2="50%" y2="-1.36175793e-14%" id="linearGradient-2">
10
+ <stop stop-color="#F0A326" offset="0%"></stop>
11
+ <stop stop-color="#FFDA9E" offset="100%"></stop>
12
+ </linearGradient>
13
+ <filter x="-31.6%" y="-43.3%" width="163.2%" height="186.7%" filterUnits="objectBoundingBox" id="filter-3">
14
+ <feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
15
+ <feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
16
+ <feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.521568627 0 0 0 0 0 0 0 0 1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
17
+ <feMerge>
18
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
19
+ <feMergeNode in="SourceGraphic"></feMergeNode>
20
+ </feMerge>
21
+ </filter>
22
+ </defs>
23
+ <g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
24
+ <g id="附件图标" transform="translate(-121.000000, -2469.000000)">
25
+ <g id="caret-left" transform="translate(100.000000, 2448.000000)">
26
+ <g id="PPT-icon" transform="translate(21.000000, 21.000000)">
27
+ <rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
28
+ <path d="M8.08888889,7.67741935 L23.6444445,7.67741935 C24.503554,7.67741935 25.2,8.3455386 25.2,9.16970547 L25.2,23.3464236 C25.2,24.1705905 24.503554,24.8387097 23.6444445,24.8387097 L8.08888889,24.8387097 C7.22977928,24.8387097 6.53333333,24.1705905 6.53333333,23.3464236 L6.53333333,9.16970547 C6.53333333,8.3455386 7.22977928,7.67741935 8.08888889,7.67741935 Z" id="蒙版备份" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
29
+ <path d="M20.291358,2.25806452 C21.1313763,2.25806452 21.8123456,2.93204446 21.8123456,3.76344086 L21.8123456,23.3333334 C21.8123456,24.1647298 22.493315,24.8387097 23.3333333,24.8387097 L4.32098765,24.8387097 C3.48096937,24.8387097 2.8,24.1647298 2.8,23.3333334 L2.8,3.76344086 C2.8,2.93204446 3.48096937,2.25806452 4.32098765,2.25806452 L20.291358,2.25806452 Z" id="path-3" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
30
+ <g id="编组-22" filter="url(#filter-3)" transform="translate(6.747309, 8.548387)">
31
+ <path d="M0.31629509,5.451829 L4.91629509,5.451829 C5.30289442,5.451829 5.61629509,5.76522967 5.61629509,6.151829 C5.61629509,6.53842832 5.30289442,6.851829 4.91629509,6.851829 L0.31629509,6.851829 C-0.0703042345,6.851829 -0.38370491,6.53842832 -0.38370491,6.151829 C-0.38370491,5.76522967 -0.0703042345,5.451829 0.31629509,5.451829 Z" id="path-5" fill="#FFDA9E" transform="translate(2.616295, 6.151829) rotate(-135.000000) translate(-2.616295, -6.151829) "></path>
32
+ <path d="M2.83675324,3.68406204 L12.4367532,3.68406204 C12.8233526,3.68406204 13.1367532,3.99746272 13.1367532,4.38406204 C13.1367532,4.77066137 12.8233526,5.08406204 12.4367532,5.08406204 L2.83675324,5.08406204 C2.45015391,5.08406204 2.13675324,4.77066137 2.13675324,4.38406204 C2.13675324,3.99746272 2.45015391,3.68406204 2.83675324,3.68406204 Z" id="path-5" fill="#FFFFFF" transform="translate(7.636753, 4.384062) rotate(-225.000000) translate(-7.636753, -4.384062) "></path>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </svg>
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>pdf-icon</title>
4
+ <defs>
5
+ <linearGradient x1="100%" y1="29.7818714%" x2="83.6208606%" y2="29.7818714%" id="linearGradient-1">
6
+ <stop stop-color="#33C7FF" offset="0%"></stop>
7
+ <stop stop-color="#009FDB" offset="100%"></stop>
8
+ </linearGradient>
9
+ <linearGradient x1="50%" y1="100%" x2="50%" y2="-2.48949813e-15%" id="linearGradient-2">
10
+ <stop stop-color="#12AFEA" offset="0%"></stop>
11
+ <stop stop-color="#94E2FF" offset="100%"></stop>
12
+ </linearGradient>
13
+ <filter x="-33.2%" y="-40.4%" width="166.4%" height="180.9%" filterUnits="objectBoundingBox" id="filter-3">
14
+ <feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
15
+ <feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
16
+ <feColorMatrix values="0 0 0 0 0.0705882353 0 0 0 0 0.68627451 0 0 0 0 0.917647059 0 0 0 0.8 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
17
+ <feMerge>
18
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
19
+ <feMergeNode in="SourceGraphic"></feMergeNode>
20
+ </feMerge>
21
+ </filter>
22
+ </defs>
23
+ <g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
24
+ <g id="附件图标" transform="translate(-121.000000, -2045.000000)">
25
+ <g id="caret-left" transform="translate(100.000000, 2024.000000)">
26
+ <g id="pdf-icon" transform="translate(21.000000, 21.451613)">
27
+ <rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
28
+ <path d="M8.08888889,7.67741935 L23.6444445,7.67741935 C24.503554,7.67741935 25.2,8.3455386 25.2,9.16970547 L25.2,23.3464236 C25.2,24.1705905 24.503554,24.8387097 23.6444445,24.8387097 L8.08888889,24.8387097 C7.22977928,24.8387097 6.53333333,24.1705905 6.53333333,23.3464236 L6.53333333,9.16970547 C6.53333333,8.3455386 7.22977928,7.67741935 8.08888889,7.67741935 Z" id="蒙版备份" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
29
+ <path d="M20.291358,2.25806452 C21.1313763,2.25806452 21.8123456,2.93204446 21.8123456,3.76344086 L21.8123456,23.3333334 C21.8123456,24.1647298 22.493315,24.8387097 23.3333333,24.8387097 L4.32098765,24.8387097 C3.48096937,24.8387097 2.8,24.1647298 2.8,23.3333334 L2.8,3.76344086 C2.8,2.93204446 3.48096937,2.25806452 4.32098765,2.25806452 L20.291358,2.25806452 Z" id="path-3" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
30
+ <g id="编组-22" filter="url(#filter-3)" transform="translate(6.000000, 8.798387)">
31
+ <path d="M7.13978495,4 L10.7397849,4 C11.1263843,4 11.4397849,4.31340068 11.4397849,4.7 C11.4397849,5.08659932 11.1263843,5.4 10.7397849,5.4 L7.13978495,5.4 C6.75318562,5.4 6.43978495,5.08659932 6.43978495,4.7 C6.43978495,4.31340068 6.75318562,4 7.13978495,4 Z" id="path-5" fill="#88DFFF" transform="translate(8.939785, 4.700000) rotate(-180.000000) translate(-8.939785, -4.700000) "></path>
32
+ <path d="M2.80326654,4 C3.08544089,4 3.34002538,4.16942267 3.44897952,4.42971358 C4.42734177,6.76701638 5.41282979,7.91043659 6.29653021,7.99493445 L6.40207871,8 L10.7,8 C11.0865993,8 11.4,8.31340068 11.4,8.7 C11.4,9.05438271 11.1366564,9.34725823 10.7949859,9.39360983 L10.7,9.4 L6.40207871,9.4 C4.9177844,9.4 3.65980532,8.17244898 2.53985234,5.8267506 L2.343,5.4 L0.7,5.4 C0.345617286,5.4 0.0527417698,5.13665638 0.00639017493,4.79498585 L0,4.7 C0,4.34561729 0.263343623,4.05274177 0.605014146,4.00639017 L0.7,4 L2.80326654,4 Z" id="路径-2" fill="#FFFFFF" fill-rule="nonzero"></path>
33
+ <path d="M2.80326654,0 C3.08544089,0 3.34002538,0.169422665 3.44897952,0.429713581 C4.42734177,2.76701638 5.41282979,3.91043659 6.29653021,3.99493445 L6.40207871,4 L10.7,4 C11.0865993,4 11.4,4.31340068 11.4,4.7 C11.4,5.05438271 11.1366564,5.34725823 10.7949859,5.39360983 L10.7,5.4 L6.40207871,5.4 C4.9177844,5.4 3.65980532,4.17244898 2.53985234,1.8267506 L2.343,1.4 L0.7,1.4 C0.345617286,1.4 0.0527417698,1.13665638 0.00639017493,0.794985854 L0,0.7 C0,0.345617286 0.263343623,0.0527417698 0.605014146,0.00639017493 L0.7,0 L2.80326654,0 Z" id="路径-2" fill="#FFFFFF" fill-rule="nonzero" transform="translate(5.700000, 2.700000) scale(1, -1) translate(-5.700000, -2.700000) "></path>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </g>
39
+ </svg>
@@ -19,6 +19,12 @@ var _newFileListVideo = _interopRequireDefault(require("./img/new-file-list-vide
19
19
 
20
20
  var _newFileListXls = _interopRequireDefault(require("./img/new-file-list-xls.svg"));
21
21
 
22
+ var _folder = _interopRequireDefault(require("./img/folder.svg"));
23
+
24
+ var _form = _interopRequireDefault(require("./img/form.svg"));
25
+
26
+ var _mind = _interopRequireDefault(require("./img/mind.svg"));
27
+
22
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
29
 
24
30
  var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
@@ -36,7 +42,7 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
36
42
  } else if (/^(avi|wmv|mov|mp4|rmvb)$/.test(fileType.toLowerCase())) {
37
43
  fileImg = _newFileListVideo["default"];
38
44
  backGroundColor = "#F5E6FF";
39
- } else if (/^(pptx|ppt)$/.test(fileType.toLowerCase())) {
45
+ } else if (/^(pptx|ppt|slide)$/.test(fileType.toLowerCase())) {
40
46
  fileImg = _newFileListPpt["default"];
41
47
  backGroundColor = "#FFF5E6";
42
48
  canPreview = true;
@@ -44,7 +50,7 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
44
50
  fileImg = _newFileListDoc["default"];
45
51
  backGroundColor = "#E6F0FF";
46
52
  canPreview = true;
47
- } else if (/^(xls|xlsx)$/.test(fileType.toLowerCase())) {
53
+ } else if (/^(xls|xlsx|sheet)$/.test(fileType.toLowerCase())) {
48
54
  fileImg = _newFileListXls["default"];
49
55
  backGroundColor = "#E6FFF5";
50
56
  canPreview = true;
@@ -52,6 +58,18 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
52
58
  fileImg = _newFileListPdf["default"];
53
59
  backGroundColor = "#FFE7E6";
54
60
  canPreview = true;
61
+ } else if (/^(folder)$/.test(fileType.toLowerCase())) {
62
+ fileImg = _folder["default"];
63
+ backGroundColor = "#FFF5E6";
64
+ canPreview = true;
65
+ } else if (/^(form)$/.test(fileType.toLowerCase())) {
66
+ fileImg = _form["default"];
67
+ backGroundColor = "#FFF5E6";
68
+ canPreview = true;
69
+ } else if (/^(mind)$/.test(fileType.toLowerCase())) {
70
+ fileImg = _mind["default"];
71
+ backGroundColor = "#E6F8FF";
72
+ canPreview = true;
55
73
  } else {
56
74
  fileImg = _newFileListOther["default"];
57
75
  backGroundColor = "#E6FCFF";
@@ -1,32 +1,32 @@
1
- .file-preview {
1
+ .files-preview {
2
2
  display: flex;
3
3
  position: relative;
4
4
  }
5
5
 
6
- .file-preview > * + * {
6
+ .files-preview > * + * {
7
7
  margin-left: 10px;
8
8
  }
9
9
 
10
- .file-preview__cover {
10
+ .files-preview__cover {
11
11
  width: 36px;
12
12
  height: 36px;
13
13
  flex-shrink: 0;
14
14
  }
15
15
 
16
- .file-preview__cover__img {
16
+ .files-preview__cover__img {
17
17
  width: 100%;
18
18
  height: 100%;
19
19
  object-fit: cover;
20
20
  object-position: center;
21
21
  }
22
22
 
23
- .file-preview__content {
23
+ .files-preview__content {
24
24
  display: flex;
25
25
  width: calc(100% - 36px);
26
26
  flex-direction: column;
27
27
  }
28
28
 
29
- .file-preview__title {
29
+ .files-preview__title {
30
30
  max-width: 100%;
31
31
  font-size: 14px;
32
32
  font-weight: 400;
@@ -37,7 +37,7 @@
37
37
  width: max-content;
38
38
  }
39
39
 
40
- .file-preview__secondTitle {
40
+ .files-preview__secondTitle {
41
41
  font-size: 12px;
42
42
  font-weight: 400;
43
43
  color: #89919F;
@@ -29,7 +29,7 @@ exports.DocType = DocType;
29
29
  DocType["FOLDER"] = "folder";
30
30
  })(DocType || (exports.DocType = DocType = {}));
31
31
 
32
- var preCls = 'file-preview';
32
+ var preCls = 'files-preview';
33
33
 
34
34
  var FilePreview = function FilePreview(_ref) {
35
35
  var title = _ref.title,
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>文件夹-icon</title>
4
+ <defs>
5
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
6
+ <stop stop-color="#FFC03F" offset="0%"></stop>
7
+ <stop stop-color="#E69F00" offset="100%"></stop>
8
+ </linearGradient>
9
+ <linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-2">
10
+ <stop stop-color="#FFDCA4" offset="0%"></stop>
11
+ <stop stop-color="#FFB112" offset="100%"></stop>
12
+ </linearGradient>
13
+ <filter x="-34.5%" y="-70.4%" width="169.1%" height="240.7%" filterUnits="objectBoundingBox" id="filter-3">
14
+ <feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
15
+ <feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
16
+ <feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.521568627 0 0 0 0 0 0 0 0 0.8 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
17
+ <feMerge>
18
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
19
+ <feMergeNode in="SourceGraphic"></feMergeNode>
20
+ </feMerge>
21
+ </filter>
22
+ </defs>
23
+ <g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
24
+ <g id="附件图标" transform="translate(-121.000000, -2257.000000)">
25
+ <g id="caret-left" transform="translate(100.000000, 2236.000000)">
26
+ <g id="文件夹-icon" transform="translate(21.000000, 21.451613)">
27
+ <rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
28
+ <g id="编组-2" transform="translate(3.000000, 4.000000)">
29
+ <path d="M15.9650836,2 L6,2 L8.77205113,6.06216846 C9.14163521,6.6037576 9.75321174,6.92979558 10.408869,6.93477353 L19,7 L19,7 L19,5.05359586 C19,3.3506359 17.6240805,2 15.9650836,2 Z" id="路径" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
30
+ <path d="M6.04598201,0 L2.57236384,0 C1.15168652,0 0,1.16658056 0,2.60563061 L0,16.3943694 C0,17.8334194 1.15168652,19 2.57236384,19 L19.4259356,19 C20.1081689,19 20.7624597,18.725479 21.2448715,18.2368285 C21.7272833,17.7481779 21.9982995,17.0854256 21.9982995,16.3943694 L22,7.44078957 L21.9889926,7.20659221 C21.8694704,5.89527292 20.7924377,4.86679244 19.4711935,4.84814641 L10.8954901,4.77831357 L8.46091772,1.49939662 C7.94002451,0.624382478 7.06938277,0 6.04598201,0 Z" id="路径" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
31
+ <g id="编组-22" filter="url(#filter-3)" transform="translate(5.439785, 9.493548)">
32
+ <path d="M0.7,4 L6.3,4 C6.68659932,4 7,4.31340068 7,4.7 C7,5.08659932 6.68659932,5.4 6.3,5.4 L0.7,5.4 C0.313400675,5.4 4.73447626e-17,5.08659932 0,4.7 C-4.73447626e-17,4.31340068 0.313400675,4 0.7,4 Z" id="path-5" fill="#FFDA9E" transform="translate(3.500000, 4.700000) rotate(-180.000000) translate(-3.500000, -4.700000) "></path>
33
+ <path d="M0.7,0 L10.3,0 C10.6865993,-1.82039446e-16 11,0.313400675 11,0.7 C11,1.08659932 10.6865993,1.4 10.3,1.4 L0.7,1.4 C0.313400675,1.4 4.73447626e-17,1.08659932 0,0.7 C-4.73447626e-17,0.313400675 0.313400675,7.10171439e-17 0.7,0 Z" id="path-5" fill="#FFFFFF" transform="translate(5.500000, 0.700000) rotate(-180.000000) translate(-5.500000, -0.700000) "></path>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </g>
39
+ </g>
40
+ </svg>
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>PPT-icon</title>
4
+ <defs>
5
+ <linearGradient x1="100%" y1="29.7818714%" x2="83.6208606%" y2="29.7818714%" id="linearGradient-1">
6
+ <stop stop-color="#F0A326" offset="0%"></stop>
7
+ <stop stop-color="#D68500" offset="100%"></stop>
8
+ </linearGradient>
9
+ <linearGradient x1="50%" y1="99.3480785%" x2="50%" y2="-1.36175793e-14%" id="linearGradient-2">
10
+ <stop stop-color="#F0A326" offset="0%"></stop>
11
+ <stop stop-color="#FFDA9E" offset="100%"></stop>
12
+ </linearGradient>
13
+ <filter x="-31.6%" y="-43.3%" width="163.2%" height="186.7%" filterUnits="objectBoundingBox" id="filter-3">
14
+ <feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
15
+ <feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
16
+ <feColorMatrix values="0 0 0 0 0.839215686 0 0 0 0 0.521568627 0 0 0 0 0 0 0 0 1 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
17
+ <feMerge>
18
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
19
+ <feMergeNode in="SourceGraphic"></feMergeNode>
20
+ </feMerge>
21
+ </filter>
22
+ </defs>
23
+ <g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
24
+ <g id="附件图标" transform="translate(-121.000000, -2469.000000)">
25
+ <g id="caret-left" transform="translate(100.000000, 2448.000000)">
26
+ <g id="PPT-icon" transform="translate(21.000000, 21.000000)">
27
+ <rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
28
+ <path d="M8.08888889,7.67741935 L23.6444445,7.67741935 C24.503554,7.67741935 25.2,8.3455386 25.2,9.16970547 L25.2,23.3464236 C25.2,24.1705905 24.503554,24.8387097 23.6444445,24.8387097 L8.08888889,24.8387097 C7.22977928,24.8387097 6.53333333,24.1705905 6.53333333,23.3464236 L6.53333333,9.16970547 C6.53333333,8.3455386 7.22977928,7.67741935 8.08888889,7.67741935 Z" id="蒙版备份" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
29
+ <path d="M20.291358,2.25806452 C21.1313763,2.25806452 21.8123456,2.93204446 21.8123456,3.76344086 L21.8123456,23.3333334 C21.8123456,24.1647298 22.493315,24.8387097 23.3333333,24.8387097 L4.32098765,24.8387097 C3.48096937,24.8387097 2.8,24.1647298 2.8,23.3333334 L2.8,3.76344086 C2.8,2.93204446 3.48096937,2.25806452 4.32098765,2.25806452 L20.291358,2.25806452 Z" id="path-3" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
30
+ <g id="编组-22" filter="url(#filter-3)" transform="translate(6.747309, 8.548387)">
31
+ <path d="M0.31629509,5.451829 L4.91629509,5.451829 C5.30289442,5.451829 5.61629509,5.76522967 5.61629509,6.151829 C5.61629509,6.53842832 5.30289442,6.851829 4.91629509,6.851829 L0.31629509,6.851829 C-0.0703042345,6.851829 -0.38370491,6.53842832 -0.38370491,6.151829 C-0.38370491,5.76522967 -0.0703042345,5.451829 0.31629509,5.451829 Z" id="path-5" fill="#FFDA9E" transform="translate(2.616295, 6.151829) rotate(-135.000000) translate(-2.616295, -6.151829) "></path>
32
+ <path d="M2.83675324,3.68406204 L12.4367532,3.68406204 C12.8233526,3.68406204 13.1367532,3.99746272 13.1367532,4.38406204 C13.1367532,4.77066137 12.8233526,5.08406204 12.4367532,5.08406204 L2.83675324,5.08406204 C2.45015391,5.08406204 2.13675324,4.77066137 2.13675324,4.38406204 C2.13675324,3.99746272 2.45015391,3.68406204 2.83675324,3.68406204 Z" id="path-5" fill="#FFFFFF" transform="translate(7.636753, 4.384062) rotate(-225.000000) translate(-7.636753, -4.384062) "></path>
33
+ </g>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </svg>
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="28px" height="28px" viewBox="0 0 28 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <title>pdf-icon</title>
4
+ <defs>
5
+ <linearGradient x1="100%" y1="29.7818714%" x2="83.6208606%" y2="29.7818714%" id="linearGradient-1">
6
+ <stop stop-color="#33C7FF" offset="0%"></stop>
7
+ <stop stop-color="#009FDB" offset="100%"></stop>
8
+ </linearGradient>
9
+ <linearGradient x1="50%" y1="100%" x2="50%" y2="-2.48949813e-15%" id="linearGradient-2">
10
+ <stop stop-color="#12AFEA" offset="0%"></stop>
11
+ <stop stop-color="#94E2FF" offset="100%"></stop>
12
+ </linearGradient>
13
+ <filter x="-33.2%" y="-40.4%" width="166.4%" height="180.9%" filterUnits="objectBoundingBox" id="filter-3">
14
+ <feOffset dx="0" dy="0.8" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
15
+ <feGaussianBlur stdDeviation="0.4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
16
+ <feColorMatrix values="0 0 0 0 0.0705882353 0 0 0 0 0.68627451 0 0 0 0 0.917647059 0 0 0 0.8 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
17
+ <feMerge>
18
+ <feMergeNode in="shadowMatrixOuter1"></feMergeNode>
19
+ <feMergeNode in="SourceGraphic"></feMergeNode>
20
+ </feMerge>
21
+ </filter>
22
+ </defs>
23
+ <g id="老图标" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
24
+ <g id="附件图标" transform="translate(-121.000000, -2045.000000)">
25
+ <g id="caret-left" transform="translate(100.000000, 2024.000000)">
26
+ <g id="pdf-icon" transform="translate(21.000000, 21.451613)">
27
+ <rect id="矩形" x="0" y="0" width="28" height="27.0967742"></rect>
28
+ <path d="M8.08888889,7.67741935 L23.6444445,7.67741935 C24.503554,7.67741935 25.2,8.3455386 25.2,9.16970547 L25.2,23.3464236 C25.2,24.1705905 24.503554,24.8387097 23.6444445,24.8387097 L8.08888889,24.8387097 C7.22977928,24.8387097 6.53333333,24.1705905 6.53333333,23.3464236 L6.53333333,9.16970547 C6.53333333,8.3455386 7.22977928,7.67741935 8.08888889,7.67741935 Z" id="蒙版备份" fill="url(#linearGradient-1)" fill-rule="nonzero"></path>
29
+ <path d="M20.291358,2.25806452 C21.1313763,2.25806452 21.8123456,2.93204446 21.8123456,3.76344086 L21.8123456,23.3333334 C21.8123456,24.1647298 22.493315,24.8387097 23.3333333,24.8387097 L4.32098765,24.8387097 C3.48096937,24.8387097 2.8,24.1647298 2.8,23.3333334 L2.8,3.76344086 C2.8,2.93204446 3.48096937,2.25806452 4.32098765,2.25806452 L20.291358,2.25806452 Z" id="path-3" fill="url(#linearGradient-2)" fill-rule="nonzero"></path>
30
+ <g id="编组-22" filter="url(#filter-3)" transform="translate(6.000000, 8.798387)">
31
+ <path d="M7.13978495,4 L10.7397849,4 C11.1263843,4 11.4397849,4.31340068 11.4397849,4.7 C11.4397849,5.08659932 11.1263843,5.4 10.7397849,5.4 L7.13978495,5.4 C6.75318562,5.4 6.43978495,5.08659932 6.43978495,4.7 C6.43978495,4.31340068 6.75318562,4 7.13978495,4 Z" id="path-5" fill="#88DFFF" transform="translate(8.939785, 4.700000) rotate(-180.000000) translate(-8.939785, -4.700000) "></path>
32
+ <path d="M2.80326654,4 C3.08544089,4 3.34002538,4.16942267 3.44897952,4.42971358 C4.42734177,6.76701638 5.41282979,7.91043659 6.29653021,7.99493445 L6.40207871,8 L10.7,8 C11.0865993,8 11.4,8.31340068 11.4,8.7 C11.4,9.05438271 11.1366564,9.34725823 10.7949859,9.39360983 L10.7,9.4 L6.40207871,9.4 C4.9177844,9.4 3.65980532,8.17244898 2.53985234,5.8267506 L2.343,5.4 L0.7,5.4 C0.345617286,5.4 0.0527417698,5.13665638 0.00639017493,4.79498585 L0,4.7 C0,4.34561729 0.263343623,4.05274177 0.605014146,4.00639017 L0.7,4 L2.80326654,4 Z" id="路径-2" fill="#FFFFFF" fill-rule="nonzero"></path>
33
+ <path d="M2.80326654,0 C3.08544089,0 3.34002538,0.169422665 3.44897952,0.429713581 C4.42734177,2.76701638 5.41282979,3.91043659 6.29653021,3.99493445 L6.40207871,4 L10.7,4 C11.0865993,4 11.4,4.31340068 11.4,4.7 C11.4,5.05438271 11.1366564,5.34725823 10.7949859,5.39360983 L10.7,5.4 L6.40207871,5.4 C4.9177844,5.4 3.65980532,4.17244898 2.53985234,1.8267506 L2.343,1.4 L0.7,1.4 C0.345617286,1.4 0.0527417698,1.13665638 0.00639017493,0.794985854 L0,0.7 C0,0.345617286 0.263343623,0.0527417698 0.605014146,0.00639017493 L0.7,0 L2.80326654,0 Z" id="路径-2" fill="#FFFFFF" fill-rule="nonzero" transform="translate(5.700000, 2.700000) scale(1, -1) translate(-5.700000, -2.700000) "></path>
34
+ </g>
35
+ </g>
36
+ </g>
37
+ </g>
38
+ </g>
39
+ </svg>
@@ -108,7 +108,9 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
108
108
  var onChange = _this.props.onChange;
109
109
  var fileInput = _this.refs.fileInput;
110
110
 
111
- _this.changeDialogUploadTypeVidible();
111
+ _this.setState({
112
+ dialogUploadTypeVidible: false
113
+ });
112
114
 
113
115
  if (onChange) onChange(e); // @ts-ignore
114
116
 
@@ -446,7 +448,7 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
446
448
  _this$props4$showFile = _this$props4.showFileList,
447
449
  showFileList = _this$props4$showFile === void 0 ? true : _this$props4$showFile;
448
450
  var attachmentPreviewUrl = _this.state.attachmentPreviewUrl;
449
- if (!list.length || !showFileList) return;
451
+ if (!list.length || !showFileList) return '';
450
452
  return /*#__PURE__*/_react["default"].createElement(_Portals["default"], {
451
453
  domNode: attachmentPreviewBox,
452
454
  className: "uploadFile__preview__list"
@@ -471,7 +473,9 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
471
473
  e.nativeEvent.stopImmediatePropagation();
472
474
 
473
475
  if (openTencentDocFile) {
474
- _this.changeDialogUploadTypeVidible();
476
+ _this.setState({
477
+ dialogUploadTypeVidible: true
478
+ });
475
479
 
476
480
  return;
477
481
  }
@@ -482,18 +486,15 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
482
486
  }
483
487
  };
484
488
 
485
- _this.changeDialogQQDocsVidible = function () {
489
+ _this.hideDialogQQDocsVidible = function () {
486
490
  _this.setState({
487
- dialogQQDocsVidible: !_this.state.dialogQQDocsVidible
491
+ dialogQQDocsVidible: false
488
492
  });
489
493
  };
490
494
 
491
- _this.changeDialogUploadTypeVidible = function () {
492
- _this.setState(function (_ref) {
493
- var dialogUploadTypeVidible = _ref.dialogUploadTypeVidible;
494
- return {
495
- dialogUploadTypeVidible: !dialogUploadTypeVidible
496
- };
495
+ _this.hideDialogUploadTypeVidible = function () {
496
+ _this.setState({
497
+ dialogUploadTypeVidible: false
497
498
  });
498
499
  };
499
500
 
@@ -583,9 +584,10 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
583
584
  uploadSuccessFiles: newUploadSuccessFiles
584
585
  });
585
586
 
586
- _this.changeDialogUploadTypeVidible();
587
-
588
- _this.changeDialogQQDocsVidible();
587
+ _this.setState({
588
+ dialogQQDocsVidible: false,
589
+ dialogUploadTypeVidible: false
590
+ });
589
591
 
590
592
  onSubmit(newUploadSuccessFiles.map(function (item) {
591
593
  return item.DfsPath;
@@ -676,12 +678,12 @@ var Upload = /*#__PURE__*/function (_PureComponent) {
676
678
  onSelectLocal: this.onSelectLocalFife,
677
679
  onSelectQQDocs: this.onShowDialogQQDocs,
678
680
  visible: dialogUploadTypeVidible,
679
- onClose: this.changeDialogUploadTypeVidible
681
+ onClose: this.hideDialogUploadTypeVidible
680
682
  }), /*#__PURE__*/_react["default"].createElement(_dialogQqDocs["default"], {
681
- fileNumLimit: fileNumLimit,
683
+ fileNumLimit: (fileNumLimit || 20) - uploadSuccessFiles.length,
682
684
  defaultQQDocsData: defaultQQDocsData,
683
685
  visible: dialogQQDocsVidible,
684
- onClose: this.changeDialogQQDocsVidible,
686
+ onClose: this.hideDialogQQDocsVidible,
685
687
  onSubmit: this.onSelectQQDocsFileHandler
686
688
  }), disableTooltip ? uploadFormContainer : /*#__PURE__*/_react["default"].createElement(_titaUi.Tooltip, {
687
689
  container: document.body,
@@ -19,6 +19,12 @@ var _video = _interopRequireDefault(require("./img/video.svg"));
19
19
 
20
20
  var _xls = _interopRequireDefault(require("./img/xls.svg"));
21
21
 
22
+ var _folder = _interopRequireDefault(require("./img/folder.svg"));
23
+
24
+ var _form = _interopRequireDefault(require("./img/form.svg"));
25
+
26
+ var _mind = _interopRequireDefault(require("./img/mind.svg"));
27
+
22
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
29
 
24
30
  var getFileSize = function getFileSize(fileSize) {
@@ -61,7 +67,7 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
61
67
  return _video["default"];
62
68
  }
63
69
 
64
- if (/^(pptx|ppt)$/.test(fileType.toLowerCase())) {
70
+ if (/^(pptx|ppt|slide)$/.test(fileType.toLowerCase())) {
65
71
  return _ppt["default"];
66
72
  }
67
73
 
@@ -69,7 +75,7 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
69
75
  return _doc["default"];
70
76
  }
71
77
 
72
- if (/^(xls|xlsx)$/.test(fileType.toLowerCase())) {
78
+ if (/^(xls|xlsx|sheet)$/.test(fileType.toLowerCase())) {
73
79
  return _xls["default"];
74
80
  }
75
81
 
@@ -77,6 +83,18 @@ var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
77
83
  return _pdf["default"];
78
84
  }
79
85
 
86
+ if (/^(folder)$/.test(fileType.toLowerCase())) {
87
+ return _folder["default"];
88
+ }
89
+
90
+ if (/^(form)$/.test(fileType.toLowerCase())) {
91
+ return _form["default"];
92
+ }
93
+
94
+ if (/^(mind)$/.test(fileType.toLowerCase())) {
95
+ return _mind["default"];
96
+ }
97
+
80
98
  return _other["default"];
81
99
  };
82
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.13.2-beta.20",
3
+ "version": "1.13.2-beta.23",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",