yuminge-app/yun-min-program-plugin-master/mycomponent/yz_comment_popup/commentGroup/commentGroup.js

69 lines
1.4 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// mycomponent/yz_comment_popup/commentGroup/commentGroup.js
Component({
/**
* 组件的属性列表
*/
properties: {
//弹窗是否显示,默认不显示
showYzComment: {
type: Boolean,
value: false
},
loading: {
//是否处于加载状态加载过程中不触发load事件
type: Boolean,
value: false
},
finished: {
//是否已加载完成加载完成后不再触发load事件
type: Boolean,
value: false
},
//评论列表
length: {
type: String,
value: ""
},
isAuthority: {
// 1游客 2作者 3管理员
// 2、3可进行删除操作
type: [Number, String],
value: 1
}
},
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
/**
* 组件的初始数据
*/
data: {
showCommentInput: false,
commentInputOptiones: {},
showSheet: false,
actions: [{
name: "回复"
}, {
name: "删除"
}]
},
/**
* 组件的方法列表
*/
methods: {
onCommentMore() {
this.triggerEvent("onMore");
},
focusCommentInput() {
this.data.commentInputOptiones = {
type: "main"
};
this.triggerEvent("showCOMInput", this.data.commentInputOptiones);
},
close() {
this.triggerEvent("clone");
}
},
});