Initial commit

This commit is contained in:
Nuintun
2015-11-20 12:47:35 +08:00
parent 72f3cc1ad8
commit a20d1def1b
29 changed files with 12094 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<ul>
<li v-for="(index, project) in configure.projects">
<a href="javascript:;" :class="{ active: activeIndex === index }" :title="project.name" @click="select(index)">
<i class="icon-folder"></i>{{ project.name }}
</a>
</li>
</ul>

View File

@@ -0,0 +1,30 @@
/**
* Created by nuintun on 2015/11/20.
*/
'use strict';
var fs = require('fs');
var path = require('path');
var Vue = require('../../vue/vue');
module.exports = Vue.component('app-nav', {
template: fs.readFileSync(path.join(__dirname, 'app-nav.html')).toString(),
props: {
activeIndex: {
type: Number,
twoWay: true,
required: true
},
configure: {
type: Object,
twoWay: true,
required: true
}
},
methods: {
select: function (index){
this.activeIndex = index;
}
}
});