@para-ui/core 3.0.55 → 3.0.56
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/AutoBox/index.d.ts +34 -0
- package/AutoBox/index.js +277 -0
- package/AutoBox/protal.d.ts +17 -0
- package/AutoTips/autoTipsMultiline/index.d.ts +18 -0
- package/AutoTips/index.d.ts +35 -0
- package/AutoTips/index.js +271 -0
- package/Breadcrumbs/index.d.ts +53 -0
- package/Breadcrumbs/index.js +266 -0
- package/Breadcrumbs/lang/en_US.d.ts +4 -0
- package/Breadcrumbs/lang/index.d.ts +9 -0
- package/Breadcrumbs/lang/zh_CN.d.ts +4 -0
- package/Button/SplitButton.d.ts +64 -0
- package/Button/index.d.ts +79 -0
- package/Button/index.js +376 -0
- package/Button/lang/en_US.d.ts +4 -0
- package/Button/lang/index.d.ts +9 -0
- package/Button/lang/zh_CN.d.ts +4 -0
- package/ButtonGroup/index.d.ts +33 -0
- package/ButtonGroup/index.js +124 -0
- package/Carousel/index.d.ts +38 -0
- package/Carousel/index.js +78 -0
- package/Cascader/index.d.ts +54 -0
- package/Cascader/index.js +159 -0
- package/Cascader/lang/en_US.d.ts +4 -0
- package/Cascader/lang/index.d.ts +9 -0
- package/Cascader/lang/zh_CN.d.ts +4 -0
- package/Checkbox/index.d.ts +40 -0
- package/Checkbox/index.js +109 -0
- package/CheckboxGroup/index.d.ts +45 -0
- package/CheckboxGroup/index.js +142 -0
- package/Collapse/collapsePanel.d.ts +30 -0
- package/Collapse/index.d.ts +57 -0
- package/Collapse/index.js +152 -0
- package/Collapse/motion.d.ts +5 -0
- package/Collapse/util.d.ts +11 -0
- package/CollapseBox/index.d.ts +27 -0
- package/CollapseBox/index.js +148 -0
- package/CollapseBox/util.d.ts +5 -0
- package/CollapseLayout/index.d.ts +53 -0
- package/CollapseLayout/index.js +176 -0
- package/ColorPicker/index.d.ts +4 -0
- package/ColorPicker/index.js +4 -0
- package/ComboSelect/index.d.ts +6 -0
- package/ComboSelect/index.js +1049 -0
- package/ComboSelect/interface.d.ts +146 -0
- package/ComboSelect/lang/en_US.d.ts +9 -0
- package/ComboSelect/lang/index.d.ts +19 -0
- package/ComboSelect/lang/zh_CN.d.ts +9 -0
- package/ComboSelect/utils.d.ts +9 -0
- package/Container/index.d.ts +77 -0
- package/Container/index.js +232 -0
- package/DatePicker/PickerButton.d.ts +3 -0
- package/DatePicker/PickerTag.d.ts +3 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
- package/DatePicker/generatePicker/index.d.ts +95 -0
- package/DatePicker/index.d.ts +18 -0
- package/DatePicker/index.js +633 -0
- package/DatePicker/lang/en_US.d.ts +3 -0
- package/DatePicker/lang/index.d.ts +7 -0
- package/DatePicker/lang/zh_CN.d.ts +3 -0
- package/DatePicker/util.d.ts +22 -0
- package/Desktop/index.d.ts +57 -0
- package/Desktop/index.js +746 -0
- package/DragVerify/index.d.ts +36 -0
- package/DragVerify/index.js +385 -0
- package/DragVerify/lang/en_US.d.ts +5 -0
- package/DragVerify/lang/index.d.ts +11 -0
- package/DragVerify/lang/zh_CN.d.ts +5 -0
- package/Drawer/index.d.ts +11 -0
- package/Drawer/index.js +235 -0
- package/Drawer/interface.d.ts +92 -0
- package/Drawer/lang/en_US.d.ts +5 -0
- package/Drawer/lang/index.d.ts +11 -0
- package/Drawer/lang/zh_CN.d.ts +5 -0
- package/Dropdown/index.d.ts +40 -0
- package/Dropdown/index.js +10 -0
- package/DynamicMultiBox/formItem.d.ts +14 -0
- package/DynamicMultiBox/index.d.ts +5 -0
- package/DynamicMultiBox/index.js +1323 -0
- package/DynamicMultiBox/interface.d.ts +165 -0
- package/DynamicMultiBox/rowForm.d.ts +24 -0
- package/Empty/images/index.d.ts +3 -0
- package/Empty/index.d.ts +30 -0
- package/Empty/index.js +642 -0
- package/Empty/lang/en_US.d.ts +6 -0
- package/Empty/lang/index.d.ts +13 -0
- package/Empty/lang/zh_CN.d.ts +6 -0
- package/Form/index.d.ts +187 -0
- package/Form/index.js +355 -0
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -0
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
- package/FormItem/compoments/formFile/index.d.ts +38 -0
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
- package/FormItem/compoments/formSelect/index.d.ts +18 -0
- package/FormItem/errorTips.d.ts +12 -0
- package/FormItem/index.d.ts +152 -0
- package/FormItem/index.js +78 -0
- package/FormItem/itemType.d.ts +42 -0
- package/FormItem/validateFunction.d.ts +15 -0
- package/FunctionModal/dialog.d.ts +58 -0
- package/FunctionModal/index.d.ts +8 -0
- package/FunctionModal/index.js +43 -0
- package/FunctionModal/modalContext.d.ts +15 -0
- package/GlobalContext/componentsProps.d.ts +21 -0
- package/GlobalContext/confirmLocale.d.ts +7 -0
- package/GlobalContext/constant.d.ts +8 -0
- package/GlobalContext/index.d.ts +28 -0
- package/GlobalContext/index.js +41 -0
- package/GlobalContext/intl.d.ts +34 -0
- package/GlobalContext/useFormatMessage.d.ts +3 -0
- package/GlobalContext/usePopupContainer.d.ts +4 -0
- package/Help/index.d.ts +24 -0
- package/Help/index.js +41 -0
- package/HelperText/index.d.ts +27 -0
- package/HelperText/index.js +34 -0
- package/Hooks/useGlobalProps.d.ts +1 -0
- package/InputLang/index.d.ts +57 -0
- package/InputLang/index.js +355 -0
- package/InputNumber/index.d.ts +71 -0
- package/InputNumber/index.js +277 -0
- package/Label/index.d.ts +37 -0
- package/Label/index.js +85 -0
- package/Loading/index.d.ts +17 -0
- package/Loading/index.js +47 -0
- package/Menu/footerExpansion.d.ts +9 -0
- package/Menu/index.d.ts +10 -0
- package/Menu/index.js +1105 -0
- package/Menu/interface.d.ts +141 -0
- package/Menu/logo.d.ts +9 -0
- package/Menu/verticalMenuList.d.ts +14 -0
- package/Message/index.d.ts +99 -0
- package/Message/index.js +246 -0
- package/Modal/Confirm/index.d.ts +65 -0
- package/Modal/index.d.ts +99 -0
- package/Modal/index.js +421 -0
- package/Modal/lang/en_US.d.ts +5 -0
- package/Modal/lang/index.d.ts +11 -0
- package/Modal/lang/zh_CN.d.ts +5 -0
- package/MultiBox/index.d.ts +60 -0
- package/MultiBox/index.js +277 -0
- package/MultiBox/lang/en_US.d.ts +4 -0
- package/MultiBox/lang/index.d.ts +9 -0
- package/MultiBox/lang/zh_CN.d.ts +4 -0
- package/Notification/index.d.ts +74 -0
- package/Notification/index.js +252 -0
- package/OperateBtn/index.d.ts +59 -0
- package/OperateBtn/index.js +237 -0
- package/OperateBtn/lang/en_US.d.ts +4 -0
- package/OperateBtn/lang/index.d.ts +9 -0
- package/OperateBtn/lang/zh_CN.d.ts +4 -0
- package/PageHeader/horizontalMeun.d.ts +9 -0
- package/PageHeader/horizontalMeunRight.d.ts +9 -0
- package/PageHeader/index.d.ts +10 -0
- package/PageHeader/index.js +1050 -0
- package/PageHeader/interface.d.ts +169 -0
- package/Pagination/index.d.ts +46 -0
- package/Pagination/index.js +461 -0
- package/Pagination/lang/en_US.d.ts +8 -0
- package/Pagination/lang/index.d.ts +17 -0
- package/Pagination/lang/zh_CN.d.ts +8 -0
- package/ParauiProvider/index.d.ts +8 -0
- package/ParauiProvider/index.js +52 -0
- package/PasswordRules/index.d.ts +55 -0
- package/PasswordRules/index.js +144 -0
- package/PopConfirm/index.d.ts +61 -0
- package/PopConfirm/index.js +194 -0
- package/PopConfirm/lang/en_US.d.ts +5 -0
- package/PopConfirm/lang/index.d.ts +11 -0
- package/PopConfirm/lang/zh_CN.d.ts +5 -0
- package/Popover/index.d.ts +16 -0
- package/Popover/index.js +59 -0
- package/Progress/Line.d.ts +47 -0
- package/Progress/Steps.d.ts +17 -0
- package/Progress/index.d.ts +83 -0
- package/Progress/index.js +323 -0
- package/Progress/utils.d.ts +6 -0
- package/Querying/images/index.d.ts +3 -0
- package/Querying/index.d.ts +26 -0
- package/Querying/index.js +760 -0
- package/Querying/lang/en_US.d.ts +4 -0
- package/Querying/lang/index.d.ts +9 -0
- package/Querying/lang/zh_CN.d.ts +4 -0
- package/README.md +6 -0
- package/Radio/index.d.ts +38 -0
- package/Radio/index.js +97 -0
- package/RadioGroup/index.d.ts +46 -0
- package/RadioGroup/index.js +134 -0
- package/Search/index.d.ts +57 -0
- package/Search/index.js +208 -0
- package/Select/index.d.ts +93 -0
- package/Select/index.js +1146 -0
- package/Select/lang/en_US.d.ts +5 -0
- package/Select/lang/index.d.ts +11 -0
- package/Select/lang/zh_CN.d.ts +5 -0
- package/SelectInput/index.d.ts +12 -0
- package/SelectInput/index.js +55 -0
- package/Selector/index.d.ts +11 -0
- package/Selector/index.js +2175 -0
- package/Selector/interface.d.ts +432 -0
- package/Selector/lang/en_US.d.ts +11 -0
- package/Selector/lang/index.d.ts +23 -0
- package/Selector/lang/zh_CN.d.ts +11 -0
- package/Selector/selectorData/index.d.ts +10 -0
- package/Selector/selectorMain/index.d.ts +10 -0
- package/Selector/selectorNode/index.d.ts +10 -0
- package/Selector/util.d.ts +15 -0
- package/SelectorPicker/index.d.ts +53 -0
- package/SelectorPicker/index.js +444 -0
- package/SelectorPicker/lang/en_US.d.ts +5 -0
- package/SelectorPicker/lang/index.d.ts +11 -0
- package/SelectorPicker/lang/zh_CN.d.ts +5 -0
- package/SingleBox/index.d.ts +44 -0
- package/SingleBox/index.js +224 -0
- package/SingleBox/lang/en_US.d.ts +4 -0
- package/SingleBox/lang/index.d.ts +9 -0
- package/SingleBox/lang/zh_CN.d.ts +4 -0
- package/Slider/index.d.ts +14 -0
- package/Slider/index.js +119 -0
- package/Slider/interface.d.ts +102 -0
- package/Split/index.d.ts +7 -0
- package/Split/index.js +123 -0
- package/Status/index.d.ts +21 -0
- package/Status/index.js +37 -0
- package/Stepper/icons.d.ts +5 -0
- package/Stepper/index.d.ts +59 -0
- package/Stepper/index.js +97 -0
- package/Switch/index.d.ts +78 -0
- package/Switch/index.js +71 -0
- package/Table/index.d.ts +10 -0
- package/Table/index.js +3001 -0
- package/Table/interface.d.ts +346 -0
- package/Table/lang/en_US.d.ts +8 -0
- package/Table/lang/index.d.ts +17 -0
- package/Table/lang/zh_CN.d.ts +8 -0
- package/Table/tableBody.d.ts +9 -0
- package/Table/tableBodyElement/index.d.ts +15 -0
- package/Table/tableBodyInterface.d.ts +73 -0
- package/Table/tableContainer/index.d.ts +16 -0
- package/Table/tableElement/index.d.ts +17 -0
- package/Table/tableHead.d.ts +9 -0
- package/Table/tableHeadElement/index.d.ts +15 -0
- package/Table/tableHeadInterface.d.ts +37 -0
- package/Table/tablePagination.d.ts +9 -0
- package/Table/tablePaginationInterface.d.ts +27 -0
- package/Table/tdElement/index.d.ts +15 -0
- package/Table/thElement/index.d.ts +28 -0
- package/Table/trElement/index.d.ts +15 -0
- package/Table/util.d.ts +34 -0
- package/Tabs/index.d.ts +69 -0
- package/Tabs/index.js +205 -0
- package/Tabs/lang/en_US.d.ts +4 -0
- package/Tabs/lang/index.d.ts +9 -0
- package/Tabs/lang/zh_CN.d.ts +4 -0
- package/Tag/TagGroup.d.ts +66 -0
- package/Tag/index.d.ts +34 -0
- package/Tag/index.js +259 -0
- package/TextEditor/common.d.ts +11 -0
- package/TextEditor/index.d.ts +127 -0
- package/TextEditor/index.js +286 -0
- package/TextField/index.d.ts +90 -0
- package/TextField/index.js +611 -0
- package/TimePicker/index.d.ts +22 -0
- package/TimePicker/index.js +80 -0
- package/TimePicker/locale/en_US.d.ts +3 -0
- package/TimePicker/locale/zh_CN.d.ts +3 -0
- package/TimePicker/style/index.d.ts +1 -0
- package/Timeline/TimelineItem.d.ts +30 -0
- package/Timeline/index.d.ts +32 -0
- package/Timeline/index.js +148 -0
- package/Title/index.d.ts +30 -0
- package/Title/index.js +50 -0
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -0
- package/ToggleButton/index.d.ts +49 -0
- package/ToggleButton/index.js +193 -0
- package/Tooltip/index.d.ts +11 -0
- package/Tooltip/index.js +368 -0
- package/Tooltip/interface.d.ts +35 -0
- package/Tooltip/utils.d.ts +18 -0
- package/Transfer/box.d.ts +38 -0
- package/Transfer/index.d.ts +32 -0
- package/Transfer/index.js +611 -0
- package/Transfer/lang/en_US.d.ts +10 -0
- package/Transfer/lang/index.d.ts +21 -0
- package/Transfer/lang/zh_CN.d.ts +10 -0
- package/Transfer/useClick.d.ts +3 -0
- package/Tree/OperateBar/index.d.ts +13 -0
- package/Tree/Tree.d.ts +4 -0
- package/Tree/index.d.ts +5 -0
- package/Tree/index.js +38 -0
- package/Tree/interface.d.ts +210 -0
- package/Tree/lang/en_US.d.ts +8 -0
- package/Tree/lang/index.d.ts +17 -0
- package/Tree/lang/zh_CN.d.ts +8 -0
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +25 -0
- package/Tree/utils/treeUtil.d.ts +15 -0
- package/Upload/Dragger/index.d.ts +10 -0
- package/Upload/ErroTip/index.d.ts +13 -0
- package/Upload/ImageUpload/index.d.ts +16 -0
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -0
- package/Upload/ImgCrop/constants.d.ts +7 -0
- package/Upload/ImgCrop/index.d.ts +6 -0
- package/Upload/ImgCrop/interface.d.ts +48 -0
- package/Upload/UploadList/index.d.ts +5 -0
- package/Upload/index.d.ts +15 -0
- package/Upload/index.js +1446 -0
- package/Upload/interface.d.ts +136 -0
- package/Upload/lang/en_US.d.ts +12 -0
- package/Upload/lang/index.d.ts +25 -0
- package/Upload/lang/zh_CN.d.ts +12 -0
- package/_verture/constant-66aa48a1.js +10 -0
- package/_verture/defineProperty-62acccfc.js +34 -0
- package/_verture/index-74f820ba.js +1355 -0
- package/_verture/index-77f9e0fb.js +236 -0
- package/_verture/index-a369ca3f.js +4 -0
- package/_verture/index-beef914f.js +340 -0
- package/_verture/index-d03136d4.js +711 -0
- package/_verture/index-e2881a53.js +16 -0
- package/_verture/intl-5cbb940c.js +57 -0
- package/_verture/modalContext-92bb0e16.js +201 -0
- package/_verture/slicedToArray-76060636.js +43 -0
- package/_verture/sortable.esm-49896035.js +3791 -0
- package/_verture/style-inject.es-300983ab.js +28 -0
- package/_verture/toConsumableArray-81040c9e.js +19 -0
- package/_verture/tslib.es6-55ed4bd2.js +38 -0
- package/_verture/typeof-498dd2b1.js +11 -0
- package/_verture/unsupportedIterableToArray-cb478f24.js +16 -0
- package/_verture/useFormatMessage-703f8b20.js +20 -0
- package/_verture/useGlobalProps-1b846a65.js +11 -0
- package/_verture/usePopupContainer-87febeb9.js +68 -0
- package/_verture/util-7e1fb1e2.js +18 -0
- package/index.d.ts +144 -0
- package/index.js +180 -0
- package/package.json +1 -1
- package/umd/AutoBox.js +43 -0
- package/umd/AutoTips.js +15 -0
- package/umd/Breadcrumbs.js +42 -0
- package/umd/Button.js +43 -0
- package/umd/ButtonGroup.js +43 -0
- package/umd/Carousel.js +6 -0
- package/umd/Cascader.js +43 -0
- package/umd/Checkbox.js +42 -0
- package/umd/CheckboxGroup.js +42 -0
- package/umd/Collapse.js +43 -0
- package/umd/CollapseBox.js +1 -0
- package/umd/CollapseLayout.js +29 -0
- package/umd/ColorPicker.js +1 -0
- package/umd/ComboSelect.js +42 -0
- package/umd/Container.js +1 -0
- package/umd/DatePicker.js +42 -0
- package/umd/Desktop.js +42 -0
- package/umd/DragVerify.js +28 -0
- package/umd/Drawer.js +43 -0
- package/umd/Dropdown.js +15 -0
- package/umd/DynamicMultiBox.js +54 -0
- package/umd/Empty.js +15 -0
- package/umd/Form.js +42 -0
- package/umd/FormItem.js +42 -0
- package/umd/FunctionModal.js +42 -0
- package/umd/GlobalContext.js +1 -0
- package/umd/Help.js +42 -0
- package/umd/HelperText.js +1 -0
- package/umd/InputLang.js +42 -0
- package/umd/InputNumber.js +42 -0
- package/umd/Label.js +42 -0
- package/umd/Loading.js +29 -0
- package/umd/Menu.js +29 -0
- package/umd/Message.js +30 -0
- package/umd/Modal.js +42 -0
- package/umd/MultiBox.js +42 -0
- package/umd/Notification.js +43 -0
- package/umd/OperateBtn.js +42 -0
- package/umd/PageHeader.js +42 -0
- package/umd/Pagination.js +42 -0
- package/umd/ParauiProvider.js +15 -0
- package/umd/PasswordRules.js +29 -0
- package/umd/PopConfirm.js +42 -0
- package/umd/Popover.js +15 -0
- package/umd/Progress.js +35 -0
- package/umd/Querying.js +15 -0
- package/umd/Radio.js +42 -0
- package/umd/RadioGroup.js +42 -0
- package/umd/Search.js +42 -0
- package/umd/Select.js +42 -0
- package/umd/SelectInput.js +42 -0
- package/umd/Selector.js +42 -0
- package/umd/SelectorPicker.js +42 -0
- package/umd/SingleBox.js +42 -0
- package/umd/Slider.js +15 -0
- package/umd/Split.js +1 -0
- package/umd/Status.js +1 -0
- package/umd/Stepper.js +42 -0
- package/umd/Switch.js +42 -0
- package/umd/Table.js +42 -0
- package/umd/Tabs.js +42 -0
- package/umd/Tag.js +43 -0
- package/umd/TextEditor.js +205 -0
- package/umd/TextField.js +42 -0
- package/umd/TimePicker.js +42 -0
- package/umd/Timeline.js +1 -0
- package/umd/Title.js +1 -0
- package/umd/ToggleButton.js +43 -0
- package/umd/Tooltip.js +15 -0
- package/umd/Transfer.js +49 -0
- package/umd/Tree.js +42 -0
- package/umd/Upload.js +56 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
3
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
4
|
+
|
|
5
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 表单错误提示\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-helper-text {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 12px;\n font-weight: 400;\n padding-left: 12px;\n line-height: 20px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-helper-text.paraui-v3-helper-text-error {\n color: rgb(235, 96, 84);\n}";
|
|
6
|
+
styleInject(css_248z);
|
|
7
|
+
|
|
8
|
+
var HelperText = function HelperText(props) {
|
|
9
|
+
var className = props.className,
|
|
10
|
+
style = props.style,
|
|
11
|
+
_props$error = props.error,
|
|
12
|
+
error = _props$error === void 0 ? false : _props$error,
|
|
13
|
+
_props$hideErrorDom = props.hideErrorDom,
|
|
14
|
+
hideErrorDom = _props$hideErrorDom === void 0 ? false : _props$hideErrorDom,
|
|
15
|
+
helperText = props.helperText;
|
|
16
|
+
if (hideErrorDom === null) return null;
|
|
17
|
+
// 不存在错误,且没有错误隐藏错误dom
|
|
18
|
+
if (!error && hideErrorDom) return null;
|
|
19
|
+
// 处理class
|
|
20
|
+
var handClass = function handClass() {
|
|
21
|
+
var str = "".concat($prefixCls, "-helper-text");
|
|
22
|
+
if (className) str += ' ' + className;
|
|
23
|
+
if (error) str += " ".concat($prefixCls, "-helper-text-error");
|
|
24
|
+
return str;
|
|
25
|
+
};
|
|
26
|
+
return jsx("p", Object.assign({
|
|
27
|
+
className: handClass(),
|
|
28
|
+
style: style
|
|
29
|
+
}, {
|
|
30
|
+
children: helperText
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { HelperText as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useGlobalProps<T>(comProps: T, comName: string): T;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/30 16:00
|
|
4
|
+
* @description 国际化输入框
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
8
|
+
import { LabelTooltipProps } from "../Label";
|
|
9
|
+
import './index.scss';
|
|
10
|
+
interface valueProps {
|
|
11
|
+
[name: string]: string;
|
|
12
|
+
}
|
|
13
|
+
export interface InputLangProps extends HelperTextDetailProps {
|
|
14
|
+
/** 样式class */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** style */
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
/** 大小 */
|
|
19
|
+
size?: 'small' | 'medium' | 'large';
|
|
20
|
+
/** 标题 */
|
|
21
|
+
label?: ReactNode;
|
|
22
|
+
/** 帮组提示信息 */
|
|
23
|
+
labelTooltip?: LabelTooltipProps;
|
|
24
|
+
/** 提示语 */
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
/** 提示语key */
|
|
27
|
+
placeholderKey?: string;
|
|
28
|
+
/** 提示语value */
|
|
29
|
+
placeholderValue?: string;
|
|
30
|
+
/** 是否禁用 */
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
/** 是否必填 */
|
|
33
|
+
required?: boolean;
|
|
34
|
+
/** 弹出框样式class */
|
|
35
|
+
popoverClassName?: string;
|
|
36
|
+
/** 默认值 不受控 */
|
|
37
|
+
defaultValue?: valueProps;
|
|
38
|
+
/** 值 */
|
|
39
|
+
value?: valueProps;
|
|
40
|
+
/** 改变值 */
|
|
41
|
+
onChange?: (val: valueProps) => void;
|
|
42
|
+
/** 语言列表 */
|
|
43
|
+
langList?: (string | {
|
|
44
|
+
label: string;
|
|
45
|
+
value: string;
|
|
46
|
+
})[];
|
|
47
|
+
/** 默认语种 */
|
|
48
|
+
defaultLang?: string;
|
|
49
|
+
/** 禁用增加 */
|
|
50
|
+
disabledAdd?: boolean;
|
|
51
|
+
/** 禁用删除 */
|
|
52
|
+
disabledDelete?: boolean;
|
|
53
|
+
/** 禁用key */
|
|
54
|
+
disabledKey?: boolean | string[];
|
|
55
|
+
}
|
|
56
|
+
export declare const InputLang: FunctionComponent<InputLangProps>;
|
|
57
|
+
export default InputLang;
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-62acccfc.js';
|
|
2
|
+
import { _ as _typeof } from '../_verture/typeof-498dd2b1.js';
|
|
3
|
+
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-81040c9e.js';
|
|
4
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-76060636.js';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
7
|
+
import { TextField } from '../TextField/index.js';
|
|
8
|
+
import HelperText from '../HelperText/index.js';
|
|
9
|
+
import { MultiBox } from '../MultiBox/index.js';
|
|
10
|
+
import { Popover } from '../Popover/index.js';
|
|
11
|
+
import Application from '@para-ui/icons/Application';
|
|
12
|
+
import { GetLanguage, ArrayToObject } from '@paraview/lib';
|
|
13
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
14
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
15
|
+
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
16
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
17
|
+
import '../Label/index.js';
|
|
18
|
+
import '../Help/index.js';
|
|
19
|
+
import '../Tooltip/index.js';
|
|
20
|
+
import 'rc-tooltip';
|
|
21
|
+
import 'rc-tooltip/lib/placements';
|
|
22
|
+
import 'clsx';
|
|
23
|
+
import '@para-ui/icons/Help';
|
|
24
|
+
import '@para-ui/icons/PreviewClose';
|
|
25
|
+
import '@para-ui/icons/PreviewOpen';
|
|
26
|
+
import '@para-ui/icons/CloseCircle';
|
|
27
|
+
import '../AutoTips/index.js';
|
|
28
|
+
import '../Loading/index.js';
|
|
29
|
+
import '@para-ui/icons/LoadingF';
|
|
30
|
+
import '../_verture/useGlobalProps-1b846a65.js';
|
|
31
|
+
import '@para-ui/core/GlobalContext';
|
|
32
|
+
import '../_verture/index-77f9e0fb.js';
|
|
33
|
+
import 'rc-dropdown';
|
|
34
|
+
import '../_verture/usePopupContainer-87febeb9.js';
|
|
35
|
+
import 'dayjs';
|
|
36
|
+
import '@para-ui/icons/Delete';
|
|
37
|
+
import '@para-ui/icons/PlusCircleF';
|
|
38
|
+
import '../_verture/useFormatMessage-703f8b20.js';
|
|
39
|
+
|
|
40
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-input-lang {\n display: inline-block;\n width: 100%;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v3-input-lang .input-lang-text-field > .text-field-content > .text-field-content-after {\n cursor: pointer;\n}\n.paraui-v3-input-lang .input-lang-text-field > .text-field-content > .text-field-content-after .lang-list-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-v3-input-lang .input-lang-text-field > .paraui-v3-helper-text {\n display: none;\n}\n\n.paraui-v3-input-lang-popover > .component-popover-content > .component-popover-inner {\n padding: 12px;\n width: 300px;\n line-height: 0;\n}\n.paraui-v3-input-lang-popover > .component-popover-content > .component-popover-inner .input-lang-multi-box {\n padding-bottom: 0;\n}\n.paraui-v3-input-lang-popover.paraui-v3-input-lang-popover-disabled-add > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-add {\n display: none;\n}\n.paraui-v3-input-lang-popover.paraui-v3-input-lang-popover-disabled-delete > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-content > .multi-box-content-item .opera-box {\n display: none;\n}";
|
|
41
|
+
styleInject(css_248z);
|
|
42
|
+
|
|
43
|
+
var InputLang = function InputLang(props) {
|
|
44
|
+
var _props$className = props.className,
|
|
45
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
46
|
+
style = props.style,
|
|
47
|
+
_props$label = props.label,
|
|
48
|
+
label = _props$label === void 0 ? '' : _props$label,
|
|
49
|
+
labelTooltip = props.labelTooltip,
|
|
50
|
+
_props$size = props.size,
|
|
51
|
+
size = _props$size === void 0 ? 'large' : _props$size,
|
|
52
|
+
_props$placeholder = props.placeholder,
|
|
53
|
+
placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
|
|
54
|
+
_props$placeholderKey = props.placeholderKey,
|
|
55
|
+
placeholderKey = _props$placeholderKey === void 0 ? '' : _props$placeholderKey,
|
|
56
|
+
_props$placeholderVal = props.placeholderValue,
|
|
57
|
+
placeholderValue = _props$placeholderVal === void 0 ? '' : _props$placeholderVal,
|
|
58
|
+
_props$error = props.error,
|
|
59
|
+
error = _props$error === void 0 ? false : _props$error,
|
|
60
|
+
hideErrorDom = props.hideErrorDom,
|
|
61
|
+
_props$helperText = props.helperText,
|
|
62
|
+
helperText = _props$helperText === void 0 ? '' : _props$helperText,
|
|
63
|
+
_props$required = props.required,
|
|
64
|
+
required = _props$required === void 0 ? false : _props$required,
|
|
65
|
+
popoverClassName = props.popoverClassName,
|
|
66
|
+
value = props.value,
|
|
67
|
+
onChange = props.onChange,
|
|
68
|
+
_props$langList = props.langList,
|
|
69
|
+
langList = _props$langList === void 0 ? ['zh', 'en'] : _props$langList,
|
|
70
|
+
_props$disabled = props.disabled,
|
|
71
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
72
|
+
defaultLang = props.defaultLang,
|
|
73
|
+
disabledDelete = props.disabledDelete,
|
|
74
|
+
disabledAdd = props.disabledAdd,
|
|
75
|
+
disabledKey = props.disabledKey;
|
|
76
|
+
var _useState = useState(false),
|
|
77
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
78
|
+
open = _useState2[0],
|
|
79
|
+
setOpen = _useState2[1]; // 打开弹窗
|
|
80
|
+
var _useState3 = useState(GetLanguage() || 'zh'),
|
|
81
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
82
|
+
lang = _useState4[0],
|
|
83
|
+
setLang = _useState4[1]; // 当前语言
|
|
84
|
+
var _useState5 = useState({}),
|
|
85
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
86
|
+
langMapping = _useState6[0],
|
|
87
|
+
setLangMapping = _useState6[1];
|
|
88
|
+
var _useState7 = useState({}),
|
|
89
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
90
|
+
valueCom = _useState8[0],
|
|
91
|
+
setValueCom = _useState8[1];
|
|
92
|
+
var _useState9 = useState([]),
|
|
93
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
94
|
+
valueListLang = _useState10[0],
|
|
95
|
+
setValueListLang = _useState10[1]; // 多值框值
|
|
96
|
+
var constData = useRef({
|
|
97
|
+
lang: lang,
|
|
98
|
+
valueCom: valueCom,
|
|
99
|
+
langMapping: {},
|
|
100
|
+
langLabelMapping: {}
|
|
101
|
+
});
|
|
102
|
+
constData.current.lang = lang;
|
|
103
|
+
constData.current.disabledDelete = disabledDelete;
|
|
104
|
+
useEffect(function () {
|
|
105
|
+
if (props.defaultValue !== undefined) {
|
|
106
|
+
handValue(props.defaultValue);
|
|
107
|
+
}
|
|
108
|
+
}, []);
|
|
109
|
+
useEffect(function () {
|
|
110
|
+
if (value !== undefined) {
|
|
111
|
+
handValue(value);
|
|
112
|
+
}
|
|
113
|
+
}, [value]);
|
|
114
|
+
useEffect(function () {
|
|
115
|
+
if (defaultLang !== undefined) {
|
|
116
|
+
setLang(defaultLang);
|
|
117
|
+
constData.current.lang = defaultLang;
|
|
118
|
+
handValue();
|
|
119
|
+
}
|
|
120
|
+
}, [defaultLang]);
|
|
121
|
+
useEffect(function () {
|
|
122
|
+
if (langList) {
|
|
123
|
+
var obj = {};
|
|
124
|
+
var objLabel = {};
|
|
125
|
+
for (var i = 0, l = langList.length; i < l; i++) {
|
|
126
|
+
var item = langList[i];
|
|
127
|
+
if (typeof item === "string") {
|
|
128
|
+
obj[item] = {
|
|
129
|
+
label: item,
|
|
130
|
+
value: item
|
|
131
|
+
};
|
|
132
|
+
objLabel[item] = {
|
|
133
|
+
label: item,
|
|
134
|
+
value: item
|
|
135
|
+
};
|
|
136
|
+
} else {
|
|
137
|
+
obj[item.value] = item;
|
|
138
|
+
objLabel[item.label] = item;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
constData.current.langMapping = obj;
|
|
142
|
+
constData.current.langLabelMapping = objLabel;
|
|
143
|
+
setLangMapping(obj);
|
|
144
|
+
handValue();
|
|
145
|
+
}
|
|
146
|
+
}, [props.langList]);
|
|
147
|
+
/**
|
|
148
|
+
* 处理值
|
|
149
|
+
*/
|
|
150
|
+
var handValue = function handValue(val) {
|
|
151
|
+
var valueCopy = Object.assign({}, val || constData.current.valueCom);
|
|
152
|
+
var arr = [];
|
|
153
|
+
var json = {};
|
|
154
|
+
if (constData.current.disabledDelete) {
|
|
155
|
+
var keyArr = Object.keys(constData.current.langMapping) || [];
|
|
156
|
+
for (var i = 0, l = keyArr.length; i < l; i++) {
|
|
157
|
+
var keyItem = constData.current.langMapping[keyArr[i]] || {};
|
|
158
|
+
var key = keyItem.value;
|
|
159
|
+
var _label = keyItem.label;
|
|
160
|
+
var _val = valueCopy[key];
|
|
161
|
+
if (key !== constData.current.lang) {
|
|
162
|
+
json[key] = true;
|
|
163
|
+
arr.push({
|
|
164
|
+
label: _label,
|
|
165
|
+
value: _val || ''
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
var valueCopyArr = Object.keys(valueCopy);
|
|
171
|
+
for (var _i = 0, _l = valueCopyArr.length; _i < _l; _i++) {
|
|
172
|
+
var _key = valueCopyArr[_i];
|
|
173
|
+
var item = valueCopy[_key];
|
|
174
|
+
// 不存在设置过,且不是当前语言
|
|
175
|
+
if (!json[_key] && _key !== constData.current.lang) {
|
|
176
|
+
var itemDetail = constData.current.langMapping[_key] || {};
|
|
177
|
+
arr.push({
|
|
178
|
+
label: itemDetail.label || _key,
|
|
179
|
+
value: item || ''
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
constData.current.valueCom = Object.assign({}, valueCopy);
|
|
184
|
+
setValueListLang(arr);
|
|
185
|
+
setValueCom(valueCopy);
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* 向外抛值
|
|
189
|
+
* */
|
|
190
|
+
var outValue = function outValue(val) {
|
|
191
|
+
if (props.value === undefined) {
|
|
192
|
+
constData.current.valueCom = Object.assign({}, val);
|
|
193
|
+
setValueCom(val);
|
|
194
|
+
}
|
|
195
|
+
onChange && onChange(val);
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* 改变当前语言
|
|
199
|
+
* @param event
|
|
200
|
+
*/
|
|
201
|
+
var changeValue = function changeValue(event) {
|
|
202
|
+
valueCom[lang] = event.target.value;
|
|
203
|
+
var val = Object.assign({}, valueCom);
|
|
204
|
+
outValue(val);
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* 改变弹窗语言值
|
|
208
|
+
* @param val
|
|
209
|
+
*/
|
|
210
|
+
var changeListLang = function changeListLang(val) {
|
|
211
|
+
setValueListLang(_toConsumableArray(val));
|
|
212
|
+
};
|
|
213
|
+
/** 模糊搜索 */
|
|
214
|
+
var fetchSuggestionsKey = function fetchSuggestionsKey(val, cb) {
|
|
215
|
+
var _a;
|
|
216
|
+
var arr = [];
|
|
217
|
+
var jsonMapping = ArrayToObject('label', valueListLang);
|
|
218
|
+
for (var i = 0, l = langList.length; i < l; i++) {
|
|
219
|
+
var item = langList[i];
|
|
220
|
+
if (_typeof(item) === "object") {
|
|
221
|
+
item = item.label;
|
|
222
|
+
}
|
|
223
|
+
if (!jsonMapping[item] && item !== (((_a = langMapping[lang]) === null || _a === void 0 ? void 0 : _a.label) || lang)) arr.push({
|
|
224
|
+
label: item,
|
|
225
|
+
value: item
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
cb(arr);
|
|
229
|
+
};
|
|
230
|
+
/** 点击国际化图标 */
|
|
231
|
+
var clickAfter = function clickAfter() {
|
|
232
|
+
setOpen(true);
|
|
233
|
+
};
|
|
234
|
+
/** 关闭弹窗 */
|
|
235
|
+
var handleClose = function handleClose(bol) {
|
|
236
|
+
var _a;
|
|
237
|
+
if (bol) return;
|
|
238
|
+
setOpen(false);
|
|
239
|
+
// 向外抛值
|
|
240
|
+
var json = {};
|
|
241
|
+
json[lang] = valueCom[lang] || '';
|
|
242
|
+
for (var i = 0, l = valueListLang.length; i < l; i++) {
|
|
243
|
+
var item = valueListLang[i];
|
|
244
|
+
var _label2 = ((_a = constData.current.langLabelMapping[item.label]) === null || _a === void 0 ? void 0 : _a.value) || item.label || '';
|
|
245
|
+
if (_label2.trim() !== '') json[_label2] = item.value || '';
|
|
246
|
+
}
|
|
247
|
+
outValue(json);
|
|
248
|
+
};
|
|
249
|
+
/** 当前语言 */
|
|
250
|
+
var AddonBeforeMemo = function AddonBeforeMemo() {
|
|
251
|
+
var _a;
|
|
252
|
+
return jsx("div", {
|
|
253
|
+
children: ((_a = langMapping[lang]) === null || _a === void 0 ? void 0 : _a.label) || lang
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
/** 加载更多语言 */
|
|
257
|
+
var AddonAfterMemo = useMemo(function () {
|
|
258
|
+
return jsx("div", Object.assign({
|
|
259
|
+
className: "lang-list-icon"
|
|
260
|
+
}, {
|
|
261
|
+
children: jsx(Application, {})
|
|
262
|
+
}));
|
|
263
|
+
}, []);
|
|
264
|
+
/** 处理弹出框className */
|
|
265
|
+
var popoverHandClass = function popoverHandClass() {
|
|
266
|
+
var str = $prefixCls + '-input-lang-popover';
|
|
267
|
+
if (popoverClassName) str += ' ' + popoverClassName;
|
|
268
|
+
if (disabledAdd) str += " ".concat($prefixCls, "-input-lang-popover-disabled-add");
|
|
269
|
+
if (disabledDelete) str += " ".concat($prefixCls, "-input-lang-popover-disabled-delete");
|
|
270
|
+
return str;
|
|
271
|
+
};
|
|
272
|
+
var handleDisabled = function handleDisabled() {
|
|
273
|
+
if (disabled === true) return;
|
|
274
|
+
var arr = [];
|
|
275
|
+
if (disabledKey) {
|
|
276
|
+
var bol = _typeof(disabledKey) === 'object';
|
|
277
|
+
for (var i = 0, l = valueListLang.length; i < l; i++) {
|
|
278
|
+
var _label3 = valueListLang[i].label || '';
|
|
279
|
+
var labelDetail = constData.current.langLabelMapping[_label3] || {};
|
|
280
|
+
if (bol) {
|
|
281
|
+
arr.push(_defineProperty({}, _label3, disabledKey.indexOf(labelDetail.value || _label3) !== -1));
|
|
282
|
+
} else {
|
|
283
|
+
if (_label3.trim() !== '') {
|
|
284
|
+
arr.push(_defineProperty({}, _label3, true));
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return arr;
|
|
290
|
+
};
|
|
291
|
+
/** 弹窗列表内容 */
|
|
292
|
+
var langListPopoverContent = function langListPopoverContent() {
|
|
293
|
+
return jsx("div", Object.assign({
|
|
294
|
+
className: "input-lang-list"
|
|
295
|
+
}, {
|
|
296
|
+
children: jsx(MultiBox, {
|
|
297
|
+
className: 'input-lang-multi-box',
|
|
298
|
+
size: size,
|
|
299
|
+
disabled: handleDisabled(),
|
|
300
|
+
value: valueListLang,
|
|
301
|
+
onChange: changeListLang,
|
|
302
|
+
fetchSuggestionsKey: fetchSuggestionsKey,
|
|
303
|
+
placeholderKey: placeholderKey,
|
|
304
|
+
placeholderValue: placeholderValue
|
|
305
|
+
})
|
|
306
|
+
}));
|
|
307
|
+
};
|
|
308
|
+
/**
|
|
309
|
+
* 处理class
|
|
310
|
+
* @return {string}
|
|
311
|
+
*/
|
|
312
|
+
var handClass = function handClass() {
|
|
313
|
+
var str = $prefixCls + '-input-lang';
|
|
314
|
+
if (size) str += " ".concat($prefixCls, "-input-lang-").concat(size);
|
|
315
|
+
if (error) str += " ".concat($prefixCls, "-input-lang-error");
|
|
316
|
+
if (className) str += ' ' + className;
|
|
317
|
+
return str;
|
|
318
|
+
};
|
|
319
|
+
return jsxs("div", Object.assign({
|
|
320
|
+
className: handClass(),
|
|
321
|
+
style: style
|
|
322
|
+
}, {
|
|
323
|
+
children: [jsx(Popover, Object.assign({
|
|
324
|
+
placement: "bottom-end",
|
|
325
|
+
visible: open,
|
|
326
|
+
content: langListPopoverContent(),
|
|
327
|
+
onVisibleChange: handleClose,
|
|
328
|
+
overlayClassName: popoverHandClass()
|
|
329
|
+
}, {
|
|
330
|
+
children: jsx(TextField, {
|
|
331
|
+
className: 'input-lang-text-field',
|
|
332
|
+
size: size,
|
|
333
|
+
error: error,
|
|
334
|
+
disabled: disabled,
|
|
335
|
+
required: required,
|
|
336
|
+
label: label,
|
|
337
|
+
labelTooltip: labelTooltip,
|
|
338
|
+
placeholder: placeholder,
|
|
339
|
+
value: valueCom[lang] || '',
|
|
340
|
+
addonAfter: AddonAfterMemo,
|
|
341
|
+
addonBefore: AddonBeforeMemo(),
|
|
342
|
+
hideErrorDom: true,
|
|
343
|
+
onClickAddonAfter: clickAfter,
|
|
344
|
+
onChange: changeValue
|
|
345
|
+
})
|
|
346
|
+
})), jsx(HelperText, {
|
|
347
|
+
className: "input-lang-error-text",
|
|
348
|
+
error: error,
|
|
349
|
+
helperText: helperText,
|
|
350
|
+
hideErrorDom: hideErrorDom
|
|
351
|
+
})]
|
|
352
|
+
}));
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
export { InputLang, InputLang as default };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/11 13:53
|
|
4
|
+
* @description 数字输入框
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { LabelTooltipProps } from "../Label";
|
|
8
|
+
import { HelperTextDetailProps } from "../HelperText";
|
|
9
|
+
import './index.scss';
|
|
10
|
+
export interface InputNumberProps extends HelperTextDetailProps {
|
|
11
|
+
/** 样式class */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** style */
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
/** 大小 */
|
|
16
|
+
size?: 'small' | 'medium' | 'large';
|
|
17
|
+
/** 间隔 */
|
|
18
|
+
step?: number;
|
|
19
|
+
/** 最大值 */
|
|
20
|
+
max?: number;
|
|
21
|
+
/** 最小值 */
|
|
22
|
+
min?: number;
|
|
23
|
+
/** 标题 */
|
|
24
|
+
label?: ReactNode;
|
|
25
|
+
/** 标题在外,还是在内 */
|
|
26
|
+
labelMode?: 'outside' | 'inside';
|
|
27
|
+
/** 标题提示 */
|
|
28
|
+
labelSign?: ReactNode;
|
|
29
|
+
/** 帮组提示信息 */
|
|
30
|
+
labelTooltip?: LabelTooltipProps;
|
|
31
|
+
/** 提示语 */
|
|
32
|
+
placeholder?: ReactNode;
|
|
33
|
+
/** 按钮模式 左右/上下/无 */
|
|
34
|
+
btnMode?: 'lr' | 'tb' | 'none';
|
|
35
|
+
/** 是否禁用 */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** 禁用加 */
|
|
38
|
+
disabledAdd?: boolean;
|
|
39
|
+
/** 禁用减 */
|
|
40
|
+
disabledReduce?: boolean;
|
|
41
|
+
/** 是否必填 */
|
|
42
|
+
required?: boolean;
|
|
43
|
+
/** 是否启用键盘快捷行为 */
|
|
44
|
+
keyboard?: boolean;
|
|
45
|
+
/** 是否自动获取焦点 */
|
|
46
|
+
autoFocus?: boolean;
|
|
47
|
+
/** 只读 */
|
|
48
|
+
readOnly?: boolean;
|
|
49
|
+
/** 指定输入框展示值的格式 */
|
|
50
|
+
formatter?: (value: number | string, info: {
|
|
51
|
+
userTyping: boolean;
|
|
52
|
+
input: string;
|
|
53
|
+
}) => string;
|
|
54
|
+
/** 指定从 formatter 里转换回数字的方式,和 formatter 搭配使用 */
|
|
55
|
+
parser?: (displayValue: string) => number;
|
|
56
|
+
/** 默认值 不受控 */
|
|
57
|
+
defaultValue?: number | null;
|
|
58
|
+
/** 默认值 受控 */
|
|
59
|
+
value?: number | null;
|
|
60
|
+
/** 改变事件 number / null */
|
|
61
|
+
onChange?: (value: any) => void;
|
|
62
|
+
/** 回车事件 */
|
|
63
|
+
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
64
|
+
/** 失去焦点 */
|
|
65
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
66
|
+
/** 得到焦点 */
|
|
67
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
68
|
+
[name: string]: any;
|
|
69
|
+
}
|
|
70
|
+
export declare const InputNumber: FunctionComponent<InputNumberProps>;
|
|
71
|
+
export default InputNumber;
|