🌈 style(eslint): add eslint rules
This commit is contained in:
@@ -1,36 +1,35 @@
|
||||
import { View, Button } from '@tarojs/components'
|
||||
import { memo } from 'react'
|
||||
import styles from "./index.module.scss"
|
||||
import classnames from "classnames";
|
||||
import { Button, View } from '@tarojs/components'
|
||||
import Taro from '@tarojs/taro'
|
||||
import { memo } from 'react'
|
||||
import classnames from 'classnames'
|
||||
import styles from './index.module.scss'
|
||||
|
||||
type prosObj = {
|
||||
isDisabled: boolean,
|
||||
handSure?: () => void,
|
||||
clientId?: Number,
|
||||
clientName?: string
|
||||
interface prosObj {
|
||||
isDisabled: boolean
|
||||
handSure?: () => void
|
||||
clientId?: Number
|
||||
clientName?: string
|
||||
}
|
||||
|
||||
export default memo((props: prosObj) => {
|
||||
const {
|
||||
isDisabled = true,
|
||||
handSure,
|
||||
clientName = ''
|
||||
} = props
|
||||
const navTo = () => {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/customerPage/index?clientId=' + props?.clientId
|
||||
})
|
||||
}
|
||||
const {
|
||||
isDisabled = true,
|
||||
handSure,
|
||||
clientName = '',
|
||||
} = props
|
||||
const navTo = () => {
|
||||
Taro.navigateTo({
|
||||
url: `/pages/customerPage/index?clientId=${props?.clientId}`,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<View className={styles.bottomBox}>
|
||||
<View className={styles.leftBottom} onClick={() => { navTo() }}>
|
||||
<View className={styles.nowFont}>当前客户:</View>
|
||||
<View className={styles.selctFont}>{clientName === '' ? '请选择客户 >' : clientName}</View>
|
||||
</View>
|
||||
<Button className={classnames(isDisabled ? styles.activeButton : styles.button)} disabled={isDisabled} onClick={() => { handSure?.() }}> 加入购物车</Button >
|
||||
</View >
|
||||
)
|
||||
return (
|
||||
<View className={styles.bottomBox}>
|
||||
<View className={styles.leftBottom} onClick={() => { navTo() }}>
|
||||
<View className={styles.nowFont}>当前客户:</View>
|
||||
<View className={styles.selctFont}>{clientName === '' ? '请选择客户 >' : clientName}</View>
|
||||
</View>
|
||||
<Button className={classnames(isDisabled ? styles.activeButton : styles.button)} disabled={isDisabled} onClick={() => { handSure?.() }}> 加入购物车</Button >
|
||||
</View >
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user