- 代码示例:
...
<div id="vue-root"></div>
...
require.config({
baseUrl:'resource/js/lib',
paths:{
vue:'./vue',
}
});
require(['vue'],function (vue){
var vm = new vue({
el:'#vue-root',
data:function (){
return {
tijian_pic:[],
}
}
});
});
网友评论