Skip to content

Commit d048289

Browse files
author
李杨枚
committed
docs: remove the secondary header
1 parent 3f448ed commit d048289

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

docs/assets/demo-vue/en/custom-layout/cell-dom-component.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,25 @@ link: custom_define/vue-dom-component
1111

1212
In `vue-vtable`, you can directly render DOM components within table cells, enabling seamless integration of complex Vue components for highly customizable table displays. Two approaches are supported: **slot-based** and **directly passing components into the `column` configuration**. Both methods require wrapping components with the `Group` component.
1313

14-
## Enabling the Feature
14+
**🛠️ Core configuration steps: Enable DOM component rendering**
1515

1616
To render DOM components in `vue-vtable`, follow these key steps:
1717

1818
- **Pass the `vue` property to the `Group` component**: This allows the `Group` component to recognize and process Vue components.
1919
- **Enable `customConfig.createReactContainer`**: This configuration creates a table container to ensure Vue components render correctly within the table.
2020

21-
## Usage
22-
23-
**Method 1: Slot-Based Rendering**
21+
**✨ Method 1: Slot-Based Rendering**
2422

2523
Slot-based rendering uses the `headerCustomLayout` and `customLayout` slots of the `ListColumn` component. Custom components must be wrapped in the `Group` component.
2624

2725
- **`headerCustomLayout`**: Customizes header cell rendering.
2826
- **`customLayout`**: Customizes body cell rendering.
2927

30-
**Method 2: Direct Configuration-Based Rendering**
28+
**Method 2: Direct Configuration-Based Rendering**
3129

3230
This method is similar to slot-based rendering but does not use slots. Instead, directly pass virtual nodes via the `element` property in the `column.headerCustomLayout` or `column.customLayout` configuration. The usage aligns with [Custom Components](../../guide/custom_define/custom_layout).
3331

34-
## Notes
32+
**⚠️ Notes**
3533

3634
- **Enabling Interactions**: If custom cells require mouse interactions, manually enable `pointer-events`. See the example below.
3735

docs/assets/demo-vue/zh/custom-layout/cell-dom-component.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,26 @@ link: custom_define/vue-dom-component
1111

1212
`vue-vtable` 中,支持在单元格中直接渲染 DOM 组件,可以轻松地在表格中嵌入复杂的 Vue 组件,实现高度自定义的表格展示效果。支持两种形式:**插槽式****直接传入到 `column` 配置中**。两种方式都需要通过 `Group` 组件进行包裹。
1313

14-
## 开启方式
14+
**🛠️ 核心配置步骤:开启 DOM 组件渲染**
1515

1616
`vue-vtable` 中,渲染 DOM 组件需要两个关键步骤:
1717

1818
- **`Group` 组件中传入 `vue` 属性**:这是为了让 `Group` 组件能够识别并处理 Vue 组件。
1919
- **开启 `customConfig.createReactContainer`**:这个配置项用于创建表格容器,确保 Vue 组件能够正确渲染到表格容器中。
2020

21-
## 使用方式
22-
23-
**使用方式 1:插槽式渲染**
21+
**✨ 使用方式 1:插槽式渲染**
2422

2523
插槽式渲染是通过 `ListColumn` 组件的两个插槽 `headerCustomLayout``customLayout` 来实现的。自定义组件需要使用 `Group` 组件进行包裹。
2624

2725
- **`headerCustomLayout`**:用于自定义表头单元格的渲染。
2826
- **`customLayout`**:用于自定义表格体单元格的渲染。
2927

30-
**使用方式 2: 直接传入配置式渲染**
28+
**使用方式 2: 直接传入配置式渲染**
3129

3230
直接传入配置式渲染与插槽式渲染类似,区别在于你不需要通过插槽来传递组件,而是直接在 `column.headerCustomLayout``column.customLayout` 配置中的 `element` 属性中传入虚拟节点。
3331
使用方法与 [自定义组件](../../guide/custom_define/custom_layout) 大致相同。
3432

35-
## 注意事项
33+
**⚠️ 注意事项**
3634

3735
- **交互开启**: 若自定义单元格中需要鼠标交互,需要手动开启 `pointer-events`, 如下示例
3836

0 commit comments

Comments
 (0)