|
@@ -144,11 +144,15 @@ var Editor = function (_React$Component) {
|
144
|
144
|
_createClass(Editor, [{
|
145
|
145
|
key: "componentDidMount",
|
146
|
146
|
value: function componentDidMount() {
|
147
|
|
- if (this.props.app.currentUser && this.props.app.currentUser.user_id > 0) {
|
148
|
|
- this.props.app.sOssSts();
|
|
147
|
+ var _props = this.props,
|
|
148
|
+ app = _props.app,
|
|
149
|
+ onRef = _props.onRef;
|
|
150
|
+
|
|
151
|
+ if (app.currentUser && (app.currentUser.user_id > 0 || app.currentUser.id > 0)) {
|
|
152
|
+ app.sOssSts();
|
149
|
153
|
}
|
150
|
|
- if ((0, _helper.isFunction)(this.props.onRef)) {
|
151
|
|
- this.props.onRef(this);
|
|
154
|
+ if ((0, _helper.isFunction)(onRef)) {
|
|
155
|
+ onRef(this);
|
152
|
156
|
}
|
153
|
157
|
}
|
154
|
158
|
}, {
|
|
@@ -373,10 +377,10 @@ var Editor = function (_React$Component) {
|
373
|
377
|
}, {
|
374
|
378
|
key: "checkDisabledSubmit",
|
375
|
379
|
value: function checkDisabledSubmit() {
|
376
|
|
- var _props = this.props,
|
377
|
|
- btnDisabled = _props.btnDisabled,
|
378
|
|
- value = _props.value,
|
379
|
|
- fileList = _props.fileList;
|
|
380
|
+ var _props2 = this.props,
|
|
381
|
+ btnDisabled = _props2.btnDisabled,
|
|
382
|
+ value = _props2.value,
|
|
383
|
+ fileList = _props2.fileList;
|
380
|
384
|
|
381
|
385
|
if (btnDisabled) {
|
382
|
386
|
return true;
|
|
@@ -400,24 +404,24 @@ var Editor = function (_React$Component) {
|
400
|
404
|
value: function render() {
|
401
|
405
|
var _this4 = this;
|
402
|
406
|
|
403
|
|
- var _props2 = this.props,
|
404
|
|
- value = _props2.value,
|
405
|
|
- rows = _props2.rows,
|
406
|
|
- showEmoji = _props2.showEmoji,
|
407
|
|
- showUpload = _props2.showUpload,
|
408
|
|
- multiple = _props2.multiple,
|
409
|
|
- emojiPopoverPlacement = _props2.emojiPopoverPlacement,
|
410
|
|
- uploadPopoverPlacement = _props2.uploadPopoverPlacement,
|
411
|
|
- uploadOverlayClassName = _props2.uploadOverlayClassName,
|
412
|
|
- fileList = _props2.fileList,
|
413
|
|
- maxUpload = _props2.maxUpload,
|
414
|
|
- btnLoading = _props2.btnLoading,
|
415
|
|
- button = _props2.button,
|
416
|
|
- emojiToolIcon = _props2.emojiToolIcon,
|
417
|
|
- imageToolIcon = _props2.imageToolIcon,
|
418
|
|
- maxLength = _props2.maxLength,
|
419
|
|
- autoFocus = _props2.autoFocus,
|
420
|
|
- app = _props2.app;
|
|
407
|
+ var _props3 = this.props,
|
|
408
|
+ value = _props3.value,
|
|
409
|
+ rows = _props3.rows,
|
|
410
|
+ showEmoji = _props3.showEmoji,
|
|
411
|
+ showUpload = _props3.showUpload,
|
|
412
|
+ multiple = _props3.multiple,
|
|
413
|
+ emojiPopoverPlacement = _props3.emojiPopoverPlacement,
|
|
414
|
+ uploadPopoverPlacement = _props3.uploadPopoverPlacement,
|
|
415
|
+ uploadOverlayClassName = _props3.uploadOverlayClassName,
|
|
416
|
+ fileList = _props3.fileList,
|
|
417
|
+ maxUpload = _props3.maxUpload,
|
|
418
|
+ btnLoading = _props3.btnLoading,
|
|
419
|
+ button = _props3.button,
|
|
420
|
+ emojiToolIcon = _props3.emojiToolIcon,
|
|
421
|
+ imageToolIcon = _props3.imageToolIcon,
|
|
422
|
+ maxLength = _props3.maxLength,
|
|
423
|
+ autoFocus = _props3.autoFocus,
|
|
424
|
+ app = _props3.app;
|
421
|
425
|
|
422
|
426
|
var placeholder = this.props.placeholder || _reactIntlUniversal2.default.get("editor.placeholder");
|
423
|
427
|
var btnSubmitText = this.props.btnSubmitText || _reactIntlUniversal2.default.get("editor.SubmitBtn");
|