Skip to content

3.3.1

Compare
Choose a tag to compare
@tzfun tzfun released this 21 Oct 10:26
· 38 commits to vue3 since this release

Terminal for vue3.

🎉更新内容

  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' 的方式引入主题,改为通过属性控制:

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

const theme = ref('dark')


//  修改当前窗口主题
const changeTheme = () => {
       if (theme.value == 'dark') {
          theme.value = 'light'
      } else {
         theme.value = 'dark'
      }
}
</script>
<template>
  <terminal name='my-terminal' :theme='theme'></terminal>
</template>