mirror of
https://github.com/xxxsf/vue3-h5-template.git
synced 2025-04-05 20:35:49 +08:00
20160819/14:58
This commit is contained in:
parent
066917e842
commit
94f9fcb631
6
.idea/encodings.xml
generated
6
.idea/encodings.xml
generated
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/vue-vueRouter-webpack.iml" filepath="$PROJECT_DIR$/.idea/vue-vueRouter-webpack.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
11
.idea/vue-vueRouter-webpack.iml
generated
11
.idea/vue-vueRouter-webpack.iml
generated
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.idea" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/node_modules" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
1039
.idea/workspace.xml
generated
1039
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,6 @@
|
||||
"babel-runtime": "^5.8.34",
|
||||
"css-loader": "^0.23.0",
|
||||
"cssnext-loader": "^1.0.1",
|
||||
"fastclick": "^1.0.6",
|
||||
"file-loader": "^0.8.4",
|
||||
"hammerjs": "^2.0.6",
|
||||
"html-loader": "^0.3.0",
|
||||
|
@ -1,11 +1,10 @@
|
||||
|
||||
require('./css/common.css');//加载公共样式
|
||||
require('./css/animate.css');//加载公共样式
|
||||
//加载公共样式
|
||||
require('./css/common.css');
|
||||
require('./css/main.css');
|
||||
require('./css/animate.css');
|
||||
|
||||
var Vue = require('vue');
|
||||
var VueRouter = require('vue-router');
|
||||
var fastclick = require('fastclick');
|
||||
fastclick.attach(document.body);
|
||||
|
||||
// register filters 自定义过滤器 金额格式化,
|
||||
var filters = require('./filters');
|
||||
|
54
src/app.vue
54
src/app.vue
@ -1,45 +1,17 @@
|
||||
<style>
|
||||
.fixed-bottom {
|
||||
position: fixed;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
.fixed-bottom div {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
text-align: center;
|
||||
}
|
||||
.fixed-bottom a {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
color: #7a7a7a;
|
||||
line-height: 50px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div class="app">
|
||||
<!--v-text="item.name"-->
|
||||
<!--<footer class="fixed-bottom clearfix">-->
|
||||
<!--<a v-for="item in items" v-link="item" v-text="item.name">{{$index}}</a>-->
|
||||
<!--</footer>-->
|
||||
<div class="app">
|
||||
|
||||
<footer class="fixed-bottom clearfix">
|
||||
<div class="col4" v-for="item in items" v-link="item">
|
||||
<a class="cur" href="" v-text="item.name">{{$index}}</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<router-view></router-view>
|
||||
|
||||
</div>
|
||||
<router-view></router-view>
|
||||
<button @click="test()">xxxx</button>
|
||||
<footer class="fixed-bottom clearfix">
|
||||
<div class="col4" v-for="item in items" v-link="item">
|
||||
<a class="cur" href="" v-text="item.name">{{$index}}</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: function() {
|
||||
return {
|
||||
@ -67,7 +39,11 @@ module.exports = {
|
||||
created:function(){
|
||||
|
||||
},
|
||||
methods:{}
|
||||
methods:{
|
||||
test: function(){
|
||||
console.log(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -1,5 +1,4 @@
|
||||
@charset "utf-8";
|
||||
@charset "utf-8";
|
||||
|
||||
/*清零*/
|
||||
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td { margin:0; padding:0;}
|
||||
@ -48,10 +47,10 @@ button{
|
||||
|
||||
|
||||
@font-face {
|
||||
font-family: "iconfont";
|
||||
src: require('iconfont.woff') format('woff'),
|
||||
require('iconfont.ttf') format('truetype'),
|
||||
require('iconfont.svg#iconfont') format('svg');
|
||||
/*font-family: "iconfont";*/
|
||||
/*src: require('iconfont.woff') format('woff'),*/
|
||||
/*require('iconfont.ttf') format('truetype'),*/
|
||||
/*require('iconfont.svg#iconfont') format('svg');*/
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@ -66,6 +65,7 @@ button{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* common css */
|
||||
.col2{
|
||||
width: 50%;
|
||||
}
|
||||
|
20
src/css/main.css
Normal file
20
src/css/main.css
Normal file
@ -0,0 +1,20 @@
|
||||
.fixed-bottom {
|
||||
position: fixed;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
z-index: 99;
|
||||
border-top: 1px solid #ccc;
|
||||
}
|
||||
.fixed-bottom div {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
text-align: center;
|
||||
}
|
||||
.fixed-bottom a {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
color: #7a7a7a;
|
||||
line-height: 50px;
|
||||
}
|
@ -31,11 +31,12 @@ module.exports = function(router){
|
||||
console.log('before---------------');
|
||||
//可以通过在路由中的自定义字段来验证用户是否需要登陆
|
||||
if(transition.to.auth){
|
||||
alert(1);
|
||||
console.log('通过配置路由中自定义的字段验证是否需要登陆');
|
||||
}
|
||||
|
||||
// //如果是中止,这里可以判断用户登录
|
||||
// //if(transition.to.path === '/forbidden'){
|
||||
//如果是中止,这里可以判断用户登录
|
||||
//if(transition.to.path === '/forbidden'){
|
||||
if(transition.to.name == 'forbidden'){
|
||||
router.app.authenticating = true
|
||||
setTimeout(function(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user