Skip to content

Commit 07f14f9

Browse files
committed
feat: 添加复制按钮
1 parent 69c4aad commit 07f14f9

File tree

2 files changed

+3
-41
lines changed

2 files changed

+3
-41
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<view class="markdown-it-code-copy" bindtap="copyClipBoard"></view>
1+
<view class="markdown-it-code-copy" bindtap="copyClipBoard">
2+
<image src="../../imgs/copy.svg" style="width: 32rpx;height: 32rpx" mode="aspectFill" />
3+
</view>
Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,9 @@
1-
@font-face {
2-
font-family: WdTd;
3-
src: url("t.eot"), url("t_iefix.eot") format("embedded-opentype"),
4-
url("t.woff") format("woff"), url("t.ttf") format("truetype"),
5-
url("t.svg") format("svg"),
6-
url("https://comp-public-replace-1303824488-cos.weda.tencent.com/icon/0.0.7/t.eot"),
7-
url("https://comp-public-replace-1303824488-cos.weda.tencent.com/icon/0.0.7/t_iefix.eot") format("embedded-opentype"),
8-
url("https://comp-public-replace-1303824488-cos.weda.tencent.com/icon/0.0.7/t.woff") format("woff"),
9-
url("https://comp-public-replace-1303824488-cos.weda.tencent.com/icon/0.0.7/t.ttf") format("truetype"),
10-
url("https://comp-public-replace-1303824488-cos.weda.tencent.com/icon/0.0.7/t.svg") format("svg");
11-
font-weight: 400;
12-
font-style: normal;
13-
}
141

15-
/* .markdown-it-code-wrap {
16-
position: relative;
17-
} */
182
.markdown-it-code-copy {
19-
font-family: WdTd !important;
20-
vertical-align: middle;
21-
font-size: 14px;
22-
border: none;
23-
background: transparent;
243
position: absolute;
254
top: 7.5px;
265
right: 6px;
276
cursor: pointer;
287
outline: none;
29-
color: black;
30-
}
31-
32-
/* i.markdown-it-code-copy {
33-
font-style: normal;
34-
} */
35-
.markdown-it-code-copy::before {
36-
content: '\E1AC';
37-
position: absolute;
38-
top: 0;
39-
right: 0;
40-
cursor: pointer;
41-
width: 20px;
42-
height: 20px;
43-
display: inline-block;
44-
text-align: center;
458
}
469

47-
.markdown-it-code-copy:hover::before {
48-
background: #eef1f4;
49-
}

0 commit comments

Comments
 (0)