Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui
提交
5da46132
N
nutui
项目概览
京东前端
/
nutui
通知
37
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nutui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5da46132
编写于
4月 22, 2019
作者:
F
Frans
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update CHANGELOG.md
上级
619159bf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
95 addition
and
16 deletion
+95
-16
CHANGELOG.md
CHANGELOG.md
+11
-0
package.json
package.json
+1
-1
src/packages/row/row.vue
src/packages/row/row.vue
+0
-1
src/packages/textinput/demo.vue
src/packages/textinput/demo.vue
+9
-9
src/packages/textinput/doc.md
src/packages/textinput/doc.md
+73
-4
src/packages/textinput/textinput.vue
src/packages/textinput/textinput.vue
+1
-1
未找到文件。
CHANGELOG.md
浏览文件 @
5da46132
## 2.1.1
`2019-4-22`
*
:sparkles: feat: 新增文本框组件
`TextInput`
*
:sparkles: chore: 优化单元测试配置
*
:sparkles: upd:
`Stepper`
组件新增支持小数
*
:bug: fix: 修复
`CountDown`
组件在iOS上某些场景下的一个问题
*
:bug: fix: 修复
`Scroller`
内部元素无法触发点击事件的问题
*
:bug: fix: 修复国际化语言包一处错误
## 2.1.0
`2019-4-15`
...
...
package.json
浏览文件 @
5da46132
{
"name"
:
"@nutui/nutui"
,
"version"
:
"2.1.
0
"
,
"version"
:
"2.1.
1
"
,
"description"
:
"一套轻量级移动端Vue组件库"
,
"typings"
:
"dist/types/index.d.ts"
,
"main"
:
"dist/nutui.js"
,
...
...
src/packages/row/row.vue
浏览文件 @
5da46132
...
...
@@ -77,7 +77,6 @@ export default {
mounted
()
{
let
slot
=
[...
this
.
$slots
.
default
];
this
.
initCol
(
slot
);
console
.
log
(
slot
);
},
}
</
script
>
\ No newline at end of file
src/packages/textinput/demo.vue
浏览文件 @
5da46132
...
...
@@ -4,7 +4,7 @@
<div>
<nut-cell>
<span
slot=
"title"
>
<nut-textinput
v-model=
"val"
label=
"基本用法:"
placeholder=
"请输入内容"
></nut-textinput
>
<nut-textinput
v-model=
"val"
label=
"基本用法:"
placeholder=
"请输入内容"
/
>
</span>
</nut-cell>
<nut-cell>
...
...
@@ -15,22 +15,22 @@
<div>
<nut-cell>
<span
slot=
"title"
>
<nut-textinput
:clearBtn=
"false"
v-model=
"val2"
label=
"无清空按钮:"
placeholder=
"请输入内容"
></nut-textinput
>
<nut-textinput
:clearBtn=
"false"
v-model=
"val2"
label=
"无清空按钮:"
placeholder=
"请输入内容"
/
>
</span>
</nut-cell>
<nut-cell>
<span
slot=
"title"
>
<nut-textinput
:disabled=
"true"
label=
"禁用状态:"
placeholder=
"请输入内容"
></nut-textinput
>
<nut-textinput
:disabled=
"true"
label=
"禁用状态:"
placeholder=
"请输入内容"
/
>
</span>
</nut-cell>
<nut-cell>
<span
slot=
"title"
>
<nut-textinput
placeholder=
"请输入密码"
v-model=
"val3"
label=
"密码框:"
type=
"password"
></nut-textinput
>
<nut-textinput
placeholder=
"请输入密码"
v-model=
"val3"
label=
"密码框:"
type=
"password"
/
>
</span>
</nut-cell>
<nut-cell>
<span
slot=
"title"
>
<nut-textinput
placeholder=
"请输入内容"
v-model=
"val4"
label=
"无边框:"
:hasBorder=
"false"
></nut-textinput
>
<nut-textinput
placeholder=
"请输入内容"
v-model=
"val4"
label=
"无边框:"
:hasBorder=
"false"
/
>
</span>
</nut-cell>
</div>
...
...
@@ -44,12 +44,12 @@
label=
"限制文字数:"
:outline=
"false"
:hasBorder=
"false"
></nut-textinput
>
/
>
</span>
</nut-cell>
<nut-cell>
<span
slot=
"title"
>
<nut-textinput
placeholder=
"请输入内容"
v-model=
"val5"
readonly
label=
"只读:"
:outline=
"false"
></nut-textinput
>
<nut-textinput
placeholder=
"请输入内容"
v-model=
"val5"
readonly
label=
"只读:"
:outline=
"false"
/
>
</span>
</nut-cell>
</div>
...
...
@@ -64,7 +64,7 @@
@
blur=
"onBlur"
v-model=
"val6"
:hasBorder=
"false"
></nut-textinput
>
/
>
</span>
</nut-cell>
<nut-cell>
...
...
@@ -75,7 +75,7 @@
<div>
<nut-cell>
<span
slot=
"title"
>
<nut-textinput
class=
"my-input"
v-model=
"val7"
placeholder=
"请输入搜索内容"
></nut-textinput
>
<nut-textinput
class=
"my-input"
v-model=
"val7"
placeholder=
"请输入搜索内容"
/
>
</span>
</nut-cell>
</div>
...
...
src/packages/textinput/doc.md
浏览文件 @
5da46132
...
...
@@ -9,15 +9,84 @@
v-model=
"val"
label=
"无清空按钮:"
placeholder=
"请输入内容"
:clearBtn=
"false"
:hasBorder=
"true"
>
</nut-textinput>
:clearBtn=
"true"
:disabled=
"false"
/>
```
## 高级用法
密码框
```
html
<nut-textinput
placeholder=
"请输入密码"
v-model=
"val"
label=
"密码框:"
type=
"password"
/>
```
禁用
```
html
<nut-textinput
label=
"禁用状态:"
:disabled=
"true"
placeholder=
"请输入内容"
/>
```
使用input原生属性
```
html
<!-- maxlength -->
<nut-textinput
placeholder=
"maxlength=5"
maxlength=
"5"
label=
"限制文字数:"
/>
<!-- readonly -->
<nut-textinput
placeholder=
"请输入内容"
v-model=
"val"
readonly
label=
"只读:"
/>
```
使用input原生事件
```
html
<nut-textinput
placeholder=
"请输入内容"
label=
"focus/blur事件:"
@
focus=
"onFocus"
@
blur=
"onBlur"
v-model=
"val"
/>
```
```
javascript
export
default
{
data
()
{
return
{
val
:
""
};
},
methods
:
{
onFocus
()
{
console
.
log
(
"
focus事件触发!
"
);
},
onBlur
()
{
console
.
log
(
"
blur事件触发!
"
);
}
}
};
```
## Prop
| 字段 | 说明 | 类型 | 默认值
|----- | ----- | ----- | -----
| value | 当前input值,可使用 v-model 双向绑定数据 | String | ''
| label | 文本框前面的标签 | String | ''
| disabled | 是否禁用 | Boolean | false
| clearBtn | 是否需要情况按钮 | Boolean | true
| hasBorder | 是否需要边框 | Boolean | true
\ No newline at end of file
src/packages/textinput/textinput.vue
浏览文件 @
5da46132
...
...
@@ -14,7 +14,7 @@
<path
d=
"M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm2.8 9.7c.3.3.3.8 0 1.1s-.8.3-1.1 0L8 9.1l-1.7 1.7c-.3.3-.8.3-1.1 0-.3-.3-.3-.8 0-1.1L6.9 8 5.2 6.3c-.3-.3-.3-.8 0-1.1.3-.3.8-.3 1.1 0L8 6.9l1.7-1.7c.3-.3.8-.3 1.1 0 .3.3.3.8 0 1.1L9.1 8l1.7 1.7z"
></path>
</svg>
</svg>
</span>
</label>
</
template
>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录