私のvueプロジェクト(webpack、ホットリロード、babelなど)でhttp://vuematerial.io/#/getting-startedを使用しています。ビューの素材 - 変更が表示されない
私はこのライブラリを(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
エラーメッセージは表示されません。 Babelコンパイラにエラーはありません。すべてが正しく含まれています。 – Zyg
あなたのページソースは何ですか?デバッグのために、新しい 'Vue({});を追加することをお勧めします。 'this:' beforeUpdate:function(){ console.debug( 'vue rerendering'); console.debug(this); }、 beforeCreate:function(){ console.debug( 'vue creating'); console.debug(this); }、 ' あなたはhueにvueアプリを注入する場所を教えてもらえますか?たぶんvueはその部門を見つけることができません – LakiGeri