@gm-pc/react 1.4.6 → 1.4.7-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-pc/react",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7-alpha.0",
|
|
4
4
|
"description": "观麦前端基础组件库",
|
|
5
5
|
"author": "liyatang <liyatang@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/gmfe/gm-pc#readme",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@gm-common/hooks": "^2.8.9",
|
|
26
26
|
"@gm-common/tool": "^2.8.9",
|
|
27
|
-
"@gm-pc/locales": "^1.4.
|
|
27
|
+
"@gm-pc/locales": "^1.4.7-alpha.0",
|
|
28
28
|
"big.js": "^6.0.1",
|
|
29
29
|
"classnames": "^2.2.5",
|
|
30
30
|
"lodash": "^4.17.19",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"react-dom": "^16.14.0",
|
|
47
47
|
"react-window": "^1.8.5"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "4058fe7a71eb64333151da7e417d62ca6cc01bc1"
|
|
50
50
|
}
|
|
@@ -178,7 +178,7 @@ export function useControlFormRef<T>() {
|
|
|
178
178
|
getFieldsValue: noop,
|
|
179
179
|
setFieldsValue: noop,
|
|
180
180
|
apiDoValidate: noop,
|
|
181
|
-
validateFields: () => Promise
|
|
181
|
+
validateFields: () => new Promise(r),
|
|
182
182
|
} as unknown) as FormInstance<T>)
|
|
183
183
|
return ref
|
|
184
184
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { FC, HTMLAttributes } from 'react'
|
|
1
|
+
import React, { FC, HTMLAttributes, ReactNode } from 'react'
|
|
2
2
|
import { Flex } from '../flex'
|
|
3
3
|
import classNames from 'classnames'
|
|
4
4
|
import _ from 'lodash'
|
|
5
5
|
|
|
6
6
|
interface StepProps {
|
|
7
7
|
title?: string
|
|
8
|
-
description?: string
|
|
8
|
+
description?: string | ReactNode
|
|
9
9
|
index: number
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -16,9 +16,9 @@ const Step: FC<StepProps> = (props) => {
|
|
|
16
16
|
<Flex row className='gm-steps-step gm-margin-top-5'>
|
|
17
17
|
<Flex column alignCenter className='gm-margin-right-10'>
|
|
18
18
|
<div className='gm-steps-step-icon'>{index}</div>
|
|
19
|
-
<div className='gm-steps-step-tag gm-margin-top-5' />
|
|
19
|
+
<div className='gm-flex-flex gm-steps-step-tag gm-margin-top-5' />
|
|
20
20
|
</Flex>
|
|
21
|
-
<div>
|
|
21
|
+
<div className='gm-flex-flex'>
|
|
22
22
|
{title && <div className='gm-steps-step-title'>{title}</div>}
|
|
23
23
|
{description && <div className='gm-steps-step-description'>{description}</div>}
|
|
24
24
|
</div>
|
|
@@ -31,8 +31,8 @@ export interface StepsProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export interface StepsDataOptions {
|
|
34
|
-
title
|
|
35
|
-
description?: string
|
|
34
|
+
title?: string
|
|
35
|
+
description?: string | ReactNode
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const Steps: FC<StepsProps> = (props) => {
|
package/src/types.ts
CHANGED
|
@@ -16,13 +16,12 @@ interface TreeDataItem<V> extends ListDataItem<V> {
|
|
|
16
16
|
children?: TreeDataItem<V>[]
|
|
17
17
|
}
|
|
18
18
|
type StringOrKeyofT<T, V = keyof T> = keyof any extends V ? string : V
|
|
19
|
-
export type StringKey<D> = Extract<keyof D, string>
|
|
19
|
+
export type StringKey<D> = Extract<keyof D, string>
|
|
20
20
|
type RecordPartial<K, V> = {
|
|
21
21
|
[P in StringKey<K>]?: V
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
type anyCallback<T = any> = (...args: any[]) => T
|
|
25
|
-
|
|
26
25
|
export type {
|
|
27
26
|
ListDataItem,
|
|
28
27
|
ListGroupDataItem,
|