feat: 添加前端配套工具
This commit is contained in:
71
Yi.Bbs.Vue3/src/views/start/components/CodeBox.vue
Normal file
71
Yi.Bbs.Vue3/src/views/start/components/CodeBox.vue
Normal file
@@ -0,0 +1,71 @@
|
||||
<script setup>
|
||||
const props = defineProps(["text"]);
|
||||
</script>
|
||||
<template>
|
||||
<div class="box">
|
||||
<div class="header">
|
||||
<div class="header-left">
|
||||
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
<span class="dot"></span>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<button>复制</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body"> {{ props.text }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped lang="scss">
|
||||
.box {
|
||||
background-color: #292D33;
|
||||
|
||||
width: 100%;
|
||||
border-radius: 12px;
|
||||
border: 4px solid #0c0e12;
|
||||
color: #fff;
|
||||
padding: 18px 18px 12px !important;
|
||||
font-size: 15px;
|
||||
line-height: 25px;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.dot {
|
||||
display: flex;
|
||||
margin-right: 8px;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.dot:nth-child(1) {
|
||||
background-color: #f24e1e;
|
||||
}
|
||||
|
||||
.dot:nth-child(2) {
|
||||
background-color: #ffc700;
|
||||
}
|
||||
|
||||
.dot:nth-child(3) {
|
||||
background-color: #0fa958;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
|
||||
height: 30px;
|
||||
&-left{
|
||||
display: flex;
|
||||
}
|
||||
&-right{
|
||||
button{
|
||||
background-color:#409EFF;
|
||||
color: #fff !important;
|
||||
height: 25px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user