bhd-components 0.11.14 → 0.11.15
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/dist/index.esm.es5.development.js +15 -7
- package/dist/index.esm.es5.production.js +1 -1
- package/dist/vendor.esm.es5.development.js +1 -1
- package/dist/vendor.esm.es5.production.js +1 -1
- package/es2017/AIMessageList/components/footer/index.js +12 -4
- package/es2017/AIMessageList/components/footer/index.module.less +3 -0
- package/es2017/AIMessageList/type.d.ts +2 -1
- package/esm/AIMessageList/components/footer/index.js +15 -7
- package/esm/AIMessageList/components/footer/index.module.less +3 -0
- package/esm/AIMessageList/type.d.ts +2 -1
- package/package.json +1 -1
|
@@ -16282,8 +16282,9 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
16282
16282
|
var ctrl = useRef(); //停止生成ai回答时使用
|
|
16283
16283
|
var _useState = _sliced_to_array(useState(""), 2), textValue = _useState[0], setTextValue = _useState[1];
|
|
16284
16284
|
var _useState1 = _sliced_to_array(useState(false), 2), sending = _useState1[0], setSending = _useState1[1];
|
|
16285
|
-
var _useState2 = _sliced_to_array(useState(false), 2),
|
|
16286
|
-
var _useState3 = _sliced_to_array(useState(
|
|
16285
|
+
var _useState2 = _sliced_to_array(useState(false), 2), isFocus = _useState2[0], setIsFocus = _useState2[1];
|
|
16286
|
+
var _useState3 = _sliced_to_array(useState(false), 2), isDisabled = _useState3[0], setIsDisabled = _useState3[1];
|
|
16287
|
+
var _useState4 = _sliced_to_array(useState(true), 2), fileCanSending = _useState4[0], setFileCanSending = _useState4[1]; // 是否允许发送 关联文件
|
|
16287
16288
|
var updateMsgRef = useRef(null);
|
|
16288
16289
|
var canSendMsgRef = useRef(false);
|
|
16289
16290
|
var recordFileList = useRef({
|
|
@@ -16302,7 +16303,7 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
16302
16303
|
// source: undefined,
|
|
16303
16304
|
// },
|
|
16304
16305
|
// });
|
|
16305
|
-
var
|
|
16306
|
+
var _useState5 = _sliced_to_array(useState(null), 2), referencesSource = _useState5[0], setReferencesSource = _useState5[1];
|
|
16306
16307
|
var recordRef = useRef({
|
|
16307
16308
|
value: textValue,
|
|
16308
16309
|
referencesSource: referencesSource,
|
|
@@ -16341,7 +16342,8 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
16341
16342
|
},
|
|
16342
16343
|
setDisabled: function(flag) {
|
|
16343
16344
|
setIsDisabled(flag);
|
|
16344
|
-
}
|
|
16345
|
+
},
|
|
16346
|
+
setIsFocus: setIsFocus
|
|
16345
16347
|
}, fileListRef.current || {});
|
|
16346
16348
|
});
|
|
16347
16349
|
useEffect(function() {
|
|
@@ -16713,12 +16715,12 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
16713
16715
|
}
|
|
16714
16716
|
};
|
|
16715
16717
|
return /*#__PURE__*/ jsxs("div", {
|
|
16716
|
-
className: "".concat(getCls("footer"), " ").concat(className),
|
|
16718
|
+
className: "".concat(getCls("footer"), " ").concat(className, " "),
|
|
16717
16719
|
ref: footerDomRef,
|
|
16718
16720
|
children: [
|
|
16719
16721
|
renderTopContent && renderTopContent(),
|
|
16720
16722
|
/*#__PURE__*/ jsxs("div", {
|
|
16721
|
-
className: "".concat(getCls("footerBody"), " ").concat(judegTextLengthWarn() ? getCls("footerBodyWarn") : ""),
|
|
16723
|
+
className: "".concat(getCls("footerBody"), " ").concat(judegTextLengthWarn() ? getCls("footerBodyWarn") : "", " ").concat(isFocus ? getCls("footerBodyFocus") : ""),
|
|
16722
16724
|
children: [
|
|
16723
16725
|
fileUpload && /*#__PURE__*/ jsx("div", {
|
|
16724
16726
|
className: getCls("footerFile"),
|
|
@@ -16749,7 +16751,13 @@ var Footer = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
16749
16751
|
minRows: 2,
|
|
16750
16752
|
maxRows: 6
|
|
16751
16753
|
},
|
|
16752
|
-
onPressEnter: onPressEnter
|
|
16754
|
+
onPressEnter: onPressEnter,
|
|
16755
|
+
onFocus: function() {
|
|
16756
|
+
setIsFocus(true);
|
|
16757
|
+
},
|
|
16758
|
+
onBlur: function() {
|
|
16759
|
+
setIsFocus(false);
|
|
16760
|
+
}
|
|
16753
16761
|
}, textAreaProps)),
|
|
16754
16762
|
/*#__PURE__*/ jsx(References$1, {
|
|
16755
16763
|
prefix: prefix,
|