FastComments.com

Add Comments to Your Svelte App


這是 FastComments 的官方 Svelte 函式庫。

在你的 Svelte 應用中嵌入即時留言、聊天和審閱元件。

儲存庫

在 GitHub 上查看


安裝 Internal Link

npm

npm install fastcomments-svelte

快速開始 Internal Link

<script lang="ts">
  import CommentWidget from "fastcomments-svelte/CommentWidget.svelte";
  import type { FastCommentsCommentWidgetConfig } from "fastcomments-typescript";

  let config: FastCommentsCommentWidgetConfig = {
    tenantId: "demo",
    urlId: "my-page"
  };
</script>

<CommentWidget config={config} />

小工具 Internal Link

此函式庫目前包含下列元件:

它也包含以下範例:

開發 Internal Link

在您使用 npm install(或 pnpm installyarn)安裝相依套件之後,啟動開發伺服器:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

src/lib 內的所有內容屬於函式庫,src/routes 內的所有內容則是示範程式。

建置 Internal Link


建置:

npm run package

維護狀態 Internal Link

這些元件是我們核心 VanillaJS 元件的包裝層。我們可以自動更新這些元件(修復錯誤、加入功能)而無需發佈此函式庫,所以即便它可能有一段時間不會發佈,這也不代表 FastComments 未在積極開發中!歡迎查看我們的部落格以取得更新。任何會破壞相容性的 API 變更或新功能,都不會在未同步在此函式庫提高版本的情況下發佈到底層核心函式庫。

需要幫助?

如果您在使用 Svelte 函式庫時遇到任何問題或有任何疑問,請:

貢獻

歡迎貢獻!請造訪 GitHub 儲存庫 以查看貢獻指南。