From e6a90f3357c0cc61f36b62f7b69bee05fc255958 Mon Sep 17 00:00:00 2001 From: ewall <1054064180@qq.com> Date: Fri, 27 Mar 2020 18:12:19 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9Adetail-comment/swiper/overview/sec?= =?UTF-8?q?tion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CommentItem/index.vue | 93 ++++++++++++++++++++++ src/components/Vant/index.js | 4 +- src/icons/svg/good.svg | 1 + src/views/detail/index.vue | 15 +++- src/views/detail/modules/Comment.vue | 99 ++++++++++++++++++++++++ src/views/detail/modules/Overview.vue | 49 ++++++++++++ src/views/detail/modules/Section.vue | 106 ++++++++++++++++++++++++++ src/views/detail/modules/Swiper.vue | 18 ++++- 8 files changed, 381 insertions(+), 4 deletions(-) create mode 100644 src/components/CommentItem/index.vue create mode 100644 src/icons/svg/good.svg create mode 100644 src/views/detail/modules/Comment.vue create mode 100644 src/views/detail/modules/Overview.vue create mode 100644 src/views/detail/modules/Section.vue diff --git a/src/components/CommentItem/index.vue b/src/components/CommentItem/index.vue new file mode 100644 index 0000000..d1edfef --- /dev/null +++ b/src/components/CommentItem/index.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/components/Vant/index.js b/src/components/Vant/index.js index 918413a..6cdb1b9 100644 --- a/src/components/Vant/index.js +++ b/src/components/Vant/index.js @@ -26,7 +26,8 @@ import { TreeSelect, Icon, Progress, - ImagePreview + ImagePreview, + Rate } from 'vant' Vue.use(Toast) @@ -54,3 +55,4 @@ Vue.use(Toast) .use(Icon) .use(Progress) .use(ImagePreview) + .use(Rate) diff --git a/src/icons/svg/good.svg b/src/icons/svg/good.svg new file mode 100644 index 0000000..ba5c894 --- /dev/null +++ b/src/icons/svg/good.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/detail/index.vue b/src/views/detail/index.vue index 9d5258e..a4ccf00 100644 --- a/src/views/detail/index.vue +++ b/src/views/detail/index.vue @@ -8,18 +8,29 @@ + + +
+ + + + diff --git a/src/views/detail/modules/Overview.vue b/src/views/detail/modules/Overview.vue new file mode 100644 index 0000000..7eff081 --- /dev/null +++ b/src/views/detail/modules/Overview.vue @@ -0,0 +1,49 @@ + + + + + + diff --git a/src/views/detail/modules/Section.vue b/src/views/detail/modules/Section.vue new file mode 100644 index 0000000..e734cbf --- /dev/null +++ b/src/views/detail/modules/Section.vue @@ -0,0 +1,106 @@ + + + + + + + diff --git a/src/views/detail/modules/Swiper.vue b/src/views/detail/modules/Swiper.vue index 8ed6a1c..1c96f89 100644 --- a/src/views/detail/modules/Swiper.vue +++ b/src/views/detail/modules/Swiper.vue @@ -1,10 +1,12 @@ @@ -17,6 +19,18 @@ export default { variables() { return variables } + }, + data() { + return { + show: false, + previewIdx: 0 + } + }, + methods: { + onSwipeClick(index) { + this.previewIdx = index + this.show = true + } } }