bhd-components 0.11.22 → 0.11.24
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.css +158 -158
- package/dist/index.esm.es5.development.js +23 -2
- package/dist/index.esm.es5.production.css +1 -1
- 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/virtuosoList/index.js +22 -1
- package/es2017/AIMessageList/components/virtuosoList/index.module.less +22 -19
- package/es2017/AIMessageList/type.d.ts +1 -1
- package/esm/AIMessageList/components/virtuosoList/index.js +22 -1
- package/esm/AIMessageList/components/virtuosoList/index.module.less +22 -19
- package/esm/AIMessageList/type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -383,6 +383,7 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
|
+
let actionNode = renderAction("node", item);
|
|
386
387
|
// 是否显示时间
|
|
387
388
|
let itemNode = /*#__PURE__*/ _jsx("div", {
|
|
388
389
|
className: `${getCls("msgItem")} ${item.location === "left" ? getCls("msgItem-left") : getCls("msgItem-right")} ${isLast ? getCls("msgItem-last") : ""}`,
|
|
@@ -406,7 +407,7 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
406
407
|
}),
|
|
407
408
|
item.location === "left" && renderAction("floatBottom", item),
|
|
408
409
|
renderReference(item),
|
|
409
|
-
renderItemBottom && renderItemBottom(item)
|
|
410
|
+
renderItemBottom && renderItemBottom(item, actionNode)
|
|
410
411
|
]
|
|
411
412
|
})
|
|
412
413
|
});
|
|
@@ -593,6 +594,26 @@ const VirtuosoList = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
593
594
|
}
|
|
594
595
|
}
|
|
595
596
|
let index = recordRef.current.dataSource.findIndex((ite)=>ite.id == item.id);
|
|
597
|
+
if (location === "node") {
|
|
598
|
+
if (item.id !== "helloMsg" && item.id !== "inputing") {
|
|
599
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
600
|
+
className: `${getCls("msgItem-action")}`,
|
|
601
|
+
children: [
|
|
602
|
+
/*#__PURE__*/ _jsx("div", {
|
|
603
|
+
className: `${getCls("msgItem-action-left")}`,
|
|
604
|
+
children: leftNodes
|
|
605
|
+
}),
|
|
606
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
607
|
+
className: `${getCls("msgItem-action-right")}`,
|
|
608
|
+
children: [
|
|
609
|
+
RefreshNode,
|
|
610
|
+
rightNodes
|
|
611
|
+
]
|
|
612
|
+
})
|
|
613
|
+
]
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
}
|
|
596
617
|
if (location === "bottom") {
|
|
597
618
|
if (item.location === "left" && item.id !== "helloMsg" && item.id !== "inputing") {
|
|
598
619
|
if (index === recordRef.current.dataSource.length - 1) {
|
|
@@ -363,26 +363,14 @@
|
|
|
363
363
|
.msgItem-text-aibody{
|
|
364
364
|
color: #1f2a28;
|
|
365
365
|
.msgItem-richText{
|
|
366
|
-
font-size: 13.5px;
|
|
367
|
-
line-height: 1.88;
|
|
368
|
-
color: #1f2a28;
|
|
369
|
-
white-space: normal;
|
|
370
|
-
word-break: break-all;
|
|
371
366
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
margin-top: 10px;
|
|
380
|
-
margin-bottom: 0;
|
|
381
|
-
}
|
|
382
|
-
& > *:first-child {
|
|
383
|
-
margin-top: 0;
|
|
384
|
-
}
|
|
385
|
-
:global {
|
|
367
|
+
font-size: 13.5px;
|
|
368
|
+
line-height: 1.88;
|
|
369
|
+
color: #1f2a28;
|
|
370
|
+
white-space: normal;
|
|
371
|
+
word-break: break-all;
|
|
372
|
+
|
|
373
|
+
:global {
|
|
386
374
|
--primary: #69c89e;
|
|
387
375
|
--primary-light: #eef8f3;
|
|
388
376
|
--primary-deep: #48b385;
|
|
@@ -597,6 +585,21 @@
|
|
|
597
585
|
}
|
|
598
586
|
/* 操作按钮组:固定在内容末尾,与上方内容保持明显间距 */
|
|
599
587
|
}
|
|
588
|
+
|
|
589
|
+
/*
|
|
590
|
+
* AI 内容排版系统
|
|
591
|
+
* 规则:所有间距只用 margin-top,margin-bottom 统一为 0
|
|
592
|
+
* 层级:H2(22px) > H3(16px) > 段落/列表(10px) > 紧跟标签后内容(5px)
|
|
593
|
+
*/
|
|
594
|
+
/* 统一重置:所有直接子元素默认上间距 10px,无下间距 */
|
|
595
|
+
& > * {
|
|
596
|
+
margin-top: 10px;
|
|
597
|
+
margin-bottom: 0;
|
|
598
|
+
}
|
|
599
|
+
& > *:first-child {
|
|
600
|
+
margin-top: 0;
|
|
601
|
+
}
|
|
602
|
+
|
|
600
603
|
}
|
|
601
604
|
|
|
602
605
|
}
|
|
@@ -79,7 +79,7 @@ export interface contentConfigProps {
|
|
|
79
79
|
onSendedHelloMsg?: () => void; //发送招呼语之后
|
|
80
80
|
onInit?: () => void; //组件初始化
|
|
81
81
|
renderLoading?: (type:"init"|"loadMore",initLoadNode:React.ReactNode,loadMoreNode:React.ReactNode) => React.ReactNode;
|
|
82
|
-
renderItemBottom?: (item: dataItemType) => React.ReactNode;
|
|
82
|
+
renderItemBottom?: (item: dataItemType,actionNode:React.ReactNode) => React.ReactNode;
|
|
83
83
|
renderItemTop?: (item: dataItemType) => React.ReactNode;
|
|
84
84
|
scrollOffset?: number;
|
|
85
85
|
renderVirtuosoFooter?: (props:{context:ContextProps} ) => React.ReactNode;
|
|
@@ -391,6 +391,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
391
391
|
});
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
+
var actionNode = renderAction("node", item);
|
|
394
395
|
// 是否显示时间
|
|
395
396
|
var itemNode = /*#__PURE__*/ _jsx("div", {
|
|
396
397
|
className: "".concat(getCls("msgItem"), " ").concat(item.location === "left" ? getCls("msgItem-left") : getCls("msgItem-right"), " ").concat(isLast ? getCls("msgItem-last") : ""),
|
|
@@ -418,7 +419,7 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
418
419
|
}),
|
|
419
420
|
item.location === "left" && renderAction("floatBottom", item),
|
|
420
421
|
renderReference(item),
|
|
421
|
-
renderItemBottom && renderItemBottom(item)
|
|
422
|
+
renderItemBottom && renderItemBottom(item, actionNode)
|
|
422
423
|
]
|
|
423
424
|
})
|
|
424
425
|
});
|
|
@@ -609,6 +610,26 @@ var VirtuosoList = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
609
610
|
var index = recordRef.current.dataSource.findIndex(function(ite) {
|
|
610
611
|
return ite.id == item.id;
|
|
611
612
|
});
|
|
613
|
+
if (location === "node") {
|
|
614
|
+
if (item.id !== "helloMsg" && item.id !== "inputing") {
|
|
615
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
616
|
+
className: "".concat(getCls("msgItem-action")),
|
|
617
|
+
children: [
|
|
618
|
+
/*#__PURE__*/ _jsx("div", {
|
|
619
|
+
className: "".concat(getCls("msgItem-action-left")),
|
|
620
|
+
children: leftNodes
|
|
621
|
+
}),
|
|
622
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
623
|
+
className: "".concat(getCls("msgItem-action-right")),
|
|
624
|
+
children: [
|
|
625
|
+
RefreshNode,
|
|
626
|
+
rightNodes
|
|
627
|
+
]
|
|
628
|
+
})
|
|
629
|
+
]
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
}
|
|
612
633
|
if (location === "bottom") {
|
|
613
634
|
if (item.location === "left" && item.id !== "helloMsg" && item.id !== "inputing") {
|
|
614
635
|
if (index === recordRef.current.dataSource.length - 1) {
|
|
@@ -363,26 +363,14 @@
|
|
|
363
363
|
.msgItem-text-aibody{
|
|
364
364
|
color: #1f2a28;
|
|
365
365
|
.msgItem-richText{
|
|
366
|
-
font-size: 13.5px;
|
|
367
|
-
line-height: 1.88;
|
|
368
|
-
color: #1f2a28;
|
|
369
|
-
white-space: normal;
|
|
370
|
-
word-break: break-all;
|
|
371
366
|
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
margin-top: 10px;
|
|
380
|
-
margin-bottom: 0;
|
|
381
|
-
}
|
|
382
|
-
& > *:first-child {
|
|
383
|
-
margin-top: 0;
|
|
384
|
-
}
|
|
385
|
-
:global {
|
|
367
|
+
font-size: 13.5px;
|
|
368
|
+
line-height: 1.88;
|
|
369
|
+
color: #1f2a28;
|
|
370
|
+
white-space: normal;
|
|
371
|
+
word-break: break-all;
|
|
372
|
+
|
|
373
|
+
:global {
|
|
386
374
|
--primary: #69c89e;
|
|
387
375
|
--primary-light: #eef8f3;
|
|
388
376
|
--primary-deep: #48b385;
|
|
@@ -597,6 +585,21 @@
|
|
|
597
585
|
}
|
|
598
586
|
/* 操作按钮组:固定在内容末尾,与上方内容保持明显间距 */
|
|
599
587
|
}
|
|
588
|
+
|
|
589
|
+
/*
|
|
590
|
+
* AI 内容排版系统
|
|
591
|
+
* 规则:所有间距只用 margin-top,margin-bottom 统一为 0
|
|
592
|
+
* 层级:H2(22px) > H3(16px) > 段落/列表(10px) > 紧跟标签后内容(5px)
|
|
593
|
+
*/
|
|
594
|
+
/* 统一重置:所有直接子元素默认上间距 10px,无下间距 */
|
|
595
|
+
& > * {
|
|
596
|
+
margin-top: 10px;
|
|
597
|
+
margin-bottom: 0;
|
|
598
|
+
}
|
|
599
|
+
& > *:first-child {
|
|
600
|
+
margin-top: 0;
|
|
601
|
+
}
|
|
602
|
+
|
|
600
603
|
}
|
|
601
604
|
|
|
602
605
|
}
|
|
@@ -79,7 +79,7 @@ export interface contentConfigProps {
|
|
|
79
79
|
onSendedHelloMsg?: () => void; //发送招呼语之后
|
|
80
80
|
onInit?: () => void; //组件初始化
|
|
81
81
|
renderLoading?: (type:"init"|"loadMore",initLoadNode:React.ReactNode,loadMoreNode:React.ReactNode) => React.ReactNode;
|
|
82
|
-
renderItemBottom?: (item: dataItemType) => React.ReactNode;
|
|
82
|
+
renderItemBottom?: (item: dataItemType,actionNode:React.ReactNode) => React.ReactNode;
|
|
83
83
|
renderItemTop?: (item: dataItemType) => React.ReactNode;
|
|
84
84
|
scrollOffset?: number;
|
|
85
85
|
renderVirtuosoFooter?: (props:{context:ContextProps} ) => React.ReactNode;
|