Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
京东前端
nutui-react
提交
118bc3fb
N
nutui-react
项目概览
京东前端
/
nutui-react
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nutui-react
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
118bc3fb
编写于
2月 07, 2023
作者:
Y
Ymm
提交者:
GitHub
2月 07, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: SearchBar 组件样式修改,排版错误问题处理 (#632)
上级
1e93efc6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
25 deletion
+18
-25
src/packages/searchbar/demo.taro.tsx
src/packages/searchbar/demo.taro.tsx
+1
-0
src/packages/searchbar/searchbar.scss
src/packages/searchbar/searchbar.scss
+6
-20
src/packages/searchbar/searchbar.taro.tsx
src/packages/searchbar/searchbar.taro.tsx
+5
-2
src/packages/searchbar/searchbar.tsx
src/packages/searchbar/searchbar.tsx
+5
-2
src/styles/variables.scss
src/styles/variables.scss
+1
-1
未找到文件。
src/packages/searchbar/demo.taro.tsx
浏览文件 @
118bc3fb
...
...
@@ -97,6 +97,7 @@ const SearchBarDemo = () => {
<
SearchBar
leftoutIcon
=
{
<
Icon
name
=
"heart-fill1"
size
=
"14"
/>
}
rightoutIcon
=
{
<
Icon
name
=
"star-fill"
size
=
"14"
/>
}
rightinIcon
=
{
<
Icon
name
=
"star-fill"
size
=
"14"
/>
}
/>
<
h2
>
{
translated
.
title6
}
</
h2
>
<
SearchBar
...
...
src/packages/searchbar/searchbar.scss
浏览文件 @
118bc3fb
...
...
@@ -48,15 +48,13 @@
align-items
:
center
;
justify-content
:
center
;
height
:
$searchbar-input-height
;
background
:
$searchbar-input-background
;
}
&
__icon
{
position
:
absolute
!
important
;
}
&
__leftin-icon
{
left
:
10px
;
padding
:
0
5px
0
10px
;
}
&
__rightin-icon
{
right
:
5px
;
padding
:
0
5px
;
}
.nut-searchbar__input-box
{
display
:
flex
;
...
...
@@ -69,12 +67,13 @@
box-sizing
:
border-box
;
width
:
$searchbar-input-width
;
height
:
$searchbar-input-height
;
line-height
:
$searchbar-input-height
;
width
:
100%
;
padding
:
$searchbar-input-padding
;
border-radius
:
0
;
font-size
:
$font-size-small
;
background
:
$searchbar-input-background
;
color
:
$searchbar-input-text-color
;
background
:
transparent
;
}
&
__round
{
border-radius
:
$searchbar-input-border-radius
;
...
...
@@ -83,9 +82,7 @@
cursor
:
not
-
allowed
;
}
&
__clear
{
position
:
absolute
!
important
;
z-index
:
888
;
right
:
8px
;
padding
:
0
10px
0
5px
;
i
{
color
:
$gray1
!
important
;
}
...
...
@@ -118,14 +115,3 @@
margin-left
:
10px
;
}
}
.nut-searchbar-taro
{
.nut-searchbar__leftin-icon
{
//top: 41%;
}
.nut-searchbar__rightin-icon
{
top
:
41%
;
}
.nut-searchbar__clear
{
top
:
33%
;
}
}
src/packages/searchbar/searchbar.taro.tsx
浏览文件 @
118bc3fb
...
...
@@ -164,7 +164,7 @@ export const SearchBar: FunctionComponent<
shape
===
'
round
'
?
searchbarBem
(
'
round
'
)
:
''
}
${
clearable
?
searchbarBem
(
'
input-clear
'
)
:
''
}
`
}
ref
=
{
searchRef
}
style
=
{
{
...
props
.
style
,
background
:
props
.
inputBackground
}
}
style
=
{
{
...
props
.
style
}
}
value
=
{
value
||
''
}
placeholder
=
{
placeholder
||
locale
.
placeholder
}
disabled
=
{
disabled
}
...
...
@@ -315,7 +315,10 @@ export const SearchBar: FunctionComponent<
>
{
renderLeftoutIcon
()
}
{
renderLabel
()
}
<
div
className
=
{
`
${
searchbarBem
(
'
content
'
)}
`
}
>
<
div
className
=
{
`
${
searchbarBem
(
'
content
'
)}
`
}
style
=
{
{
background
:
props
.
inputBackground
}
}
>
{
renderLeftinIcon
()
}
<
div
className
=
"nut-searchbar__input-box"
>
{
renderField
()
}
</
div
>
{
renderRightinIcon
()
}
...
...
src/packages/searchbar/searchbar.tsx
浏览文件 @
118bc3fb
...
...
@@ -163,7 +163,7 @@ export const SearchBar: FunctionComponent<
shape
===
'
round
'
?
searchbarBem
(
'
round
'
)
:
''
}
${
clearable
?
searchbarBem
(
'
input-clear
'
)
:
''
}
`
}
ref
=
{
searchRef
}
style
=
{
{
...
props
.
style
,
background
:
props
.
inputBackground
}
}
style
=
{
{
...
props
.
style
}
}
value
=
{
value
||
''
}
placeholder
=
{
placeholder
||
locale
.
placeholder
}
disabled
=
{
disabled
}
...
...
@@ -310,7 +310,10 @@ export const SearchBar: FunctionComponent<
>
{
renderLeftoutIcon
()
}
{
renderLabel
()
}
<
div
className
=
{
`
${
searchbarBem
(
'
content
'
)}
`
}
>
<
div
className
=
{
`
${
searchbarBem
(
'
content
'
)}
`
}
style
=
{
{
background
:
props
.
inputBackground
}
}
>
{
renderLeftinIcon
()
}
{
renderField
()
}
{
renderRightinIcon
()
}
...
...
src/styles/variables.scss
浏览文件 @
118bc3fb
...
...
@@ -1665,7 +1665,7 @@ $searchbar-action-text-color: var(
$gray1
)
!
default
;
$searchbar-input-height
:
var
(
--
nutui-searchbar-input-height
,
32px
)
!
default
;
$searchbar-input-padding
:
var
(
--
nutui-searchbar-input-padding
,
0
28
px
)
!
default
;
$searchbar-input-padding
:
var
(
--
nutui-searchbar-input-padding
,
0
5
px
)
!
default
;
$searchbar-input-background
:
var
(
--
nutui-searchbar-input-background
,
#f7f7f7
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录