RAS-WEB/src/views/screen/R_D_Environment/component/item.vue

53 lines
1.1 KiB
Vue
Raw Normal View History

2024-11-05 09:07:21 +00:00
<template>
<div class="item-container">
2024-11-11 09:05:25 +00:00
<div class="box-title" :class="[prop.pos == 'left'?'pos-l':'pos-r']">{{ prop.title }}</div>
2024-11-05 09:07:21 +00:00
<div class="content">
<slot></slot>
</div>
</div>
</template>
<script setup>
const prop = defineProps({
title: {
type: String,
default: '标题'
},
2024-11-11 09:05:25 +00:00
pos: {
type: String,
default: 'left'
}
2024-11-05 09:07:21 +00:00
})
</script>
<style lang="scss" scoped>
.item-container {
width: 100%;
height: 100%;
.box-title {
width: 100%;
height: 41px;
box-sizing: border-box;
padding-left: 25px;
font-size: 20px;
line-height: 40px;
color: #fff;
2024-11-11 09:05:25 +00:00
}
.pos-l {
2024-11-22 08:58:50 +00:00
// background: linear-gradient(to right, #102238 0%, transparent 100%);
2024-11-11 09:05:25 +00:00
background: url('/src/assets/images/box-title-l.png') no-repeat center center / 100% 100%;
}
.pos-r {
2024-11-22 08:58:50 +00:00
// background: linear-gradient(to left, #102238 0%, transparent 100%);
2024-11-11 09:05:25 +00:00
background: url('/src/assets/images/box-title-r.png') no-repeat center center / 100% 100%;
text-align: right;
padding-right: 25px;
2024-11-05 09:07:21 +00:00
}
.content {
width: 100%;
height: calc(100% - 41px);
}
}
</style>