Skip to content

Commit

Permalink
fix: empty task (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsuo committed Mar 3, 2020
1 parent 637b476 commit 5e4f6bd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/vue-terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-terminal.min.js.map

Large diffs are not rendered by default.

13 changes: 5 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
</div>
</body>
<script>
var main = {
data() {
return {
taskList,
commandList
}
}
const main = {
data() {
return { taskList, commandList }
}
}
var APP = Vue.extend(main)
const APP = Vue.extend(main)
new APP().$mount('#app')
</script>
</html>
2 changes: 1 addition & 1 deletion docs/vue-terminal.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/vue-terminal.min.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/VueTerminal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@
},
commandList: {
required: false,
default: () => { return {}}
default: () => ({})
},
taskList: {
required: false,
default: () => { return {}}
default: () => ({})
},
title: {
required: false,
Expand Down Expand Up @@ -185,6 +185,7 @@
}
},
handleRun(taskName, input) {
if (!this.taskList[taskName] || !this.taskList[taskName][taskName]) return Promise.resolve()
this.lastLineContent = '...'
return this.taskList[taskName][taskName](this.pushToList, input).then(done => {
this.pushToList(done)
Expand Down Expand Up @@ -362,6 +363,7 @@
display: inline-block;
width: 0;
overflow: hidden;
overflow-wrap: normal;
animation: load 1.2s step-end infinite;
-webkit-animation: load 1.2s step-end infinite;
}
Expand Down

0 comments on commit 5e4f6bd

Please sign in to comment.