@fe-free/core 3.0.42 → 3.0.43

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 3.0.43
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: markdown
8
+ - @fe-free/icons@3.0.43
9
+ - @fe-free/tool@3.0.43
10
+
3
11
  ## 3.0.42
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "3.0.42",
3
+ "version": "3.0.43",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -46,8 +46,8 @@
46
46
  "antd": "^5.27.1",
47
47
  "dayjs": "~1.11.10",
48
48
  "react": "^19.2.0",
49
- "@fe-free/icons": "3.0.42",
50
- "@fe-free/tool": "3.0.42"
49
+ "@fe-free/icons": "3.0.43",
50
+ "@fe-free/tool": "3.0.43"
51
51
  },
52
52
  "scripts": {
53
53
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -23,13 +23,9 @@ function Markdown(props: MarkdownProps) {
23
23
  }, [children]);
24
24
 
25
25
  const KnowledgeRefComponent = useMemo(
26
- () => (props: { id: string }) => {
26
+ () => (p: any) => {
27
27
  return (
28
- <KnowledgeRefBlock
29
- {...props}
30
- knowledgeRefs={knowledgeRefs}
31
- onKnowledgeRef={onKnowledgeRef}
32
- />
28
+ <KnowledgeRefBlock {...p} knowledgeRefs={knowledgeRefs} onKnowledgeRef={onKnowledgeRef} />
33
29
  );
34
30
  },
35
31
  [knowledgeRefs, onKnowledgeRef],
@@ -13,6 +13,12 @@ function KnowledgeRefBlock(props: any) {
13
13
  if (id) {
14
14
  const index = knowledgeRefs?.findIndex((ref: { id: string }) => ref.id === id);
15
15
 
16
+ console.log('index', index);
17
+ // 没有数据的时候显示 id
18
+ if (index === -1) {
19
+ return <span>[{id}]</span>;
20
+ }
21
+
16
22
  return (
17
23
  <span
18
24
  data-id={id}
@@ -499,7 +499,7 @@ export const HMChart: Story = {
499
499
  export const Knowledge: Story = {
500
500
  args: {
501
501
  children: `
502
- 根据检索结果,知识库中包含多个酒店的信息。[^knowledge:1-0]例如:\n\n- **杭州城中香格里拉**:位于杭州长寿路6号,提供多种餐饮选择,包括非凡酒廊、美食汇、城中啤酒餐吧以及城中小馆中餐厅[^knowledge:0-0]。\n- **凯恩斯香格里拉**:位于澳大利亚Pierpoint Road Cairns, Queensland,提供纯正澳式待客之道,靠近马林码头与珊瑚海交汇处[^knowledge:2-0]。\n- **马斯喀特 Al Husn 香格里拉**:位于阿曼P.O. Box 644, Muscat 100,是一个成人专享的世外桃源,拥有私人海滩和海湾[^knowledge:3-0]。\n\n此外,还有一家未直接命名但详细描述了其服务特色的豪华酒店,该酒店以江南丝绸商贸之家为灵感设计,提供独特的入住体验,包括定制贴心体验、精致餐饮及新颖的康养项目[^knowledge:4-0]。
502
+ 根据检索结果,知识库中包含多个酒店的信息。[^knowledge:1-0]例如:\n\n- **杭州城中香格里拉**:位于杭州长寿路6号,提供多种餐饮选择,包括非凡酒廊、美食汇、城中啤酒餐吧以及城中小馆中餐厅[^knowledge:0-0]。\n- **凯恩斯香格里拉**:位于澳大利亚Pierpoint Road Cairns, Queensland,提供纯正澳式待客之道,靠近马林码头与珊瑚海交汇处[^knowledge:2-0]。\n- **马斯喀特 Al Husn 香格里拉**:位于阿曼P.O. Box 644, Muscat 100,是一个成人专享的世外桃源,拥有私人海滩和海湾[^knowledge:3-0]。\n\n此外,还有一家未直接命名但详细描述了其服务特色的豪华酒店,该酒店以江南丝绸商贸之家为灵感设计,提供独特的入住体验,包括定制贴心体验、精致餐饮及新颖的康养项目[^knowledge:4-0][^knowledge:14-0]
503
503
  `,
504
504
  knowledgeRefs: [
505
505
  { id: '0-0', title: '杭州城中香格里拉' },