assui 2.0.62 → 2.0.66
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.
- package/es/single-img-upload/index.js +8 -4
- package/es/single-img-upload/style/index.css +5 -0
- package/es/single-img-upload/style/index.less +6 -0
- package/lib/single-img-upload/index.js +8 -4
- package/lib/single-img-upload/style/index.css +5 -0
- package/lib/single-img-upload/style/index.less +6 -0
- package/package.json +3 -3
|
@@ -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
|
-
|
|
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:
|
|
192
|
+
className: classNames('as-img-upload-button', {
|
|
193
|
+
'init-disable': disabled
|
|
194
|
+
})
|
|
191
195
|
}, children)));
|
|
192
196
|
};
|
|
193
197
|
|
|
@@ -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
|
-
|
|
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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.66",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@ahooksjs/use-url-state": "^2.5.8",
|
|
34
34
|
"@tinymce/tinymce-react": "^3.13.0",
|
|
35
35
|
"@types/react-beautiful-dnd": "^13.1.2",
|
|
36
|
-
"a-icons": "^1.0.
|
|
36
|
+
"a-icons": "^1.0.37",
|
|
37
37
|
"ahooks": "^3.0.8",
|
|
38
38
|
"bignumber.js": "^9.0.1",
|
|
39
39
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"node": ">=10.0.0"
|
|
70
70
|
},
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "f3684aed76a06a3eb00f7ceef5c45038bddf0593"
|
|
73
73
|
}
|