Answer the question
In order to leave comments, you need to log in
Why doesn't vuejs bind the data?
I use vueify + browserify. There are no errors in consoles. Just doesn't render {{hello}}
<template>
<div class="v-steplist">
<div class="v-steplist__header">
<h3>{{ hello }}</h3>
<div class="v-steplist__edit-step"></div>
</div>
<div class="v-steplist__content">
<div class="v-steplist__step"></div>
</div>
</div>
</template>
<script>
const Vue = require("vue/dist/vue.js");
Vue.component("v-steplist",{
data: function (){
return {hello: 'greet'}
}
})
</script>
let vueMigrate = function(){
const Vue = require("vue/dist/vue.js");
let rootSteplist = document.querySelector("#v-steplist")
if(rootSteplist){
new Vue({
el: '#v-steplist',
components: {
vSteplist: require("../_modules/components/vue-components/vue-steplist/steplist.vue")
}
})
}
}
module.exports = vueMigrate
Answer the question
In order to leave comments, you need to log in
try to be more precise. https://codesandbox.io/s/jz6nyvnl1v
I don't know if browserify can import ES6, but it won't take long to fix.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question