[breaking change] Search: 修改原有结构 (#198)

* 修改文档 注释

* [breaking change] change type showcase to simple

* [breaking change] search 组件传入参数更改

* search 文档更改

* [breaking change] delete type && add background && showSearch

* showCancel 更名为 showAction && 增加 slot action

* add search test code
This commit is contained in:
Yao
2017-10-12 20:56:03 +08:00
committed by GitHub
parent 9084a662c3
commit f02048a3dc
4 changed files with 147 additions and 123 deletions

View File

@@ -1,26 +1,19 @@
@import './common/var.css';
.van-search {
position: relative;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 4px 15px;
background-color: #F2F2F2;
&--focus {
padding-right: 50px;
}
&--showcase {
padding: 10px;
background-color: $background-color;
.van-search__input-wrap {
border-color: $gray-light;
}
&--show-action {
padding-right: 0;
}
&__input-wrap {
position: relative;
flex: 1;
height: 16px;
padding: 8px 24px 8px 35px;
border: 1px solid $gray-light;
border-radius: 4px;
@@ -49,13 +42,14 @@
}
}
&__cancel {
position: absolute;
&__action {
line-height: 34px;
padding: 4px 0;
top: 0;
right: 10px;
font-size: 14px;
letter-spacing: 1px;
}
&__action-text {
padding: 0 10px;
color: $green;
}
@@ -73,9 +67,11 @@
font-size: 14px;
line-height: 16px;
position: absolute;
right: 5px;
right: 0;
top: 50%;
transform: translateY(-50%);
/* 增加 clear 点击区域 */
padding: 5px;
color: #888;
}
}