vue-terminal-ui

terminal UI for VueJs
1,233 57
Install
npm install vue-terminal-ui
Latest Version:0.1.6
Vue:2
License:MIT
Last Updated:Nov 2, 2019
Links: GitHub  ·  npm
Maintainer: shershen08

Vuejs terminal UI emulator

Vuejs component for displaying UI element that acts as console terminal. Actual terminal logic code forked from Ptty.

Demo/sandbox available here:

Edit Vue Template

Install

npm i vue-terminal-ui --save

Usage

// import plugin
import VueTerminal from 'vue-terminal-ui'

// add to components section
components{
    VueTerminal
},
// add method to call on command is typed
 methods: {
    onCliCommand(data, resolve, reject){
      // typed command is available in data.text
      // don't forget to resolve or reject the Promise
      setTimeout(()=> {
        resolve('')
      }, 300)
    }
  },
// use in template
   <VueTerminal :intro="intro"
                console-sign="$"
                allow-arbitrary
                height="500px"
                @command="onCliCommand"></VueTerminal>

Properties & Events

props

  • intro (String) - intro text when terminal starts;
  • console-sign(String) - starting symbol for each command line, eg. my-folder/master $ or just >>;
  • allow-arbitrary(Boolean) - allow type any command in addition to basic ones, then @command will be called;
  • height(String) - UI block height, eg. 500px;

event

  • @command - callback function to call with command; accepts text, and resolve/reject callbacks

ToDo

  • get rid of jQuery dependancy

License

MIT

Related Packages

fman

旨在通过工具链提高本地开发效率。

1,003
vue-terminal

A terminal emulator in Vue

1,055 267
vtui-docs

Interactive docs terminal for vue-termui.

400 21
@brass-lantern/vue

Brass Lantern for Vue: the CRT terminal, the game store, themes, and a mountGame...

1,232 1
vue-termui

Build terminal apps with Vue 3

24,392

Version History

Version Released Vue License
0.1.6 ^2.5.16 MIT
0.1.5 ^2.5.16 MIT
0.1.4 ^2.5.16 MIT
0.1.3 ^2.5.16 MIT
0.1.2 ^2.5.16 MIT