🌈 style(eslint): add eslint rules
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
import { View, Image } from '@tarojs/components'
|
||||
import React, { useCallback, memo, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import styles from "../empty/index.module.scss"
|
||||
import { Image, View } from '@tarojs/components'
|
||||
import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import styles from '../empty/index.module.scss'
|
||||
|
||||
interface PropsObj {
|
||||
picUrl?: string,
|
||||
text?: string
|
||||
picUrl?: string
|
||||
text?: string
|
||||
}
|
||||
|
||||
export default memo((pros: PropsObj) => {
|
||||
const {
|
||||
picUrl = '',
|
||||
text = '无搜索历史'
|
||||
} = pros
|
||||
|
||||
return (
|
||||
<View className={styles.mainBox}>
|
||||
<Image className={styles.pic} mode='aspectFill' lazyLoad src={picUrl}></Image>
|
||||
<View className={styles.text}>{text}</View>
|
||||
</View>
|
||||
)
|
||||
const {
|
||||
picUrl = '',
|
||||
text = '无搜索历史',
|
||||
} = pros
|
||||
|
||||
return (
|
||||
<View className={styles.mainBox}>
|
||||
<Image className={styles.pic} mode="aspectFill" lazyLoad src={picUrl}></Image>
|
||||
<View className={styles.text}>{text}</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user