Skip to content

Commit

Permalink
docs(textarea): update the default value of confirm-type props
Browse files Browse the repository at this point in the history
  • Loading branch information
betavs committed Dec 5, 2023
1 parent 0029123 commit 0fe95ad
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
23 changes: 12 additions & 11 deletions src/textarea/README.en-US.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:: BASE_DOC ::

## API

### Textarea Props

name | type | default | description | required
Expand All @@ -9,7 +10,7 @@ adjust-position | Boolean | true | \- | N
autofocus | Boolean | false | \- | N
autosize | Boolean | false | \- | N
confirm-hold | Boolean | false | \- | N
confirm-type | String | done | options:send/search/next/go/done。Typescript:`'send' \| 'search' \| 'next' \| 'go' \| 'done'` | N
confirm-type | String | return | options:return/send/search/next/go/done。Typescript:`'return' \| 'send' \| 'search' \| 'next' \| 'go' \| 'done'` | N
cursor-spacing | Number | 0 | \- | N
disabled | Boolean | false | \- | N
external-classes | Array | - | `['t-class', 't-class-textarea', 't-class-label']` | N
Expand All @@ -31,16 +32,16 @@ enter | `(value: TextareaValue)` | \-
focus | `(value: TextareaValue)` | \-
line-change | `(value: TextareaValue)` | \-


### CSS Variables

The component provides the following CSS variables, which can be used to customize styles.
Name | Default Value | Description
Name | Default Value | Description
-- | -- | --
--td-textarea-background-color | @bg-color-container | -
--td-textarea-border-color | rgba(220, 220, 220, 1) | -
--td-textarea-border-radius | @radius-default | -
--td-textarea-disabled-text-color | @font-gray-4 | -
--td-textarea-indicator-text-color | @font-gray-3 | -
--td-textarea-label-color | @font-gray-1 | -
--td-textarea-placeholder-color | @font-gray-3 | -
--td-textarea-text-color | @font-gray-1 | -
--td-textarea-background-color | @bg-color-container | -
--td-textarea-border-color | rgba(220, 220, 220, 1) | -
--td-textarea-border-radius | @radius-default | -
--td-textarea-disabled-text-color | @font-gray-4 | -
--td-textarea-indicator-text-color | @font-gray-3 | -
--td-textarea-label-color | @font-gray-1 | -
--td-textarea-placeholder-color | @font-gray-3 | -
--td-textarea-text-color | @font-gray-1 | -
27 changes: 15 additions & 12 deletions src/textarea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ isComponent: true
---

<span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20lines-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20functions-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20statements-100%25-blue" /></span><span class="coverages-badge" style="margin-right: 10px"><img src="https://img.shields.io/badge/coverages%3A%20branches-92%25-blue" /></span>

## 引入

全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
Expand Down Expand Up @@ -57,6 +58,7 @@ isComponent: true
- 如果需要在页面中调整 `textarea``placeholder` 样式,请使用名称为`t-textarea__placeholder`的Class选择器,直接覆盖组件内部样式(注意权重)。

## API

### Textarea Props

名称 | 类型 | 默认值 | 说明 | 必传
Expand All @@ -65,7 +67,7 @@ adjust-position | Boolean | true | 键盘弹起时,是否自动上推页面 |
autofocus | Boolean | false | 自动聚焦,拉起键盘 | N
autosize | Boolean / Object | false | 是否自动增高,值为 true 时,style.height 不生效。支持传入对象,如 { maxHeight: 120, minHeight: 20 } | N
confirm-hold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起点 | N
confirm-type | String | done | 设置键盘右下角按钮的文字,仅在 type='text'时生效。可选项:send/search/next/go/done。TS 类型:`'return' \| 'send' \| 'search' \| 'next' \| 'go' \| 'done'` | N
confirm-type | String | return | 设置键盘右下角按钮的文字,仅在 type='text'时生效。可选项:return/send/search/next/go/done。TS 类型:`'return' \| 'send' \| 'search' \| 'next' \| 'go' \| 'done'` | N
cursor-spacing | Number | 0 | 指定光标与键盘的距离。取textarea距离底部的距离和cursor-spacing指定的距离的最小值作为光标与键盘的距离 | N
disabled | Boolean | false | 是否禁用文本框 | N
focus | Boolean | false | 自动聚焦 | N
Expand Down Expand Up @@ -98,23 +100,24 @@ line-change | `(value: TextareaValue)` | 行高发生变化时触发
keyboardheightchange | `(height: number, duration: number)` | 键盘高度发生变化的时候触发此事件

### Textarea 外部样式类

类名 | 说明
-- | --
-- | --
t-class | 根节点样式类
t-class-textarea | 占位符样式类
t-class-label | 左侧文本样式类
t-class-indicator | 计数器样式类


### CSS 变量

组件提供了下列 CSS 变量,可用于自定义样式。
名称 | 默认值 | 描述
名称 | 默认值 | 描述
-- | -- | --
--td-textarea-background-color | @bg-color-container | -
--td-textarea-border-color | rgba(220, 220, 220, 1) | -
--td-textarea-border-radius | @radius-default | -
--td-textarea-disabled-text-color | @font-gray-4 | -
--td-textarea-indicator-text-color | @font-gray-3 | -
--td-textarea-label-color | @font-gray-1 | -
--td-textarea-placeholder-color | @font-gray-3 | -
--td-textarea-text-color | @font-gray-1 | -
--td-textarea-background-color | @bg-color-container | -
--td-textarea-border-color | rgba(220, 220, 220, 1) | -
--td-textarea-border-radius | @radius-default | -
--td-textarea-disabled-text-color | @font-gray-4 | -
--td-textarea-indicator-text-color | @font-gray-3 | -
--td-textarea-label-color | @font-gray-1 | -
--td-textarea-placeholder-color | @font-gray-3 | -
--td-textarea-text-color | @font-gray-1 | -
2 changes: 1 addition & 1 deletion src/textarea/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface TdTextareaProps {
};
/**
* 设置键盘右下角按钮的文字,仅在 type='text'时生效
* @default done
* @default return
*/
confirmType?: {
type: StringConstructor;
Expand Down

0 comments on commit 0fe95ad

Please sign in to comment.