docs: prettier all markdown files

This commit is contained in:
chenjiahan
2020-04-11 09:17:33 +08:00
committed by neverland
parent 48067f79db
commit 7f84f8a487
140 changed files with 4441 additions and 4723 deletions
+43 -43
View File
@@ -30,15 +30,15 @@ export default {
option1: [
{ text: 'Option1', value: 0 },
{ text: 'Option2', value: 1 },
{ text: 'Option3', value: 2 }
{ text: 'Option3', value: 2 },
],
option2: [
{ text: 'Option A', value: 'a' },
{ text: 'Option B', value: 'b' },
{ text: 'Option C', value: 'c' },
]
}
}
],
};
},
};
```
@@ -65,15 +65,15 @@ export default {
option: [
{ text: 'Option1', value: 0 },
{ text: 'Option2', value: 1 },
{ text: 'Option3', value: 2 }
]
}
{ text: 'Option3', value: 2 },
],
};
},
methods: {
onConfirm() {
this.$refs.item.toggle();
}
}
},
},
};
```
@@ -111,55 +111,55 @@ Use `active-color` prop to custom active color of the title and options
### DropdownMenu Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| active-color | Active color of title and option | *string* | `#1989fa` |
| direction `v2.0.1` | Expand direction, can be set to `up` | *string* | `down` |
| 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 `v2.0.7` | Whether to close when click outside | *boolean* | `true` |
| --- | --- | --- | --- |
| active-color | Active color of title and option | _string_ | `#1989fa` |
| direction `v2.0.1` | Expand direction, can be set to `up` | _string_ | `down` |
| 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 `v2.0.7` | Whether to close when click outside | _boolean_ | `true` |
### DropdownItem Props
| Attribute | Description | Type | Default |
|------|------|------|------|
| value | Value of current optioncan use `v-model` | *number \| string* | - |
| title | Item title | *string* | Text of selected option |
| options | Options | *Option[]* | `[]` |
| disabled | Whether to disable dropdown item | *boolean* | `false` |
| title-class | Title class | *string* | - |
| get-container `v2.2.4` | Return the mount node for menu | *string \| () => Element* | - |
| --- | --- | --- | --- |
| value | Value of current optioncan use `v-model` | _number \| string_ | - |
| title | Item title | _string_ | Text of selected option |
| options | Options | _Option[]_ | `[]` |
| disabled | Whether to disable dropdown item | _boolean_ | `false` |
| title-class | Title class | _string_ | - |
| get-container `v2.2.4` | Return the mount node for menu | _string \| () => Element_ | - |
### 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 | 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 | - |
### DropdownItem Slots
| Name | Description |
|------|------|
| default | Content |
| title | Custom title |
| Name | Description |
| ------- | ------------ |
| default | Content |
| title | Custom title |
### DropdownItem Methods
Use [ref](https://vuejs.org/v2/api/#ref) to get DropdownItem instance and call instance methods
| Name | Description | Attribute | Return value |
|------|------|------|------|
| toggle | Toggle display | show: boolean | - |
| Name | Description | Attribute | Return value |
| ------ | -------------- | ------------- | ------------ |
| toggle | Toggle display | show: boolean | - |
### Data Structure of Option
| Key | Description | Type |
|------|------|------|
| text | Text | *string* |
| value | Value | *number \| string* |
| icon | Left icon | *string* |
| Key | Description | Type |
| ----- | ----------- | ------------------ |
| text | Text | _string_ |
| value | Value | _number \| string_ |
| icon | Left icon | _string_ |