Skip to content

Commit 042560f

Browse files
committed
fix: 修复 confirmType 属性不生效的问题 #306
1 parent a460d0b commit 042560f

File tree

5 files changed

+58
-58
lines changed

5 files changed

+58
-58
lines changed

docs/components/easyinput.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ easyinput 组件是对原生input组件的增强 ,是专门为配合表单组
138138
|trim|Boolean/String|见 trim Options | false | 是否自动去除空格,传入类型为 Boolean 时,自动去除前后空格|
139139
|inputBorder|Boolean|-|true|是否显示input输入框的边框|
140140
|styles|Object|-|-| 样式自定义|
141-
|passwrodIcon|Boolean|-| true | type=password 时,是否显示小眼睛图标|
141+
|passwordIcon|Boolean|-| true | type=password 时,是否显示小眼睛图标|
142142

143143

144144
#### Type Options

uni_modules/uni-easyinput/changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## 0.0.14
1+
## 0.0.14(2021-06-18)
22
- 新增 passwordIcon 属性,当type=password时是否显示小眼睛图标
3+
- 修复 confirmType 属性不生效的问题
34
## 0.0.13(2021-06-04)
45
- 修复 disabled 状态可清出内容的 bug
56
## 0.0.12(2021-05-12)

uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<uni-icons v-if="prefixIcon" class="content-clear-icon" :type="prefixIcon" color="#c0c4cc" @click="onClickIcon('prefix')"></uni-icons>
66
<textarea v-if="type === 'textarea'" class="uni-easyinput__content-textarea" :class="{'input-padding':inputBorder}"
77
:name="name" :value="val" :placeholder="placeholder" :placeholderStyle="placeholderStyle" :disabled="disabled"
8-
:maxlength="inputMaxlength" :focus="focused" :autoHeight="autoHeight" @input="onInput" @blur="onBlur" @focus="onFocus"
8+
:maxlength="inputMaxlength" :focus="focused" :autoHeight="autoHeight" :confirmType="confirmType" @input="onInput" @blur="onBlur" @focus="onFocus"
99
@confirm="onConfirm"></textarea>
1010
<input v-else :type="type === 'password'?'text':type" class="uni-easyinput__content-input" :style="{
1111
'padding-right':type === 'password' ||clearable || prefixIcon?'':'10px',
1212
'padding-left':prefixIcon?'':'10px'
1313
}"
1414
:name="name" :value="val" :password="!showPassword && type === 'password'" :placeholder="placeholder"
15-
:placeholderStyle="placeholderStyle" :disabled="disabled" :maxlength="inputMaxlength" :focus="focused" @focus="onFocus"
15+
:placeholderStyle="placeholderStyle" :disabled="disabled" :maxlength="inputMaxlength" :focus="focused" :confirmType="confirmType" @focus="onFocus"
1616
@blur="onBlur" @input="onInput" @confirm="onConfirm" />
1717
<template v-if="type === 'password' && passwrodIcon" >
1818
<uni-icons v-if="val != '' " class="content-clear-icon" :class="{'is-textarea-icon':type==='textarea'}" :type="showPassword?'eye-slash-filled':'eye-filled'"

