mirror of
https://github.com/xsf0105/vue3-h5-template.git
synced 2025-09-18 11:30:07 +08:00
add mint-ui
This commit is contained in:
parent
e5b0985b45
commit
5ab5755dcf
@ -6,7 +6,6 @@
|
||||
"extract-text-webpack-plugin": "^0.8.2",
|
||||
"mint-ui": "^0.2.7",
|
||||
"open-browser-webpack-plugin": "^0.0.2",
|
||||
"weui": "^0.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.3.17",
|
||||
|
20
src/app.js
20
src/app.js
@ -5,29 +5,17 @@ require('./css/animate.css');
|
||||
|
||||
const Vue = require('vue');
|
||||
const VueRouter = require('vue-router');
|
||||
const filters = require('./common/filters');// register filters 自定义过滤器
|
||||
|
||||
const _config = require('./common/config');// API接口 可以在需要的页面引入,此页面可以不引入!
|
||||
|
||||
//console.log(_config.SERVICE.EDU.DETAILS);
|
||||
|
||||
//Object.keys(filters).forEach(function(k) {
|
||||
// Vue.filter(k, filters[k]);
|
||||
//});
|
||||
const filters = require('./common/filters'); // register filters 自定义过滤器
|
||||
const _config = require('./common/config'); // API接口 可以在需要的页面引入,此页面可以不引入!
|
||||
|
||||
var App = Vue.extend(require('./app.vue'));
|
||||
Vue.use(VueRouter);
|
||||
|
||||
var router = new VueRouter(
|
||||
{
|
||||
var router = new VueRouter({
|
||||
hashbang: true, //为true的时候 example.com/#!/foo/bar , false的时候 example.com/#/foo/bar
|
||||
//abstract:true, //地址栏不会有变化
|
||||
//以下设置需要服务端设置
|
||||
//history: false, //当使用 HTML5 history 模式时,服务器需要被正确配置 以防用户在直接访问链接时会遇到404页面。
|
||||
//saveScrollPosition: false
|
||||
linkActiveClass:'custom-active-class' //全局设置连接匹配时的类名 参考http://vuejs.github.io/vue-router/en/link.html
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
require('./routers')(router);
|
||||
|
||||
|
13
src/app.vue
13
src/app.vue
@ -10,7 +10,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
import 'mint-ui/lib/style.css';
|
||||
|
||||
module.exports = {
|
||||
data: function() {
|
||||
return {
|
||||
items:{
|
||||
@ -29,15 +31,10 @@ module.exports = {
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
components:{
|
||||
// modal:require('./components/modal.vue'),
|
||||
},
|
||||
created:function(){
|
||||
|
||||
},
|
||||
methods:{
|
||||
/* do someThing */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -49,6 +49,7 @@
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
.select_components_mask{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
|
@ -2,10 +2,6 @@ h2{
|
||||
font-size: 28px;
|
||||
text-align: center;
|
||||
}
|
||||
span{
|
||||
font-size: 15px;
|
||||
color: red;
|
||||
}
|
||||
p{
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
|
@ -14,9 +14,6 @@
|
||||
<div class="index">
|
||||
<h2>vue-router 介绍:</h2>
|
||||
<a class="router-link" href="http://router.vuejs.org/zh-cn/" target="_blank">点击这里</a>
|
||||
|
||||
<mt-cell title="标题文字"></mt-cell>
|
||||
<mt-cell title="标题文字" value="说明文字"></mt-cell>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -24,8 +21,7 @@
|
||||
var lifecycle = []; //为了描述生命周期, 在 canActivate 阶段 还没有 this.lifecycle
|
||||
|
||||
import Vue from 'vue'
|
||||
import { Cell } from 'mint-ui';
|
||||
Vue.component(Cell.name, Cell);
|
||||
import { Toast } from 'mint-ui';
|
||||
|
||||
module.exports = {
|
||||
//props: ['父组建传的值'],
|
||||
@ -41,7 +37,7 @@
|
||||
//waitForData: true, //数据加载完毕后再切换试图,也就是 点击之后先没反应,然后数据加载完,再出发过渡效果
|
||||
canActivate:function(transition){
|
||||
//canActivate阶段,可以做一些用户验证的事情
|
||||
console.log(1);
|
||||
Toast('Test toast');
|
||||
return true;
|
||||
},
|
||||
activate:function(transition){
|
||||
|
Loading…
x
Reference in New Issue
Block a user