From cb66a2061293034821bbd5a1b5956f5c36dbab44 Mon Sep 17 00:00:00 2001 From: Xc <124118265@qq.com> Date: Mon, 21 Nov 2022 21:37:14 +0800 Subject: [PATCH] docs(components): [container] (#10680) * docs(components): [container] * docs(components): [container] * docs(components): [container] --- docs/en-US/component/container.md | 82 +++++++++++-------- packages/components/container/src/aside.vue | 3 + .../components/container/src/container.vue | 3 + packages/components/container/src/footer.vue | 3 + packages/components/container/src/header.vue | 3 + 5 files changed, 58 insertions(+), 36 deletions(-) diff --git a/docs/en-US/component/container.md b/docs/en-US/component/container.md index 8ca078b85e..3864d8e9c2 100644 --- a/docs/en-US/component/container.md +++ b/docs/en-US/component/container.md @@ -79,56 +79,66 @@ container/example ::: -## Container Attributes +## Container API -| Name | Description | Type | Accepted Values | Default | -| --------- | ----------------------------------- | ------ | --------------------- | -------------------------------------------------------------------------- | -| direction | layout direction for child elements | string | horizontal / vertical | vertical when nested with `el-header` or `el-footer`; horizontal otherwise | +### Container Attributes -## Container Slots +| Name | Description | Type | Default | +| --------- | ----------------------------------- | ------------------------------------- | -------------------------------------------------------------------------- | +| direction | layout direction for child elements | ^[string]`'horizontal' \| 'vertical'` | vertical when nested with `el-header` or `el-footer`; horizontal otherwise | -| Name | Description | Subtags | -| ---- | ------------------------- | ------------------------------------------ | -| — | customize default content | Container / Header / Aside / Main / Footer | +### Container Slots -## Header Attributes +| Name | Description | Subtags | +| ------- | ------------------------- | ------------------------------------------ | +| default | customize default content | Container / Header / Aside / Main / Footer | -| Name | Description | Type | Accepted Values | Default | -| ------ | -------------------- | ------ | --------------- | ------- | -| height | height of the header | string | — | 60px | +## Header API -## Header Slots +### Header Attributes -| Name | Description | -| ---- | ------------------------- | -| — | customize default content | +| Name | Description | Type | Default | +| ------ | -------------------- | --------- | ------- | +| height | height of the header | ^[string] | 60px | -## Aside Attributes +### Header Slots -| Name | Description | Type | Accepted Values | Default | -| ----- | ------------------------- | ------ | --------------- | ------- | -| width | width of the side section | string | — | 300px | +| Name | Description | +| ------- | ------------------------- | +| default | customize default content | -## Aside Slots +## Aside API -| Name | Description | -| ---- | ------------------------- | -| — | customize default content | +### Aside Attributes -## Main Slots +| Name | Description | Type | Default | +| ----- | ------------------------- | --------- | ------- | +| width | width of the side section | ^[string] | 300px | -| Name | Description | -| ---- | ------------------------- | -| — | customize default content | +### Aside Slots -## Footer Attributes +| Name | Description | +| ------- | ------------------------- | +| default | customize default content | -| Name | Description | Type | Accepted Values | Default | -| ------ | -------------------- | ------ | --------------- | ------- | -| height | height of the footer | string | — | 60px | +## Main API -## Footer Slots +### Main Slots -| Name | Description | -| ---- | ------------------------- | -| — | customize default content | +| Name | Description | +| ------- | ------------------------- | +| default | customize default content | + +## Footer API + +### Footer Attributes + +| Name | Description | Type | Default | +| ------ | -------------------- | --------- | ------- | +| height | height of the footer | ^[string] | 60px | + +### Footer Slots + +| Name | Description | +| ------- | ------------------------- | +| default | customize default content | diff --git a/packages/components/container/src/aside.vue b/packages/components/container/src/aside.vue index d55d085bdc..6aed726890 100644 --- a/packages/components/container/src/aside.vue +++ b/packages/components/container/src/aside.vue @@ -13,6 +13,9 @@ defineOptions({ name: 'ElAside', }) const props = defineProps({ + /** + * @description width of the side section + */ width: { type: String, default: null, diff --git a/packages/components/container/src/container.vue b/packages/components/container/src/container.vue index a220b444cd..4b32661098 100644 --- a/packages/components/container/src/container.vue +++ b/packages/components/container/src/container.vue @@ -13,6 +13,9 @@ defineOptions({ name: 'ElContainer', }) const props = defineProps({ + /** + * @description layout direction for child elements + */ direction: { type: String, }, diff --git a/packages/components/container/src/footer.vue b/packages/components/container/src/footer.vue index 29c2ccbab6..05ea2fea2b 100644 --- a/packages/components/container/src/footer.vue +++ b/packages/components/container/src/footer.vue @@ -13,6 +13,9 @@ defineOptions({ name: 'ElFooter', }) const props = defineProps({ + /** + * @description height of the footer + */ height: { type: String, default: null, diff --git a/packages/components/container/src/header.vue b/packages/components/container/src/header.vue index 59b19c5241..fb5115f734 100644 --- a/packages/components/container/src/header.vue +++ b/packages/components/container/src/header.vue @@ -14,6 +14,9 @@ defineOptions({ }) const props = defineProps({ + /** + * @description height of the header + */ height: { type: String, default: null,