@nutui/nutui-react 0.1.1 → 1.1.0-beta.0
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/CHANGELOG.md +8 -0
- package/README.md +120 -55
- package/dist/esm/ActionSheet/style/css.js +1 -0
- package/dist/esm/ActionSheet/style/index.js +1 -1
- package/dist/esm/ActionSheet.js +1 -10
- package/dist/esm/Address/style/css.js +1 -0
- package/dist/esm/Address/style/index.js +1 -1
- package/dist/esm/Address.js +34 -0
- package/dist/esm/AnimatingNumbers/style/css.js +1 -0
- package/dist/esm/AnimatingNumbers/style/index.js +1 -1
- package/dist/esm/Avatar/style/css.js +1 -0
- package/dist/esm/Avatar/style/index.js +1 -1
- package/dist/esm/BackTop/style/css.js +1 -0
- package/dist/esm/BackTop/style/index.js +1 -1
- package/dist/esm/Badge/style/css.js +1 -0
- package/dist/esm/Badge/style/index.js +1 -1
- package/dist/esm/Barrage/style/css.js +1 -0
- package/dist/esm/Barrage/style/index.js +1 -1
- package/dist/esm/Barrage.js +1 -0
- package/dist/esm/Button/style/css.js +1 -0
- package/dist/esm/Button/style/index.js +1 -1
- package/dist/esm/Button.js +110 -4
- package/dist/esm/Calendar/style/css.js +1 -0
- package/dist/esm/Calendar/style/index.js +1 -1
- package/dist/esm/CalendarItem/style/css.js +1 -0
- package/dist/esm/CalendarItem/style/index.js +1 -1
- package/dist/esm/Cell/style/css.js +1 -0
- package/dist/esm/Cell/style/index.js +1 -1
- package/dist/esm/Cell.js +1 -1
- package/dist/esm/CellGroup/style/css.js +1 -0
- package/dist/esm/CellGroup/style/index.js +1 -1
- package/dist/esm/Checkbox/style/css.js +1 -0
- package/dist/esm/Checkbox/style/index.js +1 -1
- package/dist/esm/CheckboxGroup/style/css.js +1 -0
- package/dist/esm/CheckboxGroup/style/index.js +1 -1
- package/dist/esm/CircleProgress/style/css.js +1 -0
- package/dist/esm/CircleProgress/style/index.js +1 -1
- package/dist/esm/Col/style/css.js +1 -0
- package/dist/esm/Col/style/index.js +1 -1
- package/dist/esm/Collapse/style/css.js +1 -0
- package/dist/esm/Collapse/style/index.js +1 -1
- package/dist/esm/CollapseItem/style/css.js +1 -0
- package/dist/esm/CollapseItem/style/index.js +1 -1
- package/dist/esm/Dialog/style/css.js +1 -0
- package/dist/esm/Dialog/style/index.js +1 -1
- package/dist/esm/Divider/style/css.js +1 -0
- package/dist/esm/Divider/style/index.js +1 -1
- package/dist/esm/Drag/style/css.js +1 -0
- package/dist/esm/Drag/style/index.js +1 -1
- package/dist/esm/Drag.js +11 -30
- package/dist/esm/Elevator/style/css.js +1 -0
- package/dist/esm/Elevator/style/index.js +1 -1
- package/dist/esm/FixedNav/style/css.js +1 -0
- package/dist/esm/FixedNav/style/index.js +1 -1
- package/dist/esm/FixedNav.js +7 -7
- package/dist/esm/Icon/style/css.js +1 -0
- package/dist/esm/Icon/style/index.js +1 -1
- package/dist/esm/Icon.js +70 -4
- package/dist/esm/Infiniteloading/style/css.js +1 -0
- package/dist/esm/Infiniteloading/style/index.js +1 -1
- package/dist/esm/Input/style/css.js +1 -0
- package/dist/esm/Input/style/index.js +1 -1
- package/dist/esm/InputNumber/style/css.js +1 -0
- package/dist/esm/InputNumber/style/index.js +1 -1
- package/dist/esm/Layout/style/css.js +1 -0
- package/dist/esm/Layout/style/index.js +1 -1
- package/dist/esm/NavBar/style/css.js +1 -0
- package/dist/esm/NavBar/style/index.js +1 -1
- package/dist/esm/NoticeBar/style/css.js +1 -0
- package/dist/esm/NoticeBar/style/index.js +1 -1
- package/dist/esm/Notify/style/css.js +1 -0
- package/dist/esm/Notify/style/index.js +1 -1
- package/dist/esm/Overlay/style/css.js +1 -0
- package/dist/esm/Overlay/style/index.js +1 -1
- package/dist/esm/Pagination/style/css.js +1 -0
- package/dist/esm/Pagination/style/index.js +1 -1
- package/dist/esm/Picker/style/css.js +1 -0
- package/dist/esm/Picker/style/index.js +1 -1
- package/dist/esm/Picker.js +0 -3
- package/dist/esm/Popover/style/css.js +1 -0
- package/dist/esm/Popover/style/index.js +1 -1
- package/dist/esm/Popup/style/css.js +1 -0
- package/dist/esm/Popup/style/index.js +1 -1
- package/dist/esm/Popup.js +2 -1
- package/dist/esm/Price/style/css.js +1 -0
- package/dist/esm/Price/style/index.js +1 -1
- package/dist/esm/Radio/style/css.js +1 -0
- package/dist/esm/Radio/style/index.js +1 -1
- package/dist/esm/RadioGroup/style/css.js +1 -0
- package/dist/esm/RadioGroup/style/index.js +1 -1
- package/dist/esm/Range/style/css.js +1 -0
- package/dist/esm/Range/style/index.js +1 -1
- package/dist/esm/Range.js +1 -4
- package/dist/esm/Rate/style/css.js +1 -0
- package/dist/esm/Rate/style/index.js +1 -1
- package/dist/esm/Row/style/css.js +1 -0
- package/dist/esm/Row/style/index.js +1 -1
- package/dist/esm/ShortPassword/style/css.js +1 -0
- package/dist/esm/ShortPassword/style/index.js +1 -1
- package/dist/esm/Signature/style/css.js +1 -0
- package/dist/esm/Signature/style/index.js +1 -1
- package/dist/esm/Signature.js +1 -2
- package/dist/esm/Step/style/css.js +1 -0
- package/dist/esm/Step/style/index.js +1 -1
- package/dist/esm/Steps/style/css.js +1 -0
- package/dist/esm/Steps/style/index.js +1 -1
- package/dist/esm/Swiper/style/css.js +1 -0
- package/dist/esm/Swiper/style/index.js +1 -1
- package/dist/esm/SwiperItem/style/css.js +1 -0
- package/dist/esm/SwiperItem/style/index.js +1 -1
- package/dist/esm/Switch/style/css.js +1 -0
- package/dist/esm/Switch/style/index.js +1 -1
- package/dist/esm/Tabbar/style/css.js +1 -0
- package/dist/esm/Tabbar/style/index.js +1 -1
- package/dist/esm/TabbarItem/style/css.js +1 -0
- package/dist/esm/TabbarItem/style/index.js +1 -1
- package/dist/esm/Tag/style/css.js +1 -0
- package/dist/esm/Tag/style/index.js +1 -1
- package/dist/esm/TextArea/style/css.js +1 -0
- package/dist/esm/TextArea/style/index.js +1 -1
- package/dist/esm/Toast/style/css.js +1 -0
- package/dist/esm/Toast/style/index.js +1 -1
- package/dist/esm/Toast.js +294 -7
- package/dist/esm/Uploader/style/css.js +1 -0
- package/dist/esm/Uploader/style/index.js +1 -1
- package/dist/esm/nutui-react.es.js +22 -22
- package/dist/nutui.react.es.js +10348 -10346
- package/dist/nutui.react.umd.js +19 -19
- package/dist/packages/cell/cell.scss +2 -0
- package/dist/packages/dialog/dialog.scss +8 -0
- package/dist/packages/fixednav/fixednav.scss +3 -0
- package/dist/packages/infiniteloading/infiniteloading.scss +1 -0
- package/dist/packages/input/input.scss +1 -0
- package/dist/packages/inputnumber/inputnumber.scss +1 -0
- package/dist/packages/range/range.scss +1 -0
- package/dist/packages/signature/signature.scss +1 -0
- package/dist/packages/step/step.scss +1 -0
- package/dist/packages/tag/tag.scss +1 -0
- package/dist/packages/toast/toast.scss +2 -0
- package/dist/packages/uploader/uploader.scss +2 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +22 -22
- package/dist/styles/variables.scss +3 -3
- package/dist/{esm/types/src/packages → types}/actionsheet/actionsheet.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/actionsheet/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/address/address.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/address/customRender.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/address/existRender.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/address/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/animatingnumbers/animatingnumbers.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/animatingnumbers/countup.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/animatingnumbers/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/avatar/avatar.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/avatar/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/backtop/backtop.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/backtop/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/badge/badge.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/badge/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/barrage/barrage.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/barrage/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/button/button.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/button/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/calendar/calendar.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/calendar/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/calendaritem/calendaritem.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/calendaritem/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/cell/cell.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/cell/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/cellgroup/cellgroup.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/cellgroup/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/checkbox/checkbox.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/checkbox/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/checkboxgroup/checkboxgroup.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/checkboxgroup/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/circleprogress/circleprogress.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/circleprogress/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/col/col.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/col/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/collapse/collapse.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/collapse/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/collapseitem/collapseitem.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/collapseitem/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/dialog/Confirm.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/dialog/Content.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/dialog/DialogWrap.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/dialog/DialogWrapper.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/dialog/Mask.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/dialog/config.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/dialog/dialog.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/dialog/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/divider/divider.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/divider/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/drag/drag.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/drag/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/elevator/elevator.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/elevator/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/fixednav/fixednav.d.ts +2 -2
- package/dist/{esm/types/src/packages → types}/fixednav/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/icon/icon.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/icon/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/infiniteloading/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/infiniteloading/infiniteloading.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/input/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/input/input.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/input/util.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/inputnumber/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/inputnumber/inputnumber.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/layout/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/layout/layout.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/navbar/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/navbar/navbar.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/noticebar/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/noticebar/noticebar.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/notify/Notification.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/notify/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/notify/notify.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/nutui.react.d.ts +23 -23
- package/dist/{esm/types/src/packages → types}/overlay/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/overlay/overlay.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/pagination/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/pagination/pagination.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/picker/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/picker/picker.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/picker/pickerSlot.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/popover/Trigger.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/popover/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/popover/popover.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/popup/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/popup/popup.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/price/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/price/price.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/radio/context.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/radio/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/radio/radio.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/radiogroup/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/radiogroup/radiogroup.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/range/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/range/range.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/rate/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/rate/rate.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/row/UserContext.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/row/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/row/row.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/shortpassword/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/shortpassword/shortpassword.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/signature/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/signature/signature.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/step/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/step/step.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/steps/UserContext.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/steps/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/steps/steps.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/swiper/UserContext.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/swiper/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/swiper/swiper.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/swiperitem/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/swiperitem/swiperitem.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/switch/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/switch/switch.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/tabbar/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/tabbar/tabbar.d.ts +0 -0
- package/dist/types/tabbaritem/index.d.ts +2 -0
- package/dist/{esm/types/src/packages/tabbaritem/tabbarItem.d.ts → types/tabbaritem/tabbaritem.d.ts} +0 -0
- package/dist/{esm/types/src/packages → types}/tag/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/tag/tag.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/textarea/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/textarea/textarea.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/toast/Notification.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/toast/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/toast/toast.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/uploader/index.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/uploader/upload.d.ts +0 -0
- package/dist/{esm/types/src/packages → types}/uploader/uploader.d.ts +0 -0
- package/package.json +12 -12
- package/dist/esm/button-345fb015.js +0 -110
- package/dist/esm/icon-63c0d58f.js +0 -70
- package/dist/esm/toast-420b65b7.js +0 -294
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +0 -56
- package/dist/esm/types/src/packages/tabbaritem/index.d.ts +0 -2
- package/dist/esm/types/src/utils/bem.d.ts +0 -2
- package/dist/esm/types/src/utils/create/bem.d.ts +0 -2
- package/dist/esm/types/src/utils/create/index.d.ts +0 -1
- package/dist/esm/types/src/utils/date.d.ts +0 -49
- package/dist/esm/types/src/utils/index.d.ts +0 -1
- package/dist/esm/types/src/utils/raf.d.ts +0 -2
- package/dist/esm/types/src/utils/useRect/index.d.ts +0 -17
- package/dist/esm/types/src/utils/useTouch/index.d.ts +0 -16
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["color", "shape", "plain", "loading", "disabled", "type", "size", "block", "icon", "children", "onClick", "className", "style"];
|
|
5
|
-
|
|
6
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
-
|
|
8
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
9
|
-
|
|
10
|
-
import React__default, { useState, useEffect } from 'react';
|
|
11
|
-
import Icon from './Icon.js';
|
|
12
|
-
var defaultProps = {
|
|
13
|
-
className: '',
|
|
14
|
-
color: '',
|
|
15
|
-
shape: 'round',
|
|
16
|
-
plain: false,
|
|
17
|
-
loading: false,
|
|
18
|
-
disabled: false,
|
|
19
|
-
type: 'default',
|
|
20
|
-
size: 'normal',
|
|
21
|
-
block: false,
|
|
22
|
-
icon: '',
|
|
23
|
-
style: {},
|
|
24
|
-
children: undefined,
|
|
25
|
-
onClick: function onClick(e) {}
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
var Button = function Button(props) {
|
|
29
|
-
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
30
|
-
color = _defaultProps$props.color,
|
|
31
|
-
shape = _defaultProps$props.shape,
|
|
32
|
-
plain = _defaultProps$props.plain,
|
|
33
|
-
loading = _defaultProps$props.loading,
|
|
34
|
-
disabled = _defaultProps$props.disabled,
|
|
35
|
-
type = _defaultProps$props.type,
|
|
36
|
-
size = _defaultProps$props.size,
|
|
37
|
-
block = _defaultProps$props.block,
|
|
38
|
-
icon = _defaultProps$props.icon,
|
|
39
|
-
children = _defaultProps$props.children,
|
|
40
|
-
onClick = _defaultProps$props.onClick,
|
|
41
|
-
className = _defaultProps$props.className,
|
|
42
|
-
style = _defaultProps$props.style,
|
|
43
|
-
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
44
|
-
|
|
45
|
-
var _useState = useState(''),
|
|
46
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
47
|
-
btnName = _useState2[0],
|
|
48
|
-
setBtnName = _useState2[1];
|
|
49
|
-
|
|
50
|
-
var _useState3 = useState({}),
|
|
51
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
52
|
-
btnStyle = _useState4[0],
|
|
53
|
-
setBtnStyle = _useState4[1];
|
|
54
|
-
|
|
55
|
-
useEffect(function () {
|
|
56
|
-
setBtnName(classes());
|
|
57
|
-
setBtnStyle(getStyle());
|
|
58
|
-
}, [className, color, shape, plain, loading, disabled, style, type, size, block, icon, children, onClick]);
|
|
59
|
-
|
|
60
|
-
var classes = function classes() {
|
|
61
|
-
var prefixCls = 'nut-button';
|
|
62
|
-
return "".concat(prefixCls, " ").concat(type ? "".concat(prefixCls, "--").concat(type) : '', "\n ").concat(size ? "".concat(prefixCls, "--").concat(size) : '', "\n ").concat(shape ? "".concat(prefixCls, "--").concat(shape) : '', "\n ").concat(plain ? "".concat(prefixCls, "--plain") : '', "\n ").concat(block ? "".concat(prefixCls, "--block") : '', "\n ").concat(disabled ? "".concat(prefixCls, "--disabled") : '', "\n ").concat(loading ? "".concat(prefixCls, "--loading") : '');
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
var handleClick = function handleClick(e) {
|
|
66
|
-
if (!loading && !disabled && onClick) {
|
|
67
|
-
onClick(e);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
var getStyle = function getStyle() {
|
|
72
|
-
var style = {};
|
|
73
|
-
|
|
74
|
-
if (color) {
|
|
75
|
-
if (plain) {
|
|
76
|
-
style.color = color;
|
|
77
|
-
style.background = '#fff';
|
|
78
|
-
|
|
79
|
-
if (!(color !== null && color !== void 0 && color.includes('gradient'))) {
|
|
80
|
-
style.borderColor = color;
|
|
81
|
-
}
|
|
82
|
-
} else {
|
|
83
|
-
style.color = '#fff';
|
|
84
|
-
style.background = color;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return style;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
return React__default.createElement("div", _objectSpread(_objectSpread({
|
|
92
|
-
className: "".concat(btnName, " ").concat(className),
|
|
93
|
-
style: _objectSpread(_objectSpread({}, btnStyle), style)
|
|
94
|
-
}, rest), {}, {
|
|
95
|
-
onClick: function onClick(e) {
|
|
96
|
-
return handleClick(e);
|
|
97
|
-
}
|
|
98
|
-
}), React__default.createElement("div", {
|
|
99
|
-
className: "nut-button__warp",
|
|
100
|
-
style: getStyle()
|
|
101
|
-
}, loading && React__default.createElement(Icon, {
|
|
102
|
-
name: "loading"
|
|
103
|
-
}), !loading && icon ? React__default.createElement(Icon, {
|
|
104
|
-
name: icon
|
|
105
|
-
}) : '', children));
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
Button.defaultProps = defaultProps;
|
|
109
|
-
Button.displayName = 'NutButton';
|
|
110
|
-
export { Button as B };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["name", "size", "classPrefix", "color", "tag", "children", "className", "style", "click"];
|
|
4
|
-
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
-
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
-
|
|
9
|
-
import React__default from 'react';
|
|
10
|
-
import { c as cn } from './bem-893ad28d.js';
|
|
11
|
-
var defaultProps = {
|
|
12
|
-
name: '',
|
|
13
|
-
size: '',
|
|
14
|
-
classPrefix: 'nutui-iconfont',
|
|
15
|
-
color: '',
|
|
16
|
-
tag: 'i',
|
|
17
|
-
click: function click(e) {},
|
|
18
|
-
className: ''
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
function pxCheck(value) {
|
|
22
|
-
return Number.isNaN(Number(value)) ? String(value) : "".concat(value, "px");
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var Icon = function Icon(props) {
|
|
26
|
-
var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props),
|
|
27
|
-
name = _defaultProps$props.name,
|
|
28
|
-
size = _defaultProps$props.size,
|
|
29
|
-
classPrefix = _defaultProps$props.classPrefix,
|
|
30
|
-
color = _defaultProps$props.color,
|
|
31
|
-
tag = _defaultProps$props.tag,
|
|
32
|
-
children = _defaultProps$props.children,
|
|
33
|
-
className = _defaultProps$props.className,
|
|
34
|
-
style = _defaultProps$props.style,
|
|
35
|
-
click = _defaultProps$props.click,
|
|
36
|
-
rest = _objectWithoutProperties(_defaultProps$props, _excluded);
|
|
37
|
-
|
|
38
|
-
var isImage = name ? name.indexOf('/') !== -1 : false;
|
|
39
|
-
var type = isImage ? 'img' : tag;
|
|
40
|
-
var b = cn('icon');
|
|
41
|
-
|
|
42
|
-
var handleClick = function handleClick(e) {
|
|
43
|
-
if (props.click) {
|
|
44
|
-
props.click(e);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var hasSrc = function hasSrc() {
|
|
49
|
-
if (isImage) return {
|
|
50
|
-
src: name
|
|
51
|
-
};
|
|
52
|
-
return {};
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return React__default.createElement(type, _objectSpread(_objectSpread({
|
|
56
|
-
className: isImage ? "".concat(className || '', " ").concat(b('img')) : "".concat(className || '', " ").concat(b(null, [classPrefix]), " nut-icon-").concat(name, " "),
|
|
57
|
-
style: _objectSpread({
|
|
58
|
-
color: color,
|
|
59
|
-
fontSize: pxCheck(size),
|
|
60
|
-
width: pxCheck(size),
|
|
61
|
-
height: pxCheck(size)
|
|
62
|
-
}, style)
|
|
63
|
-
}, rest), {}, {
|
|
64
|
-
onClick: handleClick
|
|
65
|
-
}, hasSrc()), children);
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
Icon.defaultProps = defaultProps;
|
|
69
|
-
Icon.displayName = 'NutIcon';
|
|
70
|
-
export { Icon as I };
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
4
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
|
|
9
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
-
|
|
11
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
-
|
|
13
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
-
|
|
15
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
-
|
|
17
|
-
import * as React from 'react';
|
|
18
|
-
import * as ReactDOM from 'react-dom';
|
|
19
|
-
import { c as cn } from './bem-893ad28d.js';
|
|
20
|
-
import { I as Icon } from './icon-63c0d58f.js';
|
|
21
|
-
import classNames from 'classnames';
|
|
22
|
-
|
|
23
|
-
var Notification = /*#__PURE__*/function (_React$PureComponent) {
|
|
24
|
-
_inherits(Notification, _React$PureComponent);
|
|
25
|
-
|
|
26
|
-
var _super = _createSuper(Notification);
|
|
27
|
-
|
|
28
|
-
function Notification(props) {
|
|
29
|
-
var _this;
|
|
30
|
-
|
|
31
|
-
_classCallCheck(this, Notification);
|
|
32
|
-
|
|
33
|
-
_this = _super.call(this, props);
|
|
34
|
-
|
|
35
|
-
_defineProperty(_assertThisInitialized(_this), "closeTimer", void 0);
|
|
36
|
-
|
|
37
|
-
_this.close = _this.close.bind(_assertThisInitialized(_this));
|
|
38
|
-
_this.startCloseTimer = _this.startCloseTimer.bind(_assertThisInitialized(_this));
|
|
39
|
-
_this.clearCloseTimer = _this.clearCloseTimer.bind(_assertThisInitialized(_this));
|
|
40
|
-
_this.close = _this.close.bind(_assertThisInitialized(_this));
|
|
41
|
-
_this.clickCover = _this.clickCover.bind(_assertThisInitialized(_this));
|
|
42
|
-
_this.state = {
|
|
43
|
-
show: true
|
|
44
|
-
};
|
|
45
|
-
return _this;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
_createClass(Notification, [{
|
|
49
|
-
key: "close",
|
|
50
|
-
value: function close() {
|
|
51
|
-
this.setState({
|
|
52
|
-
show: false
|
|
53
|
-
});
|
|
54
|
-
this.clearCloseTimer();
|
|
55
|
-
this.props.onClose();
|
|
56
|
-
}
|
|
57
|
-
}, {
|
|
58
|
-
key: "startCloseTimer",
|
|
59
|
-
value: function startCloseTimer() {
|
|
60
|
-
var _this2 = this;
|
|
61
|
-
|
|
62
|
-
var duration = this.props.duration;
|
|
63
|
-
|
|
64
|
-
if (duration) {
|
|
65
|
-
this.closeTimer = window.setTimeout(function () {
|
|
66
|
-
_this2.close();
|
|
67
|
-
}, duration * 1000);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}, {
|
|
71
|
-
key: "clearCloseTimer",
|
|
72
|
-
value: function clearCloseTimer() {
|
|
73
|
-
if (this.closeTimer) {
|
|
74
|
-
clearTimeout(this.closeTimer);
|
|
75
|
-
this.closeTimer = -1;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
key: "clickCover",
|
|
80
|
-
value: function clickCover() {
|
|
81
|
-
var closeOnClickOverlay = this.props.closeOnClickOverlay;
|
|
82
|
-
|
|
83
|
-
if (closeOnClickOverlay) {
|
|
84
|
-
this.close();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "componentDidMount",
|
|
89
|
-
value: function componentDidMount() {
|
|
90
|
-
this.startCloseTimer();
|
|
91
|
-
}
|
|
92
|
-
}, {
|
|
93
|
-
key: "componentWillUnmount",
|
|
94
|
-
value: function componentWillUnmount() {
|
|
95
|
-
this.clearCloseTimer();
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
key: "render",
|
|
99
|
-
value: function render() {
|
|
100
|
-
var _classNames,
|
|
101
|
-
_this3 = this;
|
|
102
|
-
|
|
103
|
-
var _this$props = this.props,
|
|
104
|
-
style = _this$props.style,
|
|
105
|
-
icon = _this$props.icon,
|
|
106
|
-
msg = _this$props.msg,
|
|
107
|
-
bottom = _this$props.bottom,
|
|
108
|
-
center = _this$props.center,
|
|
109
|
-
bgColor = _this$props.bgColor,
|
|
110
|
-
coverColor = _this$props.coverColor,
|
|
111
|
-
textAlignCenter = _this$props.textAlignCenter,
|
|
112
|
-
size = _this$props.size,
|
|
113
|
-
customClass = _this$props.customClass,
|
|
114
|
-
cover = _this$props.cover,
|
|
115
|
-
type = _this$props.type;
|
|
116
|
-
this.state;
|
|
117
|
-
var toastBem = cn('toast');
|
|
118
|
-
var classes = classNames((_classNames = {}, _defineProperty(_classNames, 'nut-toast-center', center), _defineProperty(_classNames, 'nut-toast-has-icon', icon), _defineProperty(_classNames, 'nut-toast-cover', cover), _defineProperty(_classNames, 'nut-toast-loading', type === 'loading'), _defineProperty(_classNames, "customClass", customClass), _defineProperty(_classNames, 'nut-toast-' + size, true), _classNames));
|
|
119
|
-
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
120
|
-
className: "".concat(toastBem(), " ").concat(classes),
|
|
121
|
-
style: {
|
|
122
|
-
bottom: center ? 'auto' : bottom + 'px',
|
|
123
|
-
backgroundColor: cover ? coverColor : ''
|
|
124
|
-
},
|
|
125
|
-
onClick: function onClick() {
|
|
126
|
-
_this3.clickCover();
|
|
127
|
-
}
|
|
128
|
-
}, React.createElement("div", {
|
|
129
|
-
className: toastBem('inner'),
|
|
130
|
-
style: {
|
|
131
|
-
textAlign: textAlignCenter ? 'center' : 'left',
|
|
132
|
-
backgroundColor: bgColor
|
|
133
|
-
}
|
|
134
|
-
}, icon ? React.createElement("p", {
|
|
135
|
-
className: toastBem('icon-wrapper')
|
|
136
|
-
}, React.createElement(Icon, {
|
|
137
|
-
name: icon ? icon : '',
|
|
138
|
-
size: "20"
|
|
139
|
-
})) : null, React.createElement("span", {
|
|
140
|
-
className: toastBem('text')
|
|
141
|
-
}, msg))));
|
|
142
|
-
}
|
|
143
|
-
}]);
|
|
144
|
-
|
|
145
|
-
return Notification;
|
|
146
|
-
}(React.PureComponent);
|
|
147
|
-
|
|
148
|
-
_defineProperty(Notification, "newInstance", void 0);
|
|
149
|
-
|
|
150
|
-
Notification.newInstance = function (properties, callback) {
|
|
151
|
-
var element = document.createElement('div');
|
|
152
|
-
|
|
153
|
-
if (properties.id) {
|
|
154
|
-
element.setAttribute('id', "".concat(properties.id));
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
document.body.appendChild(element);
|
|
158
|
-
var called = false;
|
|
159
|
-
|
|
160
|
-
function ref(instance) {
|
|
161
|
-
if (called) {
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
called = true;
|
|
166
|
-
callback({
|
|
167
|
-
component: instance,
|
|
168
|
-
destroy: function destroy() {
|
|
169
|
-
ReactDOM.unmountComponentAtNode(element);
|
|
170
|
-
element && element.parentNode && element.parentNode.removeChild(element);
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
ReactDOM.render(React.createElement(Notification, _objectSpread(_objectSpread({}, properties), {}, {
|
|
176
|
-
ref: ref
|
|
177
|
-
})), element);
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
var messageInstance = null;
|
|
181
|
-
var options = {
|
|
182
|
-
msg: '',
|
|
183
|
-
id: '',
|
|
184
|
-
duration: 1.5,
|
|
185
|
-
center: true,
|
|
186
|
-
type: 'text',
|
|
187
|
-
customClass: '',
|
|
188
|
-
bottom: 30,
|
|
189
|
-
size: 'base',
|
|
190
|
-
icon: '',
|
|
191
|
-
textAlignCenter: true,
|
|
192
|
-
loadingRotate: true,
|
|
193
|
-
bgColor: 'rgba(0, 0, 0, .8)',
|
|
194
|
-
onClose: function onClose() {},
|
|
195
|
-
cover: false,
|
|
196
|
-
coverColor: 'rgba(0, 0, 0, 0)',
|
|
197
|
-
closeOnClickOverlay: false // 是否点击遮罩可关闭
|
|
198
|
-
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
function getInstance(props, callback) {
|
|
202
|
-
if (messageInstance) {
|
|
203
|
-
messageInstance.destroy();
|
|
204
|
-
messageInstance = null;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
Notification.newInstance(props, function (notification) {
|
|
208
|
-
return callback && callback(notification);
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
function notice(opts) {
|
|
213
|
-
function close() {
|
|
214
|
-
if (messageInstance) {
|
|
215
|
-
messageInstance.destroy();
|
|
216
|
-
messageInstance = null;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
opts = _objectSpread(_objectSpread(_objectSpread({}, options), opts), {}, {
|
|
221
|
-
onClose: close
|
|
222
|
-
});
|
|
223
|
-
getInstance(opts, function (notification) {
|
|
224
|
-
messageInstance = notification;
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
var errorMsg = function errorMsg(msg) {
|
|
229
|
-
if (!msg) {
|
|
230
|
-
console.warn('[NutUI Toast]: msg不能为空');
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
var Toast = {
|
|
236
|
-
text: function text(msg) {
|
|
237
|
-
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
238
|
-
errorMsg(msg);
|
|
239
|
-
return notice(_objectSpread({
|
|
240
|
-
msg: msg,
|
|
241
|
-
type: 'text'
|
|
242
|
-
}, option));
|
|
243
|
-
},
|
|
244
|
-
success: function success(msg) {
|
|
245
|
-
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
246
|
-
errorMsg(msg);
|
|
247
|
-
return notice(_objectSpread({
|
|
248
|
-
msg: msg,
|
|
249
|
-
icon: 'success',
|
|
250
|
-
type: 'success'
|
|
251
|
-
}, option));
|
|
252
|
-
},
|
|
253
|
-
fail: function fail(msg) {
|
|
254
|
-
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
255
|
-
errorMsg(msg);
|
|
256
|
-
return notice(_objectSpread({
|
|
257
|
-
msg: msg,
|
|
258
|
-
icon: 'failure',
|
|
259
|
-
type: 'fail'
|
|
260
|
-
}, option));
|
|
261
|
-
},
|
|
262
|
-
loading: function loading(msg) {
|
|
263
|
-
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
264
|
-
errorMsg(msg);
|
|
265
|
-
return notice(_objectSpread({
|
|
266
|
-
msg: msg,
|
|
267
|
-
icon: 'loading',
|
|
268
|
-
type: 'loading'
|
|
269
|
-
}, option));
|
|
270
|
-
},
|
|
271
|
-
warn: function warn(msg) {
|
|
272
|
-
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
273
|
-
errorMsg(msg);
|
|
274
|
-
return notice(_objectSpread({
|
|
275
|
-
msg: msg,
|
|
276
|
-
icon: 'tips',
|
|
277
|
-
type: 'warn'
|
|
278
|
-
}, option));
|
|
279
|
-
},
|
|
280
|
-
customIcon: function customIcon(msg) {
|
|
281
|
-
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
282
|
-
errorMsg(msg);
|
|
283
|
-
return notice(_objectSpread({
|
|
284
|
-
msg: msg
|
|
285
|
-
}, option));
|
|
286
|
-
},
|
|
287
|
-
hide: function hide() {
|
|
288
|
-
if (messageInstance) {
|
|
289
|
-
messageInstance.destroy();
|
|
290
|
-
messageInstance = null;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
export { Toast as T };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import Avatar from '@/packages/avatar';
|
|
2
|
-
import Button from '@/packages/button';
|
|
3
|
-
import Cell from '@/packages/cell';
|
|
4
|
-
import CellGroup from '@/packages/cellgroup';
|
|
5
|
-
import Icon from '@/packages/icon';
|
|
6
|
-
import Price from '@/packages/price';
|
|
7
|
-
import Overlay from '@/packages/overlay';
|
|
8
|
-
import Divider from '@/packages/divider';
|
|
9
|
-
import Layout from '@/packages/layout';
|
|
10
|
-
import Row from '@/packages/row';
|
|
11
|
-
import Col from '@/packages/col';
|
|
12
|
-
import Drag from '@/packages/drag';
|
|
13
|
-
import Collapse from '@/packages/collapse';
|
|
14
|
-
import Toast from '@/packages/toast';
|
|
15
|
-
import BackTop from '@/packages/backtop';
|
|
16
|
-
import Range from '@/packages/range';
|
|
17
|
-
import Infiniteloading from '@/packages/infiniteloading';
|
|
18
|
-
import Steps from '@/packages/steps';
|
|
19
|
-
import Step from '@/packages/step';
|
|
20
|
-
import CircleProgress from '@/packages/circleprogress';
|
|
21
|
-
import Popup from '@/packages/popup';
|
|
22
|
-
import ActionSheet from '@/packages/actionsheet';
|
|
23
|
-
import NoticeBar from '@/packages/noticebar';
|
|
24
|
-
import Notify from '@/packages/notify';
|
|
25
|
-
import Dialog from '@/packages/dialog';
|
|
26
|
-
import Switch from '@/packages/switch';
|
|
27
|
-
import CollapseItem from '@/packages/collapseitem';
|
|
28
|
-
import Swiper from '@/packages/swiper';
|
|
29
|
-
import SwiperItem from '@/packages/swiperitem';
|
|
30
|
-
import NavBar from '@/packages/navbar';
|
|
31
|
-
import Tabbar from '@/packages/tabbar';
|
|
32
|
-
import TabbarItem from '@/packages/tabbaritem';
|
|
33
|
-
import InputNumber from '@/packages/inputnumber';
|
|
34
|
-
import Elevator from '@/packages/elevator';
|
|
35
|
-
import FixedNav from '@/packages/fixednav';
|
|
36
|
-
import Pagination from '@/packages/pagination';
|
|
37
|
-
import Rate from '@/packages/rate';
|
|
38
|
-
import Uploader from '@/packages/uploader';
|
|
39
|
-
import Input from '@/packages/input';
|
|
40
|
-
import TextArea from '@/packages/textarea';
|
|
41
|
-
import Checkbox from '@/packages/checkbox';
|
|
42
|
-
import CheckboxGroup from '@/packages/checkboxgroup';
|
|
43
|
-
import Tag from '@/packages/tag';
|
|
44
|
-
import Popover from '@/packages/popover';
|
|
45
|
-
import Badge from '@/packages/badge';
|
|
46
|
-
import AnimatingNumbers from '@/packages/animatingnumbers';
|
|
47
|
-
import Radio from '@/packages/radio';
|
|
48
|
-
import RadioGroup from '@/packages/radiogroup';
|
|
49
|
-
import ShortPassword from '@/packages/shortpassword';
|
|
50
|
-
import Calendar from '@/packages/calendar';
|
|
51
|
-
import CalendarItem from '@/packages/calendaritem';
|
|
52
|
-
import Picker from '@/packages/picker';
|
|
53
|
-
import Signature from '@/packages/signature';
|
|
54
|
-
import Barrage from '@/packages/barrage';
|
|
55
|
-
import Address from '@/packages/address';
|
|
56
|
-
export { Avatar, Button, Cell, CellGroup, Icon, Price, Overlay, Divider, Layout, Row, Col, Drag, Collapse, Toast, BackTop, Range, Infiniteloading, Steps, Step, CircleProgress, Popup, ActionSheet, NoticeBar, Notify, Dialog, Switch, CollapseItem, Swiper, SwiperItem, NavBar, Tabbar, TabbarItem, InputNumber, Elevator, FixedNav, Pagination, Rate, Uploader, Input, TextArea, Checkbox, CheckboxGroup, Tag, Popover, Badge, AnimatingNumbers, Radio, RadioGroup, ShortPassword, Calendar, CalendarItem, Picker, Signature, Barrage, Address };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function createNameSpace(name: string): (string | (() => void))[];
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
declare const Utils: {
|
|
2
|
-
/**
|
|
3
|
-
* 是否为闫年
|
|
4
|
-
* @return {Boolse} true|false
|
|
5
|
-
*/
|
|
6
|
-
isLeapYear: (y: number) => boolean;
|
|
7
|
-
/**
|
|
8
|
-
* 返回星期数
|
|
9
|
-
* @return {String}
|
|
10
|
-
*/
|
|
11
|
-
getWhatDay: (year: number, month: number, day: number) => string;
|
|
12
|
-
/**
|
|
13
|
-
* 返回星期数
|
|
14
|
-
* @return {Number}
|
|
15
|
-
*/
|
|
16
|
-
getMonthPreDay: (year: number, month: number) => number;
|
|
17
|
-
/**
|
|
18
|
-
* 返回月份天数
|
|
19
|
-
* @return {Number}
|
|
20
|
-
*/
|
|
21
|
-
getMonthDays: (year: string, month: string) => number;
|
|
22
|
-
/**
|
|
23
|
-
* 补齐数字位数
|
|
24
|
-
* @return {string}
|
|
25
|
-
*/
|
|
26
|
-
getNumTwoBit: (n: number) => string;
|
|
27
|
-
/**
|
|
28
|
-
* 日期对象转成字符串
|
|
29
|
-
* @return {string}
|
|
30
|
-
*/
|
|
31
|
-
date2Str: (date: Date, split?: string | undefined) => string;
|
|
32
|
-
/**
|
|
33
|
-
* 返回日期格式字符串
|
|
34
|
-
* @param {Number} 0返回今天的日期、1返回明天的日期,2返回后天得日期,依次类推
|
|
35
|
-
* @return {string} '2014-12-31'
|
|
36
|
-
*/
|
|
37
|
-
getDay: (i: number) => string;
|
|
38
|
-
/**
|
|
39
|
-
* 时间比较
|
|
40
|
-
* @return {Boolean}
|
|
41
|
-
*/
|
|
42
|
-
compareDate: (date1: string, date2: string) => boolean;
|
|
43
|
-
/**
|
|
44
|
-
* 时间是否相等
|
|
45
|
-
* @return {Boolean}
|
|
46
|
-
*/
|
|
47
|
-
isEqual: (date1: string, date2: string) => boolean;
|
|
48
|
-
};
|
|
49
|
-
export default Utils;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
获取元素的大小及其相对于视口的位置,等价于 Element.getBoundingClientRect。
|
|
3
|
-
width 宽度 number
|
|
4
|
-
height 高度 number
|
|
5
|
-
top 顶部与视图窗口左上角的距离 number
|
|
6
|
-
left 左侧与视图窗口左上角的距离 number
|
|
7
|
-
right 右侧与视图窗口左上角的距离 number
|
|
8
|
-
bottom 底部与视图窗口左上角的距离 number
|
|
9
|
-
*/
|
|
10
|
-
export declare const useRect: (elementRef: Element | Window | undefined) => DOMRect | {
|
|
11
|
-
top: number;
|
|
12
|
-
left: number;
|
|
13
|
-
right: number;
|
|
14
|
-
bottom: number;
|
|
15
|
-
width: number;
|
|
16
|
-
height: number;
|
|
17
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare type Direction = '' | 'vertical' | 'horizontal';
|
|
2
|
-
export declare function useTouch(): {
|
|
3
|
-
move: EventListener;
|
|
4
|
-
start: EventListener;
|
|
5
|
-
reset: () => void;
|
|
6
|
-
startX: number;
|
|
7
|
-
startY: number;
|
|
8
|
-
deltaX: number;
|
|
9
|
-
deltaY: number;
|
|
10
|
-
offsetX: number;
|
|
11
|
-
offsetY: number;
|
|
12
|
-
direction: Direction;
|
|
13
|
-
isVertical: () => boolean;
|
|
14
|
-
isHorizontal: () => boolean;
|
|
15
|
-
};
|
|
16
|
-
export {};
|