1.html中引入 http-vue-loader.js
下载地址等详情访问: https://www.npmjs.com/package/http-vue-loader
github地址 https://github.com/FranckFreiburger/http-vue-loader
html中写法和vue中一样
<MatchListBox :listType="1"></MatchListBox>
2.在js里面的写法
Vue.use(httpVueLoader)
var vm = new Vue({
el: '#app',
components: {
'MatchListBox': httpVueLoader('../compoent/MatchListBox.vue'),
},
}
3.vue组件的写法
<template>
<div class="hello">Hello {{jojo}}</div>
</template>
<script>
module.exports = {
data: function() {
return {
jojo: 'world'
}
}
}
</script>
<style>
</style>