Skip to content

Commit fc1e5ff

Browse files
committed
fix: the style of Not nameShow and lang
1 parent fd4d024 commit fc1e5ff

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/App.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const light = 'light'
1919
const vue = 'vue'
2020
const dark = 'dark'
2121
const height = '200px'
22-
const borderRadius = '0px'
22+
const borderRadius = '10px'
2323
</script>
2424
<template>
2525
<div class="wrapper">
@@ -37,6 +37,8 @@ const borderRadius = '0px'
3737
:lang="vue"
3838
:codeLines="true"
3939
:borderRadius="borderRadius"
40+
:nameShow="false"
41+
:copy="false"
4042
></HighCode>
4143
</div>
4244
</template>

src/components/HighCode.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ nextTick(() => {
132132
class="code_area"
133133
ref="codeArea"
134134
:style="{
135+
paddingBottom: nameShow === true && copy === true ? '20px' : '14px',
136+
paddingTop: nameShow === true && copy === true ? 0 : '14px',
135137
borderBottomLeftRadius: props.borderRadius,
136138
borderBottomRightRadius: props.borderRadius,
137139
borderTopLeftRadius: withoutHeader == true ? props.borderRadius : 0,
@@ -179,6 +181,7 @@ nextTick(() => {
179181
padding-top: 0px;
180182
padding-left: 24px;
181183
overflow: overlay;
184+
margin: auto 0;
182185
// border-radius: 5px;
183186
display: flex;
184187
&_link {
@@ -204,7 +207,8 @@ nextTick(() => {
204207
position: relative;
205208
display: flex;
206209
justify-content: flex-start;
207-
height: 30px;
210+
// height: 30px;
211+
208212
width: 100%;
209213
}
210214
pre code {

0 commit comments

Comments
 (0)