halo-dev-halo-comment-normal-master
java 

所属分类:Java编程
开发工具:Java
文件大小:835KB
下载次数:0
上传日期:2021-02-28 17:57:53
上 传 者serializstion
说明:  定制katalon recorder 适配 selenide 框架生成 web ui 自动化脚本
(Customizing katalon recorder to adapt selenide framework to generate Web UI automation scripts)

文件列表:
halo-comment-normal (0, 2020-07-08)
halo-comment-normal\.eslintrc.js (396, 2020-07-08)
halo-comment-normal\babel.config.js (73, 2020-07-08)
halo-comment-normal\dist (0, 2020-07-08)
halo-comment-normal\dist\demo.html (177, 2020-07-08)
halo-comment-normal\dist\halo-comment.js (589279, 2020-07-08)
halo-comment-normal\dist\halo-comment.js.map (852015, 2020-07-08)
halo-comment-normal\dist\halo-comment.min.js (293020, 2020-07-08)
halo-comment-normal\dist\halo-comment.min.js.map (891695, 2020-07-08)
halo-comment-normal\package-lock.json (464820, 2020-07-08)
halo-comment-normal\package.json (1664, 2020-07-08)
halo-comment-normal\public (0, 2020-07-08)
halo-comment-normal\public\favicon.ico (4286, 2020-07-08)
halo-comment-normal\public\index.html (575, 2020-07-08)
halo-comment-normal\src (0, 2020-07-08)
halo-comment-normal\src\App.vue (456, 2020-07-08)
halo-comment-normal\src\api (0, 2020-07-08)
halo-comment-normal\src\api\comment.js (520, 2020-07-08)
halo-comment-normal\src\api\option.js (238, 2020-07-08)
halo-comment-normal\src\assets (0, 2020-07-08)
halo-comment-normal\src\assets\logo.png (6849, 2020-07-08)
halo-comment-normal\src\components (0, 2020-07-08)
halo-comment-normal\src\components\Comment.vue (3729, 2020-07-08)
halo-comment-normal\src\components\CommentEditor.vue (12965, 2020-07-08)
halo-comment-normal\src\components\CommentLoading.vue (674, 2020-07-08)
halo-comment-normal\src\components\CommentNode.vue (5204, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker (0, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\Categories.vue (1083, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\Emoji.vue (251, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\EmojiList.vue (2940, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\Helper.vue (170, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\InputSearch.vue (610, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\VEmojiPicker.vue (2101, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\VSvg.vue (500, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\_icons.js (14535, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\data (0, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\data\emojis.js (105027, 2020-07-08)
halo-comment-normal\src\components\EmojiPicker\index.js (137, 2020-07-08)
... ...

halo-comment-normal

> 适用于 Halo 的评论组件。 ![npm](https://img.shields.io/npm/v/halo-comment-normal?style=flat-square) [![](https://data.jsdelivr.com/v1/package/npm/halo-comment-normal/badge)](https://www.jsdelivr.com/package/npm/halo-comment-normal) ### 使用指南 1. 进入后台 -> 系统 -> 博客设置 -> 评论设置 2. 将 `评论模块 JS` 修改为:`https://cdn.jsdelivr.net/npm/halo-comment-normal@1.1.1/dist/halo-comment.min.js` ### 自定义配置 如果你需要自定义该评论组件,下面提供了一些属性: | 属性 | 说明 | 默认值 | 可选 | | -------------- | ------------------------ | ------------------------- | -------------------------- | | autoLoad | 是否自动加载评论列表 | true | `true` `false` | | showUserAgent | 是否显示评论者的 UA 信息 | true | `true` `false` | | gravatarSource | Gravatar 源地址 | `//cdn.v2ex.com/gravatar` | - | | loadingStyle | 评论加载样式 | `default` | `default` `circle` `balls` | 配置方法: 在引入评论组件的页面加上: ```javascript ``` 修改评论组件标签加上: ```html :configs="configs" ``` 示例: ```html ``` ```html ``` ```html ``` ### 主题开发引用指南 #### 方法一 新建 comment.ftl: ```html <#macro comment target,type> <#if !post.disallowComment!false> ``` 然后在 post.ftl/sheet.ftl 中引用: post.ftl: ```html <#include "comment.ftl"> <@comment target=post type="post" /> ``` sheet.ftl: ```html <#include "comment.ftl"> <@comment target=sheet type="sheet" /> ``` #### 方法二 一般在主题制作过程中,我们可以将 head 部分抽出来作为宏模板,如:,那么我们就可以将所需要的依赖放在 head 标签中: ```html ... <#if is_post?? && is_sheet??> ... ``` 然后在 post.ftl/sheet.ftl 中引用: post.ftl: ```html <#if !post.disallowComment!false> ``` sheet.ftl: ```html <#if !sheet.disallowComment!false> ``` #### 进阶: 可以将 configs 中的属性通过 settings.yaml 保存数据库中,以供用户自行选择,如: settings.yaml: ```yaml ... comment: label: 评论设置 items: autoLoad: name: autoLoad label: 自动加载评论 type: radio data-type: bool default: true options: - value: true label: 开启 - value: false label: 关闭 showUserAgent: name: showUserAgent label: 评论者 UA 信息 type: radio data-type: bool default: true options: - value: true label: 显示 - value: false label: 隐藏 ... ``` 那么我们需要将上面的 script 改为下面这种写法: ```javascript ``` #### 说明 1. configs 可以不用配置。 2. 具体主题开发文档请参考:

近期下载者

相关文件


收藏者