mirror of
https://github.com/element-plus/element-plus.git
synced 2025-08-14 18:11:48 +08:00

* perf: change to import-x * feat: add rules * chore: fix rule * chore: fix * chore: fix * chore: fix * style: `pnpm lint:fix` * Revert "style: `pnpm lint:fix`" This reverts commit db0116a288299c507e3cfc4d7a22e2207265d920. * Revert "chore: fix" This reverts commit 69c82a90c01525e38180be4c21e8ef5602512318. * chore: fix * style: `pnpm lint:fix` * fix: lint * chore: `pnpm format`
69 lines
1.9 KiB
Vue
69 lines
1.9 KiB
Vue
<template>
|
|
<el-radio-group v-model="size">
|
|
<el-radio value="large">Large</el-radio>
|
|
<el-radio value="default">Default</el-radio>
|
|
<el-radio value="small">Small</el-radio>
|
|
</el-radio-group>
|
|
|
|
<el-descriptions
|
|
title="Vertical list with border"
|
|
direction="vertical"
|
|
:column="4"
|
|
:size="size"
|
|
border
|
|
>
|
|
<el-descriptions-item label="Username">kooriookami</el-descriptions-item>
|
|
<el-descriptions-item label="Telephone">18100000000</el-descriptions-item>
|
|
<el-descriptions-item label="Place" :span="2">Suzhou</el-descriptions-item>
|
|
<el-descriptions-item label="Remarks">
|
|
<el-tag size="small">School</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="Address">
|
|
No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
|
|
<el-descriptions
|
|
title="Vertical list without border"
|
|
:column="4"
|
|
:size="size"
|
|
direction="vertical"
|
|
:style="blockMargin"
|
|
>
|
|
<el-descriptions-item label="Username">kooriookami</el-descriptions-item>
|
|
<el-descriptions-item label="Telephone">18100000000</el-descriptions-item>
|
|
<el-descriptions-item label="Place" :span="2">Suzhou</el-descriptions-item>
|
|
<el-descriptions-item label="Remarks">
|
|
<el-tag size="small">School</el-tag>
|
|
</el-descriptions-item>
|
|
<el-descriptions-item label="Address">
|
|
No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
|
|
</el-descriptions-item>
|
|
</el-descriptions>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed, ref } from 'vue'
|
|
|
|
import type { ComponentSize } from 'element-plus'
|
|
|
|
const size = ref<ComponentSize>('default')
|
|
|
|
const blockMargin = computed(() => {
|
|
const marginMap = {
|
|
large: '32px',
|
|
default: '28px',
|
|
small: '24px',
|
|
}
|
|
return {
|
|
marginTop: marginMap[size.value] || marginMap.default,
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
.el-descriptions {
|
|
margin-top: 20px;
|
|
}
|
|
</style>
|