2021-09-17 00:18:50 +08:00
|
|
|
<template>
|
|
|
|
<el-radio-group v-model="size">
|
2021-12-12 17:54:21 +08:00
|
|
|
<el-radio label="large">Large</el-radio>
|
|
|
|
<el-radio>Default</el-radio>
|
2021-09-17 00:18:50 +08:00
|
|
|
<el-radio label="small">Small</el-radio>
|
|
|
|
</el-radio-group>
|
|
|
|
|
|
|
|
<el-descriptions
|
|
|
|
class="margin-top"
|
|
|
|
title="With border"
|
|
|
|
:column="3"
|
|
|
|
:size="size"
|
|
|
|
border
|
|
|
|
>
|
|
|
|
<template #extra>
|
2021-12-30 17:46:33 +08:00
|
|
|
<el-button type="primary">Operation</el-button>
|
2021-09-17 00:18:50 +08:00
|
|
|
</template>
|
|
|
|
<el-descriptions-item>
|
|
|
|
<template #label>
|
2021-12-30 17:46:33 +08:00
|
|
|
<div class="cell-item">
|
|
|
|
<el-icon :style="iconStyle">
|
|
|
|
<user />
|
|
|
|
</el-icon>
|
|
|
|
Username
|
|
|
|
</div>
|
2021-09-17 00:18:50 +08:00
|
|
|
</template>
|
|
|
|
kooriookami
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item>
|
|
|
|
<template #label>
|
2021-12-30 17:46:33 +08:00
|
|
|
<div class="cell-item">
|
|
|
|
<el-icon :style="iconStyle">
|
|
|
|
<iphone />
|
|
|
|
</el-icon>
|
|
|
|
Telephone
|
|
|
|
</div>
|
2021-09-17 00:18:50 +08:00
|
|
|
</template>
|
|
|
|
18100000000
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item>
|
|
|
|
<template #label>
|
2021-12-30 17:46:33 +08:00
|
|
|
<div class="cell-item">
|
|
|
|
<el-icon :style="iconStyle">
|
|
|
|
<location />
|
|
|
|
</el-icon>
|
|
|
|
Place
|
|
|
|
</div>
|
2021-09-17 00:18:50 +08:00
|
|
|
</template>
|
|
|
|
Suzhou
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item>
|
|
|
|
<template #label>
|
2021-12-30 17:46:33 +08:00
|
|
|
<div class="cell-item">
|
|
|
|
<el-icon :style="iconStyle">
|
|
|
|
<tickets />
|
|
|
|
</el-icon>
|
|
|
|
Remarks
|
|
|
|
</div>
|
2021-09-17 00:18:50 +08:00
|
|
|
</template>
|
|
|
|
<el-tag size="small">School</el-tag>
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item>
|
|
|
|
<template #label>
|
2021-12-30 17:46:33 +08:00
|
|
|
<div class="cell-item">
|
|
|
|
<el-icon :style="iconStyle">
|
|
|
|
<office-building />
|
|
|
|
</el-icon>
|
|
|
|
Address
|
|
|
|
</div>
|
2021-09-17 00:18:50 +08:00
|
|
|
</template>
|
|
|
|
No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
|
|
|
|
</el-descriptions-item>
|
|
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
<el-descriptions
|
|
|
|
class="margin-top"
|
|
|
|
title="Without border"
|
|
|
|
:column="3"
|
|
|
|
:size="size"
|
2021-12-30 17:46:33 +08:00
|
|
|
:style="blockMargin"
|
2021-09-17 00:18:50 +08:00
|
|
|
>
|
|
|
|
<template #extra>
|
2021-12-30 17:46:33 +08:00
|
|
|
<el-button type="primary">Operation</el-button>
|
2021-09-17 00:18:50 +08:00
|
|
|
</template>
|
|
|
|
<el-descriptions-item label="Username">kooriookami</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="Telephone">18100000000</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="Place">Suzhou</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="Remarks">
|
|
|
|
<el-tag size="small">School</el-tag>
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="Address"
|
2021-12-30 17:46:33 +08:00
|
|
|
>No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
|
|
|
|
</el-descriptions-item>
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-descriptions>
|
|
|
|
</template>
|
|
|
|
|
2021-11-05 17:44:02 +08:00
|
|
|
<script setup lang="ts">
|
2021-12-30 17:46:33 +08:00
|
|
|
import { computed, ref } from 'vue'
|
2021-10-28 06:18:09 +08:00
|
|
|
import {
|
|
|
|
Iphone,
|
|
|
|
Location,
|
|
|
|
OfficeBuilding,
|
2022-03-25 15:35:56 +08:00
|
|
|
Tickets,
|
|
|
|
User,
|
2021-12-04 11:20:06 +08:00
|
|
|
} from '@element-plus/icons-vue'
|
2021-10-28 06:18:09 +08:00
|
|
|
|
2021-11-05 17:44:02 +08:00
|
|
|
const size = ref('')
|
2021-12-30 17:46:33 +08:00
|
|
|
const iconStyle = computed(() => {
|
|
|
|
const marginMap = {
|
|
|
|
large: '8px',
|
|
|
|
default: '6px',
|
|
|
|
small: '4px',
|
|
|
|
}
|
|
|
|
return {
|
|
|
|
marginRight: marginMap[size.value] || marginMap.default,
|
|
|
|
}
|
|
|
|
})
|
|
|
|
const blockMargin = computed(() => {
|
|
|
|
const marginMap = {
|
|
|
|
large: '32px',
|
|
|
|
default: '28px',
|
|
|
|
small: '24px',
|
|
|
|
}
|
|
|
|
return {
|
|
|
|
marginTop: marginMap[size.value] || marginMap.default,
|
|
|
|
}
|
|
|
|
})
|
2021-09-17 00:18:50 +08:00
|
|
|
</script>
|
2021-12-30 17:46:33 +08:00
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.el-descriptions {
|
|
|
|
margin-top: 20px;
|
|
|
|
}
|
|
|
|
.cell-item {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2022-01-31 23:43:56 +08:00
|
|
|
.margin-top {
|
|
|
|
margin-top: 20px;
|
|
|
|
}
|
2021-12-30 17:46:33 +08:00
|
|
|
</style>
|