2022-05-19 17:28:53 +08:00
|
|
|
<template>
|
2022-06-01 18:22:19 +08:00
|
|
|
<section class="AiItem" :class="{border}">
|
2022-05-19 17:28:53 +08:00
|
|
|
<div v-if="topLabel" class="topLabel">
|
|
|
|
|
<div class="labelPane" flex>
|
2022-06-01 18:22:19 +08:00
|
|
|
<div class="label" :class="{required,labelBold}" v-text="label"/>
|
2022-05-19 17:28:53 +08:00
|
|
|
<slot name="sub" v-if="$slots.sub"/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content">
|
|
|
|
|
<slot v-if="$slots.default"/>
|
|
|
|
|
<div v-else v-text="value"/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="normal" flex>
|
|
|
|
|
<div class="fill" flex>
|
2022-06-01 18:22:19 +08:00
|
|
|
<div class="label" :class="{required,labelBold}" v-text="label"/>
|
2022-05-19 17:28:53 +08:00
|
|
|
<slot name="sub" v-if="$slots.sub"/>
|
|
|
|
|
</div>
|
2022-06-01 18:22:19 +08:00
|
|
|
<div class="flexContent">
|
|
|
|
|
<slot v-if="$slots.default"/>
|
|
|
|
|
<div v-else v-text="value"/>
|
|
|
|
|
</div>
|
2022-05-19 17:28:53 +08:00
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: "AiItem",
|
|
|
|
|
props: {
|
|
|
|
|
value: {default: ""},
|
|
|
|
|
label: {default: ""},
|
|
|
|
|
required: Boolean,
|
2022-06-01 18:22:19 +08:00
|
|
|
topLabel: Boolean,
|
|
|
|
|
border: {default: true},
|
|
|
|
|
labelBold: Boolean
|
2022-05-19 17:28:53 +08:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.AiItem {
|
|
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
|
|
2022-06-01 18:22:19 +08:00
|
|
|
.border {
|
|
|
|
|
.normal {
|
|
|
|
|
border-bottom: 2px solid #ddd;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.topLabel {
|
|
|
|
|
border-bottom: 2px solid #ddd;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-19 17:28:53 +08:00
|
|
|
.normal {
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding-right: 32px;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
height: 112px;
|
2022-06-01 18:22:19 +08:00
|
|
|
|
|
|
|
|
.flexContent {
|
|
|
|
|
max-width: 62vw;
|
|
|
|
|
}
|
2022-05-19 17:28:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.label {
|
|
|
|
|
padding-left: 20px;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #333333;
|
|
|
|
|
margin-right: 20px;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
&.required:before {
|
|
|
|
|
position: absolute;
|
|
|
|
|
display: block;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
content: "*";
|
|
|
|
|
color: #f46;
|
|
|
|
|
}
|
2022-06-01 18:22:19 +08:00
|
|
|
|
|
|
|
|
&.labelBold {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
font-size: 34px;
|
|
|
|
|
}
|
2022-05-19 17:28:53 +08:00
|
|
|
}
|
|
|
|
|
|
2022-06-01 18:22:19 +08:00
|
|
|
::v-deep.topLabel {
|
2022-05-19 17:28:53 +08:00
|
|
|
padding: 32px 32px 32px 0;
|
|
|
|
|
|
|
|
|
|
.labelPane {
|
|
|
|
|
margin-bottom: 32px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
padding-left: 20px;
|
2022-06-01 18:22:19 +08:00
|
|
|
|
|
|
|
|
.AiMore > .u-icon {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
2022-05-19 17:28:53 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|