2.3.1
Terminal for vue2.
🎉更新内容
- 🆕 支持通过属性设置主题,并移除 import css 的方式 #111
- 🆕 输入命令行时支持键入
ctrl + enter
输入换行符 #110 - 💡 优化
DragConf
的属性定义与读取,width
和height
支持百分比和px为单位的数字格式 #100 - 💡 提示框样式优化,跟随光标移动 #101 #105
- 💡 优化默认实现的命令搜索提示优先级逻辑 #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>