diff --git a/docs/zh/components/container.md b/docs/zh/components/container.md index 741eb7f9..396b6e08 100644 --- a/docs/zh/components/container.md +++ b/docs/zh/components/container.md @@ -6,13 +6,8 @@ | 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | --- | -| type | 容器类型 | 非 | String | card ghost full | card | +| type | 容器类型 | 非 | String | card ghost full | full | | scroll | 滚动优化 | 非 | Boolean | | false | -| responsive | 响应式宽度 | 非 | Boolean | | false | - -::: tip -`responsive` 参数设置只在 `type` 等于 `card` 或 `ghost` 时生效 -::: ## 使用方法 @@ -40,25 +35,6 @@ export default { ``` -### 基础页面容器 - -高度根据内容适应 - -``` vue - - 主体内容 - -``` - -使用 `slot` - -``` vue - - - 主体内容 - -``` - ### 自适应填充页面容器 无论内容高度多少,都会自动撑满页面,并有可选的 `header` 和 `footer` 插槽 @@ -101,6 +77,27 @@ export default { ``` +### 卡片型页面容器 + +高度根据内容适应 + +``` vue + + 主体内容 + +``` + +使用 `slot` + +> 卡片型容器只有 header 插槽 + +``` vue + + + 主体内容 + +``` + ### 隐形页面容器 不显示任何背景色和边框,通常这个模式只有在极少情况下会使用 @@ -111,4 +108,15 @@ export default { ``` +使用 `slot` + +> 隐形页面容器只有 header 插槽 + +``` vue + + + 主体内容 + +``` + 如果你不希望内容紧贴上边,可以在内容外层容器设置 `class="d2-mt"` diff --git a/src/components/core/d2-container/index.vue b/src/components/core/d2-container/index.vue index 0d6922ae..191d4cc1 100644 --- a/src/components/core/d2-container/index.vue +++ b/src/components/core/d2-container/index.vue @@ -1,5 +1,5 @@