You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< script lang = "ts" setup >
import { onMounted , ref } from "vue" ;
const item = {
// img: "/src/assets/images/test.png",
img : 'http://47.93.59.251/api/image/thumbnail_1752999610491604992.jpeg' ,
checked : false ,
title : "YP4567890545" ,
date : "2023-12-19 12:09:18" ,
} ;
const data = ref < any [ ] > ( [ ] ) ;
onMounted ( ( ) => {
for ( let i = 0 ; i < 20 ; i ++ ) {
data . value . push ( item as any ) ;
}
} ) ;
< / script >
< template >
< div class = "wrapper" >
< div class = "item" v-for ="(item, index) in data" :key ="index" >
< div class = "top" >
< div
class = "img"
: style = "`background:url(${item.img});background-size:100%;background-repeat: no-repeat;`"
>
< div class = "check_box" > < n -checkbox size = "medium" label = " " / > < / div >
< / div >
< div class = "content" >
< div class = "title" > 任务ID : { { item . title } } < / div >
< div class = "date" > { { item . date } } < / div >
< div class = "tag_box" >
< div
class = "tag_item"
v-for ="index in 2"
:key="index"
:style="index == 2 ? 'color:#02C984' : 'color:#507AFD'"
>
{{ index==1?'待确认':'张思' }}
</div>
</div>
</div>
</div>
<div class="bottom">
<div class="resovle_action">通过</div>
<div class="reject_action">不通过</div>
</div>
</div>
</div>
</template>
<style scoped lang="less" >
.wrapper {
display : flex ;
flex -flow : row wrap ;
align -items : center ;
justify -content : flex -start ;
flex : 1 ;
box -sizing : border -box ;
margin -left : 16px ;
width : 100 % ;
background : # fff ;
padding : 0px 24px 24px 24px ;
.item {
width : 23 % ;
border : 1px solid # ededed ;
border -radius : 3px ;
padding : 8px 10px ;
margin -right : 10px ;
.top {
display : flex ;
flex -flow : row nowrap ;
align -items : center ;
justify -content : flex -start ;
.img {
width : 50 % ;
height : 70px ;
border -radius : 3px ;
.check_box {
margin -left : 8px ;
}
}
.content {
margin -left : 8px ;
.title ,
.date {
font -size : 11px ;
font -weight : bolder ;
text -align : left ;
color : # 323233 ;
line -height : 16px ;
}
}
.tag_box {
display : flex ;
flex -flow : row nowrap ;
align -items : center ;
justify -content : flex -start ;
.tag_item {
width : 31px ;
height : 14px ;
font -size : 10px ;
font -weight : bolder ;
text -align : left ;
/ / color : # 507afd ;
line -height : 14px ;
letter -spacing : 0.1px ;
margin -right : 8px ;
}
}
}
.bottom {
display : flex ;
flex -flow : row nowrap ;
align -items : center ;
justify -content : flex -end ;
.resovle_action {
font -size : 12px ;
font -weight : bolder ;
text -align : left ;
color : # 507afd ;
line -height : 17px ;
}
.reject_action {
font -size : 12px ;
font -weight : bolder ;
text -align : left ;
color : # ff4e4f ;
line -height : 17px ;
margin -left : 15px ;
}
}
}
}
< / style >