Skip to content

Commit

Permalink
fix: timeselect export
Browse files Browse the repository at this point in the history
  • Loading branch information
oasis-cloud committed Jul 26, 2022
1 parent e5d8da4 commit 21dcb5e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@
"desc": "配送时间日期选择",
"sort": 7,
"show": false,
"exportEmpty": true,
"author": "zhaoqian16"
},
{
Expand All @@ -763,6 +764,7 @@
"desc": "配送时间上门时间选择",
"sort": 8,
"show": false,
"exportEmpty": true,
"author": "zhaoqian16"
},
{
Expand Down
7 changes: 5 additions & 2 deletions src/packages/timedetail/timedetail.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { FunctionComponent, useEffect, useState } from 'react'
import './timedetail.scss'
import bem from '@/utils/bem'
import { useConfig } from '@/packages/configprovider'

Expand Down Expand Up @@ -57,7 +56,11 @@ export const TimeDetail: FunctionComponent<
return (
<div className={`${b()} ${className || ''}`}>
{renderData.map((item: string, index: number) => (
<span className={getDetailClass(item)} key={item} onClick={() => handleTime(item)}>
<span
className={getDetailClass(item)}
key={item}
onClick={() => handleTime(item)}
>
{item}
</span>
))}
Expand Down
6 changes: 4 additions & 2 deletions src/packages/timepannel/timepannel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { FunctionComponent } from 'react'
import './timepannel.scss'
import bem from '@/utils/bem'
import { useConfig } from '@/packages/configprovider'

Expand All @@ -18,7 +17,10 @@ export const TimePannel: FunctionComponent<
Partial<TimePannelProps> & React.HTMLAttributes<HTMLDivElement>
> = (props) => {
const { locale } = useConfig()
const { children, className, date, curKey, change } = { ...defaultProps, ...props }
const { children, className, date, curKey, change } = {
...defaultProps,
...props,
}
const b = bem('timepannel')

return (
Expand Down
3 changes: 3 additions & 0 deletions src/packages/timeselect/timeselect.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@import '../timepannel/timepannel.scss';
@import '../timedetail/timedetail.scss';

.nut-timeselect {
display: flex;
flex-direction: column;
Expand Down

0 comments on commit 21dcb5e

Please sign in to comment.