BUG 30546

This commit is contained in:
aixianling
2022-07-18 11:31:40 +08:00
parent 70c6d61e23
commit 068cbb2916
3 changed files with 138 additions and 13 deletions

View File

@@ -0,0 +1,23 @@
<template>
<section class="AiGroup">
<slot/>
</section>
</template>
<script>
export default {
name: "AiGroup"
}
</script>
<style lang="scss" scoped>
.AiGroup {
background: #FFFFFF;
box-shadow: inset 0px -1px 0px 0px #DDDDDD;
padding-left: 32px;
& + .AiGroup {
margin-top: 16px;
}
}
</style>

View File

@@ -0,0 +1,107 @@
<template>
<section class="AiItem" :class="{border}">
<div v-if="topLabel" class="topLabel">
<div class="labelPane flex">
<div class="label" :class="{required,labelBold}" v-text="label"/>
<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">
<div class="label" :class="{required,labelBold}" v-text="label"/>
<slot name="sub" v-if="$slots.sub"/>
</div>
<div class="flexContent">
<slot v-if="$slots.default"/>
<div v-else v-text="value"/>
</div>
</div>
</section>
</template>
<script>
export default {
name: "AiItem",
props: {
value: {default: ""},
label: {default: ""},
required: Boolean,
topLabel: Boolean,
border: {default: true},
labelBold: Boolean
},
data() {
return {}
}
}
</script>
<style lang="scss" scoped>
.AiItem {
font-family: PingFangSC-Regular, PingFang SC;
.border {
.normal {
border-bottom: 2px solid #ddd;
}
.topLabel {
border-bottom: 2px solid #ddd;
}
}
.normal {
width: 100%;
padding-right: 32px;
box-sizing: border-box;
height: 112px;
.flexContent {
max-width: 62vw;
}
}
.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;
}
&.labelBold {
font-weight: bold;
font-size: 34px;
}
}
::v-deep.topLabel {
padding: 32px 32px 32px 0;
.labelPane {
margin-bottom: 32px;
}
.content {
padding-left: 20px;
.AiMore > .u-icon {
width: 100%;
}
}
}
}
</style>