mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Merge branch '2.x' into dev
This commit is contained in:
commit
f34d828f25
@ -164,8 +164,8 @@ export default {
|
||||
| lock-scroll | Whether to lock background scroll | _boolean_ | `true` |
|
||||
| lazy-render | Whether to lazy render util appeared | _boolean_ | `true` |
|
||||
| close-on-popstate `v2.5.3` | Whether to close when popstate | _boolean_ | `false` |
|
||||
| close-on-click-action | Whether to close when click action | _boolean_ | `false` |
|
||||
| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `true` |
|
||||
| close-on-click-action | Whether to close when an action is clicked | _boolean_ | `false` |
|
||||
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `true` |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
|
||||
| teleport | Return the mount node for ActionSheet | _string \| Element_ | - |
|
||||
|
||||
@ -184,13 +184,13 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| select | Triggered when click option | _action: Action, index: number_ |
|
||||
| cancel | Triggered when click cancel button | - |
|
||||
| open | Triggered when open ActionSheet | - |
|
||||
| close | Triggered when close ActionSheet | - |
|
||||
| opened | Triggered when opened ActionSheet | - |
|
||||
| closed | Triggered when closed ActionSheet | - |
|
||||
| click-overlay | Triggered when click overlay | - |
|
||||
| select | Emitted when an option is clicked | _action: Action, index: number_ |
|
||||
| cancel | Emitted when the cancel button is clicked | - |
|
||||
| open | Emitted when opening ActionSheet | - |
|
||||
| close | Emitted when closing ActionSheet | - |
|
||||
| opened | Emitted when ActionSheet is opened | - |
|
||||
| closed | Emitted when ActionSheet is closed | - |
|
||||
| click-overlay | Emitted when overlay is clicked | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -95,15 +95,15 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| save | Triggered when click save button | content:form content |
|
||||
| focus | Triggered when focus field | key: field name |
|
||||
| delete | Triggered when confirm delete | content:form content |
|
||||
| cancel-delete | Triggered when cancel delete | content:form content |
|
||||
| select-search | Triggered when select search result | value: search content |
|
||||
| click-area `v2.5.9` | Triggered when click area | - |
|
||||
| change-area | Triggered when change area | values: area values |
|
||||
| change-detail | Triggered when address detail changed | value: address detail |
|
||||
| change-default | Triggered when switch default address | value: checked |
|
||||
| save | Emitted when the save button is clicked | content:form content |
|
||||
| focus | Emitted when field is focused | key: field name |
|
||||
| delete | Emitted when confirming delete | content:form content |
|
||||
| cancel-delete | Emitted when canceling delete | content:form content |
|
||||
| select-search | Emitted when a search result is selected | value: search content |
|
||||
| click-area `v2.5.9` | Emitted when the area field is clicked | - |
|
||||
| change-area | Emitted when area changed | values: area values |
|
||||
| change-detail | Emitted when address detail changed | value: address detail |
|
||||
| change-default | Emitted when switching default address | value: checked |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -87,12 +87,12 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| add | Triggered when click add button | - |
|
||||
| edit | Triggered when edit address | item: address object,index |
|
||||
| select | Triggered when select address | item: address object,index |
|
||||
| edit-disabled | Triggered when edit disabled address | item: address object,index |
|
||||
| select-disabled | Triggered when select disabled address | item: address object,index |
|
||||
| click-item | Triggered when click address item | item: address object,index |
|
||||
| add | Emitted when the add button is clicked | - |
|
||||
| edit | Emitted when the edit icon of address is clicked | item: address object,index |
|
||||
| select | Emitted when an address is selected | item: address object,index |
|
||||
| edit-disabled | Emitted when the edit icon of disabled address is clicked | item: address object,index |
|
||||
| select-disabled | Emitted when a disabled address is selected | item: address object,index |
|
||||
| click-item | Emitted when an address item is clicked | item: address object,index |
|
||||
|
||||
### Data Structure of Address
|
||||
|
||||
|
@ -76,9 +76,9 @@ To have a selected value,simply pass the `code` of target area to `value` prop
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| confirm | triggers when clicking the confirm button | an array |
|
||||
| cancel | triggers when clicking the cancel button | - |
|
||||
| change | Triggered when current option changed | current values,column index |
|
||||
| confirm | Emitted when the confirm button is clicked | selected areas |
|
||||
| cancel | Emitted when the cancel button is clicked | - |
|
||||
| change | Emitted when current option changed | current values,column index |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -132,8 +132,8 @@ app.use(Button);
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| click | Triggered when click button and not disabled or loading | _event: Event_ |
|
||||
| touchstart | Triggered when touch start | _event: TouchEvent_ |
|
||||
| click | Emitted when button is clicked and not disabled or loading | _event: Event_ |
|
||||
| touchstart | Emitted when button is touched | _event: TouchEvent_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -18,7 +18,7 @@ app.use(Calendar);
|
||||
|
||||
### Select Single Date
|
||||
|
||||
The `confirm` event will be triggered after the date selection is completed.
|
||||
The `confirm` event will be emitted after the date selection is completed.
|
||||
|
||||
```html
|
||||
<van-cell title="Select Single Date" :value="date" @click="show = true" />
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
|
||||
### Quick Select
|
||||
|
||||
Set `show-confirm` to `false` to hide the confirm button. In this case, the `confirm` event will be triggered immediately after the selection is completed.
|
||||
Set `show-confirm` to `false` to hide the confirm button. In this case, the `confirm` event will be emitted immediately after the selection is completed.
|
||||
|
||||
```html
|
||||
<van-calendar v-model:show="show" :show-confirm="false" />
|
||||
@ -257,7 +257,7 @@ Following props are supported when the poppable is true
|
||||
| position | Popup position, can be set to `top` `right` `left` | _string_ | `bottom` |
|
||||
| round | Whether to show round corner | _boolean_ | `true` |
|
||||
| close-on-popstate `v2.4.4` | Whether to close when popstate | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `true` |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
|
||||
| teleport `v2.4.4` | Return the mount node for Calendar | _string \| Element_ | - |
|
||||
|
||||
@ -295,14 +295,14 @@ Following props are supported when the type is multiple
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| select | Triggered when select date | _value: Date \| Date[]_ |
|
||||
| confirm | Triggered after date selection is complete,if `show-confirm` is`true`, it is triggered after clicking the confirm button | _value: Date \| Date[]_ |
|
||||
| open `v2.5.2` | Triggered when open Popup | - |
|
||||
| close `v2.5.2` | Triggered when close Popup | - |
|
||||
| opened `v2.5.2` | Triggered when opened Popup | - |
|
||||
| closed `v2.5.2` | Triggered when closed Popup | - |
|
||||
| unselect `v2.7.2` | Triggered when unselect date when type is multiple | _value: Date_ |
|
||||
| month-show `v2.8.2` | Triggered when a month enters the visible area | _{ date: Date, title: string }_ |
|
||||
| select | Emitted when date is selected | _value: Date \| Date[]_ |
|
||||
| confirm | Emitted after date selection is complete,if `show-confirm` is `true`, it is Emitted after clicking the confirm button | _value: Date \| Date[]_ |
|
||||
| open `v2.5.2` | Emitted when opening Popup | - |
|
||||
| close `v2.5.2` | Emitted when closing Popup | - |
|
||||
| opened `v2.5.2` | Emitted when Popup is opened | - |
|
||||
| closed `v2.5.2` | Emitted when Popup is closed | - |
|
||||
| unselect `v2.7.2` | Emitted when unselect date when type is multiple | _value: Date_ |
|
||||
| month-show `v2.8.2` | Emitted when a month enters the visible area | _{ date: Date, title: string }_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -81,10 +81,10 @@ Use slot to custom content.
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----------- | ---------------------------- | -------------- |
|
||||
| click | Triggered when clicked | _event: Event_ |
|
||||
| click-thumb | Triggered when thumb clicked | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----------- | --------------------------------- | -------------- |
|
||||
| click | Emitted when component is clicked | _event: Event_ |
|
||||
| click-thumb | Emitted when thumb is clicked | _event: Event_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -154,9 +154,9 @@ app.use(CellGroup);
|
||||
|
||||
### Cell Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------- | -------------- |
|
||||
| click | Triggered when click cell | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ---------------------------- | -------------- |
|
||||
| click | Emitted when cell is clicked | _event: Event_ |
|
||||
|
||||
### CellGroup Slots
|
||||
|
||||
|
@ -249,16 +249,16 @@ export default {
|
||||
|
||||
### Checkbox Events
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| ------ | ----------------------------- | ------------------ |
|
||||
| change | Triggered when value changed | _checked: boolean_ |
|
||||
| click | Triggered when click checkbox | _event: Event_ |
|
||||
| Event | Description | Parameters |
|
||||
| ------ | ------------------------------------ | ------------------ |
|
||||
| change | Emitted when value changed | _checked: boolean_ |
|
||||
| click | Emitted when the checkbox is clicked | _event: Event_ |
|
||||
|
||||
### CheckboxGroup Events
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| ------ | ---------------------------- | -------------- |
|
||||
| change | Triggered when value changed | _names: any[]_ |
|
||||
| Event | Description | Parameters |
|
||||
| ------ | -------------------------- | -------------- |
|
||||
| change | Emitted when value changed | _names: any[]_ |
|
||||
|
||||
### Checkbox Slots
|
||||
|
||||
|
@ -100,12 +100,12 @@ Set grid spacing using `gutter` attribute. The default value is 0.
|
||||
|
||||
### Row Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------ | -------------- |
|
||||
| click | Triggered when click row | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------------- | -------------- |
|
||||
| click | Emitted when the row is clicked | _event: Event_ |
|
||||
|
||||
### Col Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------ | -------------- |
|
||||
| click | Triggered when click col | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------------- | -------------- |
|
||||
| click | Emitted when the col is clicked | _event: Event_ |
|
||||
|
@ -111,9 +111,9 @@ export default {
|
||||
|
||||
### Collapse Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | --------------------------- | ----------- |
|
||||
| change | Triggered when switch panel | activeNames |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ---------------------------- | ----------- |
|
||||
| change | Emitted when switching panel | activeNames |
|
||||
|
||||
### CollapseItem Props
|
||||
|
||||
|
@ -85,6 +85,6 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ---------------------- | -------------- |
|
||||
| click | Triggered when clicked | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | --------------------------------- | -------------- |
|
||||
| click | Emitted when component is clicked | _event: Event_ |
|
||||
|
@ -61,10 +61,10 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ---------------------------------- | --------------------- |
|
||||
| save | Triggered when click save button | content:contact info |
|
||||
| delete | Triggered when click delete button | content:contact info |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ----------------------------------------- | --------------------- |
|
||||
| save | Emitted when the save button is clicked | content:contact info |
|
||||
| delete | Emitted when the delete button is clicked | content:contact info |
|
||||
|
||||
### Data Structure of Contact
|
||||
|
||||
|
@ -76,9 +76,9 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| add | Triggered when click add button | - |
|
||||
| edit | Triggered when click edit button | _contact: Contact,index: number_ |
|
||||
| select | Triggered when select contact | _contact: Contact, index: number_ |
|
||||
| add | Emitted when the add button is clicked | - |
|
||||
| edit | Emitted when the edit button is clicked | _contact: Contact,index: number_ |
|
||||
| select | Emitted when a contact is selected | _contact: Contact, index: number_ |
|
||||
|
||||
### Data Structure of Contact
|
||||
|
||||
|
@ -136,8 +136,8 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| finish | Triggered when count down finished | - |
|
||||
| change `v2.4.4` | Triggered when count down changed | _currentTime: CurrentTime_ |
|
||||
| finish | Emitted when count down finished | - |
|
||||
| change `v2.4.4` | Emitted when count down changed | _currentTime: CurrentTime_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -110,8 +110,8 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| change | Triggered when change chosen coupon | index: index of chosen coupon |
|
||||
| exchange | Triggered when exchange coupon | code: exchange code |
|
||||
| change | Emitted when chosen coupon changed | index: index of chosen coupon |
|
||||
| exchange | Emitted when exchanging coupon | code: exchange code |
|
||||
|
||||
### Data Structure of Coupon
|
||||
|
||||
|
@ -287,11 +287,11 @@ Following props are supported when the type is time
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------- | ----------------------------------- | -------------------- |
|
||||
| change | Triggered when value changed | value: current value |
|
||||
| confirm | Triggered when click confirm button | value: current value |
|
||||
| cancel | Triggered when click cancel button | - |
|
||||
| Event | Description | Arguments |
|
||||
| ------- | ------------------------------------------ | -------------------- |
|
||||
| change | Emitted when value changed | value: current value |
|
||||
| confirm | Emitted when the confirm button is clicked | value: current value |
|
||||
| cancel | Emitted when the cancel button is clicked | - |
|
||||
|
||||
### Methods
|
||||
|
||||
|
@ -153,7 +153,7 @@ export default {
|
||||
| overlayClass | Custom overlay class | _string_ | - |
|
||||
| overlayStyle | Custom overlay style | _object_ | - |
|
||||
| closeOnPopstate | Whether to close when popstate | _boolean_ | `true` |
|
||||
| closeOnClickOverlay | Whether to close when click overlay | _boolean_ | `false` |
|
||||
| closeOnClickOverlay | Whether to close when overlay is clicked | _boolean_ | `false` |
|
||||
| lockScroll | Whether to lock body scroll | _boolean_ | `true` |
|
||||
| allowHtml `v2.8.7` | Whether to allow HTML rendering in message | _boolean_ | `false` |
|
||||
| beforeClose | Callback function before close,<br>call done() to close dialog,<br>call done(false) to cancel loading | (action: string, done: Function) => void | - |
|
||||
@ -180,7 +180,7 @@ export default {
|
||||
| overlay-class | Custom overlay class | _string_ | - |
|
||||
| overlay-style | Custom overlay style | _object_ | - |
|
||||
| close-on-popstate | Whether to close when popstate | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `false` |
|
||||
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `false` |
|
||||
| lazy-render | Whether to lazy render util appeared | _boolean_ | `true` |
|
||||
| lock-scroll | Whether to lock background scroll | _boolean_ | `true` |
|
||||
| allow-html `v2.8.7` | Whether to allow HTML rendering in message | _boolean_ | `false` |
|
||||
@ -190,14 +190,14 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| ------- | ----------------------------------- | ---------- |
|
||||
| confirm | Triggered when click confirm button | - |
|
||||
| cancel | Triggered when click cancel button | - |
|
||||
| open | Triggered when open Dialog | - |
|
||||
| close | Triggered when close Dialog | - |
|
||||
| opened | Triggered when opened Dialog | - |
|
||||
| closed | Triggered when closed Dialog | - |
|
||||
| Event | Description | Parameters |
|
||||
| ------- | ------------------------------------------ | ---------- |
|
||||
| confirm | Emitted when the confirm button is clicked | - |
|
||||
| cancel | Emitted when the cancel button is clicked | - |
|
||||
| open | Emitted when opening Dialog | - |
|
||||
| close | Emitted when closing Dialog | - |
|
||||
| opened | Emitted when Dialog is opened | - |
|
||||
| closed | Emitted when Dialog is closed | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -130,8 +130,8 @@ Use `active-color` prop to custom active color of the title and options.
|
||||
| z-index | z-index of menu item | _number \| string_ | `10` |
|
||||
| duration | Transition duration, unit second | _number \| string_ | `0.2` |
|
||||
| overlay | Whether to show overlay | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `true` |
|
||||
| close-on-click-outside | Whether to close when click outside | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `true` |
|
||||
| close-on-click-outside | Whether to close when outside is clicked | _boolean_ | `true` |
|
||||
|
||||
### DropdownItem Props
|
||||
|
||||
@ -147,13 +147,13 @@ Use `active-color` prop to custom active color of the title and options.
|
||||
|
||||
### DropdownItem Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ----------------------------------------- | --------- |
|
||||
| change | Triggered select option and value changed | value |
|
||||
| open | Triggered when open menu | - |
|
||||
| close | Triggered when close menu | - |
|
||||
| opened | Triggered when menu opened | - |
|
||||
| closed | Triggered when menu closed | - |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | --------------------------------------- | --------- |
|
||||
| change | Emitted select option and value changed | value |
|
||||
| open | Emitted when opening menu | - |
|
||||
| close | Emitted when closing menu | - |
|
||||
| opened | Emitted when menu is opened | - |
|
||||
| closed | Emitted when menu is closed | - |
|
||||
|
||||
### DropdownItem Slots
|
||||
|
||||
|
@ -260,14 +260,14 @@ Field support all native events of input tag
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| --- | --- | --- |
|
||||
| input | Triggered when input value changed | _value: string_ |
|
||||
| focus | Triggered when input gets focus | _event: Event_ |
|
||||
| blur | Triggered when input loses focus | _event: Event_ |
|
||||
| clear | Triggered when click clear icon | _event: Event_ |
|
||||
| click | Triggered when click Field | _event: Event_ |
|
||||
| click-input `v2.8.1` | Triggered when click input | _event: Event_ |
|
||||
| click-left-icon | Triggered when click the left icon of Field | _event: Event_ |
|
||||
| click-right-icon | Triggered when click the right icon of Field | _event: Event_ |
|
||||
| input | Emitted when input value changed | _value: string_ |
|
||||
| focus | Emitted when input is focused | _event: Event_ |
|
||||
| blur | Emitted when input is blured | _event: Event_ |
|
||||
| clear | Emitted when the clear icon is clicked | _event: Event_ |
|
||||
| click | Emitted when component is clicked | _event: Event_ |
|
||||
| click-input `v2.8.1` | Emitted when the input is clicked | _event: Event_ |
|
||||
| click-left-icon | Emitted when the left icon is clicked | _event: Event_ |
|
||||
| click-right-icon | Emitted when the right icon is clicked | _event: Event_ |
|
||||
|
||||
### Methods
|
||||
|
||||
|
@ -462,8 +462,8 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| submit | Triggered after submitting the form and validation passed | _values: object_ |
|
||||
| failed | Triggered after submitting the form and validation failed | _errorInfo: { values: object, errors: object[] }_ |
|
||||
| submit | Emitted after submitting the form and validation passed | _values: object_ |
|
||||
| failed | Emitted after submitting the form and validation failed | _errorInfo: { values: object, errors: object[] }_ |
|
||||
|
||||
### Methods
|
||||
|
||||
|
@ -122,9 +122,9 @@ app.use(GridItem);
|
||||
|
||||
### GridItem Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ---------------------- | -------------- |
|
||||
| click | Triggered when clicked | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | --------------------------------- | -------------- |
|
||||
| click | Emitted when component is clicked | _event: Event_ |
|
||||
|
||||
### GridItem Slots
|
||||
|
||||
|
@ -97,6 +97,6 @@ import 'vant/lib/icon/local.css';
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------- | -------------- |
|
||||
| click | Triggered when click icon | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ---------------------------- | -------------- |
|
||||
| click | Emitted when icon is clicked | _event: Event_ |
|
||||
|
@ -119,9 +119,9 @@ export default {
|
||||
| showIndicators | Whether to show indicators | _boolean_ | `false` |
|
||||
| loop | Whether to enable loop | _boolean_ | `true` |
|
||||
| swipeDuration | Animation duration (ms) | _number \| string_ | `500` |
|
||||
| onClose | Triggered when close | _Function_ | - |
|
||||
| onChange | Triggered when current image change | _Function_ | - |
|
||||
| onScale | Triggered when current image scale | _Function_ | - |
|
||||
| onClose | Emitted when ImagePreview is closed | _Function_ | - |
|
||||
| onChange | Emitted when current image changed | _Function_ | - |
|
||||
| onScale | Emitted when scaling current image | _Function_ | - |
|
||||
| closeOnPopstate | Whether to close when popstate | _boolean_ | `true` |
|
||||
| beforeClose | Callback function before close | _(action) => boolean \| Promise_ | - |
|
||||
| className | Custom className | _any_ | - |
|
||||
@ -156,10 +156,17 @@ export default {
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| --- | --- | --- |
|
||||
| close | Triggered when close | { index, url } |
|
||||
| closed `v2.5.6` | Triggered after closed | - |
|
||||
| change | Triggered when current image change | index: index of current image |
|
||||
| scale `v2.5.0` | Triggered when current image scale | { index: index of current image, scale: scale of current image} |
|
||||
| close | Emitted when closing ImagePreview | { index, url } |
|
||||
| closed `v2.5.6` | Emitted when ImagePreview is closed | - |
|
||||
| change | Emitted when current image changed | index: index of current image |
|
||||
| scale `v2.5.0` | Emitted when scaling current image | { index: index of current image, scale: scale of current image} |
|
||||
|
||||
### Methods
|
||||
|
||||
Use [ref](https://vuejs.org/v2/api/#ref) to get ImagePreview instance and call instance methods.
|
||||
|
||||
| Name | Description | Attribute | Return value |
|
||||
| --- | --- | --- | --- |
|
||||
| swipeTo `2.9.0` | Swipe to target index | index: target index, options: Options | - |
|
||||
|
||||
### Slots
|
||||
|
@ -201,7 +201,14 @@ export default {
|
||||
| closed `v2.5.6` | 关闭且且动画结束后触发 | - |
|
||||
| change | 切换当前图片时触发 | index: 当前图片的索引 |
|
||||
| scale `v2.5.0` | 缩放当前图片时触发 | { index: 当前图片的索引, scale: 当前缩放的值 } |
|
||||
| swipeTo `2.9.0` | 切换到指定位置 | index: number, options: Options | - |
|
||||
|
||||
### 方法
|
||||
|
||||
通过组件调用 `ImagePreview` 时,通过 ref 可以获取到 ImagePreview 实例并调用实例方法,详见[组件实例方法](#/zh-CN/advanced-usage#zu-jian-shi-li-fang-fa)。
|
||||
|
||||
| 方法名 | 说明 | 参数 | 返回值 |
|
||||
| --------------- | -------------- | ------------------------------- | ------ |
|
||||
| swipeTo `2.9.0` | 切换到指定位置 | index: number, options: Options | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -93,11 +93,11 @@ app.use(Lazyload);
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | -------------------------------- | -------------- |
|
||||
| click | Triggered when click image | _event: Event_ |
|
||||
| load | Triggered when image loaded | - |
|
||||
| error | Triggered when image load failed | - |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------------ | -------------- |
|
||||
| click | Emitted when image is clicked | _event: Event_ |
|
||||
| load | Emitted when image loaded | - |
|
||||
| error | Emitted when image load failed | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -81,8 +81,8 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| select | Triggered when select index | _index: number \| string_ |
|
||||
| change `v2.10.10` | Triggered when active index changed | _index: number \| string_ |
|
||||
| select | Emitted when an index is selected | _index: number \| string_ |
|
||||
| change `v2.10.10` | Emitted when active index changed | _index: number \| string_ |
|
||||
|
||||
### IndexAnchor Slots
|
||||
|
||||
|
@ -145,10 +145,10 @@ export default {
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
| --- | --- | --- | --- |
|
||||
| v-model:loading | Whether to show loading info,the `load` event will not be triggered when loading | _boolean_ | `false` |
|
||||
| finished | Whether loading is finished,the `load` event will not be triggered when finished | _boolean_ | `false` |
|
||||
| error | Whether loading is error,the `load` event will be triggered only when error text clicked, the `sync` modifier is needed | _boolean_ | `false` |
|
||||
| offset | The load event will be triggered when the distance between the scrollbar and the bottom is less than offset | _number \| string_ | `300` |
|
||||
| v-model:loading | Whether to show loading info,the `load` event will not be Emitted when loading | _boolean_ | `false` |
|
||||
| finished | Whether loading is finished,the `load` event will not be Emitted when finished | _boolean_ | `false` |
|
||||
| error | Whether loading is error,the `load` event will be Emitted only when error text clicked, the `sync` modifier is needed | _boolean_ | `false` |
|
||||
| offset | The load event will be Emitted when the distance between the scrollbar and the bottom is less than offset | _number \| string_ | `300` |
|
||||
| loading-text | Loading text | _string_ | `Loading...` |
|
||||
| finished-text | Finished text | _string_ | - |
|
||||
| error-text | Error loaded text | _string_ | - |
|
||||
@ -159,7 +159,7 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| load | Triggered when the distance between the scrollbar and the bottom is less than offset | - |
|
||||
| load | Emitted when the distance between the scrollbar and the bottom is less than offset | - |
|
||||
|
||||
### Methods
|
||||
|
||||
|
@ -76,7 +76,7 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----------- | --------------------------------- | --------- |
|
||||
| click-left | Triggered when click left button | - |
|
||||
| click-right | Triggered when click right button | - |
|
||||
| Event | Description | Arguments |
|
||||
| ----------- | ---------------------------------------- | --------- |
|
||||
| click-left | Emitted when the left button is clicked | - |
|
||||
| click-right | Emitted when the right button is clicked | - |
|
||||
|
@ -101,11 +101,11 @@ app.use(NoticeBar);
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --------------- | ------------------------------ | -------------- |
|
||||
| click | Triggered when click NoticeBar | _event: Event_ |
|
||||
| close | Triggered when closed | _event: Event_ |
|
||||
| replay `v2.6.2` | Triggered when replay | - |
|
||||
| Event | Description | Arguments |
|
||||
| --------------- | ---------------------------------- | -------------- |
|
||||
| click | Emitted when NoticeBar is clicked | _event: Event_ |
|
||||
| close | Emitted when NoticeBar is closed | _event: Event_ |
|
||||
| replay `v2.6.2` | Emitted when NoticeBar is replayed | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -155,7 +155,7 @@ export default {
|
||||
| delete-button-text | Delete button text | _string_ | Delete Icon |
|
||||
| close-button-loading `v2.7.0` | Whether to show loading close button in custom theme | _boolean_ | `false` |
|
||||
| show-delete-key `v2.5.9` | Whether to show delete button | _boolean_ | `true` |
|
||||
| hide-on-click-outside | Whether to hide keyboard when click outside | _boolean_ | `true` |
|
||||
| hide-on-click-outside | Whether to hide keyboard when outside is clicked | _boolean_ | `true` |
|
||||
| teleport `v2.10.0` | Return the mount node for NumberKeyboard | _string \| Element_ | - |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
|
||||
|
||||
@ -163,12 +163,12 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| input | Triggered when keydown | key: Content of the key |
|
||||
| delete | Triggered when press delete key | - |
|
||||
| close | Triggered when click close button | - |
|
||||
| blur | Triggered when click close button or blur keyboard | - |
|
||||
| show | Triggered when keyboard is fully displayed | - |
|
||||
| hide | Triggered when keyboard is fully hidden | - |
|
||||
| input | Emitted when keydown | key: Content of the key |
|
||||
| delete | Emitted when the delete key is pressed | - |
|
||||
| close | Emitted when the close button is clicked | - |
|
||||
| blur | Emitted when the close button is clicked or the keyboard is blured | - |
|
||||
| show | Emitted when keyboard is fully displayed | - |
|
||||
| hide | Emitted when keyboard is fully hidden | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -69,9 +69,9 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ---------------------- | -------------- |
|
||||
| click | Triggered when clicked | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | --------------------------------- | -------------- |
|
||||
| click | Emitted when component is clicked | _event: Event_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -77,9 +77,9 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ------------------------ | --------- |
|
||||
| change | Triggered on page change | - |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | --------------------------------- | --------- |
|
||||
| change | Emitted when current page changed | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -132,6 +132,6 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | -------------------------------- | --------- |
|
||||
| focus | Triggered when input get focused | - |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ----------------------------- | --------- |
|
||||
| focus | Emitted when input is focused | - |
|
||||
|
@ -223,7 +223,7 @@ export default createComponent({
|
||||
setIndex(index, true);
|
||||
|
||||
// compatible with desktop scenario
|
||||
// use setTimeout to skip the click event triggered after touchstart
|
||||
// use setTimeout to skip the click event Emitted after touchstart
|
||||
setTimeout(() => {
|
||||
moving = false;
|
||||
}, 0);
|
||||
|
@ -261,9 +261,9 @@ Picker events will pass different parameters according to the columns are single
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| confirm | Triggered when click confirm button | Single column:current value,current index<br>Multiple columns:current values,current indexes |
|
||||
| cancel | Triggered when click cancel button | Single column:current value,current index<br>Multiple columns:current values,current indexes |
|
||||
| change | Triggered when current option changed | Single column:Picker instance, current value,current index<br>Multiple columns:Picker instance, current values,column index |
|
||||
| confirm | Emitted when click confirm button | Single column:current value,current index<br>Multiple columns:current values,current indexes |
|
||||
| cancel | Emitted when click cancel button | Single column:current value,current index<br>Multiple columns:current values,current indexes |
|
||||
| change | Emitted when current option changed | Single column:Picker instance, current value,current index<br>Multiple columns:Picker instance, current values,column index |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -180,13 +180,13 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | -------------------------------- | ------------------------------- |
|
||||
| select | Triggered when clicking action | _action: Action, index: number_ |
|
||||
| open | Triggered when opening Popover | - |
|
||||
| close | Triggered when closing Popover | - |
|
||||
| opened | Triggered when Popover is opened | - |
|
||||
| closed | Triggered when Popover is closed | - |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | --------------------------------- | ------------------------------- |
|
||||
| select | Emitted when an action is clicked | _action: Action, index: number_ |
|
||||
| open | Emitted when opening Popover | - |
|
||||
| close | Emitted when closing Popover | - |
|
||||
| opened | Emitted when Popover is opened | - |
|
||||
| closed | Emitted when Popover is closed | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
@import '../style/var';
|
||||
@import '../style/mixins/hairline';
|
||||
|
||||
.van-popover {
|
||||
position: absolute;
|
||||
|
@ -122,7 +122,7 @@ export default {
|
||||
| lock-scroll | Whether to lock background scroll | _boolean_ | `true` |
|
||||
| lazy-render | Whether to lazy render util appeared | _boolean_ | `true` |
|
||||
| close-on-popstate | Whether to close when popstate | _boolean_ | `false` |
|
||||
| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `true` |
|
||||
| closeable | Whether to show close icon | _boolean_ | `false` |
|
||||
| close-icon | Close icon name | _string_ | `cross` |
|
||||
| close-icon-position | Close Icon Position,can be set to `top-left` `bottom-left` `bottom-right` | _string_ | `top-right` |
|
||||
@ -133,11 +133,11 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------------- | ---------------------------- | -------------- |
|
||||
| click | Triggered when click Popup | _event: Event_ |
|
||||
| open | Triggered when open Popup | - |
|
||||
| close | Triggered when close Popup | - |
|
||||
| opened | Triggered when opened Popup | - |
|
||||
| closed | Triggered when closed Popup | - |
|
||||
| click-overlay | Triggered when click overlay | - |
|
||||
| Event | Description | Arguments |
|
||||
| ------------- | ------------------------------- | -------------- |
|
||||
| click | Emitted when Popup is clicked | _event: Event_ |
|
||||
| open | Emitted when opening Popup | - |
|
||||
| close | Emitted when closing Popup | - |
|
||||
| opened | Emitted when Popup is opened | - |
|
||||
| closed | Emitted when Popup is closed | - |
|
||||
| click-overlay | Emitted when overlay is clicked | - |
|
||||
|
@ -63,7 +63,7 @@ export const popupSharedProps = {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
// whether to close popup when click overlay
|
||||
// whether to close popup when overlay is clicked
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
|
@ -14,7 +14,7 @@ app.use(PullRefresh);
|
||||
|
||||
### Basic Usage
|
||||
|
||||
The `refresh` event will be triggered when pull refresh, you should set `v-model` to `false` to reset loading status after process refresh event.
|
||||
The `refresh` event will be Emitted when pull refresh, you should set `v-model` to `false` to reset loading status after process refresh event.
|
||||
|
||||
```html
|
||||
<van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
||||
@ -110,9 +110,9 @@ Use slots to custom tips.
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| ------- | --------------------------- | ---------- |
|
||||
| refresh | Triggered when pull refresh | - |
|
||||
| Event | Description | Parameters |
|
||||
| ------- | ----------------------------- | ---------- |
|
||||
| refresh | Emitted after pulling refresh | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -172,15 +172,15 @@ export default {
|
||||
|
||||
### Radio Events
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| ----- | -------------------------- | -------------- |
|
||||
| click | Triggered when click radio | _event: Event_ |
|
||||
| Event | Description | Parameters |
|
||||
| ----- | ----------------------------- | -------------- |
|
||||
| click | Emitted when radio is clicked | _event: Event_ |
|
||||
|
||||
### RadioGroup Events
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| ------ | ---------------------------- | -------------- |
|
||||
| change | Triggered when value changed | _name: string_ |
|
||||
| Event | Description | Parameters |
|
||||
| ------ | -------------------------- | -------------- |
|
||||
| change | Emitted when value changed | _name: string_ |
|
||||
|
||||
### Radio Slots
|
||||
|
||||
|
@ -119,6 +119,6 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| ------ | --------------------------- | ------------ |
|
||||
| change | Triggered when rate changed | current rate |
|
||||
| Event | Description | Parameters |
|
||||
| ------ | ------------------------- | ------------ |
|
||||
| change | Emitted when rate changed | current rate |
|
||||
|
@ -30,7 +30,7 @@ export default {
|
||||
|
||||
### Listen to Events
|
||||
|
||||
`search` event will be triggered when click the search button on the keyboard, `cancel` event will be triggered when click the cancel button.
|
||||
`search` event will be Emitted when click the search button on the keyboard, `cancel` event will be Emitted when click the cancel button.
|
||||
|
||||
```html
|
||||
<form action="/">
|
||||
@ -91,7 +91,7 @@ export default {
|
||||
|
||||
### Custom Action Button
|
||||
|
||||
Use `action` slot to custom right button, `cancel` event will no longer be triggered when use this slot.
|
||||
Use `action` slot to custom right button, `cancel` event will no longer be Emitted when use this slot.
|
||||
|
||||
```html
|
||||
<van-search
|
||||
@ -132,14 +132,14 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ---------------------------------- | --------------- |
|
||||
| search | Triggered when confirm search | _value: string_ |
|
||||
| input | Triggered when input value changed | _value: string_ |
|
||||
| focus | Triggered when input gets focus | _event: Event_ |
|
||||
| blur | Triggered when input loses focus | _event: Event_ |
|
||||
| clear | Triggered when click clear icon | _event: Event_ |
|
||||
| cancel | Triggered when click cancel button | - |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ----------------------------------------- | --------------- |
|
||||
| search | Emitted when confirming search | _value: string_ |
|
||||
| input | Emitted when input value changed | _value: string_ |
|
||||
| focus | Emitted when input is focused | _event: Event_ |
|
||||
| blur | Emitted when input is blured | _event: Event_ |
|
||||
| clear | Emitted when the clear icon is clicked | _event: Event_ |
|
||||
| cancel | Emitted when the cancel button is clicked | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -121,7 +121,7 @@ export default {
|
||||
| lock-scroll | Whether to lock background scroll | _boolean_ | `true` |
|
||||
| lazy-render | Whether to lazy render util appeared | _boolean_ | `true` |
|
||||
| close-on-popstate | Whether to close when popstate | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when click overlay | _boolean_ | `true` |
|
||||
| close-on-click-overlay | Whether to close when overlay is clicked | _boolean_ | `true` |
|
||||
| safe-area-inset-bottom | Whether to enable bottom safe area adaptation | _boolean_ | `true` |
|
||||
| teleport | Return the mount node for ShareSheet | _string \| Element_ | - |
|
||||
|
||||
@ -138,9 +138,9 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| select | Triggered when click option | _option: Option, index: number_ |
|
||||
| cancel | Triggered when click cancel button | - |
|
||||
| click-overlay `v2.9.1` | Triggered when click overlay | - |
|
||||
| select | Emitted when an option is clicked | _option: Option, index: number_ |
|
||||
| cancel | Emitted when the cancel button is clicked | - |
|
||||
| click-overlay `v2.9.1` | Emitted when overlay is clicked | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -90,9 +90,9 @@ export default {
|
||||
|
||||
### Sidebar Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | --------------------------- | ---------------------------- |
|
||||
| change | Triggered when item changed | index: index of current item |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | -------------------------------- | ---------------------------- |
|
||||
| change | Emitted when chosen item changed | index: index of current item |
|
||||
|
||||
### SidebarItem Props
|
||||
|
||||
@ -108,9 +108,9 @@ export default {
|
||||
|
||||
### SidebarItem Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------- | ---------------------------- |
|
||||
| click | Triggered when click item | index: index of current item |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------------- | ---------------------------- |
|
||||
| click | Emitted when an item is clicked | index: index of current item |
|
||||
|
||||
### SidebarItem Slots
|
||||
|
||||
|
@ -160,12 +160,12 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ---------- | ------------------------------------ | ------------------- |
|
||||
| input | Instant triggered when value changed | value: current rate |
|
||||
| change | Triggered after value changed | value: current rate |
|
||||
| drag-start | Triggered when start drag | - |
|
||||
| drag-end | Triggered when end drag | - |
|
||||
| Event | Description | Arguments |
|
||||
| ---------- | ------------------------------ | ------------------- |
|
||||
| input | Emitted when value is changing | value: current rate |
|
||||
| change | Emitted after value changed | value: current rate |
|
||||
| drag-start | Emitted when start draging | - |
|
||||
| drag-end | Emitted when end draging | - |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -136,9 +136,9 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| change | Triggered when value change | _value: string, detail: { name: string }_ |
|
||||
| overlimit | Triggered when click disabled button | - |
|
||||
| plus | Triggered when click plus button | - |
|
||||
| minus | Triggered when click minus button | - |
|
||||
| focus | Triggered when input focused | _event: Event_ |
|
||||
| blur | Triggered when input blured | _event: Event_ |
|
||||
| change | Emitted when value changed | _value: string, detail: { name: string }_ |
|
||||
| overlimit | Emitted when a disabled button is clicked | - |
|
||||
| plus | Emitted when the plus button is clicked | - |
|
||||
| minus | Emitted when the minus button is clicked | - |
|
||||
| focus | Emitted when the input is focused | _event: Event_ |
|
||||
| blur | Emitted when the input is blured | _event: Event_ |
|
||||
|
@ -88,4 +88,4 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| click-step `v2.5.9` | Triggered when a step's title or icon is clicked | _index: number_ |
|
||||
| click-step `v2.5.9` | Emitted when a step's title or icon is clicked | _index: number_ |
|
||||
|
@ -63,6 +63,6 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | --------------------- | ------------------------------ |
|
||||
| scroll | Triggered when scroll | object: { scrollTop, isFixed } |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ---------------------- | ------------------------------ |
|
||||
| scroll | Emitted when scrolling | object: { scrollTop, isFixed } |
|
||||
|
@ -118,9 +118,9 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| click | Triggered when clicked | Click positon (`left` `right` `cell` `outside`) |
|
||||
| open | Triggered when opened | { position: 'left' \| 'right' , name: string } |
|
||||
| close | Triggered when closed | { position: string , name: string } |
|
||||
| click | Emitted when SwipeCell is clicked | Click positon (`left` `right` `cell` `outside`) |
|
||||
| open | Emitted when SwipeCell is opened | { position: 'left' \| 'right' , name: string } |
|
||||
| close | Emitted when SwipeCell is closed | { position: string , name: string } |
|
||||
|
||||
### beforeClose Params
|
||||
|
||||
|
@ -177,15 +177,15 @@ export default {
|
||||
|
||||
### Swipe Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ----------------------------------- | ----------------------------- |
|
||||
| change | Triggered when current swipe change | index: index of current swipe |
|
||||
| Event | Description | Arguments |
|
||||
| ------ | ---------------------------------- | ----------------------------- |
|
||||
| change | Emitted when current swipe changed | index: index of current swipe |
|
||||
|
||||
### SwipeItem Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ---------------------- | -------------- |
|
||||
| click | Triggered when clicked | _event: Event_ |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | --------------------------------- | -------------- |
|
||||
| click | Emitted when component is clicked | _event: Event_ |
|
||||
|
||||
### Swipe Methods
|
||||
|
||||
|
@ -105,7 +105,7 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Parameters |
|
||||
| ------ | ----------------------------------- | -------------- |
|
||||
| change | Triggered when check status changed | _value: any_ |
|
||||
| click | Triggered when clicked | _event: Event_ |
|
||||
| Event | Description | Parameters |
|
||||
| ------ | --------------------------------- | -------------- |
|
||||
| change | Emitted when check status changed | _value: any_ |
|
||||
| click | Emitted when component is clicked | _event: Event_ |
|
||||
|
@ -258,11 +258,11 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| click | Triggered when click tab | name,title |
|
||||
| change | Triggered when active tab changed | name,title |
|
||||
| disabled | Triggered when click disabled tab | name,title |
|
||||
| rendered `v2.3.0` | Triggered when content first rendered in lazy-render mode | name,title |
|
||||
| scroll | Triggered when tab scroll in sticky mode | object: { scrollTop, isFixed } |
|
||||
| click | Emitted when a tab is clicked | name,title |
|
||||
| change | Emitted when active tab changed | name,title |
|
||||
| disabled | Emitted when a disabled tab is clicked | name,title |
|
||||
| rendered `v2.3.0` | Emitted when content first rendered in lazy-render mode | name,title |
|
||||
| scroll | Emitted when tab scrolling in sticky mode | object: { scrollTop, isFixed } |
|
||||
|
||||
### Tabs Methods
|
||||
|
||||
|
@ -167,7 +167,7 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ------ | -------------------------------- | ---------------------------- |
|
||||
| change | Triggered when change active tab | active: index of current tab |
|
||||
| change | Emitted when changing active tab | active: index of current tab |
|
||||
|
||||
### TabbarItem Props
|
||||
|
||||
|
@ -102,7 +102,7 @@ export default {
|
||||
|
||||
### Events
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ------------------------------- | -------------- |
|
||||
| click | Triggered when clicked | _event: Event_ |
|
||||
| close | Triggered when click close icon | - |
|
||||
| Event | Description | Arguments |
|
||||
| ----- | ---------------------------------- | -------------- |
|
||||
| click | Emitted when component is clicked | _event: Event_ |
|
||||
| close | Emitted when close icon is clicked | - |
|
||||
|
@ -161,7 +161,7 @@ Toast.resetDefaultOptions('loading');
|
||||
| overlay | Whether to show overlay | _boolean_ | `false` |
|
||||
| forbidClick | Whether to forbid click background | _boolean_ | `false` |
|
||||
| closeOnClick | Whether to close after clicked | _boolean_ | `false` |
|
||||
| closeOnClickOverlay | Whether to close when click overlay | _boolean_ | `false` |
|
||||
| closeOnClickOverlay | Whether to close when overlay is clicked | _boolean_ | `false` |
|
||||
| loadingType | Loading icon type, can be set to `spinner` | _string_ | `circular` |
|
||||
| duration | Toast duration(ms), won't disappear if value is 0 | _number_ | `2000` |
|
||||
| className | Custom className | _any_ | - |
|
||||
|
@ -129,8 +129,8 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| click-nav | triggered when parent node is selected | index: index of selected parent |
|
||||
| click-item | triggered when item is selected | data: selected item |
|
||||
| click-nav | Emitted when parent node is selected | index: index of selected parent |
|
||||
| click-item | Emitted when item is selected | data: selected item |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -203,7 +203,7 @@ Use `disabled` prop to disable uploader.
|
||||
| name | Input name | _number \| string_ | - |
|
||||
| preview-size | Size of preview image | _number \| string_ | `80px` |
|
||||
| preview-image | Whether to show image preview | _boolean_ | `true` |
|
||||
| preview-full-image | Whethe to show full screen image preview when click image | _boolean_ | `true` |
|
||||
| preview-full-image | Whethe to show full screen image preview when image is clicked | _boolean_ | `true` |
|
||||
| preview-options `v2.9.3` | Options of full screen image preview,see [ImagePreview](#/en-US/image-preview) | _object_ | - |
|
||||
| multiple | Whether to enable multiple selection pictures | _boolean_ | `false` |
|
||||
| disabled | Whether to disabled the upload | _boolean_ | `false` |
|
||||
@ -225,10 +225,10 @@ Use `disabled` prop to disable uploader.
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| oversize | Triggered when file size over limit | Same as after-read |
|
||||
| click-preview | Triggered when click preview image | Same as after-read |
|
||||
| close-preview | Triggered when close full screen image preview | - |
|
||||
| delete | Triggered when delete preview file | Same as after-read |
|
||||
| oversize | Emitted when file size over limit | Same as after-read |
|
||||
| click-preview | Emitted when preview image is clicked | Same as after-read |
|
||||
| close-preview | Emitted when the full screen image preview is closed | - |
|
||||
| delete | Emitted when preview file is deleted | Same as after-read |
|
||||
|
||||
### Slots
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user