• 16-03-2018, 17:52:17
    #1
    Arkadaşlar merhaba,
    Aşağıda gördüğünüz kodlar webpack.config.js'den alınma. Ama Bu kodun içerisinde props: ['link'] var bu props'un amacı nedir bir türlü çözemedim. Dökümanlardan da bulamadım.
    <script>
    
    
    module.exports = {
    
    
    link: {
    label: 'Hello'
    },
    
    
    props: ['link'],
    
    
    data: function () {
    return {
    name: []
    }
    },
    
    
    watch: {
    
    
    name: function (name) {
    this.link = '@hello/name?name=' + name;
    }
    
    
    }
    
    
    };
    
    
    
    
    window.Links.components['hello'] = module.exports;
    
    
    </script>
  • 16-03-2018, 19:45:56
    #2
    ztk
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Bu VueJS, props da webpack ile değil de Vue ile alakalı olsa gerek. Vuejs de props bir datayı alt componentlere taşımaya yarar.
    Bkz: https://vuejs.org/v2/guide/components.html#Props