步骤4:修改.babelrccss
步骤5:在main.js引入对应的js和csshtml
步骤6:调用mui中的组件vue
<template> <ul class="mui-table-view"> <li class="mui-table-view-cell mui-collapse"> <a class="mui-navigate-right" href="#">面板1</a> <div class="mui-collapse-content"> <p>面板1子内容</p> </div> </li> </ul> </template> <script> export default { created() { mui.ajax('http://jsonplaceholder.typicode.com/users',{ dataType:'json',//服务器返回json格式数据 type:'get',//HTTP请求类型 timeout:10000,//超时时间设置为10秒; headers:{'Content-Type':'application/json'}, success:function(data){ //服务器返回响应,根据响应结果,分析是否登陆成功; console.log(data) }, error:function(xhr,type,errorThrown){ //异常处理; console.log(type); } }); }, name: 'HelloWorld', data () { return { msg: 'Welcome to Your Vue.js App' } } } </script> <!-- Add "scoped" attribute to limit CSS to this component only --> <style scoped> h1, h2 { font-weight: normal; } ul { list-style-type: none; padding: 0; } li { display: inline-block; margin: 0 10px; } a { color: #42b983; } </style>