assui 2.1.46 → 2.1.49
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/es/a-select/demo/index.less +11 -0
- package/es/a-select/index.d.ts +10 -0
- package/es/a-select/index.js +73 -0
- package/es/a-select/style/index.css +1796 -0
- package/es/a-select/style/index.d.ts +2 -0
- package/es/a-select/style/index.js +2 -0
- package/es/a-select/style/index.less +16 -0
- package/es/area-text/index.d.ts +7 -0
- package/es/area-text/index.js +12 -0
- package/es/area-text/style/index.css +4 -0
- package/es/area-text/style/index.d.ts +1 -0
- package/es/area-text/style/index.js +1 -0
- package/es/area-text/style/index.less +4 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +2 -0
- package/lib/a-select/demo/index.less +11 -0
- package/lib/a-select/index.d.ts +10 -0
- package/lib/a-select/index.js +87 -0
- package/lib/a-select/style/index.css +1796 -0
- package/lib/a-select/style/index.d.ts +2 -0
- package/lib/a-select/style/index.js +9 -0
- package/lib/a-select/style/index.less +16 -0
- package/lib/area-text/index.d.ts +7 -0
- package/lib/area-text/index.js +25 -0
- package/lib/area-text/style/index.css +4 -0
- package/lib/area-text/style/index.d.ts +1 -0
- package/lib/area-text/style/index.js +7 -0
- package/lib/area-text/style/index.less +4 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +19 -1
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SelectProps } from 'antd/lib/select';
|
|
3
|
+
export interface ASelectProps extends SelectProps {
|
|
4
|
+
valueRender?: (value: any) => React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const ASelect: {
|
|
7
|
+
(props: ASelectProps): JSX.Element;
|
|
8
|
+
Option: import("rc-select/lib/Option").OptionFC;
|
|
9
|
+
};
|
|
10
|
+
export default ASelect;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
|
|
6
|
+
for (var p in s) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var __read = this && this.__read || function (o, n) {
|
|
18
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
|
+
if (!m) return o;
|
|
20
|
+
var i = m.call(o),
|
|
21
|
+
r,
|
|
22
|
+
ar = [],
|
|
23
|
+
e;
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
27
|
+
ar.push(r.value);
|
|
28
|
+
}
|
|
29
|
+
} catch (error) {
|
|
30
|
+
e = {
|
|
31
|
+
error: error
|
|
32
|
+
};
|
|
33
|
+
} finally {
|
|
34
|
+
try {
|
|
35
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
36
|
+
} finally {
|
|
37
|
+
if (e) throw e.error;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return ar;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
import React from 'react';
|
|
45
|
+
import Select from "antd/es/select";
|
|
46
|
+
import useControllableValue from "ahooks/es/useControllableValue";
|
|
47
|
+
|
|
48
|
+
var ASelect = function ASelect(props) {
|
|
49
|
+
var valueRender = props.valueRender;
|
|
50
|
+
|
|
51
|
+
var _a = __read(useControllableValue(props), 2),
|
|
52
|
+
value = _a[0],
|
|
53
|
+
onChange = _a[1];
|
|
54
|
+
|
|
55
|
+
if (!valueRender) {
|
|
56
|
+
return /*#__PURE__*/React.createElement(Select, __assign({}, props, {
|
|
57
|
+
value: value,
|
|
58
|
+
onChange: onChange
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: "a-select-wrap"
|
|
64
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
65
|
+
className: "a-select-value-wrap"
|
|
66
|
+
}, valueRender(value)), /*#__PURE__*/React.createElement(Select, __assign({}, props, {
|
|
67
|
+
value: value,
|
|
68
|
+
onChange: onChange
|
|
69
|
+
})));
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export default ASelect;
|
|
73
|
+
ASelect.Option = Select.Option;
|