zartui 2.1.5 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/action-sheet/index.js +15 -26
- package/es/area/index.js +5 -41
- package/es/avatar/index.js +3 -16
- package/es/back-top/index.js +4 -19
- package/es/badge/index.js +4 -12
- package/es/button/index.js +20 -40
- package/es/calendar/components/Header.js +3 -12
- package/es/calendar/components/Month.js +12 -65
- package/es/calendar/index.js +23 -94
- package/es/calendar/types.js +9 -15
- package/es/calendar/utils.js +5 -16
- package/es/cascader/index.js +4 -37
- package/es/cell/index.js +19 -37
- package/es/cell-group/index.js +5 -8
- package/es/checkbox/index.js +4 -11
- package/es/checkbox-group/index.js +4 -9
- package/es/col/index.js +6 -11
- package/es/collapse/index.js +2 -5
- package/es/collapse-item/index.js +19 -35
- package/es/count-down/index.js +2 -15
- package/es/count-down/utils.js +3 -10
- package/es/datetime-picker/DatePicker.js +12 -70
- package/es/datetime-picker/TimePicker.js +10 -23
- package/es/datetime-picker/index.js +2 -26
- package/es/datetime-picker/shared.js +5 -21
- package/es/datetime-picker/utils.js +0 -5
- package/es/dialog/Dialog.js +6 -21
- package/es/dialog/index.js +0 -16
- package/es/divider/index.js +5 -6
- package/es/dropdown-item/index.js +13 -39
- package/es/dropdown-menu/index.js +4 -9
- package/es/empty/images/Developing.js +0 -3
- package/es/empty/images/EmptyInterface.js +0 -3
- package/es/empty/images/EmptyResult.js +0 -3
- package/es/empty/images/FindNull.js +0 -3
- package/es/empty/images/NetworkError.js +0 -3
- package/es/empty/images/NotFound.js +0 -3
- package/es/empty/images/ReportSuccess.js +0 -3
- package/es/empty/images/Restricted.js +0 -3
- package/es/empty/images/ServerError.js +0 -3
- package/es/empty/index.js +3 -11
- package/es/field/index.js +21 -86
- package/es/fold-dialog/index.js +5 -20
- package/es/form/index.js +2 -18
- package/es/grid/index.js +2 -6
- package/es/grid-item/index.js +18 -30
- package/es/hierarchy-select/breadcrumb.js +2 -6
- package/es/hierarchy-select/index.js +13 -15
- package/es/hierarchy-select/markList.js +11 -32
- package/es/hierarchy-select/svg/SubIcon.js +0 -1
- package/es/icon/index.js +9 -13
- package/es/image/index.js +3 -19
- package/es/image-preview/ImagePreview.js +4 -8
- package/es/image-preview/ImagePreviewItem.js +14 -30
- package/es/image-preview/index.js +0 -12
- package/es/image-preview/shared.js +2 -4
- package/es/index-anchor/index.js +2 -6
- package/es/index-bar/IndexIndicate.js +0 -1
- package/es/index-bar/index.js +7 -28
- package/es/index.js +1 -4
- package/es/info/index.js +6 -8
- package/es/list/index.js +11 -27
- package/es/loading/index.js +7 -15
- package/es/locale/index.js +0 -2
- package/es/media-picker/index.js +34 -120
- package/es/media-picker/media-util.js +2 -5
- package/es/media-picker/type.js +9 -14
- package/es/media-picker/wx-util.js +0 -1
- package/es/media-player/index.js +7 -19
- package/es/mixins/bind-event.js +0 -3
- package/es/mixins/checkbox.js +5 -11
- package/es/mixins/click-outside.js +0 -2
- package/es/mixins/close-on-popstate.js +0 -1
- package/es/mixins/field.js +0 -2
- package/es/mixins/popup/index.js +12 -28
- package/es/mixins/popup/overlay.js +1 -11
- package/es/mixins/portal.js +2 -8
- package/es/mixins/relation.js +0 -8
- package/es/mixins/slots.js +1 -4
- package/es/mixins/touch.js +4 -9
- package/es/multiple-picker/MultiplePickerOptions.js +3 -20
- package/es/multiple-picker/index.js +5 -17
- package/es/nav-bar/index.js +4 -12
- package/es/notice-bar/index.js +10 -28
- package/es/number-keyboard/Key.js +2 -10
- package/es/number-keyboard/index.js +4 -19
- package/es/overlay/index.js +5 -8
- package/es/password-input/index.js +10 -16
- package/es/picker/PickerColumn.js +21 -56
- package/es/picker/index.js +12 -45
- package/es/popover/index.js +65 -90
- package/es/popup/index.js +5 -21
- package/es/pull-refresh/index.js +10 -29
- package/es/radio/index.js +2 -4
- package/es/radio-group/index.js +2 -4
- package/es/rate/index.js +12 -26
- package/es/row/index.js +3 -9
- package/es/search/index.js +9 -15
- package/es/signature/bezier.js +13 -20
- package/es/signature/force-landscape.js +0 -5
- package/es/signature/index.js +5 -24
- package/es/signature/point.js +1 -6
- package/es/signature/throttle.js +1 -10
- package/es/skeleton/index.js +5 -15
- package/es/slider/index.js +19 -55
- package/es/step/index.js +5 -12
- package/es/stepper/index.js +11 -39
- package/es/steps/index.js +2 -4
- package/es/sticky/index.js +8 -50
- package/es/swipe/index.js +19 -62
- package/es/swipe-cell/index.js +7 -23
- package/es/swipe-item/index.js +10 -19
- package/es/switch/index.js +8 -10
- package/es/switch/shared.js +1 -0
- package/es/switch-cell/index.js +7 -7
- package/es/tab/index.js +4 -15
- package/es/tabbar/index.js +4 -14
- package/es/tabbar-item/index.js +7 -15
- package/es/table/index.js +5 -28
- package/es/table/type.js +3 -4
- package/es/tabs/Content.js +5 -9
- package/es/tabs/Title.js +11 -20
- package/es/tabs/index.js +16 -51
- package/es/tabs/utils.js +0 -8
- package/es/tag/index.js +13 -17
- package/es/text-ellipsis/index.js +25 -42
- package/es/timeline/index.js +2 -25
- package/es/toast/Toast.js +11 -23
- package/es/toast/index.js +6 -33
- package/es/toast/lock-click.js +0 -2
- package/es/uploader/index.js +11 -62
- package/es/uploader/utils.js +0 -10
- package/es/utils/constant.js +2 -1
- package/es/utils/create/bem.js +1 -5
- package/es/utils/create/component.js +4 -8
- package/es/utils/create/i18n.js +0 -2
- package/es/utils/deep-assign.js +0 -4
- package/es/utils/deep-clone.js +0 -3
- package/es/utils/dom/event.js +2 -5
- package/es/utils/dom/node.js +0 -1
- package/es/utils/dom/raf.js +7 -6
- package/es/utils/dom/reset-scroll.js +2 -1
- package/es/utils/dom/scroll.js +8 -17
- package/es/utils/dom/style.js +3 -2
- package/es/utils/easings.js +2 -4
- package/es/utils/format/date-util.js +54 -122
- package/es/utils/format/number.js +2 -11
- package/es/utils/format/string.js +0 -3
- package/es/utils/format/unit.js +2 -12
- package/es/utils/functional.js +6 -9
- package/es/utils/getScroll.js +0 -5
- package/es/utils/index.js +3 -5
- package/es/utils/interceptor.js +2 -4
- package/es/utils/media/image-util.js +7 -19
- package/es/utils/raf.js +4 -12
- package/es/utils/router.js +7 -6
- package/es/utils/scrollTo.js +10 -15
- package/es/utils/validate/number.js +2 -2
- package/es/utils/vnodes.js +2 -8
- package/lib/action-sheet/index.js +12 -37
- package/lib/area/index.js +7 -48
- package/lib/avatar/index.js +5 -21
- package/lib/back-top/index.js +6 -28
- package/lib/badge/index.js +6 -18
- package/lib/button/index.js +20 -52
- package/lib/calendar/FastForwardImg.js +2 -3
- package/lib/calendar/SlowForwardImg.js +2 -3
- package/lib/calendar/components/Header.js +5 -21
- package/lib/calendar/components/Month.js +14 -74
- package/lib/calendar/index.js +23 -109
- package/lib/calendar/types.js +11 -22
- package/lib/calendar/utils.js +18 -46
- package/lib/cascader/index.js +6 -49
- package/lib/cell/index.js +19 -50
- package/lib/cell/shared.js +2 -3
- package/lib/cell-group/index.js +6 -17
- package/lib/checkbox/index.js +6 -17
- package/lib/checkbox-group/index.js +6 -16
- package/lib/col/index.js +8 -17
- package/lib/collapse/index.js +4 -11
- package/lib/collapse-item/index.js +20 -46
- package/lib/count-down/index.js +4 -22
- package/lib/count-down/utils.js +5 -17
- package/lib/datetime-picker/DatePicker.js +14 -84
- package/lib/datetime-picker/TimePicker.js +12 -33
- package/lib/datetime-picker/index.js +7 -41
- package/lib/datetime-picker/shared.js +9 -35
- package/lib/datetime-picker/utils.js +2 -11
- package/lib/dialog/Dialog.js +8 -31
- package/lib/dialog/index.js +1 -24
- package/lib/divider/index.js +6 -14
- package/lib/dropdown-item/index.js +14 -52
- package/lib/dropdown-menu/index.js +6 -18
- package/lib/empty/context.js +2 -3
- package/lib/empty/images/Developing.js +2 -9
- package/lib/empty/images/EmptyInterface.js +2 -9
- package/lib/empty/images/EmptyResult.js +2 -9
- package/lib/empty/images/FindNull.js +2 -9
- package/lib/empty/images/NetworkError.js +2 -9
- package/lib/empty/images/NotFound.js +2 -9
- package/lib/empty/images/ReportSuccess.js +2 -9
- package/lib/empty/images/Restricted.js +2 -9
- package/lib/empty/images/ServerError.js +2 -9
- package/lib/empty/index.js +5 -26
- package/lib/field/ClearIcon.js +2 -3
- package/lib/field/SearchIcon.js +2 -3
- package/lib/field/index.js +22 -99
- package/lib/fold-dialog/index.js +7 -25
- package/lib/form/index.js +4 -24
- package/lib/grid/index.js +4 -13
- package/lib/grid-item/index.js +19 -40
- package/lib/hierarchy-select/breadcrumb.js +5 -13
- package/lib/hierarchy-select/index.js +16 -26
- package/lib/hierarchy-select/markList.js +14 -41
- package/lib/hierarchy-select/svg/SubIcon.js +2 -4
- package/lib/icon/index.js +9 -21
- package/lib/image/index.js +4 -25
- package/lib/image-preview/ImagePreview.js +2 -19
- package/lib/image-preview/ImagePreviewItem.js +15 -39
- package/lib/image-preview/index.js +1 -18
- package/lib/image-preview/shared.js +3 -8
- package/lib/index-anchor/index.js +4 -14
- package/lib/index-bar/IndexIndicate.js +2 -4
- package/lib/index-bar/index.js +9 -40
- package/lib/index.js +5 -164
- package/lib/info/index.js +7 -16
- package/lib/lazyload/index.js +1 -5
- package/lib/list/index.js +12 -36
- package/lib/loading/index.js +8 -23
- package/lib/locale/index.js +2 -10
- package/lib/locale/lang/de-DE-formal.js +2 -3
- package/lib/locale/lang/de-DE.js +2 -3
- package/lib/locale/lang/en-US.js +2 -3
- package/lib/locale/lang/es-ES.js +2 -3
- package/lib/locale/lang/fr-FR.js +2 -3
- package/lib/locale/lang/ja-JP.js +2 -3
- package/lib/locale/lang/nb-NO.js +2 -3
- package/lib/locale/lang/ro-RO.js +2 -3
- package/lib/locale/lang/th-TH.js +2 -3
- package/lib/locale/lang/tr-TR.js +2 -3
- package/lib/locale/lang/zh-CN.js +2 -3
- package/lib/locale/lang/zh-HK.js +2 -3
- package/lib/locale/lang/zh-TW.js +2 -3
- package/lib/media-picker/image/DefaultAudioIcon.js +2 -3
- package/lib/media-picker/image/DefaultDocIcon.js +2 -3
- package/lib/media-picker/image/DefaultExcelIcon.js +2 -3
- package/lib/media-picker/image/DefaultFileIcon.js +2 -3
- package/lib/media-picker/image/DefaultPdfIcon.js +2 -3
- package/lib/media-picker/image/DefaultPptIcon.js +2 -3
- package/lib/media-picker/image/DefaultTextIcon.js +2 -3
- package/lib/media-picker/image/DefaultVideoIcon.js +2 -3
- package/lib/media-picker/image/DeleteIcon.js +2 -3
- package/lib/media-picker/image/Img64.js +4 -7
- package/lib/media-picker/image/PickFileIcon.js +2 -3
- package/lib/media-picker/image/PickPhotoIcon.js +2 -3
- package/lib/media-picker/image/ReUpload.js +2 -3
- package/lib/media-picker/image/TakeAudioIcon.js +2 -3
- package/lib/media-picker/image/TakePhotoIcon.js +2 -3
- package/lib/media-picker/image/TakeVideoIcon.js +2 -3
- package/lib/media-picker/index.js +32 -164
- package/lib/media-picker/media-util.js +9 -22
- package/lib/media-picker/type.js +10 -18
- package/lib/media-picker/wx-util.js +4 -15
- package/lib/media-player/index.js +8 -27
- package/lib/mixins/bind-event.js +1 -6
- package/lib/mixins/checkbox.js +8 -21
- package/lib/mixins/click-outside.js +3 -8
- package/lib/mixins/close-on-popstate.js +2 -7
- package/lib/mixins/field.js +2 -5
- package/lib/mixins/popup/context.js +2 -3
- package/lib/mixins/popup/index.js +12 -38
- package/lib/mixins/popup/overlay.js +3 -25
- package/lib/mixins/portal.js +2 -9
- package/lib/mixins/relation.js +0 -11
- package/lib/mixins/slots.js +3 -8
- package/lib/mixins/touch.js +6 -14
- package/lib/multiple-picker/MultiplePickerOptions.js +4 -26
- package/lib/multiple-picker/index.js +7 -29
- package/lib/multiple-picker/shared.js +3 -5
- package/lib/nav-bar/index.js +6 -19
- package/lib/notice-bar/CloseIcon.js +2 -3
- package/lib/notice-bar/MenuIcon.js +2 -3
- package/lib/notice-bar/NoticeIcon.js +2 -3
- package/lib/notice-bar/OpenIcon.js +2 -3
- package/lib/notice-bar/TipIcon.js +2 -3
- package/lib/notice-bar/WarningIcon.js +2 -3
- package/lib/notice-bar/index.js +12 -43
- package/lib/number-keyboard/CollapseIcon.js +2 -3
- package/lib/number-keyboard/DeleteIcon.js +2 -3
- package/lib/number-keyboard/Key.js +4 -20
- package/lib/number-keyboard/index.js +6 -29
- package/lib/overlay/index.js +6 -18
- package/lib/password-input/index.js +11 -25
- package/lib/picker/PickerColumn.js +24 -71
- package/lib/picker/index.js +14 -59
- package/lib/picker/shared.js +3 -5
- package/lib/popover/index.js +65 -104
- package/lib/popup/index.js +7 -30
- package/lib/pull-refresh/index.js +11 -38
- package/lib/radio/index.js +4 -10
- package/lib/radio-group/index.js +4 -11
- package/lib/rate/index.js +13 -34
- package/lib/row/index.js +5 -15
- package/lib/search/index.js +8 -23
- package/lib/signature/bezier.js +14 -25
- package/lib/signature/force-landscape.js +5 -19
- package/lib/signature/index.js +8 -34
- package/lib/signature/point.js +2 -11
- package/lib/signature/throttle.js +1 -11
- package/lib/skeleton/index.js +6 -23
- package/lib/slider/index.js +21 -66
- package/lib/step/index.js +7 -21
- package/lib/stepper/index.js +12 -49
- package/lib/steps/index.js +4 -10
- package/lib/sticky/index.js +10 -62
- package/lib/swipe/index.js +21 -73
- package/lib/swipe-cell/index.js +9 -32
- package/lib/swipe-item/index.js +12 -27
- package/lib/switch/index.js +9 -17
- package/lib/switch/shared.js +3 -4
- package/lib/switch-cell/index.js +7 -18
- package/lib/tab/index.js +6 -24
- package/lib/tabbar/index.js +6 -22
- package/lib/tabbar-item/index.js +7 -24
- package/lib/table/index.js +7 -38
- package/lib/table/type.js +3 -5
- package/lib/tabs/Content.js +7 -18
- package/lib/tabs/Title.js +13 -27
- package/lib/tabs/index.js +17 -68
- package/lib/tabs/utils.js +0 -13
- package/lib/tag/index.js +13 -25
- package/lib/text-ellipsis/index.js +27 -49
- package/lib/timeline/index.js +4 -35
- package/lib/timeline/svg/current.js +2 -3
- package/lib/timeline/svg/pass.js +2 -3
- package/lib/toast/Toast.js +12 -33
- package/lib/toast/index.js +7 -40
- package/lib/toast/lock-click.js +0 -3
- package/lib/toast/svg/SuccessIcon.js +2 -3
- package/lib/toast/svg/WarnIcon.js +2 -3
- package/lib/uploader/index.js +12 -75
- package/lib/uploader/utils.js +4 -21
- package/lib/utils/constant.js +12 -21
- package/lib/utils/create/bem.js +1 -6
- package/lib/utils/create/component.js +6 -17
- package/lib/utils/create/i18n.js +0 -8
- package/lib/utils/create/index.js +0 -4
- package/lib/utils/deep-assign.js +0 -6
- package/lib/utils/deep-clone.js +0 -5
- package/lib/utils/device.js +1 -3
- package/lib/utils/dom/event.js +5 -14
- package/lib/utils/dom/node.js +0 -2
- package/lib/utils/dom/raf.js +9 -13
- package/lib/utils/dom/reset-scroll.js +2 -4
- package/lib/utils/dom/scroll.js +16 -37
- package/lib/utils/dom/style.js +3 -3
- package/lib/utils/easings.js +2 -5
- package/lib/utils/format/date-util.js +88 -203
- package/lib/utils/format/number.js +4 -15
- package/lib/utils/format/string.js +0 -5
- package/lib/utils/format/unit.js +2 -16
- package/lib/utils/functional.js +7 -15
- package/lib/utils/getScroll.js +1 -8
- package/lib/utils/index.js +10 -26
- package/lib/utils/interceptor.js +2 -6
- package/lib/utils/media/image-util.js +10 -28
- package/lib/utils/raf.js +4 -13
- package/lib/utils/router.js +10 -13
- package/lib/utils/scrollTo.js +12 -24
- package/lib/utils/validate/date.js +0 -2
- package/lib/utils/validate/email.js +0 -1
- package/lib/utils/validate/mobile.js +0 -1
- package/lib/utils/validate/number.js +3 -5
- package/lib/utils/validate/system.js +0 -3
- package/lib/utils/vnodes.js +2 -9
- package/lib/zart.js +3524 -7066
- package/lib/zart.min.js +7 -1
- package/package.json +1 -1
package/lib/notice-bar/index.js
CHANGED
|
@@ -1,35 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
exports.__esModule = true;
|
|
6
5
|
exports.default = void 0;
|
|
7
|
-
|
|
8
6
|
var _utils = require("../utils");
|
|
9
|
-
|
|
10
7
|
var _raf = require("../utils/dom/raf");
|
|
11
|
-
|
|
12
8
|
var _bindEvent = require("../mixins/bind-event");
|
|
13
|
-
|
|
14
9
|
var _icon = _interopRequireDefault(require("../icon"));
|
|
15
|
-
|
|
16
10
|
var _NoticeIcon = _interopRequireDefault(require("./NoticeIcon"));
|
|
17
|
-
|
|
18
11
|
var _MenuIcon = _interopRequireDefault(require("./MenuIcon"));
|
|
19
|
-
|
|
20
12
|
var _CloseIcon = _interopRequireDefault(require("./CloseIcon"));
|
|
21
|
-
|
|
22
13
|
var _OpenIcon = _interopRequireDefault(require("./OpenIcon"));
|
|
23
|
-
|
|
24
14
|
var _WarningIcon = _interopRequireDefault(require("./WarningIcon"));
|
|
25
|
-
|
|
26
15
|
var _TipIcon = _interopRequireDefault(require("./TipIcon"));
|
|
27
|
-
|
|
28
16
|
var _createNamespace = (0, _utils.createNamespace)('notice-bar'),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var _default = createComponent({
|
|
17
|
+
createComponent = _createNamespace[0],
|
|
18
|
+
bem = _createNamespace[1];
|
|
19
|
+
var _default = exports.default = createComponent({
|
|
33
20
|
mixins: [(0, _bindEvent.BindEventMixin)(function (bind) {
|
|
34
21
|
// fix cache issues with forwards and back history in safari
|
|
35
22
|
// see: https://guwii.com/cache-issues-with-forwards-and-back-history-in-safari/
|
|
@@ -94,17 +81,16 @@ var _default = createComponent({
|
|
|
94
81
|
},
|
|
95
82
|
onTransitionEnd: function onTransitionEnd() {
|
|
96
83
|
var _this = this;
|
|
97
|
-
|
|
98
84
|
this.offset = this.wrapWidth;
|
|
99
|
-
this.duration = 0;
|
|
100
|
-
// using nextTick won't work in iOS14
|
|
85
|
+
this.duration = 0;
|
|
101
86
|
|
|
87
|
+
// wait for Vue to render offset
|
|
88
|
+
// using nextTick won't work in iOS14
|
|
102
89
|
(0, _raf.raf)(function () {
|
|
103
90
|
// use double raf to ensure animation can start
|
|
104
91
|
(0, _raf.doubleRaf)(function () {
|
|
105
92
|
_this.offset = -_this.contentWidth;
|
|
106
93
|
_this.duration = (_this.contentWidth + _this.wrapWidth) / _this.speed;
|
|
107
|
-
|
|
108
94
|
_this.$emit('replay');
|
|
109
95
|
});
|
|
110
96
|
});
|
|
@@ -116,7 +102,6 @@ var _default = createComponent({
|
|
|
116
102
|
// @exposed-api
|
|
117
103
|
reset: function reset() {
|
|
118
104
|
var _this2 = this;
|
|
119
|
-
|
|
120
105
|
var delay = (0, _utils.isDef)(this.delay) ? this.delay * 1000 : 0;
|
|
121
106
|
this.offset = 0;
|
|
122
107
|
this.duration = 0;
|
|
@@ -125,16 +110,13 @@ var _default = createComponent({
|
|
|
125
110
|
clearTimeout(this.startTimer);
|
|
126
111
|
this.startTimer = setTimeout(function () {
|
|
127
112
|
var _this2$$refs = _this2.$refs,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
113
|
+
wrap = _this2$$refs.wrap,
|
|
114
|
+
content = _this2$$refs.content;
|
|
131
115
|
if (!wrap || !content || _this2.scrollable === false) {
|
|
132
116
|
return;
|
|
133
117
|
}
|
|
134
|
-
|
|
135
118
|
var wrapWidth = wrap.getBoundingClientRect().width;
|
|
136
119
|
var contentWidth = content.getBoundingClientRect().width;
|
|
137
|
-
|
|
138
120
|
if (_this2.scrollable || contentWidth > wrapWidth) {
|
|
139
121
|
(0, _raf.doubleRaf)(function () {
|
|
140
122
|
_this2.offset = -contentWidth;
|
|
@@ -148,12 +130,11 @@ var _default = createComponent({
|
|
|
148
130
|
},
|
|
149
131
|
render: function render() {
|
|
150
132
|
var _this3 = this;
|
|
151
|
-
|
|
152
133
|
var h = arguments[0];
|
|
153
134
|
var slots = this.slots,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
135
|
+
mode = this.mode,
|
|
136
|
+
leftIcon = this.leftIcon,
|
|
137
|
+
onClickIcon = this.onClickIcon;
|
|
157
138
|
var barStyle = {
|
|
158
139
|
color: this.color,
|
|
159
140
|
background: this.background
|
|
@@ -162,14 +143,11 @@ var _default = createComponent({
|
|
|
162
143
|
transform: this.offset ? "translateX(" + this.offset + "px)" : '',
|
|
163
144
|
transitionDuration: this.duration + 's'
|
|
164
145
|
};
|
|
165
|
-
|
|
166
146
|
function LeftIcon() {
|
|
167
147
|
var slot = slots('left-icon');
|
|
168
|
-
|
|
169
148
|
if (slot) {
|
|
170
149
|
return slot;
|
|
171
150
|
}
|
|
172
|
-
|
|
173
151
|
if (leftIcon === 'zt-notice-icon') {
|
|
174
152
|
return h("div", {
|
|
175
153
|
"class": bem('left-icon')
|
|
@@ -201,7 +179,6 @@ var _default = createComponent({
|
|
|
201
179
|
"class": bem('left-icon-size')
|
|
202
180
|
})]);
|
|
203
181
|
}
|
|
204
|
-
|
|
205
182
|
if (leftIcon) {
|
|
206
183
|
return h(_icon.default, {
|
|
207
184
|
"class": bem('left-icon'),
|
|
@@ -211,16 +188,12 @@ var _default = createComponent({
|
|
|
211
188
|
});
|
|
212
189
|
}
|
|
213
190
|
}
|
|
214
|
-
|
|
215
191
|
function RightIcon() {
|
|
216
192
|
var slot = slots('right-icon');
|
|
217
|
-
|
|
218
193
|
if (slot) {
|
|
219
194
|
return slot;
|
|
220
195
|
}
|
|
221
|
-
|
|
222
196
|
var iconName;
|
|
223
|
-
|
|
224
197
|
if (mode === 'zt-closeable') {
|
|
225
198
|
return h("div", {
|
|
226
199
|
"class": bem('right-icon'),
|
|
@@ -244,7 +217,6 @@ var _default = createComponent({
|
|
|
244
217
|
} else if (mode === 'link') {
|
|
245
218
|
iconName = 'arrow';
|
|
246
219
|
}
|
|
247
|
-
|
|
248
220
|
if (iconName) {
|
|
249
221
|
return h(_icon.default, {
|
|
250
222
|
"class": bem('right-icon'),
|
|
@@ -257,7 +229,6 @@ var _default = createComponent({
|
|
|
257
229
|
});
|
|
258
230
|
}
|
|
259
231
|
}
|
|
260
|
-
|
|
261
232
|
return h("div", {
|
|
262
233
|
"attrs": {
|
|
263
234
|
"role": "alert"
|
|
@@ -292,6 +263,4 @@ var _default = createComponent({
|
|
|
292
263
|
}
|
|
293
264
|
}, [this.slots() || this.text])]), RightIcon()]);
|
|
294
265
|
}
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
exports.default = _default;
|
|
266
|
+
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
var _default = {
|
|
5
|
+
var _default = exports.default = {
|
|
6
6
|
render: function render() {
|
|
7
7
|
var h = arguments[0];
|
|
8
8
|
return h("svg", {
|
|
@@ -17,5 +17,4 @@ var _default = {
|
|
|
17
17
|
}
|
|
18
18
|
})]);
|
|
19
19
|
}
|
|
20
|
-
};
|
|
21
|
-
exports.default = _default;
|
|
20
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
-
var _default = {
|
|
5
|
+
var _default = exports.default = {
|
|
6
6
|
render: function render() {
|
|
7
7
|
var h = arguments[0];
|
|
8
8
|
return h("svg", {
|
|
@@ -17,5 +17,4 @@ var _default = {
|
|
|
17
17
|
}
|
|
18
18
|
})]);
|
|
19
19
|
}
|
|
20
|
-
};
|
|
21
|
-
exports.default = _default;
|
|
20
|
+
};
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
exports.__esModule = true;
|
|
6
5
|
exports.default = void 0;
|
|
7
|
-
|
|
8
6
|
var _utils = require("../utils");
|
|
9
|
-
|
|
10
7
|
var _touch = require("../mixins/touch");
|
|
11
|
-
|
|
12
8
|
var _loading = _interopRequireDefault(require("../loading"));
|
|
13
|
-
|
|
14
9
|
var _DeleteIcon = _interopRequireDefault(require("./DeleteIcon"));
|
|
15
|
-
|
|
16
10
|
var _CollapseIcon = _interopRequireDefault(require("./CollapseIcon"));
|
|
17
|
-
|
|
18
11
|
var _createNamespace = (0, _utils.createNamespace)('key'),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _default = createComponent({
|
|
12
|
+
createComponent = _createNamespace[0],
|
|
13
|
+
bem = _createNamespace[1];
|
|
14
|
+
var _default = exports.default = createComponent({
|
|
23
15
|
mixins: [_touch.TouchMixin],
|
|
24
16
|
props: {
|
|
25
17
|
type: String,
|
|
@@ -46,7 +38,6 @@ var _default = createComponent({
|
|
|
46
38
|
},
|
|
47
39
|
onTouchMove: function onTouchMove(event) {
|
|
48
40
|
this.touchMove(event);
|
|
49
|
-
|
|
50
41
|
if (this.direction) {
|
|
51
42
|
this.active = false;
|
|
52
43
|
}
|
|
@@ -58,7 +49,6 @@ var _default = createComponent({
|
|
|
58
49
|
if (!this.slots('default')) {
|
|
59
50
|
event.preventDefault();
|
|
60
51
|
}
|
|
61
|
-
|
|
62
52
|
this.active = false;
|
|
63
53
|
this.$emit('press', this.text, this.type);
|
|
64
54
|
}
|
|
@@ -68,25 +58,21 @@ var _default = createComponent({
|
|
|
68
58
|
var isExtra = this.type === 'extra';
|
|
69
59
|
var isDelete = this.type === 'delete';
|
|
70
60
|
var text = this.slots('default') || this.text;
|
|
71
|
-
|
|
72
61
|
if (this.loading) {
|
|
73
62
|
return h(_loading.default, {
|
|
74
63
|
"class": bem('loading-icon')
|
|
75
64
|
});
|
|
76
65
|
}
|
|
77
|
-
|
|
78
66
|
if (isDelete) {
|
|
79
67
|
return text || h(_DeleteIcon.default, {
|
|
80
68
|
"class": bem('delete-icon')
|
|
81
69
|
});
|
|
82
70
|
}
|
|
83
|
-
|
|
84
71
|
if (isExtra) {
|
|
85
72
|
return text || h(_CollapseIcon.default, {
|
|
86
73
|
"class": bem('collapse-icon')
|
|
87
74
|
});
|
|
88
75
|
}
|
|
89
|
-
|
|
90
76
|
return text;
|
|
91
77
|
}
|
|
92
78
|
},
|
|
@@ -108,6 +94,4 @@ var _default = createComponent({
|
|
|
108
94
|
}])
|
|
109
95
|
}, [this.genContent()])]);
|
|
110
96
|
}
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
exports.default = _default;
|
|
97
|
+
});
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
exports.__esModule = true;
|
|
6
5
|
exports.default = void 0;
|
|
7
|
-
|
|
8
6
|
var _utils = require("../utils");
|
|
9
|
-
|
|
10
7
|
var _event = require("../utils/dom/event");
|
|
11
|
-
|
|
12
8
|
var _portal = require("../mixins/portal");
|
|
13
|
-
|
|
14
9
|
var _bindEvent = require("../mixins/bind-event");
|
|
15
|
-
|
|
16
10
|
var _Key = _interopRequireDefault(require("./Key"));
|
|
17
|
-
|
|
18
11
|
var _createNamespace = (0, _utils.createNamespace)('number-keyboard'),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _default = createComponent({
|
|
12
|
+
createComponent = _createNamespace[0],
|
|
13
|
+
bem = _createNamespace[1];
|
|
14
|
+
var _default = exports.default = createComponent({
|
|
23
15
|
mixins: [(0, _portal.PortalMixin)(), (0, _bindEvent.BindEventMixin)(function (bind) {
|
|
24
16
|
if (this.hideOnClickOutside) {
|
|
25
17
|
bind(document.body, 'touchstart', this.onBlur);
|
|
@@ -81,26 +73,22 @@ var _default = createComponent({
|
|
|
81
73
|
if (this.theme === 'custom') {
|
|
82
74
|
return this.genCustomKeys();
|
|
83
75
|
}
|
|
84
|
-
|
|
85
76
|
return this.genDefaultKeys();
|
|
86
77
|
}
|
|
87
78
|
},
|
|
88
79
|
methods: {
|
|
89
80
|
genBasicKeys: function genBasicKeys() {
|
|
90
81
|
var keys = [];
|
|
91
|
-
|
|
92
82
|
for (var i = 1; i <= 9; i++) {
|
|
93
83
|
keys.push({
|
|
94
84
|
text: i
|
|
95
85
|
});
|
|
96
86
|
}
|
|
97
|
-
|
|
98
87
|
if (this.randomKeyOrder) {
|
|
99
88
|
keys.sort(function () {
|
|
100
89
|
return Math.random() > 0.5 ? 1 : -1;
|
|
101
90
|
});
|
|
102
91
|
}
|
|
103
|
-
|
|
104
92
|
return keys;
|
|
105
93
|
},
|
|
106
94
|
genDefaultKeys: function genDefaultKeys() {
|
|
@@ -118,7 +106,6 @@ var _default = createComponent({
|
|
|
118
106
|
var keys = this.genBasicKeys();
|
|
119
107
|
var extraKey = this.extraKey;
|
|
120
108
|
var extraKeys = Array.isArray(extraKey) ? extraKey : [extraKey];
|
|
121
|
-
|
|
122
109
|
if (extraKeys.length === 1) {
|
|
123
110
|
keys.push({
|
|
124
111
|
text: 0,
|
|
@@ -138,7 +125,6 @@ var _default = createComponent({
|
|
|
138
125
|
type: 'extra'
|
|
139
126
|
});
|
|
140
127
|
}
|
|
141
|
-
|
|
142
128
|
return keys;
|
|
143
129
|
},
|
|
144
130
|
onBlur: function onBlur() {
|
|
@@ -156,12 +142,9 @@ var _default = createComponent({
|
|
|
156
142
|
if (type === 'extra') {
|
|
157
143
|
this.onBlur();
|
|
158
144
|
}
|
|
159
|
-
|
|
160
145
|
return;
|
|
161
146
|
}
|
|
162
|
-
|
|
163
147
|
var value = this.value;
|
|
164
|
-
|
|
165
148
|
if (type === 'delete') {
|
|
166
149
|
this.$emit('delete');
|
|
167
150
|
this.$emit('update:value', value.slice(0, value.length - 1));
|
|
@@ -175,16 +158,14 @@ var _default = createComponent({
|
|
|
175
158
|
genTitle: function genTitle() {
|
|
176
159
|
var h = this.$createElement;
|
|
177
160
|
var title = this.title,
|
|
178
|
-
|
|
179
|
-
|
|
161
|
+
theme = this.theme,
|
|
162
|
+
closeButtonText = this.closeButtonText;
|
|
180
163
|
var titleLeft = this.slots('title-left');
|
|
181
164
|
var showClose = closeButtonText && theme === 'default';
|
|
182
165
|
var showTitle = title || showClose || titleLeft;
|
|
183
|
-
|
|
184
166
|
if (!showTitle) {
|
|
185
167
|
return;
|
|
186
168
|
}
|
|
187
|
-
|
|
188
169
|
return h("div", {
|
|
189
170
|
"class": bem('header')
|
|
190
171
|
}, [titleLeft && h("span", {
|
|
@@ -203,7 +184,6 @@ var _default = createComponent({
|
|
|
203
184
|
},
|
|
204
185
|
genKeys: function genKeys() {
|
|
205
186
|
var _this = this;
|
|
206
|
-
|
|
207
187
|
var h = this.$createElement;
|
|
208
188
|
return this.keys.map(function (key) {
|
|
209
189
|
return h(_Key.default, {
|
|
@@ -222,7 +202,6 @@ var _default = createComponent({
|
|
|
222
202
|
},
|
|
223
203
|
genSidebar: function genSidebar() {
|
|
224
204
|
var h = this.$createElement;
|
|
225
|
-
|
|
226
205
|
if (this.theme === 'custom') {
|
|
227
206
|
return h("div", {
|
|
228
207
|
"class": bem('sidebar')
|
|
@@ -280,6 +259,4 @@ var _default = createComponent({
|
|
|
280
259
|
"class": bem('keys')
|
|
281
260
|
}, [this.genKeys()]), this.genSidebar()])])]);
|
|
282
261
|
}
|
|
283
|
-
});
|
|
284
|
-
|
|
285
|
-
exports.default = _default;
|
|
262
|
+
});
|
package/lib/overlay/index.js
CHANGED
|
@@ -1,38 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
exports.__esModule = true;
|
|
6
5
|
exports.default = void 0;
|
|
7
|
-
|
|
8
6
|
var _babelHelperVueJsxMergeProps = _interopRequireDefault(require("@vue/babel-helper-vue-jsx-merge-props"));
|
|
9
|
-
|
|
10
7
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
8
|
var _utils = require("../utils");
|
|
13
|
-
|
|
14
9
|
var _functional = require("../utils/functional");
|
|
15
|
-
|
|
16
10
|
var _event = require("../utils/dom/event");
|
|
17
|
-
|
|
18
11
|
// Utils
|
|
19
|
-
var _createNamespace = (0, _utils.createNamespace)('overlay'),
|
|
20
|
-
createComponent = _createNamespace[0],
|
|
21
|
-
bem = _createNamespace[1];
|
|
22
12
|
|
|
13
|
+
// Types
|
|
14
|
+
|
|
15
|
+
var _createNamespace = (0, _utils.createNamespace)('overlay'),
|
|
16
|
+
createComponent = _createNamespace[0],
|
|
17
|
+
bem = _createNamespace[1];
|
|
23
18
|
function preventTouchMove(event) {
|
|
24
19
|
(0, _event.preventDefault)(event, true);
|
|
25
20
|
}
|
|
26
|
-
|
|
27
21
|
function Overlay(h, props, slots, ctx) {
|
|
28
22
|
var style = (0, _extends2.default)({
|
|
29
23
|
zIndex: props.zIndex
|
|
30
24
|
}, props.customStyle);
|
|
31
|
-
|
|
32
25
|
if ((0, _utils.isDef)(props.duration)) {
|
|
33
26
|
style.animationDuration = props.duration + "s";
|
|
34
27
|
}
|
|
35
|
-
|
|
36
28
|
return h("transition", {
|
|
37
29
|
"attrs": {
|
|
38
30
|
"name": "zt-fade"
|
|
@@ -49,7 +41,6 @@ function Overlay(h, props, slots, ctx) {
|
|
|
49
41
|
}
|
|
50
42
|
}, (0, _functional.inherit)(ctx, true)]), [slots.default == null ? void 0 : slots.default()])]);
|
|
51
43
|
}
|
|
52
|
-
|
|
53
44
|
Overlay.props = {
|
|
54
45
|
show: Boolean,
|
|
55
46
|
zIndex: [Number, String],
|
|
@@ -61,7 +52,4 @@ Overlay.props = {
|
|
|
61
52
|
default: true
|
|
62
53
|
}
|
|
63
54
|
};
|
|
64
|
-
|
|
65
|
-
var _default = createComponent(Overlay);
|
|
66
|
-
|
|
67
|
-
exports.default = _default;
|
|
55
|
+
var _default = exports.default = createComponent(Overlay);
|
|
@@ -1,48 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
exports.__esModule = true;
|
|
6
5
|
exports.default = void 0;
|
|
7
|
-
|
|
8
6
|
var _babelHelperVueJsxMergeProps = _interopRequireDefault(require("@vue/babel-helper-vue-jsx-merge-props"));
|
|
9
|
-
|
|
10
7
|
var _utils = require("../utils");
|
|
11
|
-
|
|
12
8
|
var _functional = require("../utils/functional");
|
|
13
|
-
|
|
14
9
|
var _constant = require("../utils/constant");
|
|
15
|
-
|
|
16
10
|
// Utils
|
|
17
|
-
var _createNamespace = (0, _utils.createNamespace)('password-input'),
|
|
18
|
-
createComponent = _createNamespace[0],
|
|
19
|
-
bem = _createNamespace[1];
|
|
20
11
|
|
|
12
|
+
// Types
|
|
13
|
+
|
|
14
|
+
var _createNamespace = (0, _utils.createNamespace)('password-input'),
|
|
15
|
+
createComponent = _createNamespace[0],
|
|
16
|
+
bem = _createNamespace[1];
|
|
21
17
|
function PasswordInput(h, props, slots, ctx) {
|
|
22
18
|
var _ref2;
|
|
23
|
-
|
|
24
19
|
var mask = props.mask,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
value = props.value,
|
|
21
|
+
length = props.length,
|
|
22
|
+
gutter = props.gutter,
|
|
23
|
+
focused = props.focused,
|
|
24
|
+
errorInfo = props.errorInfo;
|
|
30
25
|
var Points = [];
|
|
31
|
-
|
|
32
26
|
for (var i = 0; i < length; i++) {
|
|
33
27
|
var _ref;
|
|
34
|
-
|
|
35
28
|
var _char = value[i];
|
|
36
29
|
var showBorder = i !== 0 && !gutter;
|
|
37
30
|
var showCursor = focused && i === value.length;
|
|
38
31
|
var style = void 0;
|
|
39
|
-
|
|
40
32
|
if (i !== 0 && gutter) {
|
|
41
33
|
style = {
|
|
42
34
|
marginLeft: (0, _utils.addUnit)(gutter)
|
|
43
35
|
};
|
|
44
36
|
}
|
|
45
|
-
|
|
46
37
|
Points.push(h("li", {
|
|
47
38
|
"class": [(_ref = {}, _ref[_constant.BORDER_LEFT] = showBorder, _ref), bem('item', {
|
|
48
39
|
focus: showCursor
|
|
@@ -56,7 +47,6 @@ function PasswordInput(h, props, slots, ctx) {
|
|
|
56
47
|
"class": bem('cursor')
|
|
57
48
|
})]));
|
|
58
49
|
}
|
|
59
|
-
|
|
60
50
|
return h("div", {
|
|
61
51
|
"class": bem()
|
|
62
52
|
}, [h("ul", (0, _babelHelperVueJsxMergeProps.default)([{
|
|
@@ -69,7 +59,6 @@ function PasswordInput(h, props, slots, ctx) {
|
|
|
69
59
|
}
|
|
70
60
|
}, (0, _functional.inherit)(ctx, true)]), [Points])]);
|
|
71
61
|
}
|
|
72
|
-
|
|
73
62
|
PasswordInput.props = {
|
|
74
63
|
gutter: [Number, String],
|
|
75
64
|
focused: Boolean,
|
|
@@ -87,7 +76,4 @@ PasswordInput.props = {
|
|
|
87
76
|
default: 6
|
|
88
77
|
}
|
|
89
78
|
};
|
|
90
|
-
|
|
91
|
-
var _default = createComponent(PasswordInput);
|
|
92
|
-
|
|
93
|
-
exports.default = _default;
|
|
79
|
+
var _default = exports.default = createComponent(PasswordInput);
|