0.0.1 • Published 4 years ago
comment-me v0.0.1
easy comment
一个评论组件
import initComment from 'comment-me';
initComment({
el: '#app',
services: { // 请自行注入两个请求 一个插入评论 一个获取评论
insertComment(){
},
getComment(){
}
}
});
insertComment 和 getComment ts声明
interface InsertComment {
(data: {
name: string;
contact: string;
content: string;
}): Promise<boolean>;
}
interface GetComment {
(query: {
index?: number;
size?: number;
all?: number;
condition?: object;
}): Promise<boolean>;
}
0.0.1
4 years ago