@zat-design/sisyphus-react 3.7.2-beta.5 → 3.7.2-beta.6

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.
@@ -18,7 +18,7 @@ var transformRatio = function transformRatio(_ref) {
18
18
  return {
19
19
  normalize: function normalize(value) {
20
20
  if (!value || !value.some(function (item) {
21
- return item;
21
+ return item || item === 0;
22
22
  })) {
23
23
  return {};
24
24
  }
@@ -26,7 +26,7 @@ var transformRatio = function transformRatio(_ref) {
26
26
  },
27
27
  getValueProps: function getValueProps(value) {
28
28
  if (!value || !value.some(function (item) {
29
- return item;
29
+ return item || item === 0;
30
30
  })) {
31
31
  return {
32
32
  value: []
@@ -71,7 +71,7 @@ var ProUpload = /*#__PURE__*/React.forwardRef(function (props, ref) {
71
71
  fieldNames = props.fieldNames,
72
72
  isConfirmDelete = props.isConfirmDelete,
73
73
  residueProps = _objectWithoutProperties(props, _excluded);
74
- var isView = otherProps === null || otherProps === void 0 ? void 0 : otherProps.isView;
74
+ var isView = (props === null || props === void 0 ? void 0 : props.isView) || (otherProps === null || otherProps === void 0 ? void 0 : otherProps.isView);
75
75
  var sensor = useSensor(PointerSensor, {
76
76
  activationConstraint: {
77
77
  distance: 10
@@ -195,6 +195,11 @@ export interface ProUploadProps {
195
195
  */
196
196
  isConfirmDelete?: boolean;
197
197
  id?: string;
198
+ /**
199
+ * @description 查看模式
200
+ * @default false
201
+ */
202
+ isView?: boolean;
198
203
  }
199
204
  export interface DraggableUploadListItemProps {
200
205
  file: UploadFile<any>;
@@ -25,7 +25,7 @@ var transformRatio = function transformRatio(_ref) {
25
25
  return {
26
26
  normalize: function normalize(value) {
27
27
  if (!value || !value.some(function (item) {
28
- return item;
28
+ return item || item === 0;
29
29
  })) {
30
30
  return {};
31
31
  }
@@ -33,7 +33,7 @@ var transformRatio = function transformRatio(_ref) {
33
33
  },
34
34
  getValueProps: function getValueProps(value) {
35
35
  if (!value || !value.some(function (item) {
36
- return item;
36
+ return item || item === 0;
37
37
  })) {
38
38
  return {
39
39
  value: []
@@ -78,7 +78,7 @@ var ProUpload = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
78
78
  fieldNames = props.fieldNames,
79
79
  isConfirmDelete = props.isConfirmDelete,
80
80
  residueProps = (0, _objectWithoutProperties2.default)(props, _excluded);
81
- var isView = otherProps === null || otherProps === void 0 ? void 0 : otherProps.isView;
81
+ var isView = (props === null || props === void 0 ? void 0 : props.isView) || (otherProps === null || otherProps === void 0 ? void 0 : otherProps.isView);
82
82
  var sensor = (0, _core.useSensor)(_core.PointerSensor, {
83
83
  activationConstraint: {
84
84
  distance: 10
@@ -195,6 +195,11 @@ export interface ProUploadProps {
195
195
  */
196
196
  isConfirmDelete?: boolean;
197
197
  id?: string;
198
+ /**
199
+ * @description 查看模式
200
+ * @default false
201
+ */
202
+ isView?: boolean;
198
203
  }
199
204
  export interface DraggableUploadListItemProps {
200
205
  file: UploadFile<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.7.2-beta.5",
3
+ "version": "3.7.2-beta.6",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",