diff --git a/src/components/DetailReply.vue b/src/components/DetailReply.vue index a5b9df9..98973bf 100755 --- a/src/components/DetailReply.vue +++ b/src/components/DetailReply.vue @@ -8,17 +8,17 @@
{{ twoCommentData.content }}
-
-
-
+
发布
@@ -35,15 +35,16 @@
- - +
{{ 500 - commentContent.length }}
-
- 发布
+
+ 发布 +
@@ -56,41 +57,60 @@ export default { data() { return { commentContent: "", - twoCommentData: { - avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle", - content: "评论回复", - - }, - popState: "discussionSingle", - openDiscussionSingleState: false, // 弹出键盘动画 - }; }, - - props: ["twoCommentData"], + props: ["twoCommentData", "popState"], mounted() { - console.log("gjklgjklg"); + + console.log("子组件"); }, methods: { // 提交回复 - postComment() { - console.log("dffgkgfk"); + postComment(commentContent) { + console.log("dffgkgfk", commentContent); }, // 关闭弹窗 - handlePopCancel(){ - this.twoCommentData = null + handlePopCancel() { + console.log("fglkdf;lgkdfl;k"); + this.$parent.twoCommentData = null + this.$parent.popState = "" }, - + + // 清空 + clearTwoCommentData() { + this.$parent.twoCommentData = null + }, + // 切换简单的切换数据 setValue(key, value) { - this[key] = value + this.$parent.popState = "discussionMulti" + + setTimeout(() => { + console.log("twoCommentData", this.twoCommentData); + }, 1000); }, + openDiscussionSingle() { + if (!this.data.islogin) { + this.setData({ + isloginBtnState: true + }) + return + } + this.$parent.popState = "discussionSingle" + this.openDiscussionSingleState = false + + setTimeout(() => { + this.openDiscussionSingleState = true + }, 500); + }, + + }, }; diff --git a/src/views/detail/detailIndex.vue b/src/views/detail/detailIndex.vue index e2b446a..37142be 100755 --- a/src/views/detail/detailIndex.vue +++ b/src/views/detail/detailIndex.vue @@ -54,7 +54,7 @@ - + @@ -65,7 +65,12 @@ export default { data() { return { - + twoCommentData: { + avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle", + content: "评论回复", + }, + popState: "discussionSingle", + }; },