uni_modules/uni-easyinput/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "uni-easyinput",
33
"displayName": "uni-easyinput 增强输入框",
4-
"version": "0.0.13",
4+
"version": "0.0.14",
55
"description": "Easyinput 组件是对原生input组件的增强",
66
"keywords": [
77
"uni-ui",

uni_modules/uni-easyinput/readme.md

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -116,82 +116,81 @@ easyinput 组件是对原生input组件的增强 ,是专门为配合表单组
116116

117117
### Easyinput Props
118118

119-
|属性名 | 类型 | 可选值 | 默认值 | 说明|
120-
|:-: | :-: |:-: | :-: | :-: |
121-
|value |String/ Number | - | - |输入内容|
122-
|type |String | 见 type Options |text| 输入框的类型(默认text) |
123-
|clearable |Boolean | - |true| 是否显示右侧清空内容的图标控件(输入框有内容,且获得焦点时才显示),点击可清空输入框内容|
124-
|autoHeight |Boolean | - |false| 是否自动增高输入区域,type为textarea时有效|
125-
|placeholder |String | - | - | 输入框的提示文字|
126-
|placeholderStyle |String | - | - | placeholder的样式(内联样式,字符串),如"color: #ddd"|
127-
|focus |Boolean | - |false| 是否自动获得焦点|
128-
|disabled |Boolean | - |false| 是否不可输入|
129-
|maxlength |Number | - |140| 最大输入长度,设置为 -1 的时候不限制最大长度|
130-
|confirmType |String | - |done| 设置键盘右下角按钮的文字,仅在type="text"时生效|
131-
|clearSize |Number | - |15| 清除图标的大小,单位px|
132-
|prefixIcon |String | - | - |输入框头部图标 |
133-
|suffixIcon |String | - | - |输入框尾部图标|
134-
|trim |Boolean/String | 见 trim Options | false | 是否自动去除空格,传入类型为 Boolean 时,自动去除前后空格|
135-
|inputBorder |Boolean | - |true| 是否显示input输入框的边框|
136-
|styles |Object | - | - | 样式自定义|
119+
|属性名| 类型| 可选值|默认值|说明|
120+
|:-:|:-:|:-:|:-:|:-:|
121+
|value|String/ Number|-|-|输入内容|
122+
|type|String|见 type Options|text|输入框的类型(默认text)|
123+
|clearable|Boolean|-|true| 是否显示右侧清空内容的图标控件(输入框有内容,且获得焦点时才显示),点击可清空输入框内容|
124+
|autoHeight|Boolean|-|false| 是否自动增高输入区域,type为textarea时有效|
125+
|placeholder|String |-| - | 输入框的提示文字|
126+
|placeholderStyle|String| - | - | placeholder的样式(内联样式,字符串),如"color: #ddd"|
127+
|focus|Boolean|-|false|是否自动获得焦点|
128+
|disabled|Boolean|-|false|是否不可输入|
129+
|maxlength|Number|-|140|最大输入长度,设置为 -1 的时候不限制最大长度|
130+
|confirmType|String|-|done|设置键盘右下角按钮的文字,仅在type="text"时生效|
131+
|clearSize|Number|-|15|清除图标的大小,单位px|
132+
|prefixIcon|String|-|-|输入框头部图标 |
133+
|suffixIcon|String|-|-|输入框尾部图标|
134+
|trim|Boolean/String|见 trim Options | false | 是否自动去除空格,传入类型为 Boolean 时,自动去除前后空格|
135+
|inputBorder|Boolean|-|true|是否显示input输入框的边框|
136+
|styles|Object|-|-| 样式自定义|
137+
|passwordIcon|Boolean|-| true | type=password 时,是否显示小眼睛图标|
137138

138139

139140
#### Type Options
140141

141-
|属性名 | 说明 |
142-
|:-: | :-: |
143-
|text |文本输入键盘 |
144-
|textarea |多行文本输入键盘 |
145-
|password |密码输入键盘 |
146-
|number |数字输入键盘,注意iOS上app-vue弹出的数字键盘并非9宫格方式 |
147-
|idcard |身份证输入键盘,仅支持微信、支付宝、百度、QQ小程序 |
148-
|digit |带小数点的数字键盘,仅支持微信、支付宝、百度、头条、QQ小程序 |
142+
|属性名| 说明|
143+
|:-:| :-:|
144+
|text|文本输入键盘|
145+
|textarea |多行文本输入键盘|
146+
|password |密码输入键盘|
147+
|number|数字输入键盘,注意iOS上app-vue弹出的数字键盘并非9宫格方式 |
148+
|idcard|身份证输入键盘,仅支持微信、支付宝、百度、QQ小程序|
149+
|digit|带小数点的数字键盘,仅支持微信、支付宝、百度、头条、QQ小程序 |
149150

150151
#### ConfirmType Options
151152

152153
平台差异与 [input](https://uniapp.dcloud.io/component/input) 相同
153154

154-
|属性名 | 说明 |
155-
|:-: | :-: |
156-
|send |右下角按钮为“发送” |
155+
|属性名 | 说明|
156+
|:-:| :-:|
157+
|send|右下角按钮为“发送” |
157158
|search |右下角按钮为“搜索” |
158-
|next |右下角按钮为“下一个”|
159-
|go |右下角按钮为“前往” |
160-
|done |右下角按钮为“完成” |
159+
|next|右下角按钮为“下一个”|
160+
|go|右下角按钮为“前往” |
161+
|done|右下角按钮为“完成” |
161162

162163

163164
#### Styles Options
164165

165-
|属性名 | 默认值 |说明 |
166-
|:-: | :-: | :-: |
167-
|color | #333 | 输入文字颜色 |
168-
|disableColor |#eee | 输入框禁用背景色 |
169-
|borderColor |#e5e5e5 | 边框颜色 |
166+
|属性名| 默认值 |说明|
167+
|:-:| :-:| :-:|
168+
|color| #333| 输入文字颜色|
169+
|disableColor |#eee| 输入框禁用背景色|
170+
|borderColor |#e5e5e5 | 边框颜色|
170171

171172
#### Trim Options
172173

173174
传入类型为 `Boolean` 时,自动去除前后空格,传入类型为 `String` 时,可以单独控制,下面是可选值
174175

175-
|属性名 |说明 |
176-
|:-: | :-: |
177-
|both | 去除两端空格 |
178-
|left | 去除左侧空格 |
179-
|right | 去除右侧空格 |
180-
|all | 去除所有空格 |
181-
|none | 不去除空格 |
176+
|属性名|说明|
177+
|:-:| :-:|
178+
|both|去除两端空格|
179+
|left|去除左侧空格|
180+
|right|去除右侧空格|
181+
|all|去除所有空格|
182+
|none|不去除空格|
182183

183184

184185
### Easyinput Events
185186

186-
|事件称名 | 说明 |返回值 |
187-
|:-: | :-: |:-: |
188-
|@input |输入框内容发生变化时触发 | - |
189-
|@focus |输入框获得焦点时触发 | - |
190-
|@blur |输入框失去焦点时触发 | - |
191-
|@confirm |点击完成按钮时触发 | - |
192-
|@iconClick |点击图标时触发 | prefix/suffix |
193-
194-
187+
|事件称名| 说明|返回值|
188+
|:-:| :-:|:-:|
189+
|@input|输入框内容发生变化时触发| -|
190+
|@focus|输入框获得焦点时触发| -|
191+
|@blur|输入框失去焦点时触发| -|
192+
|@confirm|点击完成按钮时触发| -|
193+
|@iconClick |点击图标时触发| prefix/suffix |
195194

196195

197196
## 组件示例

0 commit comments

Comments
 (0)