Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
submodule
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
web_component
submodule
Commits
812af672
Commit
812af672
authored
May 23, 2020
by
满振华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改控件
parent
a2646970
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
24 deletions
+20
-24
index.js
ant_components/BIInput/index.js
+16
-9
style.less
ant_components/BIInput/style.less
+3
-14
IconFont.ts
components/IconFont/IconFont.ts
+1
-1
No files found.
ant_components/BIInput/index.js
View file @
812af672
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Input
}
from
'antd'
;
import
{
Input
}
from
'antd'
;
import
'./style.less'
;
import
InconFont
from
'@/submodule/components/IconFont/IconFont'
;
import
styles
from
'./style.less'
;
const
{
TextArea
}
=
Input
;
const
{
TextArea
}
=
Input
;
const
Search
=
Input
.
Search
;
const
Search
=
Input
.
Search
;
...
@@ -12,15 +13,21 @@ const Password = Input.Password;
...
@@ -12,15 +13,21 @@ const Password = Input.Password;
* 只扩展自定义样式
* 只扩展自定义样式
* */
* */
class
BIInput
extends
React
.
Component
{
const
BIInput
=
(
props
)
=>
{
const
onClear
=
()
=>
{
render
()
{
if
(
props
.
onChange
)
{
props
.
onChange
(
''
)
}
if
(
props
.
onClear
)
{
props
.
onClear
(
''
)
}
}
return
(
return
(
<
span
className
=
'BIInput'
>
<
Input
<
Input
{...
this
.
props
}
/
>
suffix
=
{
props
.
value
?
(
<
InconFont
type
=
"iconguanbi"
className
=
{
styles
.
clearIcon
}
onClick
=
{
onClear
}
/>
)
: null
}
<
/span
>
{...
props
}
/
>
);
);
}
}
}
export
default
BIInput
;
export
default
BIInput
;
...
...
ant_components/BIInput/style.less
View file @
812af672
@import "../config.less";
@import "../config.less";
:global .BIInput {
.clearIcon{
.ant-input {
color:rgba(0, 0, 0, 0.25);
border-radius: 4px;
font-size: 12px;
}
.ant-input:hover {
//border: 1px solid @base-green;
}
.ant-input:focus{
//border: 1px solid @base-green;
//box-shadow: 0 0 0 2px @base-green-shadow;
}
.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) {
//border-color: @base-green;
}
}
}
components/IconFont/IconFont.ts
View file @
812af672
import
{
createFromIconfontCN
}
from
'@ant-design/icons'
;
import
{
createFromIconfontCN
}
from
'@ant-design/icons'
;
const
IconFont
=
createFromIconfontCN
({
const
IconFont
=
createFromIconfontCN
({
scriptUrl
:
'//at.alicdn.com/t/font_1509781_
z48eeampujo
.js'
,
scriptUrl
:
'//at.alicdn.com/t/font_1509781_
g70awna9ne
.js'
,
});
});
export
default
IconFont
;
export
default
IconFont
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment