本文为大家分享了vue.js中薄荷味框架的使用方法,具体内容如下
1.安装vue2.0的薄荷味框架
国家预防机制安装薄荷-用户界面-保存2。引用和使用框架,我用的是全部组件,也可以按需选择加载相应的组件,不过要使用巴别塔插件组件
从薄荷味的导入薄荷;Vue.use(薄荷);3.创建一个header.vue组件,里面写入薄荷味的头部组件
模板mt-header title='问答路由器-链接到='/搜索'插槽='左侧' mt-按钮图标=' search ' { search title } } mt-button路由器-将mt-button链接到='/ask ' slot=' right ' mt-button图标='询问'提问mt-button mt-button mt-header模板脚本需要('./less/配置。减’);导出默认{ data(){ return { search left : ' search left ',searchTitle: '搜索,} },方法: { handleclose3360 function(){ this .$indicator.open('加载中.');} } }脚本4。在app.vue组件中调用header.vue组件
模板div id=' app ' h-reader-reader路由器-链接到='/home '主页路由器-链接路由器-链接到='/新闻'新闻路由器链接点击。native=' handleClick '按钮mt-button div路由器-查看路由器-查看div class=' box ' div模板脚本导入标题来自./组件/标题。vue ';要求('。/较少/收集。减’);导出默认{ name: 'app ',methods : { handle click : FuncTion(){ this .$indicator.open('加载中.');},},组件3360 { ' h-reader ' : header } }脚本5。预览图
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持我们。