Skip to content

2.3.1

Compare
Choose a tag to compare
@tzfun tzfun released this 21 Oct 08:37
· 21 commits to vue2 since this release

Terminal for vue2.

🎉更新内容

  1. 🆕 支持通过属性设置主题,并移除 import css 的方式 #111
  2. 🆕 输入命令行时支持键入 ctrl + enter 输入换行符 #110
  3. 💡 优化DragConf的属性定义与读取,widthheight支持百分比和px为单位的数字格式 #100
  4. 💡 提示框样式优化,跟随光标移动 #101 #105
  5. 💡 优化默认实现的命令搜索提示优先级逻辑 #103

⚠️ 变更配置

不再支持通过 import 'vue-web-terminal/lib/theme/dark.css' 的方式引入主题,改为通过属性控制:

<template>
  <terminal name='my-terminal' :theme='theme'></terminal>
</template>

<script>
import Terminal from 'vue-web-terminal';

export default {
  data() {
    theme: 'dark'
  },
  methods: {
    //  修改当前窗口主题
    changeTheme() {
       if (this.theme == 'dark') {
          this.theme = 'light'
      } else {
         this.theme = 'dark'
      }
   }
  }
}
</script>