mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user