فهرست منبع

feat: 补充TimeLineList类型说明

lanjianrong 4 سال پیش
والد
کامیت
6ffee10e80
2فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 3 2
      src/components/TimeLineList/index.tsx
  2. 1 0
      src/pages/Customer/Test/index.tsx

+ 3 - 2
src/components/TimeLineList/index.tsx

@@ -12,8 +12,9 @@ type TimeLineListProps<T> = {
   rowKey?: ((item: T) => React.Key) | keyof T
   dataSource: T[]
   renderItem?: (item: T, index: number) => React.ReactNode
-  dataField: keyof T
-  mode: 'line' | 'card'
+  /** @name 指定渲染时间轴的字段, 默认:createTime */
+  dataField?: keyof T
+  mode?: 'line' | 'card'
 }
 
 function TimeLineList<T>({

+ 1 - 0
src/pages/Customer/Test/index.tsx

@@ -1,4 +1,5 @@
 import TimeLineList from '@/components/TimeLineList'
+import { Select } from 'antd'
 
 type LogItem = {
   id: string