diff --git a/ant_components/BIInput/index.js b/ant_components/BIInput/index.js index 478df279260969f5c5deded65cbb05b20291b8fe..4de4eb48ce852cbfc815ec2b1385cdd3eed84bd7 100644 --- a/ant_components/BIInput/index.js +++ b/ant_components/BIInput/index.js @@ -1,6 +1,7 @@ import React from 'react'; import { Input } from 'antd'; -import './style.less'; +import InconFont from '@/submodule/components/IconFont/IconFont'; +import styles from './style.less'; const { TextArea } = Input; const Search = Input.Search; @@ -12,15 +13,21 @@ const Password = Input.Password; * 只扩展自定义样式 * */ -class BIInput extends React.Component { - - render() { - return ( - - - - ); +const BIInput = (props) => { + const onClear = () => { + if (props.onChange) { + props.onChange('') + } + if (props.onClear) { + props.onClear('') + } } + return ( + ) : null} + {...props} + /> + ); } export default BIInput; diff --git a/ant_components/BIInput/style.less b/ant_components/BIInput/style.less index 63aa998c0af4bbecd5df051dfb790760cd30ad68..d854e7543bb8fad2ec54187d5a74071be5d8e38e 100644 --- a/ant_components/BIInput/style.less +++ b/ant_components/BIInput/style.less @@ -1,17 +1,6 @@ @import "../config.less"; -:global .BIInput { - .ant-input { - border-radius: 4px; - } - .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; - } +.clearIcon{ + color:rgba(0, 0, 0, 0.25); + font-size: 12px; } diff --git a/components/IconFont/IconFont.ts b/components/IconFont/IconFont.ts index 9f1a4c34c063ed242f656ea246d5dfb8b54be5f2..9c6a9faf33626ee41d582148dc6f2e82cb61f778 100755 --- a/components/IconFont/IconFont.ts +++ b/components/IconFont/IconFont.ts @@ -1,7 +1,7 @@ import { createFromIconfontCN } from '@ant-design/icons'; const IconFont = createFromIconfontCN({ - scriptUrl: '//at.alicdn.com/t/font_1509781_z48eeampujo.js', + scriptUrl: '//at.alicdn.com/t/font_1509781_g70awna9ne.js', }); export default IconFont;