🌈 style(eslint): 新增eslint规则
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { Input, View } from '@tarojs/components'
|
||||
import classnames from 'classnames'
|
||||
import { forwardRef, memo, useEffect, useImperativeHandle, useRef, useState } from 'react'
|
||||
import styles from './index.module.scss'
|
||||
import CloseBtn from '@/components/closeBtn'
|
||||
import classnames from 'classnames'
|
||||
import { debounce } from '@/common/util'
|
||||
import { forwardRef, memo, useEffect, useImperativeHandle, useRef, useState } from 'react'
|
||||
|
||||
type Params = {
|
||||
interface Params {
|
||||
clickOnSearch?: (val: string) => void
|
||||
disabled?: false | true
|
||||
placeholder?: string
|
||||
@@ -16,7 +16,7 @@ type Params = {
|
||||
showBtn?: false | true
|
||||
btnStyle?: Object
|
||||
btnTitle?: string
|
||||
debounceTime?: number //防抖时间,不设默认为零
|
||||
debounceTime?: number // 防抖时间,不设默认为零
|
||||
defaultValue?: string
|
||||
borderRadius?: string
|
||||
}
|
||||
@@ -25,17 +25,17 @@ export default memo(
|
||||
forwardRef(
|
||||
(
|
||||
{
|
||||
clickOnSearch, //点击筛选按钮触发
|
||||
changeOnSearch, //输入文字触发
|
||||
disabled = false, //是否禁用
|
||||
clickOnSearch, // 点击筛选按钮触发
|
||||
changeOnSearch, // 输入文字触发
|
||||
disabled = false, // 是否禁用
|
||||
placeholder = '输入搜索内容',
|
||||
showIcon = true, //是否显示关闭图标
|
||||
showBtn = false, //是否显示搜索按钮
|
||||
showIcon = true, // 是否显示关闭图标
|
||||
showBtn = false, // 是否显示搜索按钮
|
||||
btnStyle = {},
|
||||
placeIcon = 'inner', //搜索图标位置:inner在里面,out在外面
|
||||
btnTitle = '搜索', //搜索文字
|
||||
debounceTime = 0, //防抖时间,不设默认为零
|
||||
defaultValue = '', //默认值
|
||||
placeIcon = 'inner', // 搜索图标位置:inner在里面,out在外面
|
||||
btnTitle = '搜索', // 搜索文字
|
||||
debounceTime = 0, // 防抖时间,不设默认为零
|
||||
defaultValue = '', // 默认值
|
||||
borderRadius = '50rpx',
|
||||
}: Params,
|
||||
ref,
|
||||
@@ -84,19 +84,21 @@ export default memo(
|
||||
'icon-sousuo',
|
||||
styles.icon_a_sousuo1_self,
|
||||
placeIcon == 'inner' ? styles.icon_inner : styles.icon_out,
|
||||
)}></View>
|
||||
)}
|
||||
></View>
|
||||
)}
|
||||
<Input
|
||||
style={{ borderRadius }}
|
||||
alwaysEmbed={true}
|
||||
alwaysEmbed
|
||||
cursorSpacing={150}
|
||||
placeholderStyle='color:#ABABAB; font-size:26rpx'
|
||||
placeholderStyle="color:#ABABAB; font-size:26rpx"
|
||||
onConfirm={onSearch}
|
||||
className={classnames(placeIcon == 'out' && styles.input_out)}
|
||||
disabled={disabled}
|
||||
value={inputCon}
|
||||
placeholder={placeholder}
|
||||
onInput={(e) => onInputEven(e)}></Input>
|
||||
onInput={e => onInputEven(e)}
|
||||
></Input>
|
||||
{!!inputCon && (
|
||||
<View className={styles.search_closeBtn}>
|
||||
<CloseBtn onClose={() => clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />
|
||||
|
||||
Reference in New Issue
Block a user