@zgfe/business-lib 1.2.48-plat.1 → 1.2.48-plat.3
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.
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import './styles/index.less';
|
|
3
|
+
export interface platItemProp {
|
|
4
|
+
key: number;
|
|
5
|
+
value: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
}
|
|
3
8
|
declare const BizPlatformSelector: React.FC<{
|
|
4
|
-
onChange
|
|
9
|
+
onChange: (val: {
|
|
10
|
+
key: number;
|
|
11
|
+
value: string;
|
|
12
|
+
}) => void;
|
|
5
13
|
}>;
|
|
6
14
|
export default BizPlatformSelector;
|
|
@@ -1,12 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconFont, BizSelect } from '@zgfe/business-lib';
|
|
3
3
|
import './styles/index.less';
|
|
4
|
-
var BizPlatformSelector = function BizPlatformSelector(
|
|
5
|
-
_objectDestructuringEmpty(_ref);
|
|
4
|
+
var BizPlatformSelector = function BizPlatformSelector(props) {
|
|
6
5
|
var classPrefix = 'biz-platform-selector';
|
|
7
|
-
|
|
6
|
+
var platformOption = [{
|
|
7
|
+
key: -1,
|
|
8
|
+
value: '全部平台'
|
|
9
|
+
}, {
|
|
10
|
+
key: 1,
|
|
11
|
+
value: 'Android',
|
|
12
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
13
|
+
type: "android1",
|
|
14
|
+
size: 16
|
|
15
|
+
})
|
|
16
|
+
}, {
|
|
17
|
+
key: 2,
|
|
18
|
+
value: 'IOS',
|
|
19
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
20
|
+
type: "ios1",
|
|
21
|
+
size: 16
|
|
22
|
+
})
|
|
23
|
+
}, {
|
|
24
|
+
key: 3,
|
|
25
|
+
value: 'JS',
|
|
26
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
27
|
+
type: "a-js2",
|
|
28
|
+
size: 16
|
|
29
|
+
})
|
|
30
|
+
}, {
|
|
31
|
+
key: 4,
|
|
32
|
+
value: '微信小程序',
|
|
33
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
34
|
+
type: "weixinxiaochengxu",
|
|
35
|
+
size: 16
|
|
36
|
+
})
|
|
37
|
+
}, {
|
|
38
|
+
key: 5,
|
|
39
|
+
value: '服务端',
|
|
40
|
+
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
41
|
+
type: "fuwuqi",
|
|
42
|
+
size: 16
|
|
43
|
+
})
|
|
44
|
+
}, {
|
|
45
|
+
key: 0,
|
|
46
|
+
value: '其他'
|
|
47
|
+
}];
|
|
8
48
|
return /*#__PURE__*/React.createElement("div", {
|
|
9
49
|
className: classPrefix
|
|
10
|
-
},
|
|
50
|
+
}, /*#__PURE__*/React.createElement(BizSelect, {
|
|
51
|
+
className: "".concat(classPrefix, "-select"),
|
|
52
|
+
options: platformOption,
|
|
53
|
+
overlayWidth: 134,
|
|
54
|
+
keyField: "key",
|
|
55
|
+
labelField: "value",
|
|
56
|
+
defaultValue: {
|
|
57
|
+
value: '全部平台',
|
|
58
|
+
key: -1
|
|
59
|
+
},
|
|
60
|
+
onChange: function onChange(val) {
|
|
61
|
+
props.onChange(val);
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
11
64
|
};
|
|
12
65
|
export default BizPlatformSelector;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.48-plat.
|
|
3
|
+
"version": "1.2.48-plat.3",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^16.12.0 || ^17.0.0",
|
|
56
56
|
"yorkie": "^2.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "3ca2ab6f5a499064c9d0e81e2fc504403dc44b6a",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|