<div class="container">
<div class="scroll-container clearfix" @click="goDetails(item.id)" style="height: 135px;margin: 0 700px 0 325px;" v-for="item in code" :key="item.id">
<div class="left_Container">
<div style="font-size: 18px;padding: 0 0 90px 0;text-align: left;" >{{ item.title}}</div>
<div style="padding: 0 0 0 0;text-align: left;font-size: 14px;">
{{ item.category}}<span style="font-size: 12px;margin-left: 10px;">{{ item.introduce }}</span>
</div>
</div>
<div class="right_Container" style="padding: 10px 0 0 0;">
<img src="@/assets/login.png" alt="" style="width: 158px;height: 112px;">
</div>
</div>
</div>
</div>
</template>
<!--
<script setup>
import editor from 'monaco-editor'
const dom = ref("")
const initEditor = () => {
// 初始化编辑器,确保dom已经渲染
editor.value = monaco.editor.create(dom.value, {
theme: 'vs-dark', //官方自带三种主题vs, hc-black, or vs-dark
value: dataList.contentValue, //编辑器初始显示文字
readOnly: false,
automaticLayout: true,
language: "javascript",
folding: true, //代码折叠
roundedSelection: false, // 右侧不显示编辑器预览框
autoIndent: true // 自动缩进
});
}
</script> -->
<script>
import axios from 'axios';
export default {
data(){
return {
code: [],
id: 2,
url: "http://localhost:9090/code",
}
},
methods:{
goDetails(id){
this.$router.push({
path: '/code/' + id
})
}
},
mounted(){
axios.post(this.url + "/list").then(res => {
this.code = res.data.data
})
}
}
</script>
<style>
.right_Container {
background-size: 12px !important;
}
* {
margin: 0;
padding: 0;
}
ul li {
font-family: 黑体;
list-style: none;
font-weight: 600;
}
.clearfix:after {
content: "";
display: block;
clear: both;
}
.header {
width: 100%;
height: 100%;
}
.logo {
height: 60px;
background-color: #fff;
padding: 12px 0 0 38px;
}
.logo a {
display: block;
width: 320px;
height: 60px;
background: url('@/assets/tuku/logo.png') no-repeat;
text-decoration: none;
}
.logo h1 a div {
font-family: "黑体";
font-size: 20px;
padding-top: 7px;
margin-right: 60px;
font-style: italic;
}
.blueStyle {
background: linear-gradient(135deg, #2564b8 56%, #ffffff 84%);
/*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
/*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.search {
float: right;
margin-right: 430px;
margin-top: 10px;
border-radius: 50px;
}
input:focus {
outline: none;
}
.logo {
float: left;
}
.search-style {
display: inline-block;
padding: 0px 0 1px 10px;
border-radius: 18px 0 0 18px;
width: 484px;
height: 40px;
box-sizing: border-box;
line-height: inherit;
border: 2px solid #418df5;
border-right: none;
font-size: 14px;
}
.btn {
display: inline-block;
color: #fff;
font-style: italic;
width: 105px;
border: 2px solid #418DF5;
line-height: 37px;
font-weight: 300;
background-color: #418DF5;
border-radius: 0 16px 16px 0;
}
.classify {
padding-left: 40px;
}
.classify ul li {
float: left;
font-size: 17px;
font-style: italic;
padding-right: 28px;
}
.userlabel {
margin-bottom: 22px;
padding: 25px 0 0 38px;
}
.userlabel ul li {
float: left;
font-size: 16px;
padding: 0 40px 25px 0;
font-style: italic;
}
.left_Container{
float: left;
}
.right_Container {
float: right;
}
.clearfix:after {content: "";display: block;clear: both;}
</style>