瀏覽代碼

closing gallery properly

tags/0.9.0
J 6 年之前
父節點
當前提交
494b7d765a
共有 2 個檔案被更改,包括 7 行新增14 行删除
  1. 3
    5
      vue-theme/src/components/gallery.vue
  2. 4
    9
      vue-theme/src/pages/single.vue

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

11
 <script>
11
 <script>
12
 export default {
12
 export default {
13
     props: {
13
     props: {
14
-        fullscreengallery: {
15
-            type: Boolean
16
-        }
14
+        fullscreengallery: { type: Boolean }
17
     },
15
     },
18
     methods: {
16
     methods: {
19
         hideGallery() {
17
         hideGallery() {
20
-            this.$emit('fullscreengalleryclose')
18
+            this.$emit('close')
21
         }
19
         }
22
     }
20
     }
23
 }
21
 }
31
     width: 100vw
29
     width: 100vw
32
     height: 100%
30
     height: 100%
33
     background-color: blue
31
     background-color: blue
34
-    opacity: 50%
32
+    opacity: 75%
35
     z-index: 1001
33
     z-index: 1001
36
     ul
34
     ul
37
         list-style: none
35
         list-style: none

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

1
 <template lang="pug">
1
 <template lang="pug">
2
 .page--single.f-row.between
2
 .page--single.f-row.between
3
+    gallery(:fullscreengallery="fullscreengallery" v-on:close="fullscreengallery = false")
3
     article.f-grow.shadow
4
     article.f-grow.shadow
4
         header
5
         header
5
             h1 {{ type }}:{{ $route.params.slug }} single
6
             h1 {{ type }}:{{ $route.params.slug }} single
6
-            button(@click="fullscreengallery=false") fullscreen
7
+            button(@click="fullscreengallery = true") fullscreen
7
         section
8
         section
8
             h4 {{ posts[$route.params.slug].title }}
9
             h4 {{ posts[$route.params.slug].title }}
9
             .block-wrapper(v-for="block in posts[$route.params.slug].blocks" v-html="block")
10
             .block-wrapper(v-for="block in posts[$route.params.slug].blocks" v-html="block")
10
-        stupidgallery(:fullscreengallery="fullscreengallery" :fullscreengalleryclose="fullscreengallery = false")
11
     sidebar(v-if="sidebar" :type="`${type}`")
11
     sidebar(v-if="sidebar" :type="`${type}`")
12
         .shadow
12
         .shadow
13
             h1.t-up single slot
13
             h1.t-up single slot
28
     },
28
     },
29
     components: {
29
     components: {
30
         sidebar: sidebar,
30
         sidebar: sidebar,
31
-        stupidgallery: gallery,
31
+        gallery: gallery
32
     },
32
     },
33
     data() {
33
     data() {
34
         return {
34
         return {
35
-            fullscreengallery: true
36
-        }
37
-    },   
38
-    methods: {
39
-        showGallery() {
40
-            console.log('testingshowGallery')
35
+            fullscreengallery: false
41
         }
36
         }
42
     },
37
     },
43
     computed: {
38
     computed: {

Loading…
取消
儲存