@zat-design/sisyphus-react 3.4.11-beta.11 → 3.4.11-beta.12
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import "antd/es/upload/style";
|
|
3
3
|
import _Upload from "antd/es/upload";
|
|
4
|
-
import {
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { useRef } from 'react';
|
|
6
6
|
import { DndContext } from '@dnd-kit/core';
|
|
7
7
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
|
@@ -27,9 +27,7 @@ var DragRender = function DragRender(props) {
|
|
|
27
27
|
setFileList = props.setFileList,
|
|
28
28
|
onChange = props.onChange;
|
|
29
29
|
var refReSelect = useRef();
|
|
30
|
-
if (isView) return
|
|
31
|
-
children: "-"
|
|
32
|
-
});
|
|
30
|
+
// if (isView) return <>-</>;
|
|
33
31
|
// 拖拽模式下单个文件可用
|
|
34
32
|
var showDraggerSingleRender = maxCount === 1 && fileList[0];
|
|
35
33
|
/**
|
|
@@ -92,13 +90,13 @@ var DragRender = function DragRender(props) {
|
|
|
92
90
|
onPreview: onPreview
|
|
93
91
|
}), file.status !== 'uploading' && _jsxs("div", {
|
|
94
92
|
className: "file-action-box",
|
|
95
|
-
children: [_jsx("div", {
|
|
93
|
+
children: [!isView && !disabled && _jsx("div", {
|
|
96
94
|
className: "file-name",
|
|
97
95
|
onClick: function onClick() {
|
|
98
96
|
handleReSelect(file);
|
|
99
97
|
},
|
|
100
98
|
children: locale === null || locale === void 0 ? void 0 : (_locale$ProUpload = locale.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.draggerSelect
|
|
101
|
-
}), _jsx("div", {
|
|
99
|
+
}), !isView && !disabled && _jsx("div", {
|
|
102
100
|
className: "file-del",
|
|
103
101
|
onClick: function onClick() {
|
|
104
102
|
handleDelFile(file);
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
-
|
|
4
1
|
.pro-upload {
|
|
5
|
-
.@{ant-prefix}-upload-disabled{
|
|
6
|
-
.file-action-box{
|
|
7
|
-
.file-name, .file-del{
|
|
8
|
-
color: #ccc;
|
|
9
|
-
cursor: not-allowed !important;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
2
|
|
|
14
3
|
.filelist-item-wrapper {
|
|
15
4
|
.file-info-box {
|
|
@@ -33,9 +33,7 @@ var DragRender = function DragRender(props) {
|
|
|
33
33
|
setFileList = props.setFileList,
|
|
34
34
|
onChange = props.onChange;
|
|
35
35
|
var refReSelect = (0, _react.useRef)();
|
|
36
|
-
if (isView) return
|
|
37
|
-
children: "-"
|
|
38
|
-
});
|
|
36
|
+
// if (isView) return <>-</>;
|
|
39
37
|
// 拖拽模式下单个文件可用
|
|
40
38
|
var showDraggerSingleRender = maxCount === 1 && fileList[0];
|
|
41
39
|
/**
|
|
@@ -98,13 +96,13 @@ var DragRender = function DragRender(props) {
|
|
|
98
96
|
onPreview: onPreview
|
|
99
97
|
}), file.status !== 'uploading' && (0, _jsxRuntime.jsxs)("div", {
|
|
100
98
|
className: "file-action-box",
|
|
101
|
-
children: [(0, _jsxRuntime.jsx)("div", {
|
|
99
|
+
children: [!isView && !disabled && (0, _jsxRuntime.jsx)("div", {
|
|
102
100
|
className: "file-name",
|
|
103
101
|
onClick: function onClick() {
|
|
104
102
|
handleReSelect(file);
|
|
105
103
|
},
|
|
106
104
|
children: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProUpload = _locale.default.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.draggerSelect
|
|
107
|
-
}), (0, _jsxRuntime.jsx)("div", {
|
|
105
|
+
}), !isView && !disabled && (0, _jsxRuntime.jsx)("div", {
|
|
108
106
|
className: "file-del",
|
|
109
107
|
onClick: function onClick() {
|
|
110
108
|
handleDelFile(file);
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
-
|
|
4
1
|
.pro-upload {
|
|
5
|
-
.@{ant-prefix}-upload-disabled{
|
|
6
|
-
.file-action-box{
|
|
7
|
-
.file-name, .file-del{
|
|
8
|
-
color: #ccc;
|
|
9
|
-
cursor: not-allowed !important;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
2
|
|
|
14
3
|
.filelist-item-wrapper {
|
|
15
4
|
.file-info-box {
|