Skip to content

Commit c05314c

Browse files
committed
normal类型的焦点获取优化
1 parent 478c162 commit c05314c

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

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": "1.2.3",
3+
"version": "1.2.4",
44
"private": false,
55
"scripts": {
66
"serve": "vue-cli-service serve",

src/Terminal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default {
7171
content: "Current login time: " + new Date().toLocaleString()
7272
}, {
7373
type: 'normal',
74-
content: "Welcome to vue web terminal! If you are using for the first time, you can use the <span class='t-teach'>help</span> command to learn.Thanks for your star support: <a href='https://github.com/tzfun/vue-web-terminal'>https://github.com/tzfun/vue-web-terminal</a>"
74+
content: "Welcome to vue web terminal! If you are using for the first time, you can use the <span class='t-teach'>help</span> command to learn.Thanks for your star support: <a class='t-a' target='_blank' href='https://github.com/tzfun/vue-web-terminal'>https://github.com/tzfun/vue-web-terminal</a>"
7575
}]
7676
}
7777
},

src/Terminal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<span style="line-height: 60px">====> {{ item.content }}</span>
6060
</span>
6161
<div v-else @click.self="_activeCursor">
62-
<span v-if="item.type === 'normal'" @click.self="_activeCursor" class="terminal-content-normal">
62+
<span v-if="item.type === 'normal'" class="terminal-content-normal">
6363
<span v-show="showLogTime">{{ item.time == null ? "" : (item.time + " ") }}</span>
6464
<span :class="item.class"
6565
style="margin-right: 10px">{{ item.tag == null ? item.class : item.tag }}</span>
@@ -108,7 +108,7 @@
108108
</table>
109109
</div>
110110
</div>
111-
<div v-else-if="item.type === 'html'" v-html="item.content" @click.self="_activeCursor"></div>
111+
<div v-else-if="item.type === 'html'" v-html="item.content"></div>
112112
</div>
113113
</div>
114114
<p class="terminal-last-line crude-font" v-show="showInputLine" @click.self="_activeCursor">

src/css/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,12 @@ pre {
9494
.t-table, .t-table tr, .t-table td, .t-table tbody, .t-table thead {
9595
margin: 0;
9696
padding: 15px;
97+
}
98+
99+
.t-a {
100+
color: antiquewhite;
101+
}
102+
103+
.t-a:hover {
104+
color: white;
97105
}

0 commit comments

Comments
 (0)