@titaui/pc 1.16.28-beta.6 → 1.16.28-beta.7

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.
@@ -112,6 +112,7 @@ var CommunicationRecord = function CommunicationRecord(_ref) {
112
112
  ref: contentRef
113
113
  }, [undefined, 0].includes(communicationTrack.version) && (0, _openData.parseTag)(communicationTrack.content.trim()), communicationTrack.version === 1 && /*#__PURE__*/_react["default"].createElement(_richEditor["default"], {
114
114
  className: "".concat(prefix, "__editor-preview"),
115
+ placeholder: "",
115
116
  editable: false,
116
117
  showToolbar: false,
117
118
  initialState: communicationTrack.content
@@ -76,6 +76,7 @@ var DynamicAnnouncement = function DynamicAnnouncement(_ref) {
76
76
  ref: contentRef
77
77
  }, [undefined, 0].includes(data.version) && (0, _openData.parseTag)(data.content.trim()), data.version === 1 && /*#__PURE__*/_react["default"].createElement(_richEditor["default"], {
78
78
  className: "".concat(prefix, "__editor-preview"),
79
+ placeholder: "",
79
80
  editable: false,
80
81
  showToolbar: false,
81
82
  initialState: data.content
@@ -59,6 +59,7 @@ function DynamicInterviewShare(_ref) {
59
59
  className: "".concat(preCls, "__text")
60
60
  }, [undefined, 0].includes(version) && (0, _openData.parseTag)(content.trim()), version === 1 && /*#__PURE__*/_react["default"].createElement(_richEditor["default"], {
61
61
  className: "".concat(preCls, "__editor-preview"),
62
+ placeholder: "",
62
63
  editable: false,
63
64
  showToolbar: false,
64
65
  initialState: content
@@ -134,6 +134,7 @@ var DynamicShare = function DynamicShare(_ref) {
134
134
  ref: contentRef
135
135
  }, [undefined, 0].includes(data.version) && (0, _openData.parseTag)(data.content.trim()), data.version === 1 && /*#__PURE__*/_react["default"].createElement(_richEditor["default"], {
136
136
  className: "".concat(prefix, "__editor-preview"),
137
+ placeholder: "",
137
138
  editable: false,
138
139
  showToolbar: false,
139
140
  initialState: data.content
@@ -163,24 +163,7 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
163
163
  return _this.setState({
164
164
  visibility: 3
165
165
  });
166
- } // @ts-ignore
167
-
168
-
169
- var textareaInput = _this.refs.textEditor.refs.textareaInput;
170
- var textareaValue = _this.state.textareaValue;
171
- textareaValue = (0, _index.insertTextAtPointer)(textareaInput, actionValue);
172
- localStorage.setItem(_this.state.localStroageKey, textareaValue); // 输入内容进行本地缓存
173
-
174
- var atAll = !!textareaValue.match(/@\[所有同事:all_members\]/g);
175
-
176
- _this.setState({
177
- textareaValue: textareaValue,
178
- isAllowSubmit: _this.allowSubmit(textareaValue),
179
- isAtAll: atAll,
180
- visibility: atAll ? 1 : _this.state.visibility
181
- }, function () {
182
- _this.focus();
183
- });
166
+ }
184
167
  };
185
168
 
186
169
  _this.onActionsSelectedUserChange = function (users) {
@@ -201,27 +184,18 @@ var MBlog = /*#__PURE__*/function (_PureComponent) {
201
184
  };
202
185
 
203
186
  _this.handlerDealAttachemntData = function (uploadSuccessFilesPath) {
204
- var _this$refs$textEditor2;
205
-
187
+ var attachemntCanSubmit = _this.props.attachemntCanSubmit;
206
188
  var successFilesPath = uploadSuccessFilesPath.filter(function (item) {
207
189
  return item !== '';
208
190
  });
209
- var successFilesPathLen = successFilesPath.length; // @ts-ignore
210
-
211
- var _this$refs$textEditor = (_this$refs$textEditor2 = _this.refs.textEditor) === null || _this$refs$textEditor2 === void 0 ? void 0 : _this$refs$textEditor2.refs,
212
- textareaInput = _this$refs$textEditor.textareaInput;
213
-
214
- var textareaValue = _this.state.textareaValue; // textareaValue = dealWithLoadedFileTips(textareaValue, successFilesPathLen); // 更新输入框内容
215
191
 
216
- localStorage.setItem(_this.state.localStroageKey, textareaValue); // 将输入框内容进行本地缓存
217
-
218
- if (textareaInput) {
219
- textareaInput.focus();
192
+ if (successFilesPath.length > 0 && attachemntCanSubmit) {
193
+ _this.setState({
194
+ isAllowSubmit: true
195
+ });
220
196
  }
221
197
 
222
198
  _this.setState({
223
- textareaValue: textareaValue,
224
- isAllowSubmit: textareaValue.trim().length > 0 && textareaValue.trim().length <= (_this.props.maxLength || 2000) || successFilesPath.length > 0,
225
199
  uploadSuccessFilesPath: successFilesPath,
226
200
  dragFilesList: []
227
201
  });
@@ -619,5 +593,6 @@ MBlog.defaultProps = {
619
593
  isShowRangeDropDown: true,
620
594
  isShowBtnCancel: true,
621
595
  submitStatus: 0,
622
- showUser: false
596
+ showUser: false,
597
+ attachemntCanSubmit: true
623
598
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.16.28-beta.6",
3
+ "version": "1.16.28-beta.7",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",