docs(components): [table] optimize FAQ code display (#18281)

* docs(components): [table] optimize FAQ code display

* docs: update
about:
https://github.com/element-plus/element-plus/issues/18240
https://github.com/element-plus/element-plus/issues/16514
This commit is contained in:
sea
2024-09-14 14:55:02 +08:00
committed by GitHub
parent 9123a05826
commit cd01ceb8f0

View File

@@ -411,18 +411,16 @@ interface TreeNode {
#### How to use image preview in the table?
```vue
<el-table-column label="Thumbnail" width="180">
```vue{4}
<template>
<el-table-column width="180">
<template #default="scope">
<div style="display: flex; align-items: center">
<el-image :preview-src-list="srcList"/>
</div>
<el-image preview-teleported :preview-src-list="srcList" />
</template>
</el-table-column>
</el-table-column>
</template>
```
PS: since the fixed column is implement by sticky, when you have fixed columns in table, please add the `preview-teleported` attribute in image
#### Why column is not rendered when use DOM templates?
Typical issue: [#5046](https://github.com/element-plus/element-plus/issues/5046) [#5862](https://github.com/element-plus/element-plus/issues/5862) [#6919](https://github.com/element-plus/element-plus/issues/6919)