assui 2.0.62 → 2.0.63

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.
@@ -79,7 +79,8 @@ var SingleImgUpload = function SingleImgUpload(props) {
79
79
  onDeleteUpload = props.onDeleteUpload,
80
80
  onSuccess = props.onSuccess,
81
81
  onError = props.onError,
82
- restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onSuccess", "onError"]);
82
+ disabled = props.disabled,
83
+ restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onSuccess", "onError", "disabled"]);
83
84
 
84
85
  var uploadInstanceRef = React.useRef();
85
86
  var fileRef = React.useRef();
@@ -173,7 +174,7 @@ var SingleImgUpload = function SingleImgUpload(props) {
173
174
  wrapperClassName: "as-img-upload-preview",
174
175
  src: fileUrl,
175
176
  preview: true
176
- }), /*#__PURE__*/React.createElement("div", {
177
+ }), !disabled && /*#__PURE__*/React.createElement("div", {
177
178
  className: "as-img-upload-close-button",
178
179
  onClick: handleDeleteUpload
179
180
  }, /*#__PURE__*/React.createElement(CloseOutlined, null))), /*#__PURE__*/React.createElement(Upload, __assign({
@@ -185,9 +186,12 @@ var SingleImgUpload = function SingleImgUpload(props) {
185
186
  onStart: handleStart,
186
187
  onProgress: handleProgress,
187
188
  onError: handleError,
188
- onSuccess: handleSuccess
189
+ onSuccess: handleSuccess,
190
+ disabled: disabled
189
191
  }, restProps), uploadStatus === 'init' && /*#__PURE__*/React.createElement("div", {
190
- className: "as-img-upload-button"
192
+ className: classNames('as-img-upload-button', {
193
+ 'init-disable': disabled
194
+ })
191
195
  }, children)));
192
196
  };
193
197
 
@@ -72,3 +72,8 @@
72
72
  color: #fff;
73
73
  text-align: center;
74
74
  }
75
+ .init-disable {
76
+ color: rgba(0, 0, 0, 0.25);
77
+ background-color: #f5f5f5;
78
+ cursor: not-allowed;
79
+ }
@@ -83,3 +83,9 @@
83
83
  }
84
84
  }
85
85
  }
86
+
87
+ .init-disable {
88
+ color: rgba(0, 0, 0, 25%);
89
+ background-color: #f5f5f5;
90
+ cursor: not-allowed;
91
+ }
@@ -130,7 +130,8 @@ var SingleImgUpload = function SingleImgUpload(props) {
130
130
  onDeleteUpload = props.onDeleteUpload,
131
131
  onSuccess = props.onSuccess,
132
132
  onError = props.onError,
133
- restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onSuccess", "onError"]);
133
+ disabled = props.disabled,
134
+ restProps = __rest(props, ["className", "wrapperClassName", "children", "value", "onStart", "onDeleteUpload", "onSuccess", "onError", "disabled"]);
134
135
 
135
136
  var uploadInstanceRef = React.useRef();
136
137
  var fileRef = React.useRef();
@@ -224,7 +225,7 @@ var SingleImgUpload = function SingleImgUpload(props) {
224
225
  wrapperClassName: "as-img-upload-preview",
225
226
  src: fileUrl,
226
227
  preview: true
227
- }), React.createElement("div", {
228
+ }), !disabled && React.createElement("div", {
228
229
  className: "as-img-upload-close-button",
229
230
  onClick: handleDeleteUpload
230
231
  }, React.createElement(CloseOutlined_1["default"], null))), React.createElement(rc_upload_1["default"], __assign({
@@ -236,9 +237,12 @@ var SingleImgUpload = function SingleImgUpload(props) {
236
237
  onStart: handleStart,
237
238
  onProgress: handleProgress,
238
239
  onError: handleError,
239
- onSuccess: handleSuccess
240
+ onSuccess: handleSuccess,
241
+ disabled: disabled
240
242
  }, restProps), uploadStatus === 'init' && React.createElement("div", {
241
- className: "as-img-upload-button"
243
+ className: classnames_1["default"]('as-img-upload-button', {
244
+ 'init-disable': disabled
245
+ })
242
246
  }, children)));
243
247
  };
244
248
 
@@ -72,3 +72,8 @@
72
72
  color: #fff;
73
73
  text-align: center;
74
74
  }
75
+ .init-disable {
76
+ color: rgba(0, 0, 0, 0.25);
77
+ background-color: #f5f5f5;
78
+ cursor: not-allowed;
79
+ }
@@ -83,3 +83,9 @@
83
83
  }
84
84
  }
85
85
  }
86
+
87
+ .init-disable {
88
+ color: rgba(0, 0, 0, 25%);
89
+ background-color: #f5f5f5;
90
+ cursor: not-allowed;
91
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "2.0.62",
3
+ "version": "2.0.63",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -69,5 +69,5 @@
69
69
  "node": ">=10.0.0"
70
70
  },
71
71
  "license": "MIT",
72
- "gitHead": "2ee8b7e4d9b2f91d13298759edfa6af397446ae5"
72
+ "gitHead": "593e64a7fcdee78cc19f89e122d08d6fdc36fc21"
73
73
  }