Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion src/textarea/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ bordered | Boolean | false | \- | N
confirm-hold | Boolean | false | \- | N
confirm-type | String | return | options: return/send/search/next/go/done。Typescript:`'return' \| 'send' \| 'search' \| 'next' \| 'go' \| 'done'` | N
cursor | Number | -1 | \- | N
cursor-color | String | #0052d9 | \- | N
cursor-spacing | Number | 0 | \- | N
disable-default-padding | Boolean | false | \- | N
disabled | Boolean | undefined | \- | N
Expand Down Expand Up @@ -68,4 +69,4 @@ Name | Default Value | Description
--td-textarea-indicator-text-color | @text-color-placeholder | -
--td-textarea-label-color | @text-color-primary | -
--td-textarea-placeholder-color | @text-color-placeholder | -
--td-textarea-text-color | @text-color-primary | -
--td-textarea-text-color | @text-color-primary | -
5 changes: 3 additions & 2 deletions src/textarea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ isComponent: true
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
adjust-position | Boolean | true | 键盘弹起时,是否自动上推页面 | N
allow-input-over-max | Boolean | false | `1.8.6`。 超出maxlength或maxcharacter之后是否还允许输入 | N
allow-input-over-max | Boolean | false | `1.8.6`。超出maxlength或maxcharacter之后是否还允许输入 | N
autofocus | Boolean | false | 自动聚焦,拉起键盘 | N
autosize | Boolean / Object | false | 是否自动增高,值为 true 时,style.height 不生效。支持传入对象,如 { maxHeight: 120, minHeight: 20 }。TS 类型:`boolean \| { maxHeight?: number, minHeight?: number }` | N
bordered | Boolean | false | 是否显示外边框 | N
confirm-hold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起点 | N
confirm-type | String | return | 设置键盘右下角按钮的文字,仅在 type='text'时生效。可选项:return/send/search/next/go/done。TS 类型:`'return' \| 'send' \| 'search' \| 'next' \| 'go' \| 'done'` | N
cursor | Number | -1 | 指定 focus 时的光标位置 | N
cursor-color | String | #0052d9 | 【试验性】光标颜色,仅在 Skyline 下有效 | N
cursor-spacing | Number | 0 | 指定光标与键盘的距离。取textarea距离底部的距离和cursor-spacing指定的距离的最小值作为光标与键盘的距离 | N
disable-default-padding | Boolean | false | 是否去掉 iOS 下的默认内边距 | N
disabled | Boolean | undefined | 是否禁用文本框 | N
Expand Down Expand Up @@ -131,4 +132,4 @@ t-class-textarea | 多行文本框样式类
--td-textarea-indicator-text-color | @text-color-placeholder | -
--td-textarea-label-color | @text-color-primary | -
--td-textarea-placeholder-color | @text-color-placeholder | -
--td-textarea-text-color | @text-color-primary | -
--td-textarea-text-color | @text-color-primary | -
1 change: 1 addition & 0 deletions src/textarea/__test__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ exports[`textarea slots : label 1`] = `
confirmHold="{{false}}"
confirmType="return"
cursor="{{-1}}"
cursorColor="#0052d9"
cursorSpacing="{{0}}"
disabled="{{null}}"
disableDefaultPadding="{{false}}"
Expand Down
5 changes: 5 additions & 0 deletions src/textarea/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ const props: TdTextareaProps = {
type: Number,
value: -1,
},
/** 【试验性】光标颜色,仅在 Skyline 下有效 */
cursorColor: {
type: String,
value: '#0052d9',
},
/** 指定光标与键盘的距离。取textarea距离底部的距离和cursor-spacing指定的距离的最小值作为光标与键盘的距离 */
cursorSpacing: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions src/textarea/textarea.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
focus="{{focus}}"
cursor="{{cursor}}"
cursor-spacing="{{cursorSpacing}}"
cursor-color="{{cursorColor}}"
adjust-position="{{adjustPosition}}"
confirm-type="{{confirmType}}"
confirm-hold="{{confirmHold}}"
Expand Down
8 changes: 8 additions & 0 deletions src/textarea/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ export interface TdTextareaProps {
type: NumberConstructor;
value?: number;
};
/**
* 【试验性】光标颜色,仅在 Skyline 下有效
* @default #0052d9
*/
cursorColor?: {
type: StringConstructor;
value?: string;
};
/**
* 指定光标与键盘的距离。取textarea距离底部的距离和cursor-spacing指定的距离的最小值作为光标与键盘的距离
* @default 0
Expand Down