🌈 style(typos): 修复eslint的报错❌

This commit is contained in:
xuan
2022-12-05 11:56:40 +08:00
parent d49314aa5b
commit 9dd7e9db18
10 changed files with 87 additions and 83 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import classnames from 'classnames'
import { memo, useEffect, useRef, useState } from 'react'
import styles from './index.module.scss'
import Popup from '@/components/popup'
import type { Params as PopuParams } from '@/components/popup'
import type { Params as PopuParams } from '@/components/popup'
import { GetProductKindListApi } from '@/api/material'
type params = {
@@ -83,7 +83,7 @@ export default memo(({ onClose, onFiltr, show = false, onRest }: params) => {
<View
key={item.id}
onClick={() => changeKind(item)}
className={classnames(styles.btn_item, filterObj.seriesId == item.id && styles.select_btn_item)}
className={classnames(styles.btn_item, filterObj.seriesId == item.id && styles.select_btn_item)}
>
{item.name}
</View>
+7 -6
View File
@@ -1,6 +1,7 @@
import Taro from '@tarojs/taro'
import { Image, Text, View } from '@tarojs/components'
import { FC, memo, useEffect, useState } from 'react'
import type { FC } from 'react'
import { memo, useEffect, useState } from 'react'
import classnames from 'classnames'
import styles from './index.module.scss'
import useUploadCDNImg from '@/use/useUploadImage'
@@ -12,7 +13,7 @@ interface ImageParam {
defaultList?: string[]
onlyRead?: false | true
}
const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = false }) => {
const PictureItem = ({ onChange, defaultList, onlyRead = false }: ImageParam) => {
const { getWxPhoto } = useUploadCDNImg()
const [imageList, setImageLise] = useState<string[]>([])
@@ -24,7 +25,7 @@ const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = fa
const uploadImage = async() => {
const list: any = await getWxPhoto('after-sale', 5)
const images: any[] = []
list?.map((item) => {
list?.forEach((item) => {
images.push(item.url)
})
setImageLise([...imageList, ...images])
@@ -53,7 +54,7 @@ const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = fa
return (
<View className={styles.image_main}>
{imageList?.map((item, index) => (
<View className={styles.ImgItem}>
<View className={styles.ImgItem} key={index}>
<Image mode="aspectFill" src={formatImgUrl(item)} onClick={showImage}></Image>
{!onlyRead && <View onClick={() => delImage(index)} className={classnames(styles.miconfont_close, 'iconfont icon-qingkong')}></View>}
</View>
@@ -66,6 +67,6 @@ const PictureItem: FC<ImageParam> = memo(({ onChange, defaultList, onlyRead = fa
)}
</View>
)
})
}
export default PictureItem
export default memo(PictureItem)