-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
247 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<template> | ||
<nav class="bar bar-tab easy-bottom-bar"> | ||
<a class="tab-item" href="#" v-link="{path:'/'}"> | ||
<span class="icon fa fa-weixin" :class="{'easy-fa-color': isOnePage}"></span> | ||
<span class="tab-label" :class="{'easy-fa-color': isOnePage}">pageone</span> | ||
</a> | ||
<a class="tab-item" href="#" v-link="{path:'/two'}"> | ||
<span class="icon icon-pages" :class="{'easy-fa-color': isTwoPage}"></span> | ||
<span class="tab-label" :class="{'easy-fa-color': isTwoPage}">pagetwo</span> | ||
</a> | ||
<a class="tab-item" href="#" v-link="{path:'/three'}"> | ||
<span class="icon icon-person" :class="{'easy-fa-color': isThreePage}"></span> | ||
<span class="tab-label" :class="{'easy-fa-color': isThreePage}">pagethree</span> | ||
</a> | ||
</nav> | ||
</template> | ||
|
||
<script> | ||
module.exports = { | ||
data: function () { | ||
return { | ||
isOnePage: true, | ||
isTwoPage: false, | ||
isThreePage: false | ||
} | ||
}, | ||
ready: function () { | ||
var uri = window.location.hash; | ||
if (uri === '#!/') { | ||
this.isOnePage = true; | ||
this.isTwoPage = false; | ||
this.isThreePage = false; | ||
} | ||
if (uri === '#!/two') { | ||
this.isOnePage = false; | ||
this.isTwoPage = true; | ||
this.isThreePage = false; | ||
} | ||
if (uri === '#!/three') { | ||
this.isOnePage = false; | ||
this.isTwoPage = false; | ||
this.isThreePage = true; | ||
} | ||
}, | ||
methods: { | ||
} | ||
} | ||
</script> | ||
<style> | ||
.easy-bottom-bar .easy-fa-color{ | ||
color: #428bca; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<template> | ||
<header class="bar bar-nav bar-easy-vue"> | ||
<a class="icon icon-refresh pull-left" @click="refresh"></a> | ||
<a class="icon icon-compose pull-right" @click="writeSome"></a> | ||
<h1 class="title">hello vue</h1> | ||
</header> | ||
</template> | ||
|
||
<script> | ||
module.exports={ | ||
methods:{ | ||
writeSome:function () { | ||
alert('write something'); | ||
}, | ||
refresh: function () { | ||
// dispatch bar-top-refresh event to parent component | ||
this.$dispatch('bar-top-refresh'); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div> | ||
<bar-top | ||
@bar-top-refresh="refresh"> | ||
</bar-top> | ||
<card></card> | ||
<bar-bottom></bar-bottom> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
var barTop = require('../components/barTop.vue'); | ||
var card = require('../components/card.vue'); | ||
var barBottom = require('../components/barBottom.vue'); | ||
module.exports = { | ||
components:{ | ||
'bar-top':barTop, | ||
'card':card, | ||
'bar-bottom':barBottom, | ||
}, | ||
methods:{ | ||
refresh: function () { | ||
//catch bar-top-refresh event dispatch by son component | ||
//broadcast all son component to execute refresh event | ||
this.$broadcast('refresh'); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div> | ||
<bar-top | ||
@bar-top-refresh="refresh"> | ||
</bar-top> | ||
<card></card> | ||
<bar-bottom></bar-bottom> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
var barTop = require('../components/barTop.vue'); | ||
var card = require('../components/card.vue'); | ||
var barBottom = require('../components/barBottom.vue'); | ||
module.exports = { | ||
components:{ | ||
'bar-top':barTop, | ||
'card':card, | ||
'bar-bottom':barBottom, | ||
}, | ||
methods:{ | ||
refresh: function () { | ||
//catch bar-top-refresh event dispatch by son component | ||
//broadcast all son component to execute refresh event | ||
this.$broadcast('refresh'); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div> | ||
<bar-top | ||
@bar-top-refresh="refresh"> | ||
</bar-top> | ||
<card></card> | ||
<bar-bottom></bar-bottom> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
var barTop = require('../components/barTop.vue'); | ||
var card = require('../components/card.vue'); | ||
var barBottom = require('../components/barBottom.vue'); | ||
module.exports = { | ||
components:{ | ||
'bar-top':barTop, | ||
'card':card, | ||
'bar-bottom':barBottom, | ||
}, | ||
methods:{ | ||
refresh: function () { | ||
//catch bar-top-refresh event dispatch by son component | ||
//broadcast all son component to execute refresh event | ||
this.$broadcast('refresh'); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
</style> |