Skip to content

Commit 5c7e27d

Browse files
authored
pref: optimizing css (#171)
- 删除不会生效的 CSS - 调整结构,减少不必要的标签
1 parent 19d87ce commit 5c7e27d

File tree

3 files changed

+11
-37
lines changed

3 files changed

+11
-37
lines changed

src/components/CodemirrorEditor/aboutDialog.vue

+4-6
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,15 @@
77
width="30%"
88
center
99
>
10-
<div style="text-align: center">
10+
<div style="text-align: center;">
1111
<h3>一款高度简洁的微信 Markdown 编辑器</h3>
12-
</div>
13-
<div style="text-align: center; margin-top: 10px">
1412
<p>扫码关注我的公众号,原创技术文章第一时间推送!</p>
1513
<img
1614
src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png"
17-
style="width: 40%; display: block; margin: 20px auto 10px"
15+
style="width: 40%;"
1816
/>
1917
</div>
20-
<span slot="footer" class="dialog-footer">
18+
<template slot="footer">
2119
<el-button
2220
type="primary"
2321
@click="onRedirect('https://github.com/doocs/md')"
@@ -32,7 +30,7 @@
3230
>
3331
Gitee 仓库
3432
</el-button>
35-
</span>
33+
</template>
3634
</el-dialog>
3735
</template>
3836

src/components/CodemirrorEditor/resetDialog.vue

+6-15
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
class="reset__dialog"
55
:visible="showResetConfirm"
66
@close="$emit('close')"
7+
center
78
>
8-
<div class="text">此操作将丢失本地自定义样式,是否继续?</div>
9-
<div slot="footer" class="dialog-footer">
9+
<div style="text-align: center">
10+
此操作将丢失本地自定义样式,是否继续?
11+
</div>
12+
<template slot="footer">
1013
<el-button :type="btnType" @click="$emit('close')" plain>
1114
取 消
1215
</el-button>
1316
<el-button :type="btnType" @click="$emit('confirm')" plain>
1417
确 定
1518
</el-button>
16-
</div>
19+
</template>
1720
</el-dialog>
1821
</template>
1922

@@ -42,16 +45,4 @@ export default {
4245
/deep/ .el-dialog {
4346
min-width: 440px;
4447
}
45-
46-
.reset__dialog {
47-
text-align: center;
48-
}
49-
50-
.text {
51-
text-align: center;
52-
}
53-
54-
.dialog-footer {
55-
text-align: center;
56-
}
5748
</style>

src/views/index.vue

+1-16
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,4 @@ export default {
2828
}
2929
</script>
3030

31-
<style scoped>
32-
.fade-enter,
33-
.fade-leave-to {
34-
opacity: 0;
35-
}
36-
37-
.fade-enter-to,
38-
.fade-leave {
39-
opacity: 1;
40-
}
41-
42-
.fade-enter-active,
43-
.fade-leave-active {
44-
transition: all 1s;
45-
}
46-
</style>
31+
<style scoped></style>

0 commit comments

Comments
 (0)