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:
@@ -1,4 +1,4 @@
|
||||
<project-configure :project.sync="project"></project-configure>
|
||||
<project-configure :project="project" :unique-projects.sync="uniqueProjects"></project-configure>
|
||||
<div class="ui-project-stage fn-hide">
|
||||
<div class="ui-control-bar fn-clear">
|
||||
<div class="ui-control-operate fn-left">
|
||||
|
@@ -28,14 +28,12 @@ module.exports = Vue.component('app-main', {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data: function (){
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
project: function (){
|
||||
var project = this.projects[this.activeIndex] || {
|
||||
name: '',
|
||||
path: '',
|
||||
env: [],
|
||||
command: []
|
||||
};
|
||||
var project = this.projects[this.activeIndex];
|
||||
|
||||
if (!project.env) {
|
||||
project.env = [];
|
||||
@@ -45,7 +43,19 @@ module.exports = Vue.component('app-main', {
|
||||
project.command = [];
|
||||
}
|
||||
|
||||
return project;
|
||||
return JSON.parse(JSON.stringify(project));
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remove: function (){
|
||||
this.projects.splice(this.activeIndex, 1);
|
||||
this.$dispatch('save-configure');
|
||||
}
|
||||
},
|
||||
events: {
|
||||
edit: function (project){
|
||||
this.projects.$set(this.activeIndex, project);
|
||||
this.$dispatch('save-configure');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user