Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix types & web-types.json #22922

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions types/autocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion types/button.d.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion types/col.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions types/date-picker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion types/element-ui.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 1 addition & 3 deletions types/input-number.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
12 changes: 3 additions & 9 deletions types/input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion types/link.d.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions types/row.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down
8 changes: 2 additions & 6 deletions types/select.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion types/skeleton.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion types/tag.d.ts
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down
4 changes: 1 addition & 3 deletions types/time-picker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ export declare class ElTimePicker extends ElementUIComponent {
/** Range separator */
rangeSeparator: string

/**
* Focus the Input component
*/
/** Focus the Input component */
focus (): void
}
4 changes: 1 addition & 3 deletions types/time-select.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
4 changes: 2 additions & 2 deletions types/tree.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export declare class ElTree<K, D extends TreeData> 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;
Expand Down Expand Up @@ -218,7 +218,7 @@ export declare class ElTree<K, D extends TreeData> 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;

Expand Down
41 changes: 23 additions & 18 deletions web-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
{
"name": "focus",
"description": "Focus the Input component",
"type": "function(): void"
"type": "() => void"
},
{
"name": "selectWhenUnmatched",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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'"
}
]
},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -2135,12 +2136,12 @@
{
"name": "title",
"description": "title",
"type": "String"
"type": "string"
},
{
"name": "content",
"description": "content",
"type": "String"
"type": "string"
}
],
"slots": [
Expand Down Expand Up @@ -2299,7 +2300,7 @@
},
{
"name": "cancelButtonType",
"description": "Popconfirm cancal type",
"description": "Popconfirm cancel type",
"type": "string"
},
{
Expand Down Expand Up @@ -2720,7 +2721,7 @@
{
"name": "align",
"description": "Vertical alignment of flex layout",
"type": "VertialAlignment"
"type": "VerticalAlignment"
},
{
"name": "justify",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -3480,7 +3481,7 @@
{
"name": "filterMultiple",
"description": "Whether data filtering supports multiple options",
"type": "Boolean"
"type": "boolean"
},
{
"name": "resizable",
Expand Down Expand Up @@ -3554,7 +3555,7 @@
{
"name": "stretch",
"description": "Whether width of tab automatically fits its container",
"type": "Boolean"
"type": "boolean"
},
{
"name": "value",
Expand Down Expand Up @@ -3847,7 +3848,7 @@
{
"name": "content",
"description": "Display content, can be overridden by slot#content",
"type": "String"
"type": "string"
},
{
"name": "enterable",
Expand Down Expand Up @@ -4172,6 +4173,10 @@
{
"name": "fullscreen",
"type": "boolean"
},
{
"name": "lock",
"type": "boolean"
}
]
},
Expand Down