Skip to content

Commit a6b4819

Browse files
committed
[vue2] publish 2.1.13
1 parent e190e72 commit a6b4819

File tree

4 files changed

+46
-2
lines changed

4 files changed

+46
-2
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.*
22
*.md
33
*.yml
4+
*.yaml
45
*.iml
56
*.lock
67
build/

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ Example:
8585
8686
<script>
8787
import Terminal from "vue-web-terminal"
88+
// This style needs to be introduced in versions after 3.1.8 and 2.1.12.
89+
// There is no need to introduce theme styles in previous versions.
90+
import 'vue-web-terminal/lib/theme/dark.css'
8891
8992
export default {
9093
name: 'App',
@@ -121,6 +124,23 @@ body, html, #app {
121124

122125
# Document
123126

127+
## Theme
128+
129+
Starting from `2.1.13` and `3.2.0` versions, the plugin has two built-in themes: `dark` and `lignt`
130+
131+
```js
132+
// import dark theme
133+
import 'vue-web-terminal/lib/theme/dark.css'
134+
135+
// import light theme
136+
import 'vue-web-terminal/lib/theme/light.css'
137+
```
138+
139+
If you need to customize the theme, you can customize the corresponding css variables.
140+
141+
> Note: Versions before `2.1.12` and `3.1.8` (including) do not support the theme function,
142+
> and there is no need to introduce css files.
143+
124144
## Attributes
125145

126146
Terminal tag supports attribute parameter table.
@@ -146,6 +166,7 @@ Terminal tag supports attribute parameter table.
146166
| scroll-mode | Scroll bar mode. | string | smooth |
147167
| push-message-before | A hook function that fires before the push message is displayed. | function | function(message, name) |
148168
| log-size-limit | Limit the maximum number of displayed logs | number | 200 |
169+
149170
> Below are the removed properties
150171
>
151172
> * ~~**show-log-time**~~: Removed after `2.0.14` and `3.0.13` versions.
@@ -865,6 +886,9 @@ The plugin provides an `onKeydown` event, which is the best way for you to contr
865886
866887
<script>
867888
import {Terminal, api as TerminalApi} from "vue-web-terminal";
889+
// This style needs to be introduced in versions after 3.1.8 and 2.1.12.
890+
// There is no need to introduce theme styles in previous versions.
891+
import 'vue-web-terminal/lib/theme/dark.css'
868892
869893
export default {
870894
name: "TerminalOldDemo",

README_ZH.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ const app = createApp(App).use(Terminal)
8282
8383
<script>
8484
import Terminal from "vue-web-terminal"
85+
// 3.1.8 以后以及 2.1.12 以后版本需要引入此样式,之前版本无需引入主题样式
86+
import 'vue-web-terminal/lib/theme/dark.css'
8587
8688
export default {
8789
name: 'App',
@@ -118,6 +120,22 @@ const app = createApp(App).use(Terminal)
118120

119121
# 插件文档
120122

123+
## 主题
124+
125+
`2.1.13``3.2.0`版本开始,插件内置有两个主题:`dark``lignt`
126+
127+
```js
128+
// 引入黑色主题
129+
import 'vue-web-terminal/lib/theme/dark.css'
130+
131+
// 引入白色主题
132+
import 'vue-web-terminal/lib/theme/light.css'
133+
```
134+
135+
如果你需要自定义主题,可以自定义相应的css变量。
136+
137+
> 注:`2.1.12``3.1.8`版本以前(包含)不支持主题功能,无需引入css文件
138+
121139
## Attributes
122140

123141
terminal标签支持的属性参数表
@@ -855,7 +873,6 @@ TerminalApi.textEditorOpen('my-terminal', {
855873
下Terminal快捷键最好的方法,这里以文本编辑器为例,设定用户按快捷键`Ctrl + S`就表示完成编辑并保存
856874

857875
```vue
858-
859876
<template>
860877
<terminal :name="name" @exec-cmd="onExecCmd" @on-keydown="onKeydown">
861878
<template #textEditor="{ data }">
@@ -876,6 +893,8 @@ TerminalApi.textEditorOpen('my-terminal', {
876893
877894
<script>
878895
import {Terminal, api as TerminalApi} from "vue-web-terminal";
896+
// 3.1.8 以后以及 2.1.12 以后版本需要引入此样式,之前版本无需引入主题样式
897+
import 'vue-web-terminal/lib/theme/dark.css'
879898
880899
export default {
881900
name: "TerminalOldDemo",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-web-terminal",
3-
"version": "2.1.12",
3+
"version": "2.1.13",
44
"description": "A lightweight and powerful web terminal plugin, suitable for vue3. 轻量、功能强大的网页端Terminal插件,适配vue3",
55
"license": "Apache-2.0",
66
"private": false,

0 commit comments

Comments
 (0)