From 22de9e06bd461727a656eb075dd3b481263dde65 Mon Sep 17 00:00:00 2001 From: qiang Date: Sat, 22 Jul 2023 08:38:38 +0800 Subject: [PATCH] docs(build): add required attribute to the tag plugin (#13691) --- docs/.vitepress/plugins/tag.ts | 6 ++++-- docs/.vitepress/vitepress/styles/content/tag-content.scss | 4 ++++ docs/en-US/component/table-v2.md | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/.vitepress/plugins/tag.ts b/docs/.vitepress/plugins/tag.ts index 7862defa60..06f538efe6 100644 --- a/docs/.vitepress/plugins/tag.ts +++ b/docs/.vitepress/plugins/tag.ts @@ -9,9 +9,11 @@ export default (md: MarkdownIt): void => { const value = token.content /** * Add styles for some special tags - * vitepress/styles/content/tag-mark-content.scss + * vitepress/styles/content/tag-content.scss */ - const tagClass = ['beta', 'deprecated', 'a11y'].includes(value) ? value : '' + const tagClass = ['beta', 'deprecated', 'a11y', 'required'].includes(value) + ? value + : '' return `${value}` } diff --git a/docs/.vitepress/vitepress/styles/content/tag-content.scss b/docs/.vitepress/vitepress/styles/content/tag-content.scss index 2bc6b2ec6a..b6be3b3b85 100644 --- a/docs/.vitepress/vitepress/styles/content/tag-content.scss +++ b/docs/.vitepress/vitepress/styles/content/tag-content.scss @@ -23,4 +23,8 @@ --vp-tag-color: var(--purple-color); --vp-tag-border-color: var(--purple-color-light); } + &.required { + --vp-tag-color: var(--el-color-success); + --vp-tag-border-color: var(--el-color-success); + } } diff --git a/docs/en-US/component/table-v2.md b/docs/en-US/component/table-v2.md index 5a4361e763..2e8e65b033 100644 --- a/docs/en-US/component/table-v2.md +++ b/docs/en-US/component/table-v2.md @@ -325,8 +325,8 @@ table-v2/manual-scroll | default-expanded-row-keys | An array of keys for default expanded rows, **NON REACTIVE** | Array\<[KeyType](#typings)\> | - | | class | Class name for the the virtual table, will be applied to all three tables (left, right, main) | String/Array/Object | - | | fixed | Flag indicates the table column's width is a fixed or flexible. | Boolean | false | -| width \* | Width for the table, required | Number | - | -| height \* | Height for the table, required | Number | - | +| width ^(required) | Width for the table | Number | - | +| height ^(required) | Height for the table | Number | - | | max-height | Maximum height for the table | Number | - | | h-scrollbar-size | Indicates the horizontal scrollbar's size for the table, used to prevent the horizontal and vertical scrollbar to collapse | Number | 6 | | v-scrollbar-size | Indicates the vertical scrollbar's size for the table, used to prevent the horizontal and vertical scrollbar to collapse | Number | 6 | @@ -389,7 +389,7 @@ Note that these are `JavaScript` Objects, so that you **CANNOT USE** kebab-case | title | The default text rendered in header cell | String | - | | maxWidth | Maximum width for the column | String | - | | minWidth | Minimum width for the column | String | - | -| width \* | Width for the column **Required** | Number | - | +| width ^(required) | Width for the column | Number | - | | cellRenderer | Customized Cell renderer | VueComponent/(props: [CellRenderProps](#typings)) => VNode | - | | headerCellRenderer | Customized Header renderer | VueComponent/(props: [HeaderRenderProps](#typings)) => VNode | - |