FastComments.com

FastComments Vue 2 Library


这是 FastComments 的官方 Vue 2 库。

适用于 Vue 2 的 FastComments 评论组件

仓库

在 GitHub 上查看


安装 Internal Link

NPM

npm install --save fastcomments-vue

Yarn

yarn add fastcomments-vue

更新当前页面(单页应用示例) Internal Link

在 FastComments 中,我们将文章 id,或评论绑定到的页面,称为 URL ID,因为它可以是一个 url 或一个 ID。
请按以下方式定义 URL ID。组件会监视 config 对象的更改并重新加载,因此您只需更新 "url" 和 "urlId" 设置即可。

完整的可运行示例请见 这里

通过以下命令运行分页示例:

npm run serve-pagination
<fast-comments-vue v-bind:config="{tenantId: 'demo', url: 'https://example.com', urlId: 'some-page-id'}" />

帐户区域(注意:欧盟客户)

如果您的帐户位于欧盟,请在小部件配置中设置 region = 'eu',例如:

<fast-comments-vue v-bind:config="{tenantId: 'demo', url: 'https://example.com', urlId: 'some-page-id', region: 'eu'}" />

否则,您无需定义 region

生产环境 Internal Link

您可能不想在内联中定义 config,特别是当您传入 callbacks 等时。相反,您会想要定义 config 在一个 computed 块中,否则每次调用您的 callbacks 等时,整个 widget 都会重新渲染。

参见 spinner 示例了解如何执行此操作。

需要帮助?

如果您在使用 Vue 2 库时遇到任何问题或有任何疑问,请:

贡献

欢迎贡献!请访问 GitHub 仓库 以获取贡献指南。