@@ -85,6 +85,9 @@ Example:
85
85
86
86
<script>
87
87
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'
88
91
89
92
export default {
90
93
name: 'App',
@@ -121,6 +124,23 @@ body, html, #app {
121
124
122
125
# Document
123
126
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
+
124
144
## Attributes
125
145
126
146
Terminal tag supports attribute parameter table.
@@ -146,6 +166,7 @@ Terminal tag supports attribute parameter table.
146
166
| scroll-mode | Scroll bar mode. | string | smooth |
147
167
| push-message-before | A hook function that fires before the push message is displayed. | function | function(message, name) |
148
168
| log-size-limit | Limit the maximum number of displayed logs | number | 200 |
169
+
149
170
> Below are the removed properties
150
171
>
151
172
> * ~~ ** 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
865
886
866
887
<script>
867
888
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'
868
892
869
893
export default {
870
894
name: "TerminalOldDemo",
0 commit comments