浏览代码

emiting close gallery

tags/0.9.0
J 6 年前
父节点
当前提交
a6162323bd
共有 2 个文件被更改,包括 9 次插入6 次删除
  1. 8
    5
      vue-theme/src/components/gallery.vue
  2. 1
    1
      vue-theme/src/pages/single.vue

+ 8
- 5
vue-theme/src/components/gallery.vue 查看文件

@@ -4,18 +4,21 @@
4 4
         li
5 5
             h1 hello world
6 6
         li
7
-            h1 hello world again        
7
+            h1 hello world again
8 8
     button(@click="hideGallery") hide
9 9
 </template>
10 10
 
11 11
 <script>
12 12
 export default {
13
-    props: {fullscreengallery:{
14
-        type: Boolean
15
-    }
13
+    props: {
14
+        fullscreengallery: {
15
+            type: Boolean
16
+        }
16 17
     },
17 18
     methods: {
18
-        hideGallery() {this.show=false}
19
+        hideGallery() {
20
+            this.$emit('fullscreengalleryclose')
21
+        }
19 22
     }
20 23
 }
21 24
 </script>

+ 1
- 1
vue-theme/src/pages/single.vue 查看文件

@@ -7,7 +7,7 @@
7 7
         section
8 8
             h4 {{ posts[$route.params.slug].title }}
9 9
             .block-wrapper(v-for="block in posts[$route.params.slug].blocks" v-html="block")
10
-        stupidgallery(:fullscreengallery="fullscreengallery")
10
+        stupidgallery(:fullscreengallery="fullscreengallery" :fullscreengalleryclose="fullscreengallery = false")
11 11
     sidebar(v-if="sidebar" :type="`${type}`")
12 12
         .shadow
13 13
             h1.t-up single slot

正在加载...
取消
保存