Files
halo/ui/docs/extension-points/comment-content.md
Ryan Wang ac88ee70cb Rename @halo-dev/console-shared to @halo-dev/ui-shared (#7926)
#### What type of PR is this?

/area ui
/kind api-change
/milestone 2.22.x

#### What this PR does / why we need it:

See #7925 

#### Which issue(s) this PR fixes:

Fixes #7925 

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```release-note
将 `@halo-dev/console-shared` 重命名为 `@halo-dev/ui-shared`
```
2025-11-10 16:20:41 +00:00

968 B
Raw Permalink Blame History

评论列表内容显示扩展点

用于替换 Halo 在 Console 的默认评论列表内容显示组件。

注意: 此扩展点并非通用扩展点,由于 Halo 早期设定Halo 在前台的评论组件 UI 部分由 评论组件插件 提供,而在此插件的后续版本中提供了富文本渲染的功能,所以为了保持 Console 的评论列表内容显示与前台一致,所以专为此插件提供了替换输入框的扩展点。

定义方式

import { definePlugin } from "@halo-dev/ui-shared";
import { markRaw } from "vue";
import CommentContent from "./components/CommentContent.vue";

export default definePlugin({
  extensionPoints: {
    "comment:list-item:content:replace": () => {
      return {
        component: markRaw(CommentContent),
      };
    },
  },
});

其中,组件需要包含的 props 如下:

  1. content:评论内容,html 格式。