내 vue 프로젝트 (webpack, hot reloads, babel 등)에 http://vuematerial.io/#/getting-started을 사용하고 있습니다.Vue 자료 - 변경 사항이 보이지 않습니다.
이 라이브러리를 npm을 통해 가져 와서 main.js 파일에 포함 시켰습니다. 프로젝트에 변경 사항이 표시되지 않습니다. 브라우저가 렌더링하지 않습니다.
내가 뭘 잘못하고 있니?
main.js :
import Vue from 'vue'
import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material'
import App from './App.vue'
Vue.use(VueMaterial)
Vue.material.registerTheme('default', {
primary: 'blue',
accent: 'red',
warn: 'red',
background: 'grey'
})
/* eslint-disable no-new */
new Vue({
el: 'body'
components: { App },
render: h => h(App)
})
App.vue는 :
<template>
<div id="app">
<hello></hello>
<md-button>Default</md-button> // this doesnt work!
</div>
</template>
<script>
export default {
components: {
'hello': Hello,
'documents': Documents,
'Home': Home
},
data: function() {
return {
}
}
}
</script>
단말기에 표시되는 오류 메시지를 포함시킬 수 있습니까? – andy
오류 메시지가 표시되지 않습니다. 바벨 컴파일러는 오류를 보지 않습니다. 모두 올바르게 포함되어 있습니다. – Zyg
페이지 소스가 무엇입니까? 디버깅을 위해서 새로운'Vue ({}); 'this :'beforeUpdate : function() { console.debug ('vue rerendering'); console.debug (this); }, beforeCreate : function() { console.debug ('vue creating'); console.debug (this); }, ' hue에 vue 앱을 주입하는 위치를 알려주시겠습니까? 아마도 vue가 해당 div를 찾을 수 없습니다. – LakiGeri