xtermjs + Vue.js
Yarn:
$ yarn add vue-term
For developer
$ git clone https://github.com/gwangyi/vue-term
$ cd vue-term
$ yarn
$ yarn build
import Vue
import VueTerm from 'vue-term'
Vue.use(VueTerm)
new Vue({ template: '<vue-term></vue-term>' }).$mount('#app')
<!-- insert Vuejs before this -->
<script src="https://unpkg.com/vue-term/dist/vue-term.web.min.js"></script>
<div id="app">
<vue-term ref="term"></vue-term>
</div>
<script>
var app = new Vue()
app.$mount('#app')
app.$refs.term.$stream.pipe(app.$refs.term.$stream)
</script>
See Terminal.ts in xterm.js
buffer
synchronized property is used to keep buffer between destruction and re-creation of component.
cols
and rows
also synchronized property.
update:title
is emitted when title is changed.
blur
and focus
event are emitted when corresponding event is occurred.
link
event is emitted when linkified hypertext link is clicked. There's no default action for this event.
fit()
method fits the terminal to parent node.