提交 5da46132 编写于 作者: F Frans

update CHANGELOG.md

上级 619159bf
## 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`
......
{
"name": "@nutui/nutui",
"version": "2.1.0",
"version": "2.1.1",
"description": "一套轻量级移动端Vue组件库",
"typings": "dist/types/index.d.ts",
"main": "dist/nutui.js",
......
......@@ -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
......@@ -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>
......
......@@ -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
......@@ -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.
先完成此消息的编辑!
想要评论请 注册