bhd-components 0.11.17 → 0.11.19

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.
@@ -102,6 +102,9 @@ const Footer = /*#__PURE__*/ forwardRef((props, ref)=>{
102
102
  setDisabled: (flag)=>{
103
103
  setIsDisabled(flag);
104
104
  },
105
+ getDisabled: ()=>{
106
+ return recordDisabled.current;
107
+ },
105
108
  setIsFocus
106
109
  }, fileListRef.current || {});
107
110
  });
@@ -182,6 +185,9 @@ const Footer = /*#__PURE__*/ forwardRef((props, ref)=>{
182
185
  if (!fileCanSending) {
183
186
  flag = false;
184
187
  }
188
+ if (recordDisabled.current) {
189
+ flag = false;
190
+ }
185
191
  canSendMsgRef.current = flag;
186
192
  return flag;
187
193
  }, [
@@ -205,7 +211,7 @@ const Footer = /*#__PURE__*/ forwardRef((props, ref)=>{
205
211
  const renderBtn = ()=>{
206
212
  let sendNode = /*#__PURE__*/ _jsx(SendBtn, {
207
213
  prefix: prefix,
208
- canSendMsg: canSendMsg && !isDisabled,
214
+ canSendMsg: canSendMsg,
209
215
  sending: sending,
210
216
  canStopMessage: canStopMessage,
211
217
  stopMessage: ()=>{
@@ -143,11 +143,18 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
143
143
  return item;
144
144
  });
145
145
  });
146
+ recordRef.current.dataSource = recordRef.current.dataSource.map((item)=>{
147
+ if (item.id == id) {
148
+ return _object_spread({}, item, obj);
149
+ }
150
+ return item;
151
+ });
146
152
  },
147
153
  clearInputing () {
148
154
  setDataSource((data)=>{
149
155
  return data.filter((item)=>item.id !== "inputing");
150
156
  });
157
+ recordRef.current.dataSource = recordRef.current.dataSource.filter((item)=>item.id !== "inputing");
151
158
  },
152
159
  recordMsg: (msg)=>{
153
160
  onRecordMessage(msg);
@@ -164,9 +171,16 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
164
171
  return item;
165
172
  });
166
173
  });
174
+ recordRef.current.dataSource = recordRef.current.dataSource.map((item)=>{
175
+ if (item.id == id) {
176
+ return _object_spread({}, item, obj);
177
+ }
178
+ return item;
179
+ });
167
180
  },
168
181
  changeDataSource: (data)=>{
169
182
  setDataSource(data);
183
+ recordRef.current.dataSource = data;
170
184
  },
171
185
  scrollToBottom,
172
186
  setSendingId: (id)=>{
@@ -75,6 +75,7 @@
75
75
  gap: 16px;
76
76
  font-size: 14px;
77
77
  color: rgba(0, 0, 0, 0.25);
78
+ white-space: nowrap;
78
79
  &:before {
79
80
  content: "";
80
81
  display: block;
@@ -218,6 +218,7 @@ export interface footerRefProps {
218
218
  stopMessage: () => void; //停止发送消息
219
219
  setReferences: (reference: referenceType) => void; // 添加引用
220
220
  setDisabled: (flag: boolean) => void;// 设置是否禁用发送按钮
221
+ getDisabled:()=>boolean;// 获取是否禁用发送安装的状态
221
222
  setIsFocus: (flag: boolean) => void;//设置是否聚焦
222
223
  }
223
224
 
@@ -106,6 +106,9 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
106
106
  setDisabled: function(flag) {
107
107
  setIsDisabled(flag);
108
108
  },
109
+ getDisabled: function() {
110
+ return recordDisabled.current;
111
+ },
109
112
  setIsFocus: setIsFocus
110
113
  }, fileListRef.current || {});
111
114
  });
@@ -186,6 +189,9 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
186
189
  if (!fileCanSending) {
187
190
  flag = false;
188
191
  }
192
+ if (recordDisabled.current) {
193
+ flag = false;
194
+ }
189
195
  canSendMsgRef.current = flag;
190
196
  return flag;
191
197
  }, [
@@ -209,7 +215,7 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
209
215
  var renderBtn = function() {
210
216
  var sendNode = /*#__PURE__*/ _jsx(SendBtn, {
211
217
  prefix: prefix,
212
- canSendMsg: canSendMsg && !isDisabled,
218
+ canSendMsg: canSendMsg,
213
219
  sending: sending,
214
220
  canStopMessage: canStopMessage,
215
221
  stopMessage: function() {
@@ -149,6 +149,12 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
149
149
  return item;
150
150
  });
151
151
  });
152
+ recordRef.current.dataSource = recordRef.current.dataSource.map(function(item) {
153
+ if (item.id == id) {
154
+ return _object_spread({}, item, obj);
155
+ }
156
+ return item;
157
+ });
152
158
  },
153
159
  clearInputing: function clearInputing() {
154
160
  setDataSource(function(data) {
@@ -156,6 +162,9 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
156
162
  return item.id !== "inputing";
157
163
  });
158
164
  });
165
+ recordRef.current.dataSource = recordRef.current.dataSource.filter(function(item) {
166
+ return item.id !== "inputing";
167
+ });
159
168
  },
160
169
  recordMsg: function(msg) {
161
170
  onRecordMessage(msg);
@@ -172,9 +181,16 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
172
181
  return item;
173
182
  });
174
183
  });
184
+ recordRef.current.dataSource = recordRef.current.dataSource.map(function(item) {
185
+ if (item.id == id) {
186
+ return _object_spread({}, item, obj);
187
+ }
188
+ return item;
189
+ });
175
190
  },
176
191
  changeDataSource: function(data) {
177
192
  setDataSource(data);
193
+ recordRef.current.dataSource = data;
178
194
  },
179
195
  scrollToBottom: scrollToBottom,
180
196
  setSendingId: function(id) {
@@ -75,6 +75,7 @@
75
75
  gap: 16px;
76
76
  font-size: 14px;
77
77
  color: rgba(0, 0, 0, 0.25);
78
+ white-space: nowrap;
78
79
  &:before {
79
80
  content: "";
80
81
  display: block;
@@ -218,6 +218,7 @@ export interface footerRefProps {
218
218
  stopMessage: () => void; //停止发送消息
219
219
  setReferences: (reference: referenceType) => void; // 添加引用
220
220
  setDisabled: (flag: boolean) => void;// 设置是否禁用发送按钮
221
+ getDisabled:()=>boolean;// 获取是否禁用发送安装的状态
221
222
  setIsFocus: (flag: boolean) => void;//设置是否聚焦
222
223
  }
223
224
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bhd-components",
3
- "version": "0.11.17",
3
+ "version": "0.11.19",
4
4
  "description": "组件功能描述",
5
5
  "config": {
6
6
  "commitizen": {