Browse Source

Add Unicode 11 Support. Now Emoji is Avaliable!

zry 4 years ago
parent
commit
eeed0995c2
2 changed files with 6 additions and 2 deletions
  1. 3 0
      XtermVue.vue
  2. 3 2
      package.json

+ 3 - 0
XtermVue.vue

@@ -6,6 +6,7 @@ import 'xterm/css/xterm.css'
 import { Terminal } from 'xterm'
 import { FitAddon } from 'xterm-addon-fit'
 import { WebLinksAddon } from 'xterm-addon-web-links'
+import { Unicode11Addon } from 'xterm-addon-unicode11'
 
 export default {
     mounted() {
@@ -13,6 +14,8 @@ export default {
         this.$fitAddon = new FitAddon()
         this.$term.loadAddon(this.$fitAddon)
         this.$term.loadAddon(new WebLinksAddon())
+        this.$term.loadAddon(new Unicode11Addon())
+        this.$term.unicode.activeVersion = '11'
         this.$term.open(this.$el)
         this.$fitAddon.fit()
         this.$term.onTitleChange((title) => this.$emit('title-change', title))

+ 3 - 2
package.json

@@ -1,6 +1,6 @@
 {
     "name": "@swzry/xterm-vue",
-    "version": "1.0.0",
+    "version": "1.0.1",
     "description": "Vue plugin for xtem.js",
     "main": "index.js",
     "repository": "https://git.swzry.com/zry/xterm-vue",
@@ -9,6 +9,7 @@
     "dependencies": {
         "xterm": "^4.5.0",
         "xterm-addon-fit": "^0.3.0",
-        "xterm-addon-web-links": "^0.3.0"
+        "xterm-addon-web-links": "^0.3.0",
+        "xterm-addon-unicode11": "^0.1.1"
     }
 }