@trionesdev/antd-mobile-react 0.0.2-beta.2 → 0.0.2-beta.20
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/LICENSE +21 -21
- package/dist/ActionSheet/ActionSheet.d.ts +25 -0
- package/dist/ActionSheet/ActionSheet.js +77 -0
- package/dist/ActionSheet/index.d.ts +1 -1
- package/dist/ActionSheet/index.js +1 -1
- package/dist/ActionSheet/style.scss +52 -0
- package/dist/Avatar/demo/base.js +2 -2
- package/dist/Avatar/demo/style.scss +6 -6
- package/dist/Badge/demo/base.js +2 -2
- package/dist/Badge/demo/base.scss +6 -6
- package/dist/Button/button.d.ts +2 -1
- package/dist/Button/button.js +1 -1
- package/dist/Button/demo/base.js +2 -2
- package/dist/Button/style.scss +234 -232
- package/dist/Calendar/calendar-grid.d.ts +10 -9
- package/dist/Calendar/calendar-grid.js +41 -64
- package/dist/Calendar/calendar-header.d.ts +3 -2
- package/dist/Calendar/calendar-header.js +6 -6
- package/dist/Calendar/calendar-range.d.ts +4 -3
- package/dist/Calendar/calendar-range.js +12 -11
- package/dist/Calendar/calendar.d.ts +5 -4
- package/dist/Calendar/calendar.js +23 -14
- package/dist/Calendar/style.scss +85 -85
- package/dist/Calendar/touchable-calendar-grid.d.ts +6 -5
- package/dist/Calendar/touchable-calendar-grid.js +67 -59
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.d.ts +3 -2
- package/dist/CalendarDatetimePicker/CalendarDatetimePicker.js +14 -28
- package/dist/CalendarDatetimePicker/DateTimeSwitch.d.ts +3 -2
- package/dist/CalendarDatetimePicker/DateTimeSwitch.js +4 -3
- package/dist/CalendarDatetimePicker/demo/base.js +1 -1
- package/dist/CalendarDatetimePicker/style.scss +54 -54
- package/dist/CalendarDatetimePicker/types.d.ts +1 -1
- package/dist/CalendarDatetimePicker/types.js +1 -1
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.d.ts +11 -0
- package/dist/CalendarDatetimePickerCell/CalendarDatetimePickerCell.js +61 -0
- package/dist/{Mask → CalendarDatetimePickerCell}/demo/base.js +9 -15
- package/dist/CalendarDatetimePickerCell/index.d.ts +3 -0
- package/dist/CalendarDatetimePickerCell/index.js +2 -0
- package/dist/CalendarDatetimePickerCell/style.scss +10 -0
- package/dist/CalendarDatetimePickerCell/types.d.ts +1 -0
- package/dist/CalendarDatetimePickerCell/types.js +1 -0
- package/dist/CalendarPicker/calendar-picker.js +2 -2
- package/dist/CalendarPicker/calendar-range-picker.d.ts +4 -4
- package/dist/CalendarPicker/calendar-range-picker.js +11 -9
- package/dist/CalendarPicker/demo/base.js +6 -6
- package/dist/CalendarPicker/index.d.ts +2 -2
- package/dist/CalendarPicker/index.js +3 -3
- package/dist/CalendarPicker/style.scss +31 -31
- package/dist/CalendarPicker/types.d.ts +8 -7
- package/dist/CalendarPickerCell/CalendarPickerCell.d.ts +11 -0
- package/dist/CalendarPickerCell/CalendarPickerCell.js +54 -0
- package/dist/CalendarPickerCell/CalendarRangePickerCell.d.ts +11 -0
- package/dist/CalendarPickerCell/CalendarRangePickerCell.js +56 -0
- package/dist/CalendarPickerCell/demo/base.d.ts +3 -0
- package/dist/CalendarPickerCell/demo/base.js +31 -0
- package/dist/CalendarPickerCell/index.d.ts +8 -0
- package/dist/CalendarPickerCell/index.js +5 -0
- package/dist/Card/demo/base.js +2 -2
- package/dist/Card/demo/base.scss +18 -18
- package/dist/CascaderPicker/cascader-picker.d.ts +27 -0
- package/dist/CascaderPicker/cascader-picker.js +90 -0
- package/dist/CascaderPicker/demo/base.js +1 -4
- package/dist/CascaderPicker/index.d.ts +1 -1
- package/dist/CascaderPicker/index.js +1 -1
- package/dist/CascaderPicker/style.scss +45 -0
- package/dist/CascaderPickerCell/CascaderPickerCell.d.ts +21 -0
- package/dist/CascaderPickerCell/CascaderPickerCell.js +70 -0
- package/dist/CascaderPickerCell/demo/base.js +71 -0
- package/dist/CascaderPickerCell/index.d.ts +3 -0
- package/dist/CascaderPickerCell/index.js +2 -0
- package/dist/CascaderPickerCell/style.scss +24 -0
- package/dist/Cell/demo/base.js +41 -2
- package/dist/Checkbox/demo/base.js +11 -6
- package/dist/Checkbox/demo/disabled.js +2 -1
- package/dist/ConfigProvider/demo/base.js +2 -2
- package/dist/DemoBlock/index.d.ts +6 -0
- package/dist/DemoBlock/index.js +9 -2
- package/dist/DemoBlock/index.scss +20 -20
- package/dist/DemoDescription/index.scss +3 -3
- package/dist/Divider/demo/base.js +2 -2
- package/dist/Ellipsis/demo/base.js +2 -2
- package/dist/Empty/demo/base.js +2 -2
- package/dist/ErrorBlock/demo/base.js +2 -2
- package/dist/FetchPicker/FetchPicker.d.ts +113 -0
- package/dist/FetchPicker/FetchPicker.js +319 -0
- package/dist/FetchPicker/index.d.ts +4 -0
- package/dist/FetchPicker/index.js +3 -0
- package/dist/FetchPicker/styles.scss +118 -0
- package/dist/FloatButton/FloatButton.d.ts +21 -0
- package/dist/FloatButton/FloatButton.js +66 -0
- package/dist/FloatButton/FloatButtonGroup.d.ts +21 -0
- package/dist/FloatButton/FloatButtonGroup.js +120 -0
- package/dist/FloatButton/context.d.ts +13 -0
- package/dist/FloatButton/context.js +2 -0
- package/dist/FloatButton/demo/base.d.ts +3 -0
- package/dist/FloatButton/demo/base.js +10 -0
- package/dist/FloatButton/demo/group.d.ts +3 -0
- package/dist/FloatButton/demo/group.js +20 -0
- package/dist/FloatButton/demo/square.d.ts +3 -0
- package/dist/FloatButton/demo/square.js +12 -0
- package/dist/FloatButton/index.d.ts +10 -0
- package/dist/FloatButton/index.js +5 -0
- package/dist/FloatButton/style.scss +123 -0
- package/dist/Footer/demo/base.js +2 -2
- package/dist/Form/FormItem/form-item-content.d.ts +17 -0
- package/dist/Form/FormItem/form-item-content.js +39 -0
- package/dist/Form/FormItem/form-item-label.d.ts +13 -0
- package/dist/Form/FormItem/form-item-label.js +29 -0
- package/dist/Form/FormItem/form-item.d.ts +51 -0
- package/dist/Form/FormItem/form-item.js +74 -0
- package/dist/Form/FormItem/index.d.ts +5 -0
- package/dist/Form/FormItem/index.js +3 -0
- package/dist/Form/demo/input.js +7 -3
- package/dist/Form/demo/vertical.d.ts +3 -0
- package/dist/Form/demo/vertical.js +45 -0
- package/dist/Form/index.d.ts +9 -2
- package/dist/Form/index.js +5 -1
- package/dist/Form/style.scss +106 -0
- package/dist/FormCell/index.d.ts +3 -0
- package/dist/FormCell/index.js +2 -0
- package/dist/Grid/demo/base.js +2 -2
- package/dist/Grid/demo/base.scss +7 -7
- package/dist/Icon/demo/base.js +2 -2
- package/dist/Image/demo/base.js +2 -2
- package/dist/Image/demo/base.scss +4 -4
- package/dist/Image/style.scss +30 -30
- package/dist/ImagesPreview/ImagesPreview.js +2 -2
- package/dist/ImagesPreview/style.scss +34 -34
- package/dist/ImagesWall/CameraModal.js +2 -2
- package/dist/ImagesWall/style.scss +70 -70
- package/dist/Input/base-input.d.ts +13 -0
- package/dist/Input/base-input.js +41 -0
- package/dist/Input/demo/base.js +115 -13
- package/dist/Input/index.d.ts +14 -2
- package/dist/Input/index.js +11 -1
- package/dist/Input/index.scss +240 -0
- package/dist/Input/input-affix-wrapper.d.ts +13 -0
- package/dist/Input/input-affix-wrapper.js +37 -0
- package/dist/Input/input-opt.d.ts +16 -0
- package/dist/Input/input-opt.js +87 -0
- package/dist/Input/input-password.d.ts +7 -0
- package/dist/Input/input-password.js +48 -0
- package/dist/Input/input.d.ts +20 -0
- package/dist/Input/input.js +66 -0
- package/dist/Input/textarea.d.ts +15 -0
- package/dist/Input/textarea.js +51 -0
- package/dist/Input/types.d.ts +3 -0
- package/dist/Input/types.js +2 -0
- package/dist/Loading/DotLoading.d.ts +1 -0
- package/dist/Loading/DotLoading.js +1 -0
- package/dist/Loading/SpinLoading.d.ts +1 -0
- package/dist/Loading/SpinLoading.js +1 -0
- package/dist/Loading/demo/base.d.ts +3 -0
- package/dist/{SpinLoading → Loading}/demo/base.js +8 -2
- package/dist/Loading/demo/dot-loading.d.ts +3 -0
- package/dist/Loading/demo/dot-loading.js +25 -0
- package/dist/Loading/index.d.ts +5 -0
- package/dist/Loading/index.js +3 -0
- package/dist/NavBar/demo/base.scss +5 -5
- package/dist/NoticeBar/demo/base.js +2 -2
- package/dist/Overlay/Overlay.d.ts +16 -0
- package/dist/Overlay/Overlay.js +117 -0
- package/dist/Overlay/demo/base.d.ts +3 -0
- package/dist/Overlay/demo/base.js +27 -0
- package/dist/Overlay/index.d.ts +4 -0
- package/dist/Overlay/index.js +3 -0
- package/dist/Overlay/style.scss +20 -0
- package/dist/PageIndicator/demo/base.js +2 -2
- package/dist/Picker/index.d.ts +1 -1
- package/dist/Picker/index.js +1 -1
- package/dist/Picker/picker.d.ts +20 -0
- package/dist/Picker/picker.js +94 -0
- package/dist/Picker/style.scss +44 -0
- package/dist/PickerView/index.d.ts +2 -1
- package/dist/PickerView/index.js +1 -1
- package/dist/PickerView/picker-view-column-item.d.ts +7 -0
- package/dist/PickerView/picker-view-column-item.js +11 -0
- package/dist/PickerView/picker-view-column.d.ts +10 -0
- package/dist/PickerView/picker-view-column.js +117 -0
- package/dist/PickerView/picker-view.d.ts +12 -0
- package/dist/PickerView/picker-view.js +60 -0
- package/dist/PickerView/style.scss +72 -0
- package/dist/PickerView/types.d.ts +4 -0
- package/dist/PickerView/types.js +1 -0
- package/dist/Popup/demo/base.js +109 -27
- package/dist/Popup/index.d.ts +2 -1
- package/dist/Popup/index.js +2 -1
- package/dist/Popup/popup.d.ts +31 -0
- package/dist/Popup/popup.js +87 -0
- package/dist/Popup/style.scss +129 -0
- package/dist/Progress/index.d.ts +1 -1
- package/dist/Progress/index.js +1 -1
- package/dist/Radio/demo/base.js +2 -2
- package/dist/Radio/demo/base.scss +4 -4
- package/dist/Result/demo/base.js +2 -2
- package/dist/SafeArea/demo/base.scss +18 -18
- package/dist/ScrollView/index.d.ts +2 -1
- package/dist/ScrollView/index.js +1 -1
- package/dist/ScrollView/scroll-view.d.ts +4 -0
- package/dist/ScrollView/scroll-view.js +55 -0
- package/dist/ScrollView/style.scss +19 -0
- package/dist/ScrollView/types.d.ts +26 -0
- package/dist/ScrollView/types.js +1 -0
- package/dist/Segmented/demo/base.d.ts +3 -0
- package/dist/Segmented/demo/base.js +33 -0
- package/dist/Segmented/index.d.ts +3 -0
- package/dist/Segmented/index.js +2 -0
- package/dist/SideBar/index.d.ts +1 -1
- package/dist/SideBar/side-bar.js +6 -6
- package/dist/SideBar/style.scss +85 -85
- package/dist/Skeleton/demo/base.d.ts +3 -0
- package/dist/Skeleton/demo/base.js +8 -0
- package/dist/Skeleton/index.d.ts +3 -0
- package/dist/Skeleton/index.js +2 -0
- package/dist/Space/demo/base.js +2 -2
- package/dist/Stepper/demo/base.d.ts +3 -0
- package/dist/Stepper/demo/base.js +23 -0
- package/dist/Stepper/index.d.ts +3 -0
- package/dist/Stepper/index.js +2 -0
- package/dist/Swiper/style.scss +54 -54
- package/dist/Switch/demo/base.js +2 -2
- package/dist/TabBar/demo/base.js +2 -2
- package/dist/Tag/demo/base.js +2 -2
- package/dist/Tag/demo/style.scss +8 -8
- package/dist/Toast/style.scss +63 -63
- package/dist/Toast/toast-modal.js +4 -4
- package/dist/VerificationCodeInput/demo/base.js +2 -2
- package/dist/VerificationCodeInput/index.d.ts +2 -2
- package/dist/VerificationCodeInput/index.js +1 -1
- package/dist/VerificationCodeInput/style.scss +20 -0
- package/dist/VerificationCodeInput/verification-code-input.d.ts +24 -0
- package/dist/VerificationCodeInput/verification-code-input.js +99 -0
- package/dist/WaterMark/demo/demo1.js +2 -2
- package/dist/WaterMark/demo/demo1.scss +6 -6
- package/dist/WaterMark/demo/demo2.js +2 -2
- package/dist/index.d.ts +33 -19
- package/dist/index.js +9 -2
- package/dist/style/variable.scss +1 -1
- package/dist/types.d.ts +0 -8
- package/dist/types.js +0 -1
- package/dist/utils/dayjs.d.ts +4 -0
- package/dist/utils/dayjs.js +42 -0
- package/dist/utils/type.js +36 -36
- package/dist/utils/use-isomorphic-update-layout-effect.d.ts +1 -1
- package/dist/utils/with-default-props.js +4 -4
- package/package.json +11 -16
- package/readme.md +43 -43
- package/dist/Mask/index.d.ts +0 -3
- package/dist/Mask/index.js +0 -2
- package/dist/Progress/Progress.d.ts +0 -37
- package/dist/Progress/Progress.js +0 -52
- package/dist/Progress/ProgressCircle.d.ts +0 -17
- package/dist/Progress/ProgressCircle.js +0 -148
- package/dist/Progress/ProgressLine.d.ts +0 -15
- package/dist/Progress/ProgressLine.js +0 -87
- package/dist/Progress/style.scss +0 -33
- package/dist/Progress/types.d.ts +0 -4
- package/dist/Progress/types.js +0 -2
- package/dist/SpinLoading/index.d.ts +0 -3
- package/dist/SpinLoading/index.js +0 -2
- /package/dist/{Mask → CalendarDatetimePickerCell}/demo/base.d.ts +0 -0
- /package/dist/{SpinLoading → CascaderPickerCell}/demo/base.d.ts +0 -0
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { DemoBlock } from "../../DemoBlock";
|
|
9
9
|
import Button from "../../Button";
|
|
10
|
-
import CascaderPicker from "../
|
|
10
|
+
import { CascaderPicker } from "../cascader-picker";
|
|
11
11
|
export default (function () {
|
|
12
12
|
var _React$useState = React.useState(false),
|
|
13
13
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -70,9 +70,6 @@ export default (function () {
|
|
|
70
70
|
onOk: function onOk(value) {
|
|
71
71
|
console.log(value);
|
|
72
72
|
},
|
|
73
|
-
style: {
|
|
74
|
-
height: 300
|
|
75
|
-
},
|
|
76
73
|
onClose: function onClose() {
|
|
77
74
|
setOpen(false);
|
|
78
75
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CascaderPicker } from "
|
|
1
|
+
import { CascaderPicker } from "./cascader-picker";
|
|
2
2
|
export default CascaderPicker;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
$cascaderPickerCls: 'triones-antm-cascader-picker';
|
|
3
|
+
|
|
4
|
+
.#{$cascaderPickerCls} {
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 300Px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
|
|
12
|
+
&-header {
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
align-items: center;
|
|
16
|
+
border-bottom: 1Px solid variable.$trionesBorderColor;
|
|
17
|
+
padding: 4Px;
|
|
18
|
+
|
|
19
|
+
&-button {
|
|
20
|
+
|
|
21
|
+
padding: 8Px;
|
|
22
|
+
font-size: 12Px;
|
|
23
|
+
&-cancel{
|
|
24
|
+
color: variable.$trionesColorTextSecondary;
|
|
25
|
+
}
|
|
26
|
+
&-ok{
|
|
27
|
+
color: variable.$trionesColorPrimary;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&-title {
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-body {
|
|
36
|
+
flex: 1 1;
|
|
37
|
+
width: 100%;
|
|
38
|
+
pointer-events: unset;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
}
|
|
41
|
+
&-view{
|
|
42
|
+
--height: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import "./style.scss";
|
|
3
|
+
import { FormCellProps } from '../FormCell';
|
|
4
|
+
export type CascaderPickerCellProps = Omit<FormCellProps, 'value'> & {
|
|
5
|
+
onChange?: (value: any[]) => void;
|
|
6
|
+
options?: any[];
|
|
7
|
+
/**
|
|
8
|
+
* @description 是否把每个选项的 label 包装到 value 中,会把 Select 的 value 类型从 string 变为 { value: string, label: ReactNode } 的格式
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
labelInValue?: boolean;
|
|
12
|
+
fieldNames?: {
|
|
13
|
+
value?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
children?: string;
|
|
16
|
+
};
|
|
17
|
+
columnsCount?: number;
|
|
18
|
+
value?: any[];
|
|
19
|
+
asyncRequest?: (parentValue?: any) => Promise<any>;
|
|
20
|
+
};
|
|
21
|
+
export declare const CascaderPickerCell: FC<CascaderPickerCellProps>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["onChange", "value", "labelInValue"];
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
|
+
import React, { useEffect, useState } from "react";
|
|
18
|
+
import CascaderPopup from "../CascaderPicker";
|
|
19
|
+
import "./style.scss";
|
|
20
|
+
import FormCell from "../FormCell";
|
|
21
|
+
var cls = 'triones-antm-cascader-picker';
|
|
22
|
+
export var CascaderPickerCell = function CascaderPickerCell(_ref) {
|
|
23
|
+
var onChange = _ref.onChange,
|
|
24
|
+
value = _ref.value,
|
|
25
|
+
_ref$labelInValue = _ref.labelInValue,
|
|
26
|
+
labelInValue = _ref$labelInValue === void 0 ? true : _ref$labelInValue,
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
+
var mergedFieldNames = _objectSpread({
|
|
29
|
+
value: 'value',
|
|
30
|
+
label: 'label',
|
|
31
|
+
children: 'children'
|
|
32
|
+
}, rest.fieldNames);
|
|
33
|
+
var _useState = useState(false),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
open = _useState2[0],
|
|
36
|
+
setOpen = _useState2[1];
|
|
37
|
+
var _useState3 = useState(value || []),
|
|
38
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
39
|
+
internalValue = _useState4[0],
|
|
40
|
+
setInternalValue = _useState4[1];
|
|
41
|
+
useEffect(function () {
|
|
42
|
+
if ((value || []) !== (internalValue || [])) {
|
|
43
|
+
setInternalValue(value || []);
|
|
44
|
+
}
|
|
45
|
+
}, [value]);
|
|
46
|
+
var valueText = function valueText() {
|
|
47
|
+
if (labelInValue) {
|
|
48
|
+
return internalValue === null || internalValue === void 0 ? void 0 : internalValue.map(function (item) {
|
|
49
|
+
return item[mergedFieldNames.label];
|
|
50
|
+
}).join('/');
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CascaderPopup, _extends({}, rest, {
|
|
54
|
+
open: open,
|
|
55
|
+
value: internalValue,
|
|
56
|
+
labelInValue: labelInValue,
|
|
57
|
+
onCancel: function onCancel() {
|
|
58
|
+
setOpen(false);
|
|
59
|
+
},
|
|
60
|
+
onOk: function onOk(value) {
|
|
61
|
+
setInternalValue(value || []);
|
|
62
|
+
setOpen(false);
|
|
63
|
+
onChange === null || onChange === void 0 || onChange(value || []);
|
|
64
|
+
}
|
|
65
|
+
})), /*#__PURE__*/React.createElement(FormCell, _extends({}, rest, {
|
|
66
|
+
onClick: function onClick() {
|
|
67
|
+
setOpen(true);
|
|
68
|
+
}
|
|
69
|
+
}), valueText()));
|
|
70
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { DemoBlock } from "../../DemoBlock";
|
|
9
|
+
import CascaderPicker from "../index";
|
|
10
|
+
export default (function () {
|
|
11
|
+
var _React$useState = React.useState(false),
|
|
12
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
13
|
+
open = _React$useState2[0],
|
|
14
|
+
setOpen = _React$useState2[1];
|
|
15
|
+
var options = [{
|
|
16
|
+
value: "jiangsu",
|
|
17
|
+
label: "江苏",
|
|
18
|
+
children: [{
|
|
19
|
+
value: "nanjing",
|
|
20
|
+
label: '南京'
|
|
21
|
+
}, {
|
|
22
|
+
value: "wuxi",
|
|
23
|
+
label: '无锡'
|
|
24
|
+
}, {
|
|
25
|
+
value: "changzhou",
|
|
26
|
+
label: '常州'
|
|
27
|
+
}, {
|
|
28
|
+
value: "suzhou",
|
|
29
|
+
label: '苏州',
|
|
30
|
+
children: [{
|
|
31
|
+
value: "gushu",
|
|
32
|
+
label: '姑苏区'
|
|
33
|
+
}]
|
|
34
|
+
}]
|
|
35
|
+
}, {
|
|
36
|
+
value: "zhejiang",
|
|
37
|
+
label: "浙江",
|
|
38
|
+
children: [{
|
|
39
|
+
value: "hangzhou",
|
|
40
|
+
label: '杭州'
|
|
41
|
+
}, {
|
|
42
|
+
value: "wenzhou",
|
|
43
|
+
label: '温州'
|
|
44
|
+
}]
|
|
45
|
+
}, {
|
|
46
|
+
value: "shanghai",
|
|
47
|
+
label: "上海"
|
|
48
|
+
}, {
|
|
49
|
+
value: "shandong",
|
|
50
|
+
label: '山东'
|
|
51
|
+
}, {
|
|
52
|
+
value: "henan",
|
|
53
|
+
label: '河南'
|
|
54
|
+
}, {
|
|
55
|
+
value: "hebei",
|
|
56
|
+
label: '河北'
|
|
57
|
+
}, {
|
|
58
|
+
value: "hunan",
|
|
59
|
+
label: '湖南'
|
|
60
|
+
}, {
|
|
61
|
+
value: "hubei",
|
|
62
|
+
label: '湖北'
|
|
63
|
+
}];
|
|
64
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
65
|
+
title: "\u57FA\u672C\u4F7F\u7528"
|
|
66
|
+
}, /*#__PURE__*/React.createElement(CascaderPicker, {
|
|
67
|
+
options: options,
|
|
68
|
+
align: "end",
|
|
69
|
+
placeholder: '请选择'
|
|
70
|
+
})));
|
|
71
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@use "../style/variable" as variable;
|
|
2
|
+
$cascaderPickerCls: 'triones-antm-cascader-picker';
|
|
3
|
+
|
|
4
|
+
.#{$cascaderPickerCls}{
|
|
5
|
+
width: 100%;
|
|
6
|
+
line-height: 1.4;
|
|
7
|
+
display: flex;
|
|
8
|
+
|
|
9
|
+
&-left {
|
|
10
|
+
justify-content: flex-start;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&-center {
|
|
14
|
+
justify-content: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-right {
|
|
18
|
+
justify-content: flex-end;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-placeholder{
|
|
22
|
+
color: variable.$trionesColorTextPlaceholder;
|
|
23
|
+
}
|
|
24
|
+
}
|
package/dist/Cell/demo/base.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { DemoBlock } from "../../DemoBlock";
|
|
3
3
|
import Cell from "../index";
|
|
4
|
+
import { RightOutline } from "@trionesdev/antd-mobile-icons-react";
|
|
5
|
+
import { Divider } from "../../index";
|
|
4
6
|
export default (function () {
|
|
5
7
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DemoBlock, {
|
|
6
8
|
title: "\u57FA\u7840\u7528\u6CD5"
|
|
@@ -8,6 +10,43 @@ export default (function () {
|
|
|
8
10
|
title: "\u5206\u7EC4"
|
|
9
11
|
}, /*#__PURE__*/React.createElement(Cell.Group, {
|
|
10
12
|
title: '标题',
|
|
11
|
-
divider:
|
|
12
|
-
}, /*#__PURE__*/React.createElement(Cell, null, "\u6807\u9898"), /*#__PURE__*/React.createElement(Cell, null, "\u6807\u9898"), /*#__PURE__*/React.createElement(Cell, null, "\u6807\u9898")))
|
|
13
|
+
divider: /*#__PURE__*/React.createElement(Divider, null)
|
|
14
|
+
}, /*#__PURE__*/React.createElement(Cell, null, "\u6807\u9898"), /*#__PURE__*/React.createElement(Cell, null, "\u6807\u9898"), /*#__PURE__*/React.createElement(Cell, null, "\u6807\u9898"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
15
|
+
title: "\u5206\u7EC4\u5E26Label"
|
|
16
|
+
}, /*#__PURE__*/React.createElement(Cell.Group, {
|
|
17
|
+
title: '标题',
|
|
18
|
+
labelCol: {
|
|
19
|
+
flex: 100
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Cell, {
|
|
22
|
+
label: 'Label'
|
|
23
|
+
}, "\u6807\u9898"), /*#__PURE__*/React.createElement(Cell, {
|
|
24
|
+
label: 'Label'
|
|
25
|
+
}, "\u6807\u9898"), /*#__PURE__*/React.createElement(Cell, {
|
|
26
|
+
label: 'Label'
|
|
27
|
+
}, "\u6807\u9898"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
28
|
+
title: "\u6837\u5F0F"
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Cell.Group, {
|
|
30
|
+
title: '标题',
|
|
31
|
+
labelCol: {
|
|
32
|
+
flex: 100
|
|
33
|
+
},
|
|
34
|
+
styles: {
|
|
35
|
+
cell: {
|
|
36
|
+
minHeight: 40
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
divider: /*#__PURE__*/React.createElement(Divider, null),
|
|
40
|
+
extra: /*#__PURE__*/React.createElement(RightOutline, {
|
|
41
|
+
style: {
|
|
42
|
+
fontSize: 12
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
}, /*#__PURE__*/React.createElement(Cell, {
|
|
46
|
+
label: 'Label'
|
|
47
|
+
}, "\u6807\u9898"), /*#__PURE__*/React.createElement(Cell, {
|
|
48
|
+
label: 'Label'
|
|
49
|
+
}, "\u6807\u9898"), /*#__PURE__*/React.createElement(Cell, {
|
|
50
|
+
label: 'Label'
|
|
51
|
+
}, "\u6807\u9898"))));
|
|
13
52
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* compact: true
|
|
1
|
+
/**
|
|
2
|
+
* compact: true
|
|
3
3
|
*/
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { DemoBlock } from "../../DemoBlock";
|
|
@@ -26,18 +26,23 @@ export default (function () {
|
|
|
26
26
|
disabled: true
|
|
27
27
|
}, "\u9999\u8549")), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
28
28
|
title: "Button"
|
|
29
|
-
}, /*#__PURE__*/React.createElement(Checkbox
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
30
|
+
shape: "button"
|
|
31
|
+
}, "\u82F9\u679C")), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
30
32
|
title: "Button \u7981\u7528"
|
|
31
|
-
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Checkbox
|
|
33
|
+
}, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Checkbox, {
|
|
34
|
+
shape: "button",
|
|
32
35
|
disabled: true
|
|
33
|
-
}, "\u82F9\u679C"), /*#__PURE__*/React.createElement(Checkbox
|
|
36
|
+
}, "\u82F9\u679C"), /*#__PURE__*/React.createElement(Checkbox, {
|
|
37
|
+
shape: "button",
|
|
34
38
|
disabled: true,
|
|
35
39
|
checked: true
|
|
36
40
|
}, "\u82F9\u679C"))), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
37
41
|
title: "\u5206\u7EC4"
|
|
38
42
|
}, /*#__PURE__*/React.createElement(Checkbox.Group, {
|
|
39
43
|
defaultValue: ['1']
|
|
40
|
-
}, /*#__PURE__*/React.createElement(Checkbox
|
|
44
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
45
|
+
shape: "button",
|
|
41
46
|
value: '1'
|
|
42
47
|
}, "\u82F9\u679C"))));
|
|
43
48
|
});
|
|
@@ -12,7 +12,8 @@ export default (function () {
|
|
|
12
12
|
disabled: true
|
|
13
13
|
}, "\u9999\u8549")), /*#__PURE__*/React.createElement(DemoBlock, {
|
|
14
14
|
title: "Button"
|
|
15
|
-
}, /*#__PURE__*/React.createElement(Checkbox
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
16
|
+
shape: "button",
|
|
16
17
|
checked: true,
|
|
17
18
|
disabled: true
|
|
18
19
|
}, "\u82F9\u679C")));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { FC, ReactNode } from 'react';
|
|
2
3
|
import './index.scss';
|
|
3
4
|
interface Props {
|
|
@@ -5,6 +6,11 @@ interface Props {
|
|
|
5
6
|
padding?: string;
|
|
6
7
|
background?: string;
|
|
7
8
|
children?: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
styles?: {
|
|
12
|
+
body?: React.CSSProperties;
|
|
13
|
+
};
|
|
8
14
|
}
|
|
9
15
|
export declare const DemoBlock: FC<Props>;
|
|
10
16
|
export {};
|
package/dist/DemoBlock/index.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
1
7
|
import React from 'react';
|
|
2
8
|
import "./index.scss";
|
|
3
9
|
export var DemoBlock = function DemoBlock(props) {
|
|
10
|
+
var _props$styles;
|
|
4
11
|
return /*#__PURE__*/React.createElement("div", {
|
|
5
12
|
className: "demoBlock"
|
|
6
13
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7
14
|
className: "demoTitle"
|
|
8
15
|
}, props.title), /*#__PURE__*/React.createElement("div", {
|
|
9
16
|
className: "demoMain",
|
|
10
|
-
style: {
|
|
17
|
+
style: _objectSpread({
|
|
11
18
|
padding: '12px 12px',
|
|
12
19
|
background: '#ffffff'
|
|
13
|
-
}
|
|
20
|
+
}, (_props$styles = props.styles) === null || _props$styles === void 0 ? void 0 : _props$styles.body)
|
|
14
21
|
}, props.children));
|
|
15
22
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.demoBlock {
|
|
2
|
-
font-size: 14px;
|
|
3
|
-
margin-bottom: 12px;
|
|
4
|
-
&:last-of-type {
|
|
5
|
-
padding-bottom: 32px;
|
|
6
|
-
}
|
|
7
|
-
scrollbar-width: thin;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.demoTitle {
|
|
11
|
-
padding: 12px 12px 8px;
|
|
12
|
-
color: #697b8c;
|
|
13
|
-
font-size: 14px;
|
|
14
|
-
background: #fafbfc;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.demoMain {
|
|
18
|
-
border-right: none;
|
|
19
|
-
border-left: none;
|
|
20
|
-
}
|
|
1
|
+
.demoBlock {
|
|
2
|
+
font-size: 14px;
|
|
3
|
+
margin-bottom: 12px;
|
|
4
|
+
&:last-of-type {
|
|
5
|
+
padding-bottom: 32px;
|
|
6
|
+
}
|
|
7
|
+
scrollbar-width: thin;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.demoTitle {
|
|
11
|
+
padding: 12px 12px 8px;
|
|
12
|
+
color: #697b8c;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
background: #fafbfc;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.demoMain {
|
|
18
|
+
border-right: none;
|
|
19
|
+
border-left: none;
|
|
20
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.demoDescription {
|
|
2
|
-
color: var(--triones-antm-color-weak);
|
|
3
|
-
}
|
|
1
|
+
.demoDescription {
|
|
2
|
+
color: var(--triones-antm-color-weak);
|
|
3
|
+
}
|
package/dist/Empty/demo/base.js
CHANGED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type LabeledValue = {
|
|
3
|
+
label?: string;
|
|
4
|
+
value?: string | number;
|
|
5
|
+
};
|
|
6
|
+
type PickerValue = string | string[] | number | number[] | LabeledValue | LabeledValue[];
|
|
7
|
+
export type FetchPickerProps = {
|
|
8
|
+
open?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @description 是否全屏
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
fullScreen?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* @description 搜索框
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
showSearch?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @description 搜索框占位符
|
|
21
|
+
* @default 搜索
|
|
22
|
+
*/
|
|
23
|
+
searchPlaceholder?: string;
|
|
24
|
+
height?: number | string;
|
|
25
|
+
value?: PickerValue;
|
|
26
|
+
/**
|
|
27
|
+
* @description 是否可返回,fullScreen 为 true 时生效
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
backable?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* @description 返回按钮图标,fullScreen 为 true 时生效
|
|
33
|
+
* @default
|
|
34
|
+
*/
|
|
35
|
+
backIcon?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* @description 是否可关闭,fullScreen 为 true 时生效
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
closable?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* @description 关闭按钮图标,fullScreen 为 true 时生效
|
|
43
|
+
* @default
|
|
44
|
+
*/
|
|
45
|
+
closeIcon?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* @description 是否多选
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
multiple?: boolean;
|
|
51
|
+
labelInValue?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* @description 弹窗标题
|
|
54
|
+
*/
|
|
55
|
+
title?: React.ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* @description 取消按钮文字,fullScreen 为 false 时生效
|
|
58
|
+
* @default 取消
|
|
59
|
+
*/
|
|
60
|
+
cancelText?: string;
|
|
61
|
+
/**
|
|
62
|
+
* @description 确定按钮文字,fullScreen 为 false 时生效
|
|
63
|
+
* @default 确定
|
|
64
|
+
*/
|
|
65
|
+
okText?: string;
|
|
66
|
+
/**
|
|
67
|
+
* @description 是否圆角,fullScreen 为 false 时生效
|
|
68
|
+
* @default true
|
|
69
|
+
*/
|
|
70
|
+
round?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* @description 关闭回调
|
|
73
|
+
* @default
|
|
74
|
+
*/
|
|
75
|
+
onClose?: () => void;
|
|
76
|
+
/**
|
|
77
|
+
* @description 回退回调
|
|
78
|
+
* @default
|
|
79
|
+
*/
|
|
80
|
+
onBack?: () => void;
|
|
81
|
+
onOk?: (value?: PickerValue, option?: any | any[]) => void;
|
|
82
|
+
/**
|
|
83
|
+
* @description 请求
|
|
84
|
+
* @default
|
|
85
|
+
*/
|
|
86
|
+
fetch?: (params: {
|
|
87
|
+
page?: number;
|
|
88
|
+
size?: number;
|
|
89
|
+
wd?: string;
|
|
90
|
+
}) => Promise<any[]>;
|
|
91
|
+
fieldNames?: {
|
|
92
|
+
label?: string;
|
|
93
|
+
value?: string;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* @description 空状态
|
|
97
|
+
* @default 暂无数据
|
|
98
|
+
*/
|
|
99
|
+
empty?: React.ReactNode;
|
|
100
|
+
/**
|
|
101
|
+
* @description 是否分页
|
|
102
|
+
* @default false
|
|
103
|
+
*/
|
|
104
|
+
pageable?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* @description 每页大小,pageable 为 true 时生效
|
|
107
|
+
* @default 20
|
|
108
|
+
*/
|
|
109
|
+
pageSize?: number;
|
|
110
|
+
optionRender?: (option: any, selected: boolean) => React.ReactNode;
|
|
111
|
+
};
|
|
112
|
+
export declare const FetchPicker: React.FC<FetchPickerProps>;
|
|
113
|
+
export {};
|