✨ feat: 发货单对接70%
This commit is contained in:
@@ -11,7 +11,7 @@ type Segment = {
|
||||
type PropsType = {
|
||||
list: Segment[]
|
||||
defaultId?: number
|
||||
onSelect?: (val: number) => void
|
||||
onSelect?: (data: {id: number, name:string}) => void
|
||||
}
|
||||
|
||||
const segmentedControl: FC<PropsType> = (props) => {
|
||||
@@ -40,7 +40,7 @@ const segmentedControl: FC<PropsType> = (props) => {
|
||||
const clickEvent = ({ item, index }: { item: any; index: number }) => {
|
||||
const num = index > 0 ? index - 1 : 0
|
||||
setSelectInfo((e) => ({ ...e, tabId: list[num].id.toString(), selected: item.id }))
|
||||
onSelect?.(item.id)
|
||||
onSelect?.(item)
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user