Browse Source

:gear: moving around some event emits and declareing to remove warnings

tags/0.9.0
J 4 years ago
parent
commit
0cee9e6344

+ 3
- 4
vue-theme/src/components/content-block/block.vue View File

26
     props: {
26
     props: {
27
         block: { required: true }
27
         block: { required: true }
28
     },
28
     },
29
+    emits: ['openGallery'],
29
     methods: {
30
     methods: {
30
         fixYoutubeUrl(url) {
31
         fixYoutubeUrl(url) {
31
             let videoUid = url.split('https://youtu.be/')[1]
32
             let videoUid = url.split('https://youtu.be/')[1]
39
         openGallery(e) {
40
         openGallery(e) {
40
             if(e.target.tagName === 'IMG') {
41
             if(e.target.tagName === 'IMG') {
41
                 this.$emit('open-gallery', e.target)
42
                 this.$emit('open-gallery', e.target)
42
-            } else {
43
-                if(e.target.dataset.type === 'URL') {
44
-                    window.open(e.target.href)
45
-                }
43
+            } else if(e.target.dataset.type === 'URL') {
44
+                window.open(e.target.href)
46
             }
45
             }
47
         }
46
         }
48
     },
47
     },

+ 3
- 1
vue-theme/src/pages/single.vue View File

16
                 p start: {{ dateFrom(post.start) }}
16
                 p start: {{ dateFrom(post.start) }}
17
                 p end: {{ dateFrom(post.end) }}
17
                 p end: {{ dateFrom(post.end) }}
18
 
18
 
19
-        block(v-for="(block, index) in post.blocks" :block="block" @open-gallery="openGallery" :key="`block-${index}`" class="post-single block-wrapper")
19
+        ul
20
+            li(v-for="(block, index) in post.blocks" :key="`block-${index}`" class="post-single block-wrapper")
21
+                block(:block="block" @open-gallery="openGallery")
20
 
22
 
21
         //- related artists section example layout
23
         //- related artists section example layout
22
         section(v-if="type === 'episodes' && post" :post="post")
24
         section(v-if="type === 'episodes' && post" :post="post")

+ 4
- 1
vue-theme/webpack.config.js View File

14
         mode: env.production ? 'production' : 'development',
14
         mode: env.production ? 'production' : 'development',
15
         resolve: {
15
         resolve: {
16
             alias: {
16
             alias: {
17
+                vue: 'vue/dist/vue.esm-bundler.js',
17
                 '@': path.resolve(__dirname, 'src'),
18
                 '@': path.resolve(__dirname, 'src'),
18
             },
19
             },
19
             extensions: ['*', '.js', '.sss', '.vue', '.json'],
20
             extensions: ['*', '.js', '.sss', '.vue', '.json'],
91
         devtool: env.production ? false : 'cheap-module-eval-source-map',
92
         devtool: env.production ? false : 'cheap-module-eval-source-map',
92
         plugins: [
93
         plugins: [
93
             new webpack.DefinePlugin({
94
             new webpack.DefinePlugin({
94
-                PRODUCTION: JSON.stringify(env.production),
95
+                // PRODUCTION: JSON.stringify(env.production),
96
+                __VUE_OPTIONS_API__: true,
97
+                __VUE_PROD_DEVTOOLS__: false
95
             }),
98
             }),
96
             new VueLoaderPlugin(),
99
             new VueLoaderPlugin(),
97
             new CompressionPlugin({ threshold: 8192 }),
100
             new CompressionPlugin({ threshold: 8192 }),

Loading…
Cancel
Save