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/typings readme #737

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
bd657ac
Changing the default language to English
Feb 9, 2018
5419d78
Fix the package.json
Feb 10, 2018
eea5bd6
Update the package.json
Feb 23, 2018
76c17c4
Merge remote-tracking branch 'upstream/master'
Mar 12, 2018
3613705
Fix layout typings
Mar 12, 2018
21155f3
fix: Message typing
Mar 12, 2018
38a357b
fix: radio typings
Mar 12, 2018
d83bae7
fixing Notification typing
Mar 12, 2018
c80060d
fix: radio documentation
Mar 12, 2018
ed3536e
fix: RadioButton typing
Mar 12, 2018
8a853cb
Fix: Readme for RadioGroup
Mar 12, 2018
59a7a57
Fix: Dialog Typings
Mar 12, 2018
23a27aa
fix: Rate typings
Mar 12, 2018
7c0ff6c
fix: Badge Typings
Mar 12, 2018
bd4b0ff
fix: Tabs typings
Mar 12, 2018
bb1cf28
fix: MessageBox typing for event
Mar 12, 2018
534dd38
Fix: Tree typing and readme
Mar 12, 2018
b97fe11
fix: Input typing
Mar 12, 2018
3e708ec
fix: Icon Readme.
Mar 12, 2018
e1be781
Fix: Menu typings and readme.
Mar 12, 2018
b2f7f97
Fix: Steps Readme
Mar 12, 2018
a0b6904
Fix: InputNumber Readme
Mar 12, 2018
63a50b8
Fix: Checkbox typings and readme.
Mar 12, 2018
1d627cd
fix: Slider typings and readme.
Mar 12, 2018
be9e2b4
Fix: Switch readme and typings
Mar 12, 2018
4a27589
fix: Form readme and typings
Mar 12, 2018
0820210
Fix: Readme Upload.
Mar 12, 2018
1833082
fix: Select, Popover readme and typings
Mar 12, 2018
aa67b4d
updating package.json
Mar 12, 2018
a71dc09
fix: Date-picker readme
Mar 12, 2018
8afcd40
fix: carousel readme.
Mar 12, 2018
5adc36c
Fix: Collapse and color-picker readme
Mar 13, 2018
76e0711
fix: Cascader and transfer readme and typings
Mar 13, 2018
6edc34b
Merge branch 'master' into fix/typings-readme
sam019 Mar 21, 2018
1dfe82d
Merge branch 'master' into fix/typings-readme
sam019 Mar 22, 2018
bd713ae
Merge branch 'master' into fix/typings-readme
e1emeb0t Jun 22, 2018
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
src: 'path/to/src'
},
output: {
path: 'path/to/output'
path: 'path/to/output',
publicPath: '/public',
chunkFilename: '[chunkhash:12].js',
filename: '[chunkhash:12].js'
Expand Down
1 change: 1 addition & 0 deletions site/docs/en-US/carousel.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ render() {
| autoplay | whether automatically loop the slides | boolean | — | true |
| interval | interval of the auto loop, in milliseconds | number | — | 3000 |
| indicatorPosition | position of the indicators | string | outside/none | — |
| indicator | whether show the indicator | boolean | — | true |
| arrow | when arrows are shown | string | always/hover/never | hover |
| type | type of the Carousel | string | card/flatcard | — |

Expand Down
2 changes: 1 addition & 1 deletion site/docs/en-US/cascader.md
Original file line number Diff line number Diff line change
Expand Up @@ -1434,5 +1434,5 @@ render() {
### Events
| Event Name | Description | Parameters |
|---------- |-------- |---------- |
| change | triggers when the binding value changes | value |
| onChange | triggers when the binding value changes | value |
| activeItemChange | triggers when active option changes, only works when `change-on-select` is `false` | an array of active options |
2 changes: 2 additions & 0 deletions site/docs/en-US/checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ render() {
| disabled | if the checkbox is disabled | boolean | — | false |
| checked | if the checkbox is checked | boolean | — | false |
| indeterminate | same as `indeterminate` in native checkbox | boolean | — | false |
| focus | if the checkbox is focused | boolean | — | false |

### Checkbox-group Attributes
| Attribute | Description | Type | Options | Default|
Expand All @@ -255,6 +256,7 @@ render() {
|textColor | font color when button is active | string | — | #ffffff |
| min | minimum number of checkbox checked | number | — | — |
| max | maximum number of checkbox checked | number | — | — |
| value | checkbox options | string[] | — | [] |

### Checkbox-group Events
| Event Name | Description | Parameters |
Expand Down
6 changes: 6 additions & 0 deletions site/docs/en-US/collapse.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,9 @@ render() {
|---------- |-------------- |---------- |-------------------------------- |-------- |
| name | unique identification of the panel | string/number | — | — |
| title | title of the panel | string | — | — |
| isActive | whether to activate item | boolean | — | — |

### Collapse Item Events
| Event Name | Description | Parameters |
|---------|---------|---------|
| onClick | triggers when click on item | name |
1 change: 1 addition & 0 deletions site/docs/en-US/color-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ render() {
### Attributes
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------- |---------- |------------- |-------- |
| value | whether to set color | string | — | — |
| showAlpha | whether to display the alpha slider | boolean | — | false |
| colorFormat | color format of v-model | string | hsl / hsv / hex / rgb | hex (when show-alpha is false)/ rgb (when show-alpha is true) |

Expand Down
4 changes: 2 additions & 2 deletions site/docs/en-US/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ render() {
| isShowTrigger | whether to show trigger icon | boolean | - | true |
| isReadOnly | - | boolean | - | false |
| isDisabled | - | boolean | - | false |
| isShowTime | show time or not | boolean | - | false |
| firstDayOfWeek | first day of week | Number | 0 to 6 | 0 |
| onFocus | - | (SyntheticEvent)=>() | - | - |
| onBlur | - | (SyntheticEvent)=>() | - | - |
| onChange | - | (SyntheticEvent)=>() | - | - |
| value | - | date | - | - |


### DatePicker
Expand Down
4 changes: 2 additions & 2 deletions site/docs/en-US/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ render() {

| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| visible | state of Dialog. | boolean | — | false |
| title | title of Dialog. Can also be passed with a named slot (see the following table) | string | — | — |
| size | size of Dialog | string | tiny/small/large/full | small |
| top | value for `top` of Dialog CSS, works when `size` is not `full` | string | — | 15% |
Expand All @@ -166,5 +167,4 @@ render() {
### Events
| Event Name | Description | Parameters |
|---------- |-------- |---------- |
| onOpen | triggers when the Dialog opens | — |
| onClose | triggers when the Dialog closes | — |
| onCancel | triggers when the Dialog closes | — |
7 changes: 6 additions & 1 deletion site/docs/en-US/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,12 @@ render() {
| label-position | position of label | string | left/right/top | right |
| label-width | width of label, and all form items will inherit from `Form` | string | — | — |
| label-suffix | suffix of the label | string | — | — |
| show-message | whether to show the error message | boolean | — | true |

### Form Events

| Method | Description | Parameters |
| ---- | ---- | ---- |
| onSubmit | submit the form | — |

### Form Methods

Expand Down
6 changes: 6 additions & 0 deletions site/docs/en-US/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ render() {
}
```
:::

## Icons Attributes

| Attribute | Description | Type | Accepted Values | Default |
| ----| ----| ----| ---- | ----- |
|name | Set icon's name | string | — | — |
1 change: 1 addition & 0 deletions site/docs/en-US/input-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ render() {

| Attribute | Description | Type | Accepted Values | Default |
|----| ----| ---| ----| -----|
|defaultValue | binding default value| number | — | — |
|value | binding value| number | — | — |
|min | the minimum allowed value | number | — | 0 |
|max | the maximum allowed value | number | — | `Infinity` |
Expand Down
19 changes: 15 additions & 4 deletions site/docs/en-US/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,23 @@ render() {
|autoComplete | same as `auto-complete` in native input | string | on/off | off |
|name | same as `name` in native input | string | — | — |
| readOnly | same as `readonly` in native input | boolean | — | false |
|max | same as `max` in native input | — | — | — |
|min | same as `min` in native input | — | — | — |
|step| same as `step` in native input | — | — | — |
|resize| control the resizability | string | none, both, horizontal, vertical | — |
|autoFocus | same as `autofocus` in native input | boolean | — | false |
| onIconClick | hook function when clicking on the input icon | function | — | — |
|defaultValue | set default value | string/number| — | — |
|prepend | set prepend element | string/element | - | - |
|append | set append element | string/element | - | - |
|validating | adding loading icon | boolean | - | false |

### Input Events

| Event Name | Description | Parameters |
|----| ----| ----|
| onIconClick | hook function when clicking on the input icon | — |
| onFocus | triggers when a suggestion is focused | suggestion being clicked |
| onBlur | hook function for suggestion loses focus | suggestion being clicked |
| onChange | hook function for control input | — |
| onMouseEnter | hook function when mouse enter on element | — |
| onMouseLeave | hook function when mouse leave on element | — |

### Autocomplete Attributes

Expand Down
5 changes: 0 additions & 5 deletions site/docs/en-US/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,6 @@ onClose() {
| onOpen | callback function when sub-menu expands | index: index of expanded sub-menu, indexPath: index path of expanded sub-menu |
| onClose | callback function when sub-menu collapses | index: index of collapsed sub-menu, indexPath: index path of collapsed sub-menu |

### Menu-Item Events
| Event Name | Description | Parameters |
|---------- |-------- |---------- |
| onClick | callback function when menu-item is clicked | el: menu-item instance |

### SubMenu Attribute
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------- |---------- |------------- |-------- |
Expand Down
5 changes: 1 addition & 4 deletions site/docs/en-US/popover.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ render() {
| content | popover content, can be replaced with a default `slot` | string | — | — |
| width | popover width | string, number | — | Min width 150px |
| placement | popover placement | string | top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end | bottom |
| disabled | whether Popover is disabled | boolean | — | false |
| value(v-model) | whether popover is visible | Boolean | — | false |
| offset | popover offset | number | — | 0 |
| visible | whether popover is visible | Boolean | — | false |
| transition | popover transition animation | string | — | fade-in-linear |
| visibleArrow | whether a tooltip arrow is displayed or not. | boolean | — | true |
| options | parameters for [popper.js](https://popper.js.org/documentation.html) | object | please refer to [popper.js](https://popper.js.org/documentation.html) | `{ boundariesElement: 'body', gpuAcceleration: false }` |
| popperClass | custom class name for popover | string | — | — |
18 changes: 14 additions & 4 deletions site/docs/en-US/radio.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,22 @@ render() {
Attribute | Description | Type | Accepted Values | Default
---- | ---- | ---- | ---- | ----
checked | checked state of radio | boolean | — | false
label | the value of radio | string/number/boolean | — | —
value | the value of radio | string/number/boolean | — | —
disabled | whether radio is disabled | boolean | — | false
name | native 'name' attribute | string | — | —
name | native 'name' attribute | string | — | —

### Radio Events

| Event Name | Description | Parameters |
--- | --- | ---
onChange | triggers when the bound value changes | the label value of the chosen radio | value

### Radio-group Attributes

Attribute | Description | Type | Accepted Values | Default
---- | ---- | ---- | ---- | ----
value | the value of radio | string/number | — | —
disabled | whether radio is disabled | boolean | — | false
size | the size of radio buttons | string | large/small | —
fill | border and background color when button is active | string | — | #20a0ff |
textColor | font color when button is active | string | — | #ffffff |
Expand All @@ -155,5 +163,7 @@ onChange | triggers when the bound value changes | the label value of the chosen

Attribute | Description | Type | Accepted Values | Default
---- | ---- | ---- | ---- | ----
label | the value of radio | string/number | — | —
disabled | whether radio is disabled | boolean | — | false
value | the value of radio | string/number | — | —
disabled | whether radio is disabled | boolean | — | inherited/false
name | native 'name' attribute | string | — | —
size | the size of radio buttons | string | large/small | inherited
1 change: 1 addition & 0 deletions site/docs/en-US/rate.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ render() {
| textColor | color of texts | string | — | #1F2D3D |
| texts | text array | array | — | ['极差', '失望', '一般', '满意', '惊喜'] |
| textTemplate | text template when the component is read-only | string | — | {value} |
| value | rating score | number | — | 0 |

### Events
| Event Name | Description | Parameters |
Expand Down
9 changes: 1 addition & 8 deletions site/docs/en-US/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,19 +446,12 @@ render() {
| disabled | whether Select is disabled | boolean | — | false |
| size | size of Input | string | large/small/mini | — |
| clearable | whether single select can be cleared | boolean | — | false |
| multipleLimit | maximum number of options user can select when `multiple` is `true`. No limit when set to 0 | number | — | 0 |
| name | the name attribute of select input | string | — | — |
| placeholder | placeholder | string | — | Select |
| filterable | whether Select is filterable | boolean | — | false |
| allowCreate | whether creating new items is allowed. To use this, `filterable` must be true | boolean | — | false |
| filterMethod | custom filter method | function | — | — |
| remote | whether options are loaded from server | boolean | — | false |
| remoteMethod | custom remote search method | function | — | — |
| loading | whether Select is loading data from server | boolean | — | false |
| loadingText | displayed text while loading data from server | string | — | Loading |
| noMatchText | displayed text when no data matches the filtering query | string | — | No matching data |
| noDataText | displayed text when there is no options | string | — | No data |
| popperClass | custom class name for Select's dropdown | string | — | — |

### Select Events
| Event Name | Description | Parameters |
Expand All @@ -472,11 +465,11 @@ render() {
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| label | name of the group | string | — | — |
| disabled | whether to disable all options in this group | boolean | — | false |

### Option Attributes
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------------- |---------- |-------------------------------- |-------- |
| value | value of option | string/number/object | — | — |
| label | label of option, same as `value` if omitted | string/number | — | — |
| selected | whether option is selected | boolean | — | false |
| disabled | whether option is disabled | boolean | — | false |
6 changes: 5 additions & 1 deletion site/docs/en-US/slider.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,12 @@ render() {
| show-stops | whether to display breakpoints | boolean | — | false |
| show-tooltip | whether to display tooltip value | boolean | — | true |
| range | whether to select a range | boolean | — | false |
| value | set slider values | number/number[] | — | 0 |
| vertical | whether to display slider vertically | boolean | — | — |
| height | set Slider height | string | — | — |

## Events
| Event Name | Description | Parameters |
|---------- |-------- |---------- |
| change | triggers when the value changes (if the mouse is being dragged, this event only fires when the mouse is released) | value after changing |
| onChange | triggers when the value changes (if the mouse is being dragged, this event only fires when the mouse is released) | value after changing |
| formatTooltip | function for formatting value | value |
7 changes: 5 additions & 2 deletions site/docs/en-US/steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,15 @@ render() {
| active | current activation step | number | — | 0 |
| processStatus | status of current step | string | wait/process/finish/error/success | process |
| finishStatus | status of end step | string | wait/process/finish/error/success | finish |
| alignCenter | whether step description is centered | boolean | — | false |
| center | center whole `Steps` component | boolean | - | false |

### Step Attributes
| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------- |---------- |------------- |-------- |
| title | step title | string | — | — |
| description | step description | string | — | — |
| icon | step icon | icons provided by Element Icon. Can be overwritten by a named slot if you want to use custom icons | string | — |
| status | step status | string | wait/process/finish/error/success | wait |
| direction | display direction | string | vertical/horizontal | horizontal |
| style | step style | Object | — | — |
| lineStyle | step lineStyle | Object | — | — |
| stepNumber | step stepNumber | number | — | — |
1 change: 1 addition & 0 deletions site/docs/en-US/switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ render() {

| Attribute | Description | Type | Accepted Values | Default |
|---------- |-------- |---------- |------------- |-------- |
| value | set Switch value | number/string/boolean | — | true |
| disabled | whether Switch is disabled | boolean | — | false |
| width | width of Switch | number | — | 58(with text)/ 46(no text) |
| onIconClass | class name of the icon displayed when in `on` state, overrides `onText`| string | — | — |
Expand Down
4 changes: 3 additions & 1 deletion site/docs/en-US/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,18 +584,20 @@ render() {
| autoExpandParent | whether to expand father node when a child node is expanded | boolean | — | true |
| defaultExpandedKeys | array of keys of initially expanded nodes | array | — | — |
| isShowCheckbox | whether node is selectable | boolean | — | false |
| checkedKeyStrictly |whether checked state of a node not affects its father and child nodes when `isShowCheckbox` is `true` | boolean | — | false |
| checkStrictly |whether checked state of a node not affects its father and child nodes when `isShowCheckbox` is `true` | boolean | — | false |
| defaultCheckedKeys | array of keys of initially checked nodes | array | — | — |
| filterNodeMethod | this function will be executed on each node when use filter method. if return `false`, tree node will be hidden. | Function(value, data, node) | — | — |
| accordion | whether only one node among the same level can be expanded at one time | boolean | — | false |
| indent |horizontal indentation of nodes in adjacent levels in pixels | number | — | 16 |
| lazy | Set true if loading subtree data | boolean | — | false |


### options
| Attribute | Description | Type | Accepted Values | Default |
| --------- | ---------------------------------------- | ------ | --------------- | ------- |
| label | specify which key of node object is used as the node's label | string | — | — |
| children | specify which key of node object is used as the node's subtree | string | — | — |
| icon | specify which key of node object is used as the node's icon | string | — | — |

### Method
`Tree` has the following method, which returns the currently selected array of nodes.
Expand Down
20 changes: 14 additions & 6 deletions site/docs/en-US/upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,25 @@ submitUpload() {
| showFileList | whether to show the uploaded file list | boolean | — | true |
| drag | whether to activate drag and drop mode | boolean | - | - |
| accept | accepted [file types](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept)| string | — | — |
| onPreview | hook function when clicking the uploaded files | function(file) | — | — |
| onRemove | hook function when files are removed | function(file, fileList) | — | — |
| onSuccess | hook function when uploaded successfully | function(response, file, fileList) | — | — |
| onError | hook function when some errors occurs | function(err, file, fileList) | — | — |
| onProgress | hook function when some progress occurs | function(event, file, fileList) | — | — |
| onChange | hook function when file status change | function(file, fileList) | — | — |
| beforeUpload | hook function before uploading with the file to be uploaded as its parameter. If `false` or a `Promise` is returned, uploading will be aborted | function(file) | — | — |
| listType | type of fileList | string | text/picture/picture-card | text |
| autoUpload | whether to auto upload file | boolean | — | true |
| fileList | default uploaded files, i.e: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg'}] | array | — | [] |

| tip | set the tip | element | — | — |
| trigger | set element to start upload | element | — | — |
| className | set class name | string | — | — |

### Upload Events
| Event Name | Description | Parameters |
|---------- |-------------- | -- |
| onPreview | hook function when clicking the uploaded files | function(file) |
| onRemove | hook function when files are removed | function(file, fileList) |
| onSuccess | hook function when uploaded successfully | function(response, file, fileList) |
| onError | hook function when some errors occurs | function(err, file, fileList) |
| onProgress | hook function when some progress occurs | function(event, file, fileList) |
| onChange | hook function when file status change | function(file, fileList) |

### Methods
| Event Name | Description | Parameters |
|---------- |-------------- | -- |
Expand Down
Loading