feat: add link for individual props/events/slots/configs/icons

This commit is contained in:
Justineo
2021-10-20 01:11:27 +08:00
parent df2b6892d2
commit b0dcdbb873
162 changed files with 2176 additions and 2073 deletions

View File

@@ -4,19 +4,19 @@
### Size variants
Available size variants for the `ui` prop: `s`/`m`.
Available size variants for the [`ui`](#props-ui) prop: `s` / `m`.
[[ demo src="/demo/textarea/size.vue" ]]
### Read-only state
Use the `readonly` prop to set a textarea to read-only state.
Use the [`readonly`](#props-readonly) prop to set a textarea to read-only state.
[[ demo src="/demo/textarea/readonly.vue" ]]
### Disabled state
Use the `disabled` prop to set a textarea to disabled state.
Use the [`disabled`](#props-disabled) prop to set a textarea to disabled state.
[[ demo src="/demo/textarea/disabled.vue" ]]
@@ -26,17 +26,17 @@ Use the `disabled` prop to set a textarea to disabled state.
| Name | Type | Default | Description |
| -- | -- | -- | -- |
| `ui` | `string=` | - | [^ui] |
| `value` | `string` | '' | [^value] |
| `disabled` | `boolean=` | `false` | Whether the textarea is disabled. |
| `readonly` | `boolean=` | `false` | Whether the textarea is read-only. |
| `line-number` | `boolean` | `false` | Whether to show line numbers. |
| `rows` | `number|string` | - | The default visible rows of the textarea. |
| `placeholder` | `string` | - | The placeholder text of the textarea. |
| `composition` | `boolean` | `false` | Whether the input process should be aware of composition. |
| `select-on-focus` | `boolean` | `false` | Whether to select text content when focused. |
| `autoresize` | `boolean` | `false` | Whether the textarea should automatically expand when the content exceeds default height. |
| `get-length` | `function(string): number=` | Used to customize length calculation of the input. |
| ``ui`` | `string=` | - | [^ui] |
| ``value`` | `string` | '' | [^value] |
| ``disabled`` | `boolean=` | `false` | Whether the textarea is disabled. |
| ``readonly`` | `boolean=` | `false` | Whether the textarea is read-only. |
| ``line-number`` | `boolean` | `false` | Whether to show line numbers. |
| ``rows`` | `number | string` | - | The default visible rows of the textarea. |
| ``placeholder`` | `string` | - | The placeholder text of the textarea. |
| ``composition`` | `boolean` | `false` | Whether the input process should be aware of composition. |
| ``select-on-focus`` | `boolean` | `false` | Whether to select text content when focused. |
| ``autoresize`` | `boolean` | `false` | Whether the textarea should automatically expand when the content exceeds default height. |
| ``get-length`` | `function(string): number=` | Used to customize length calculation of the input. |
^^^ui
预设样式。
@@ -61,8 +61,8 @@ Use the `disabled` prop to set a textarea to disabled state.
| 名称 | 描述 |
| -- | -- |
| `change` | [^event-change] |
| `input` | [^event-input] |
| ``change`` | [^event-change] |
| ``input`` | [^event-input] |
^^^event-change
输入框内容变化时触发,即原生 `change` 事件触发时。回调参数为 `(value, event)`。
@@ -80,7 +80,7 @@ Use the `disabled` prop to set a textarea to disabled state.
`v-model`
:::
有效输入时触发,受 `composition` 属性影响。回调参数为 `(value: string)``value` 为输入框的 `value` 值。
有效输入时触发,受 [`composition`](#props-composition) 属性影响。回调参数为 `(value: string)``value` 为输入框的 `value` 值。
^^^
此外,`Textarea` 支持如下的原生事件: