@gmfe/react 2.14.7-beta.3 → 2.14.10

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": "@gmfe/react",
3
- "version": "2.14.7-beta.3",
3
+ "version": "2.14.10",
4
4
  "description": "",
5
5
  "author": "liyatang <liyatang@qq.com>",
6
6
  "homepage": "https://github.com/gmfe/gmfe#readme",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@gm-common/tool": "^1.0.0",
30
- "@gmfe/locales": "^2.14.7-beta.3",
30
+ "@gmfe/locales": "^2.14.10",
31
31
  "big.js": "^5.2.2",
32
32
  "classnames": "^2.2.5",
33
33
  "lodash": "^4.17.14",
@@ -35,5 +35,5 @@
35
35
  "prop-types": "^15.7.2",
36
36
  "react-window": "^1.8.5"
37
37
  },
38
- "gitHead": "44c87dc2acc0f08eeae70b57b89d7229f08e110e"
38
+ "gitHead": "272dcd805329a1d462d0e906abc9318c2d399e0d"
39
39
  }
@@ -59,6 +59,7 @@ const Item = ({
59
59
  )}
60
60
  {level > 0 && isLeaf && <div style={{ width: '2em' }} />}
61
61
  <Checkbox
62
+ disabled={!!data?.disabled}
62
63
  checked={isSelected}
63
64
  onChange={handleRadio}
64
65
  indeterminate={isIndeterminate}
@@ -83,7 +83,11 @@ function getLeafValues(list) {
83
83
  () => true
84
84
  )
85
85
 
86
- return _.map(flat, item => item.data.value)
86
+ // 这里再加一个过滤禁用的
87
+ return _.map(
88
+ flat.filter(item => !item?.data?.disabled),
89
+ item => item.data.value
90
+ )
87
91
  }
88
92
 
89
93
  // 用find,高效。深度遍历,找到存在没选的就终止遍历。
package/src/index.js CHANGED
@@ -102,7 +102,6 @@ import Steps from './component/steps'
102
102
  import Selection from './component/selection'
103
103
  import TreeV2 from './component/tree_v2'
104
104
  import RecommendInput from './component/recommend_input'
105
- import PicturePreview from './component/picture_preview'
106
105
 
107
106
  Object.assign(Sheet, {
108
107
  SheetColumn,
@@ -232,6 +231,5 @@ export {
232
231
  Steps,
233
232
  Selection,
234
233
  TreeV2,
235
- RecommendInput,
236
- PicturePreview
234
+ RecommendInput
237
235
  }
@@ -1,21 +0,0 @@
1
- import 'react-photo-view/dist/react-photo-view.css'
2
- import { PhotoProvider, PhotoView } from 'react-photo-view'
3
- import PropTypes from 'prop-types'
4
- import React from 'react'
5
-
6
- export default function PicturePreview({ images, className }) {
7
- return (
8
- <PhotoProvider>
9
- {(images || []).map((item, index) => (
10
- <PhotoView key={index} src={item}>
11
- <img src={item} alt='' className={className} />
12
- </PhotoView>
13
- ))}
14
- </PhotoProvider>
15
- )
16
- }
17
-
18
- PicturePreview.propTypes = {
19
- images: PropTypes.array,
20
- className: PropTypes.string
21
- }