From af96bc113fba35793e727d1676f63b1b30e9498a Mon Sep 17 00:00:00 2001 From: Karlen Date: Fri, 12 Jul 2024 00:27:03 +0300 Subject: [PATCH] Fix types & web-types.json --- types/autocomplete.d.ts | 4 +--- types/button.d.ts | 2 +- types/col.d.ts | 2 +- types/date-picker.d.ts | 4 +--- types/element-ui.d.ts | 2 +- types/input-number.d.ts | 4 +--- types/input.d.ts | 12 +++--------- types/link.d.ts | 2 +- types/row.d.ts | 6 +++--- types/select.d.ts | 8 ++------ types/skeleton.d.ts | 2 +- types/tag.d.ts | 2 +- types/time-picker.d.ts | 4 +--- types/time-select.d.ts | 4 +--- types/tree.d.ts | 4 ++-- web-types.json | 41 +++++++++++++++++++++++------------------ 16 files changed, 44 insertions(+), 59 deletions(-) diff --git a/types/autocomplete.d.ts b/types/autocomplete.d.ts index a56e8f33c..05fc60f04 100644 --- a/types/autocomplete.d.ts +++ b/types/autocomplete.d.ts @@ -71,8 +71,6 @@ export declare class ElAutocomplete extends ElementUIComponent { /** Whether to append the dropdown to body */ popperAppendToBody: boolean - /** - * Focus the Input component - */ + /** Focus the Input component */ focus (): void } diff --git a/types/button.d.ts b/types/button.d.ts index b81b8f6e1..9f0963a91 100644 --- a/types/button.d.ts +++ b/types/button.d.ts @@ -1,7 +1,7 @@ import { ElementUIComponent, ElementUIComponentSize } from './component' /** Button type */ -export type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text' +export type ButtonType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'text' | 'default' /** Same as native button's type */ export type ButtonNativeType = 'button' | 'submit' | 'reset' | 'menu' diff --git a/types/col.d.ts b/types/col.d.ts index bbdb33297..b78a044da 100644 --- a/types/col.d.ts +++ b/types/col.d.ts @@ -12,7 +12,7 @@ export interface ResponsiveColumnProperties { /** Responsive column property */ export type ResponsiveColumn = number | ResponsiveColumnProperties -/** Colunm Layout Component */ +/** Column Layout Component */ export declare class ElCol extends ElementUIComponent { /** Number of column the grid spans */ span: number diff --git a/types/date-picker.d.ts b/types/date-picker.d.ts index b4e9e6f40..8a3882a6f 100644 --- a/types/date-picker.d.ts +++ b/types/date-picker.d.ts @@ -117,8 +117,6 @@ export declare class ElDatePicker extends ElementUIComponent { /** name for the inner native input */ name: string - /** - * Focus the Input component - */ + /** Focus the Input component */ focus (): void } diff --git a/types/element-ui.d.ts b/types/element-ui.d.ts index 62c4f2ad4..c84ad5259 100644 --- a/types/element-ui.d.ts +++ b/types/element-ui.d.ts @@ -174,7 +174,7 @@ export class CheckboxButton extends ElCheckboxButton {} /** Checkbox Group Component */ export class CheckboxGroup extends ElCheckboxGroup {} -/** Colunm Layout Component */ +/** Column Layout Component */ export class Col extends ElCol {} /** Collapse Component */ diff --git a/types/input-number.d.ts b/types/input-number.d.ts index 76288ffc3..83e254390 100644 --- a/types/input-number.d.ts +++ b/types/input-number.d.ts @@ -40,8 +40,6 @@ export declare class ElInputNumber extends ElementUIComponent { /** whether input value can only be multiple of step */ stepStrictly: boolean - /** - * Focus the Input component - */ + /** Focus the Input component */ focus (): void } diff --git a/types/input.d.ts b/types/input.d.ts index a67ef88d0..096c9e2cf 100644 --- a/types/input.d.ts +++ b/types/input.d.ts @@ -90,18 +90,12 @@ export declare class ElInput extends ElementUIComponent { /** Whether to show wordCount when setting maxLength */ showWordLimit: boolean - /** - * Focus the Input component - */ + /** Focus the Input component */ focus (): void - /** - * Blur the Input component - */ + /** Blur the Input component */ blur (): void - /** - * Select the text in input element - */ + /** Select the text in input element */ select (): void } diff --git a/types/link.d.ts b/types/link.d.ts index c7ed7dd1b..6e69a01af 100644 --- a/types/link.d.ts +++ b/types/link.d.ts @@ -1,7 +1,7 @@ import { ElementUIComponent } from './component' /** Button type */ -export type LinkType = 'primary' | 'success' | 'warning' | 'danger' | 'info' +export type LinkType = 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default' /** Link Component */ export declare class ElLink extends ElementUIComponent { diff --git a/types/row.d.ts b/types/row.d.ts index 4769de71c..963302366 100644 --- a/types/row.d.ts +++ b/types/row.d.ts @@ -3,8 +3,8 @@ import { ElementUIComponent } from './component' /** Horizontal alignment of flex layout */ export type HorizontalAlignment = 'start' | 'end' | 'center' | 'space-around' | 'space-between' -/** vertical alignment of flex layout */ -export type VertialAlignment = 'top' | 'middle' | 'bottom' +/** Vertical alignment of flex layout */ +export type VerticalAlignment = 'top' | 'middle' | 'bottom' /** Row Layout Component */ export declare class ElRow extends ElementUIComponent { @@ -18,7 +18,7 @@ export declare class ElRow extends ElementUIComponent { justify: HorizontalAlignment /** Vertical alignment of flex layout */ - align: VertialAlignment + align: VerticalAlignment /** Custom element tag */ tag: string diff --git a/types/select.d.ts b/types/select.d.ts index 110835ea9..7580feae1 100644 --- a/types/select.d.ts +++ b/types/select.d.ts @@ -78,13 +78,9 @@ export declare class ElSelect extends ElementUIComponent { /** Whether to append the popper menu to body */ popperAppendToBody: boolean - /** - * Focus the Input component - */ + /** Focus the Input component */ focus (): void - /** - * Blur the Input component, and hide the dropdown - */ + /** Blur the Input component, and hide the dropdown */ blur (): void } diff --git a/types/skeleton.d.ts b/types/skeleton.d.ts index 6550566fc..65e6e5602 100644 --- a/types/skeleton.d.ts +++ b/types/skeleton.d.ts @@ -25,7 +25,7 @@ export declare class ElSkeleton extends ElementUIComponent { /** numbers of the row, only useful when no template slot were given; default: 4 */ rows: boolean - /** Rendering delay in millseconds; default: 0 */ + /** Rendering delay in milliseconds; default: 0 */ throttle: number $slots: ElSkeletonSlots diff --git a/types/tag.d.ts b/types/tag.d.ts index cc59f796b..8f1064089 100644 --- a/types/tag.d.ts +++ b/types/tag.d.ts @@ -1,6 +1,6 @@ import { ElementUIComponent, ElementUIComponentSize } from './component' -export type TagType = 'primary' | 'gray' | 'success' | 'warning' | 'danger' +export type TagType = 'success' | 'info' | 'warning' | 'danger' export type TagTheme = 'dark' | 'light' | 'plain' /** Tag Component */ diff --git a/types/time-picker.d.ts b/types/time-picker.d.ts index 40114f489..1e104343c 100644 --- a/types/time-picker.d.ts +++ b/types/time-picker.d.ts @@ -56,8 +56,6 @@ export declare class ElTimePicker extends ElementUIComponent { /** Range separator */ rangeSeparator: string - /** - * Focus the Input component - */ + /** Focus the Input component */ focus (): void } diff --git a/types/time-select.d.ts b/types/time-select.d.ts index a784f8edb..933fb8bc4 100644 --- a/types/time-select.d.ts +++ b/types/time-select.d.ts @@ -49,8 +49,6 @@ export declare class ElTimeSelect extends ElementUIComponent { /** Additional options, check the table below */ pickerOptions: TimeSelectOptions - /** - * Focus the Input component - */ + /** Focus the Input component */ focus (): void } diff --git a/types/tree.d.ts b/types/tree.d.ts index 64dd36ad7..5a87b0a19 100644 --- a/types/tree.d.ts +++ b/types/tree.d.ts @@ -158,7 +158,7 @@ export declare class ElTree extends ElementUIComponent { /** * Set certain nodes to be checked. Only works when `node-key` is assigned * - * @param nodes An array of nodes to be checked + * @param data An array of nodes to be checked * @param leafOnly If the parameter is true, it only returns the currently selected array of sub-nodes */ setCheckedNodes(data: D[], leafOnly?: boolean): void; @@ -218,7 +218,7 @@ export declare class ElTree extends ElementUIComponent { /** * Set highlighted node, only works when node-key is assigned * - * @param node The node to be highlighted + * @param data The node to be highlighted */ setCurrentNode(data: D): void; diff --git a/web-types.json b/web-types.json index 5b6201b27..8bd327270 100644 --- a/web-types.json +++ b/web-types.json @@ -96,7 +96,7 @@ { "name": "focus", "description": "Focus the Input component", - "type": "function(): void" + "type": "() => void" }, { "name": "selectWhenUnmatched", @@ -1045,7 +1045,7 @@ { "name": "value", "description": "The value of the date picker", - "type": "Date|string|Date[]|string[]" + "type": "Date|string|Date[]|string[]|number|number[]" }, { "name": "rangeSeparator", @@ -1290,14 +1290,14 @@ "doc-url": "https://element.eleme.io/#/en-US/component/divider", "props": [ { - "name": "vertical", - "description": "enable vertical divider", - "type": "boolean" + "name": "direction", + "description": "Set divider's direction", + "type": "'horizontal' | 'vertical'" }, { - "name": "posiiton", - "description": "customize the content on the divider line", - "type": "ContentPosition" + "name": "content-position", + "description": "Customize the content on the divider line", + "type": "'left' | 'right' | 'center'" } ] }, @@ -1386,7 +1386,8 @@ { "name": "type", "description": "Menu button type. only works when split-button is true", - "type": "ButtonType" + "type": "ButtonType", + "default": "'default'" }, { "name": "tabindex", @@ -2135,12 +2136,12 @@ { "name": "title", "description": "title", - "type": "String" + "type": "string" }, { "name": "content", "description": "content", - "type": "String" + "type": "string" } ], "slots": [ @@ -2299,7 +2300,7 @@ }, { "name": "cancelButtonType", - "description": "Popconfirm cancal type", + "description": "Popconfirm cancel type", "type": "string" }, { @@ -2720,7 +2721,7 @@ { "name": "align", "description": "Vertical alignment of flex layout", - "type": "VertialAlignment" + "type": "VerticalAlignment" }, { "name": "justify", @@ -3308,7 +3309,7 @@ { "name": "defaultExpandAll", "description": "Whether expand all rows by default. Only works when the table has a column `type=\"expand\"`", - "type": "Boolean" + "type": "boolean" }, { "name": "height", @@ -3358,7 +3359,7 @@ { "name": "emptyText", "description": "Displayed text when data is empty. You can customize this area with `slot=\"empty\"`", - "type": "String" + "type": "string" }, { "name": "maxHeight", @@ -3480,7 +3481,7 @@ { "name": "filterMultiple", "description": "Whether data filtering supports multiple options", - "type": "Boolean" + "type": "boolean" }, { "name": "resizable", @@ -3554,7 +3555,7 @@ { "name": "stretch", "description": "Whether width of tab automatically fits its container", - "type": "Boolean" + "type": "boolean" }, { "name": "value", @@ -3847,7 +3848,7 @@ { "name": "content", "description": "Display content, can be overridden by slot#content", - "type": "String" + "type": "string" }, { "name": "enterable", @@ -4172,6 +4173,10 @@ { "name": "fullscreen", "type": "boolean" + }, + { + "name": "lock", + "type": "boolean" } ] },