mirror of
https://github.com/nuintun/command-manager.git
synced 2025-10-20 01:27:47 +08:00
update files
This commit is contained in:
7
static/js/components/app-nav/app-nav.html
Normal file
7
static/js/components/app-nav/app-nav.html
Normal 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>
|
30
static/js/components/app-nav/index.js
Normal file
30
static/js/components/app-nav/index.js
Normal 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;
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user