63 lines
1015 B
Vue
63 lines
1015 B
Vue
<template>
|
|
<div class="line-field">
|
|
<div class="label">
|
|
{{label}}
|
|
</div>
|
|
<div class="right-box" >
|
|
<slot>
|
|
{{value}}
|
|
</slot>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "LineField",
|
|
props: {
|
|
label: {
|
|
type: String,
|
|
default: null
|
|
},
|
|
value: {
|
|
type: [String, Number],
|
|
default: null,
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
.line-field {
|
|
width: 100%;
|
|
padding: 0.5em 1em;
|
|
font-size: 14px;
|
|
display: flex;
|
|
height: fit-content;
|
|
line-height: 1.5em;
|
|
justify-content: space-between;
|
|
.label {
|
|
width: fit-content;
|
|
margin-right: 2em;
|
|
}
|
|
.right-box {
|
|
flex: 1;
|
|
text-align: right;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: flex-end;
|
|
vertical-align: center;
|
|
}
|
|
i {
|
|
line-height: 1.5em;
|
|
margin: 0 0.5em;
|
|
}
|
|
}
|
|
.line-field:nth-child(n + 2) {
|
|
border-top: 1px solid #ededed;
|
|
}
|
|
.line-field:hover {
|
|
background-color: rgba(136, 131, 240, 0.08);
|
|
}
|
|
</style>
|