2025-10-30 15:39:08 +08:00
< script lang = "ts" setup >
2025-11-02 12:32:36 +08:00
defineOptions ( { name : 'CardTitle' } ) ;
2025-11-02 09:20:25 +08:00
// TODO @jawe from xingyu: https://gitee.com/yudaocode/yudao-ui-admin-vben/pulls/243/files#diff_note_47350213; 这个组件没有必要, 直接用antdv card 的slot去做就行了, 只有这一个地方用, 没有必要单独写一个组件
2025-10-30 15:39:08 +08:00
defineProps ( {
title : {
type : String ,
required : true ,
} ,
} ) ;
< / script >
< template >
< span class = "card-title" > { { title } } < / span >
< / template >
< style scoped lang = "scss" >
. card - title {
font - size : 14 px ;
font - weight : 600 ;
& : : before {
position : relative ;
top : 8 px ;
left : - 5 px ;
display : inline - block ;
width : 3 px ;
height : 14 px ;
content : '' ;
//background-color: #105cfb;
background : var ( -- el - color - primary ) ;
border - radius : 5 px ;
transform : translateY ( - 50 % ) ;
}
}
< / style >