2019-06-17 15:25:33 +08:00
|
|
|
<template>
|
|
|
|
<div
|
|
|
|
class="n-nimbus-form-card"
|
2019-06-17 16:12:10 +08:00
|
|
|
:style="{width: width + 'px'}"
|
2019-06-17 15:25:33 +08:00
|
|
|
>
|
2019-06-18 16:12:33 +08:00
|
|
|
<div class="n-nimbus-form-card__body">
|
|
|
|
<div class="n-nimbus-form-card__header">
|
|
|
|
<span class="n-nimbus-form-card__title">{{ title }}</span>
|
|
|
|
<div class="n-nimbus-form-card__right-header">
|
|
|
|
<div>
|
|
|
|
<slot name="header" />
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="n-nimbus-form-card__deactivator"
|
|
|
|
@click="deactivate"
|
|
|
|
/>
|
|
|
|
</div>
|
2019-06-17 16:12:10 +08:00
|
|
|
</div>
|
2019-06-18 16:12:33 +08:00
|
|
|
<div class="n-nimbus-form-card__divider" />
|
|
|
|
<slot name="content" />
|
|
|
|
<div class="n-nimbus-form-card__footer">
|
|
|
|
<div class="nimbus-form-card__footer nimbus-form-card__actions">
|
|
|
|
<slot name="footer" />
|
|
|
|
</div>
|
2019-06-17 16:12:10 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-17 15:25:33 +08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'NNimbusFormCard',
|
|
|
|
props: {
|
|
|
|
width: {
|
2019-06-17 16:12:10 +08:00
|
|
|
type: [Number, String],
|
2019-06-17 15:25:33 +08:00
|
|
|
default: 900
|
2019-06-17 16:12:10 +08:00
|
|
|
},
|
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
required: true
|
|
|
|
},
|
|
|
|
deactivate: {
|
|
|
|
type: Function,
|
|
|
|
required: true
|
2019-06-17 15:25:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.n-nimbus-form-card {
|
|
|
|
min-width: 600px;
|
|
|
|
width: 1032px;
|
2019-06-18 16:12:33 +08:00
|
|
|
margin: auto;
|
|
|
|
.n-nimbus-form-card__body {
|
|
|
|
margin-top: 24px;
|
|
|
|
margin-bottom: 24px;
|
|
|
|
background: #5c657e;
|
|
|
|
padding: 24px 45px;
|
|
|
|
border-radius: 9px;
|
|
|
|
.n-nimbus-form-card__header {
|
2019-06-17 16:12:10 +08:00
|
|
|
display: flex;
|
2019-06-18 16:12:33 +08:00
|
|
|
justify-content: space-between;
|
2019-06-17 16:12:10 +08:00
|
|
|
align-items: center;
|
2019-06-18 16:12:33 +08:00
|
|
|
margin-bottom: 20px;
|
|
|
|
height: 19px;
|
|
|
|
.n-nimbus-form-card__title {
|
|
|
|
line-height: 19px;
|
|
|
|
font-size: 16px;
|
|
|
|
font-weight: 700;
|
|
|
|
color: #ffffff;
|
|
|
|
}
|
|
|
|
.n-nimbus-form-card__right-header {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
.n-nimbus-form-card__deactivator {
|
|
|
|
position: relative;
|
|
|
|
width: 14px;
|
|
|
|
height: 14px;
|
|
|
|
margin-left: 17px;
|
|
|
|
cursor: pointer;
|
|
|
|
&::before {
|
|
|
|
position: absolute;
|
|
|
|
transform: rotate(45deg);
|
|
|
|
height: 7px;
|
|
|
|
width: 7px;
|
|
|
|
top: -3px;
|
|
|
|
content: "";
|
|
|
|
border-right: 3px solid #c5d0de;
|
|
|
|
border-bottom: 3px solid #c5d0de;
|
|
|
|
}
|
|
|
|
&::after {
|
|
|
|
position: absolute;
|
|
|
|
height: 7px;
|
|
|
|
width: 7px;
|
|
|
|
content: "";
|
|
|
|
transform: rotate(45deg);
|
|
|
|
top: 7px;
|
|
|
|
border-left: 3px solid #c5d0de;
|
|
|
|
border-top: 3px solid #c5d0de;
|
|
|
|
}
|
2019-06-17 16:12:10 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-06-18 16:12:33 +08:00
|
|
|
.n-nimbus-form-card__divider {
|
|
|
|
border: 1px solid #6f778d;
|
|
|
|
margin-bottom: 19px;
|
|
|
|
}
|
|
|
|
.n-nimbus-form-card__footer {
|
|
|
|
margin-top: 24px;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row-reverse;
|
|
|
|
}
|
2019-06-17 15:25:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|