Kaynağa Gözat

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

tags/0.9.0
J 4 yıl önce
ebeveyn
işleme
0cee9e6344

+ 3
- 4
vue-theme/src/components/content-block/block.vue Dosyayı Görüntüle

@@ -26,6 +26,7 @@ export default {
26 26
     props: {
27 27
         block: { required: true }
28 28
     },
29
+    emits: ['openGallery'],
29 30
     methods: {
30 31
         fixYoutubeUrl(url) {
31 32
             let videoUid = url.split('https://youtu.be/')[1]
@@ -39,10 +40,8 @@ export default {
39 40
         openGallery(e) {
40 41
             if(e.target.tagName === 'IMG') {
41 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 Dosyayı Görüntüle

@@ -16,7 +16,9 @@
16 16
                 p start: {{ dateFrom(post.start) }}
17 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 23
         //- related artists section example layout
22 24
         section(v-if="type === 'episodes' && post" :post="post")

+ 4
- 1
vue-theme/webpack.config.js Dosyayı Görüntüle

@@ -14,6 +14,7 @@ module.exports = (env = {}) => {
14 14
         mode: env.production ? 'production' : 'development',
15 15
         resolve: {
16 16
             alias: {
17
+                vue: 'vue/dist/vue.esm-bundler.js',
17 18
                 '@': path.resolve(__dirname, 'src'),
18 19
             },
19 20
             extensions: ['*', '.js', '.sss', '.vue', '.json'],
@@ -91,7 +92,9 @@ module.exports = (env = {}) => {
91 92
         devtool: env.production ? false : 'cheap-module-eval-source-map',
92 93
         plugins: [
93 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 99
             new VueLoaderPlugin(),
97 100
             new CompressionPlugin({ threshold: 8192 }),

Loading…
İptal
Kaydet