@aloudata/aloudata-design 0.4.8-beta.3 → 0.4.8-beta.4
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,10 +1,12 @@
|
|
|
1
1
|
import { Checkbox } from 'antd';
|
|
2
|
+
import classnames from 'classnames';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
export default function MultipleList(params) {
|
|
4
5
|
var disabled = params.disabled,
|
|
5
6
|
option = params.option,
|
|
6
7
|
selected = params.selected,
|
|
7
|
-
onChange = params.onChange
|
|
8
|
+
onChange = params.onChange,
|
|
9
|
+
className = params.className;
|
|
8
10
|
|
|
9
11
|
var onClick = function onClick() {
|
|
10
12
|
//TODO: 这里有bug 等待antd升级 https://github.com/ant-design/ant-design/pull/39078
|
|
@@ -12,7 +14,7 @@ export default function MultipleList(params) {
|
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
return /*#__PURE__*/React.createElement("div", {
|
|
15
|
-
className:
|
|
17
|
+
className: classnames('ald-multiple-option', className),
|
|
16
18
|
onClick: onClick
|
|
17
19
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
18
20
|
checked: selected,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CheckLine } from '@aloudata/icons-react';
|
|
2
|
+
import classnames from 'classnames';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import colors from "../../style/themes/default/themeColor.module.less";
|
|
4
5
|
export default function SingleOption(params) {
|
|
@@ -6,7 +7,8 @@ export default function SingleOption(params) {
|
|
|
6
7
|
selected = params.selected,
|
|
7
8
|
option = params.option,
|
|
8
9
|
_params$onChange = params.onChange,
|
|
9
|
-
onChange = _params$onChange === void 0 ? function () {} : _params$onChange
|
|
10
|
+
onChange = _params$onChange === void 0 ? function () {} : _params$onChange,
|
|
11
|
+
className = params.className;
|
|
10
12
|
|
|
11
13
|
var onClick = function onClick() {
|
|
12
14
|
if (disabled) return;
|
|
@@ -14,7 +16,7 @@ export default function SingleOption(params) {
|
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
17
|
-
className:
|
|
19
|
+
className: classnames('ald-single-option', className),
|
|
18
20
|
onClick: onClick
|
|
19
21
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20
22
|
className: "ald-icons-check-line"
|
package/dist/Select/index.js
CHANGED
|
@@ -163,6 +163,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
163
163
|
return /*#__PURE__*/React.createElement(MultipleOption, {
|
|
164
164
|
key: option.value,
|
|
165
165
|
selected: isSelected,
|
|
166
|
+
className: option.className,
|
|
166
167
|
option: option,
|
|
167
168
|
disabled: option.disabled,
|
|
168
169
|
onChange: function onChange(selected) {
|
|
@@ -200,6 +201,7 @@ var Select = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
200
201
|
return /*#__PURE__*/React.createElement(SingleOption, {
|
|
201
202
|
key: option.value,
|
|
202
203
|
selected: isSelected,
|
|
204
|
+
className: option.className,
|
|
203
205
|
option: option,
|
|
204
206
|
disabled: option.disabled,
|
|
205
207
|
onChange: function onChange() {
|