zartui 2.1.6 → 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 +9 -30
- 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 +12 -39
- 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 +2324 -4741
- package/lib/zart.min.js +7 -1
- package/package.json +1 -1
package/es/toast/Toast.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// Utils
|
|
2
2
|
import { createNamespace, isDef } from '../utils';
|
|
3
|
-
import { lockClick } from './lock-click';
|
|
3
|
+
import { lockClick } from './lock-click';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Mixins
|
|
6
|
+
import { PopupMixin } from '../mixins/popup';
|
|
6
7
|
|
|
8
|
+
// Components
|
|
7
9
|
import Icon from '../icon';
|
|
8
10
|
import Loading from '../loading';
|
|
9
11
|
import SuccessIcon from './svg/SuccessIcon';
|
|
10
12
|
import WarnIcon from './svg/WarnIcon';
|
|
11
|
-
|
|
12
13
|
var _createNamespace = createNamespace('toast'),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
createComponent = _createNamespace[0],
|
|
15
|
+
bem = _createNamespace[1];
|
|
16
16
|
export default createComponent({
|
|
17
17
|
mixins: [PopupMixin()],
|
|
18
18
|
props: {
|
|
@@ -63,17 +63,13 @@ export default createComponent({
|
|
|
63
63
|
},
|
|
64
64
|
toggleClickable: function toggleClickable() {
|
|
65
65
|
var clickable = this.value && this.forbidClick;
|
|
66
|
-
|
|
67
66
|
if (this.clickable !== clickable) {
|
|
68
67
|
this.clickable = clickable;
|
|
69
68
|
lockClick(clickable);
|
|
70
69
|
}
|
|
71
70
|
},
|
|
72
|
-
|
|
73
|
-
/* istanbul ignore next */
|
|
74
|
-
onAfterEnter: function onAfterEnter() {
|
|
71
|
+
/* istanbul ignore next */onAfterEnter: function onAfterEnter() {
|
|
75
72
|
this.$emit('opened');
|
|
76
|
-
|
|
77
73
|
if (this.onOpened) {
|
|
78
74
|
this.onOpened();
|
|
79
75
|
}
|
|
@@ -84,10 +80,9 @@ export default createComponent({
|
|
|
84
80
|
genIcon: function genIcon() {
|
|
85
81
|
var h = this.$createElement;
|
|
86
82
|
var icon = this.icon,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
type = this.type,
|
|
84
|
+
iconPrefix = this.iconPrefix,
|
|
85
|
+
loadingType = this.loadingType;
|
|
91
86
|
if (icon) {
|
|
92
87
|
return h(Icon, {
|
|
93
88
|
"class": bem('icon'),
|
|
@@ -97,19 +92,16 @@ export default createComponent({
|
|
|
97
92
|
}
|
|
98
93
|
});
|
|
99
94
|
}
|
|
100
|
-
|
|
101
95
|
if (type === 'success') {
|
|
102
96
|
return h(SuccessIcon, {
|
|
103
97
|
"class": bem('success')
|
|
104
98
|
});
|
|
105
99
|
}
|
|
106
|
-
|
|
107
100
|
if (type === 'fail') {
|
|
108
101
|
return h(WarnIcon, {
|
|
109
102
|
"class": bem('fail')
|
|
110
103
|
});
|
|
111
104
|
}
|
|
112
|
-
|
|
113
105
|
if (type === 'loading') {
|
|
114
106
|
return h(Loading, {
|
|
115
107
|
"class": bem('loading'),
|
|
@@ -122,12 +114,10 @@ export default createComponent({
|
|
|
122
114
|
genMessage: function genMessage() {
|
|
123
115
|
var h = this.$createElement;
|
|
124
116
|
var type = this.type,
|
|
125
|
-
|
|
126
|
-
|
|
117
|
+
message = this.message;
|
|
127
118
|
if (!isDef(message) || message === '') {
|
|
128
119
|
return;
|
|
129
120
|
}
|
|
130
|
-
|
|
131
121
|
if (type === 'html') {
|
|
132
122
|
return h("div", {
|
|
133
123
|
"class": bem('text'),
|
|
@@ -136,7 +126,6 @@ export default createComponent({
|
|
|
136
126
|
}
|
|
137
127
|
});
|
|
138
128
|
}
|
|
139
|
-
|
|
140
129
|
return h("div", {
|
|
141
130
|
"class": bem('text')
|
|
142
131
|
}, [message]);
|
|
@@ -144,7 +133,6 @@ export default createComponent({
|
|
|
144
133
|
},
|
|
145
134
|
render: function render() {
|
|
146
135
|
var _ref;
|
|
147
|
-
|
|
148
136
|
var h = arguments[0];
|
|
149
137
|
return h("transition", {
|
|
150
138
|
"attrs": {
|
package/es/toast/index.js
CHANGED
|
@@ -24,38 +24,32 @@ var defaultOptions = {
|
|
|
24
24
|
overlayStyle: null,
|
|
25
25
|
closeOnClick: false,
|
|
26
26
|
closeOnClickOverlay: false
|
|
27
|
-
};
|
|
27
|
+
};
|
|
28
28
|
|
|
29
|
+
// default options of specific type
|
|
29
30
|
var defaultOptionsMap = {};
|
|
30
31
|
var queue = [];
|
|
31
32
|
var multiple = false;
|
|
32
|
-
|
|
33
33
|
var currentOptions = _extends({}, defaultOptions);
|
|
34
|
-
|
|
35
34
|
function parseOptions(message) {
|
|
36
35
|
if (isObject(message)) {
|
|
37
36
|
return message;
|
|
38
37
|
}
|
|
39
|
-
|
|
40
38
|
return {
|
|
41
39
|
message: message
|
|
42
40
|
};
|
|
43
41
|
}
|
|
44
|
-
|
|
45
42
|
function isInDocument(element) {
|
|
46
43
|
return document.body.contains(element);
|
|
47
44
|
}
|
|
48
|
-
|
|
49
45
|
function createInstance() {
|
|
50
46
|
/* istanbul ignore if */
|
|
51
47
|
if (isServer) {
|
|
52
48
|
return {};
|
|
53
49
|
}
|
|
54
|
-
|
|
55
50
|
queue = queue.filter(function (item) {
|
|
56
51
|
return !item.$el.parentNode || isInDocument(item.$el);
|
|
57
52
|
});
|
|
58
|
-
|
|
59
53
|
if (!queue.length || multiple) {
|
|
60
54
|
var toast = new (Vue.extend(VueToast))({
|
|
61
55
|
el: document.createElement('div')
|
|
@@ -65,11 +59,10 @@ function createInstance() {
|
|
|
65
59
|
});
|
|
66
60
|
queue.push(toast);
|
|
67
61
|
}
|
|
68
|
-
|
|
69
62
|
return queue[queue.length - 1];
|
|
70
|
-
}
|
|
71
|
-
|
|
63
|
+
}
|
|
72
64
|
|
|
65
|
+
// transform toast options to popup props
|
|
73
66
|
function transformOptions(options) {
|
|
74
67
|
return _extends({}, options, {
|
|
75
68
|
overlay: options.mask || options.overlay,
|
|
@@ -77,33 +70,27 @@ function transformOptions(options) {
|
|
|
77
70
|
duration: undefined
|
|
78
71
|
});
|
|
79
72
|
}
|
|
80
|
-
|
|
81
73
|
function Toast(options) {
|
|
82
74
|
if (options === void 0) {
|
|
83
75
|
options = {};
|
|
84
76
|
}
|
|
77
|
+
var toast = createInstance();
|
|
85
78
|
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
// should add z-index if previous toast has not disappeared
|
|
88
80
|
if (toast.value) {
|
|
89
81
|
toast.updateZIndex();
|
|
90
82
|
}
|
|
91
|
-
|
|
92
83
|
options = parseOptions(options);
|
|
93
84
|
options = _extends({}, currentOptions, defaultOptionsMap[options.type || currentOptions.type], options);
|
|
94
|
-
|
|
95
85
|
if (process.env.NODE_ENV === 'development' && options.mask) {
|
|
96
86
|
console.warn('[Zart] Toast: "mask" option is deprecated, use "overlay" option instead.');
|
|
97
87
|
}
|
|
98
|
-
|
|
99
88
|
options.clear = function () {
|
|
100
89
|
toast.value = false;
|
|
101
|
-
|
|
102
90
|
if (options.onClose) {
|
|
103
91
|
options.onClose();
|
|
104
92
|
options.onClose = null;
|
|
105
93
|
}
|
|
106
|
-
|
|
107
94
|
if (multiple && !isServer) {
|
|
108
95
|
toast.$on('closed', function () {
|
|
109
96
|
clearTimeout(toast.timer);
|
|
@@ -115,20 +102,15 @@ function Toast(options) {
|
|
|
115
102
|
});
|
|
116
103
|
}
|
|
117
104
|
};
|
|
118
|
-
|
|
119
105
|
_extends(toast, transformOptions(options));
|
|
120
|
-
|
|
121
106
|
clearTimeout(toast.timer);
|
|
122
|
-
|
|
123
107
|
if (options.duration > 0) {
|
|
124
108
|
toast.timer = setTimeout(function () {
|
|
125
109
|
toast.clear();
|
|
126
110
|
}, options.duration);
|
|
127
111
|
}
|
|
128
|
-
|
|
129
112
|
return toast;
|
|
130
113
|
}
|
|
131
|
-
|
|
132
114
|
var createMethod = function createMethod(type) {
|
|
133
115
|
return function (options) {
|
|
134
116
|
return Toast(_extends({
|
|
@@ -136,11 +118,9 @@ var createMethod = function createMethod(type) {
|
|
|
136
118
|
}, parseOptions(options)));
|
|
137
119
|
};
|
|
138
120
|
};
|
|
139
|
-
|
|
140
121
|
['loading', 'success', 'fail'].forEach(function (method) {
|
|
141
122
|
Toast[method] = createMethod(method);
|
|
142
123
|
});
|
|
143
|
-
|
|
144
124
|
Toast.clear = function (all) {
|
|
145
125
|
if (queue.length) {
|
|
146
126
|
if (all) {
|
|
@@ -155,7 +135,6 @@ Toast.clear = function (all) {
|
|
|
155
135
|
}
|
|
156
136
|
}
|
|
157
137
|
};
|
|
158
|
-
|
|
159
138
|
Toast.setDefaultOptions = function (type, options) {
|
|
160
139
|
if (typeof type === 'string') {
|
|
161
140
|
defaultOptionsMap[type] = options;
|
|
@@ -163,7 +142,6 @@ Toast.setDefaultOptions = function (type, options) {
|
|
|
163
142
|
_extends(currentOptions, type);
|
|
164
143
|
}
|
|
165
144
|
};
|
|
166
|
-
|
|
167
145
|
Toast.resetDefaultOptions = function (type) {
|
|
168
146
|
if (typeof type === 'string') {
|
|
169
147
|
defaultOptionsMap[type] = null;
|
|
@@ -172,22 +150,17 @@ Toast.resetDefaultOptions = function (type) {
|
|
|
172
150
|
defaultOptionsMap = {};
|
|
173
151
|
}
|
|
174
152
|
};
|
|
175
|
-
|
|
176
153
|
Toast.allowMultiple = function (value) {
|
|
177
154
|
if (value === void 0) {
|
|
178
155
|
value = true;
|
|
179
156
|
}
|
|
180
|
-
|
|
181
157
|
multiple = value;
|
|
182
158
|
};
|
|
183
|
-
|
|
184
159
|
Toast.install = function () {
|
|
185
160
|
Vue.use(VueToast);
|
|
186
161
|
};
|
|
187
|
-
|
|
188
162
|
if (typeof Vue.prototype.$toast === "undefined") {
|
|
189
163
|
Vue.prototype.$toast = Toast;
|
|
190
164
|
}
|
|
191
|
-
|
|
192
165
|
Vue.prototype.$ztToast = Toast;
|
|
193
166
|
export default Toast;
|
package/es/toast/lock-click.js
CHANGED
package/es/uploader/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
// Utils
|
|
3
3
|
import { createNamespace, addUnit, noop, isPromise, isDef } from '../utils';
|
|
4
|
-
import { toArray, readFile as _readFile, isOversize, isImageFile } from './utils';
|
|
4
|
+
import { toArray, readFile as _readFile, isOversize, isImageFile } from './utils';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// Mixins
|
|
7
|
+
import { FieldMixin } from '../mixins/field';
|
|
7
8
|
|
|
9
|
+
// Components
|
|
8
10
|
import Icon from '../icon';
|
|
9
11
|
import Image from '../image';
|
|
10
12
|
import Loading from '../loading';
|
|
11
13
|
import ImagePreview from '../image-preview';
|
|
12
|
-
|
|
13
14
|
var _createNamespace = createNamespace('uploader'),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
createComponent = _createNamespace[0],
|
|
16
|
+
bem = _createNamespace[1];
|
|
17
17
|
import { ImageProcessor, ResizeOptions, WatermarkOptions, WatermarkContext, CompressOptions, checkWatermarkConfigSupported } from '@egova-mobile/app-media-utils';
|
|
18
18
|
import { formatDate, FORMAT } from '../utils/format/date-util';
|
|
19
19
|
export default createComponent({
|
|
@@ -82,7 +82,6 @@ export default createComponent({
|
|
|
82
82
|
type: String,
|
|
83
83
|
default: 'photograph'
|
|
84
84
|
},
|
|
85
|
-
|
|
86
85
|
/**
|
|
87
86
|
* {
|
|
88
87
|
* maxImageSideLength,
|
|
@@ -114,7 +113,6 @@ export default createComponent({
|
|
|
114
113
|
if (index === void 0) {
|
|
115
114
|
index = this.fileList.length;
|
|
116
115
|
}
|
|
117
|
-
|
|
118
116
|
return {
|
|
119
117
|
name: this.name,
|
|
120
118
|
index: index
|
|
@@ -127,20 +125,16 @@ export default createComponent({
|
|
|
127
125
|
},
|
|
128
126
|
addWatermark: function addWatermark(files) {
|
|
129
127
|
var _this = this;
|
|
130
|
-
|
|
131
128
|
// files = Array.from(files)
|
|
132
129
|
var arr = [];
|
|
133
|
-
|
|
134
130
|
for (var i = 0; i < files.length; i++) {
|
|
135
131
|
arr.push(files[i]);
|
|
136
132
|
}
|
|
137
|
-
|
|
138
133
|
files = arr;
|
|
139
134
|
return new Promise(function (resolve) {
|
|
140
135
|
if (!_this.watermarkOptions || _this.watermarkOptions && !checkWatermarkConfigSupported(_this.watermarkOptions.watermarkConfigString)) {
|
|
141
136
|
resolve(files);
|
|
142
137
|
}
|
|
143
|
-
|
|
144
138
|
var processImagePromises = [];
|
|
145
139
|
files.forEach(function (file, index) {
|
|
146
140
|
if (file.type.indexOf('image') === 0) {
|
|
@@ -162,7 +156,6 @@ export default createComponent({
|
|
|
162
156
|
var processor = new ImageProcessor(file, resizeOptions, watermarkOptions, compressOptions);
|
|
163
157
|
var proc = processor.process().then(function (file) {
|
|
164
158
|
var uniqueFileName = _this.getNewFileName(file);
|
|
165
|
-
|
|
166
159
|
var newFile = new File([file], uniqueFileName, {
|
|
167
160
|
lastModified: file.lastModified,
|
|
168
161
|
type: file.type
|
|
@@ -173,11 +166,9 @@ export default createComponent({
|
|
|
173
166
|
processImagePromises.push(proc);
|
|
174
167
|
}
|
|
175
168
|
});
|
|
176
|
-
|
|
177
169
|
if (!processImagePromises || processImagePromises && processImagePromises.length === 0) {
|
|
178
170
|
resolve(files);
|
|
179
171
|
}
|
|
180
|
-
|
|
181
172
|
return Promise.all(processImagePromises).then(function (watermarkFiles) {
|
|
182
173
|
files.forEach(function (file, i) {
|
|
183
174
|
watermarkFiles.forEach(function (f) {
|
|
@@ -195,25 +186,18 @@ export default createComponent({
|
|
|
195
186
|
},
|
|
196
187
|
onChange: function onChange(event) {
|
|
197
188
|
var _this2 = this;
|
|
198
|
-
|
|
199
189
|
var files = event.target.files;
|
|
200
|
-
|
|
201
190
|
if (this.disabled || !files.length) {
|
|
202
191
|
return;
|
|
203
192
|
}
|
|
204
|
-
|
|
205
193
|
this.addWatermark(files).then(function (files) {
|
|
206
194
|
files = files.length === 1 ? files[0] : [].slice.call(files);
|
|
207
|
-
|
|
208
195
|
if (_this2.beforeRead) {
|
|
209
196
|
var response = _this2.beforeRead(files, _this2.getDetail());
|
|
210
|
-
|
|
211
197
|
if (!response) {
|
|
212
198
|
_this2.resetInput();
|
|
213
|
-
|
|
214
199
|
return;
|
|
215
200
|
}
|
|
216
|
-
|
|
217
201
|
if (isPromise(response)) {
|
|
218
202
|
response.then(function (data) {
|
|
219
203
|
if (data) {
|
|
@@ -225,22 +209,17 @@ export default createComponent({
|
|
|
225
209
|
return;
|
|
226
210
|
}
|
|
227
211
|
}
|
|
228
|
-
|
|
229
212
|
_this2.readFile(files);
|
|
230
213
|
});
|
|
231
214
|
},
|
|
232
215
|
readFile: function readFile(files) {
|
|
233
216
|
var _this3 = this;
|
|
234
|
-
|
|
235
217
|
var oversize = isOversize(files, this.maxSize);
|
|
236
|
-
|
|
237
218
|
if (Array.isArray(files)) {
|
|
238
219
|
var maxCount = this.maxCount - this.fileList.length;
|
|
239
|
-
|
|
240
220
|
if (files.length > maxCount) {
|
|
241
221
|
files = files.slice(0, maxCount);
|
|
242
222
|
}
|
|
243
|
-
|
|
244
223
|
Promise.all(files.map(function (file) {
|
|
245
224
|
return _readFile(file, _this3.resultType);
|
|
246
225
|
})).then(function (contents) {
|
|
@@ -250,14 +229,11 @@ export default createComponent({
|
|
|
250
229
|
status: '',
|
|
251
230
|
message: ''
|
|
252
231
|
};
|
|
253
|
-
|
|
254
232
|
if (contents[index]) {
|
|
255
233
|
result.content = contents[index];
|
|
256
234
|
}
|
|
257
|
-
|
|
258
235
|
return result;
|
|
259
236
|
});
|
|
260
|
-
|
|
261
237
|
_this3.onAfterRead(fileList, oversize);
|
|
262
238
|
});
|
|
263
239
|
} else {
|
|
@@ -267,24 +243,19 @@ export default createComponent({
|
|
|
267
243
|
status: '',
|
|
268
244
|
message: ''
|
|
269
245
|
};
|
|
270
|
-
|
|
271
246
|
if (content) {
|
|
272
247
|
result.content = content;
|
|
273
248
|
}
|
|
274
|
-
|
|
275
249
|
_this3.onAfterRead(result, oversize);
|
|
276
250
|
});
|
|
277
251
|
}
|
|
278
252
|
},
|
|
279
253
|
onAfterRead: function onAfterRead(files, oversize) {
|
|
280
254
|
var _this4 = this;
|
|
281
|
-
|
|
282
255
|
this.resetInput();
|
|
283
256
|
var validFiles = files;
|
|
284
|
-
|
|
285
257
|
if (oversize) {
|
|
286
258
|
var oversizeFiles = files;
|
|
287
|
-
|
|
288
259
|
if (Array.isArray(files)) {
|
|
289
260
|
oversizeFiles = [];
|
|
290
261
|
validFiles = [];
|
|
@@ -300,15 +271,11 @@ export default createComponent({
|
|
|
300
271
|
} else {
|
|
301
272
|
validFiles = null;
|
|
302
273
|
}
|
|
303
|
-
|
|
304
274
|
this.$emit('oversize', oversizeFiles, this.getDetail());
|
|
305
275
|
}
|
|
306
|
-
|
|
307
276
|
var isValidFiles = Array.isArray(validFiles) ? Boolean(validFiles.length) : Boolean(validFiles);
|
|
308
|
-
|
|
309
277
|
if (isValidFiles) {
|
|
310
278
|
this.$emit('input', [].concat(this.fileList, toArray(validFiles)));
|
|
311
|
-
|
|
312
279
|
if (this.afterRead) {
|
|
313
280
|
this.afterRead(validFiles, this.getDetail());
|
|
314
281
|
}
|
|
@@ -316,17 +283,13 @@ export default createComponent({
|
|
|
316
283
|
},
|
|
317
284
|
onDelete: function onDelete(file, index) {
|
|
318
285
|
var _file$beforeDelete,
|
|
319
|
-
|
|
320
|
-
|
|
286
|
+
_this5 = this;
|
|
321
287
|
var beforeDelete = (_file$beforeDelete = file.beforeDelete) != null ? _file$beforeDelete : this.beforeDelete;
|
|
322
|
-
|
|
323
288
|
if (beforeDelete) {
|
|
324
289
|
var response = beforeDelete(file, this.getDetail(index));
|
|
325
|
-
|
|
326
290
|
if (!response) {
|
|
327
291
|
return;
|
|
328
292
|
}
|
|
329
|
-
|
|
330
293
|
if (isPromise(response)) {
|
|
331
294
|
response.then(function () {
|
|
332
295
|
_this5.deleteFile(file, index);
|
|
@@ -334,7 +297,6 @@ export default createComponent({
|
|
|
334
297
|
return;
|
|
335
298
|
}
|
|
336
299
|
}
|
|
337
|
-
|
|
338
300
|
this.deleteFile(file, index);
|
|
339
301
|
},
|
|
340
302
|
deleteFile: function deleteFile(file, index) {
|
|
@@ -354,11 +316,9 @@ export default createComponent({
|
|
|
354
316
|
},
|
|
355
317
|
onPreviewImage: function onPreviewImage(item) {
|
|
356
318
|
var _this6 = this;
|
|
357
|
-
|
|
358
319
|
if (!this.previewFullImage) {
|
|
359
320
|
return;
|
|
360
321
|
}
|
|
361
|
-
|
|
362
322
|
var imageFiles = this.fileList.filter(function (item) {
|
|
363
323
|
return isImageFile(item);
|
|
364
324
|
});
|
|
@@ -387,8 +347,6 @@ export default createComponent({
|
|
|
387
347
|
return;
|
|
388
348
|
}
|
|
389
349
|
/* istanbul ignore else */
|
|
390
|
-
|
|
391
|
-
|
|
392
350
|
if (this.$refs.input) {
|
|
393
351
|
this.$refs.input.click();
|
|
394
352
|
}
|
|
@@ -396,8 +354,7 @@ export default createComponent({
|
|
|
396
354
|
genPreviewMask: function genPreviewMask(item) {
|
|
397
355
|
var h = this.$createElement;
|
|
398
356
|
var status = item.status,
|
|
399
|
-
|
|
400
|
-
|
|
357
|
+
message = item.message;
|
|
401
358
|
if (status === 'uploading' || status === 'failed') {
|
|
402
359
|
var MaskIcon = status === 'failed' ? h(Icon, {
|
|
403
360
|
"attrs": {
|
|
@@ -417,10 +374,9 @@ export default createComponent({
|
|
|
417
374
|
},
|
|
418
375
|
genPreviewItem: function genPreviewItem(item, index) {
|
|
419
376
|
var _item$deletable,
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
377
|
+
_this7 = this,
|
|
378
|
+
_item$previewSize,
|
|
379
|
+
_item$imageFit;
|
|
424
380
|
var h = this.$createElement;
|
|
425
381
|
var deleteAble = (_item$deletable = item.deletable) != null ? _item$deletable : this.deletable;
|
|
426
382
|
var showDelete = item.status !== 'uploading' && deleteAble;
|
|
@@ -429,7 +385,6 @@ export default createComponent({
|
|
|
429
385
|
"on": {
|
|
430
386
|
"click": function click(event) {
|
|
431
387
|
event.stopPropagation();
|
|
432
|
-
|
|
433
388
|
_this7.onDelete(item, index);
|
|
434
389
|
}
|
|
435
390
|
}
|
|
@@ -491,11 +446,9 @@ export default createComponent({
|
|
|
491
446
|
},
|
|
492
447
|
genUpload: function genUpload() {
|
|
493
448
|
var h = this.$createElement;
|
|
494
|
-
|
|
495
449
|
if (this.fileList.length >= this.maxCount || !this.showUpload) {
|
|
496
450
|
return;
|
|
497
451
|
}
|
|
498
|
-
|
|
499
452
|
var slot = this.slots();
|
|
500
453
|
var Input = this.readonly ? null : h("input", {
|
|
501
454
|
"attrs": _extends({}, this.$attrs, {
|
|
@@ -509,7 +462,6 @@ export default createComponent({
|
|
|
509
462
|
"change": this.onChange
|
|
510
463
|
}
|
|
511
464
|
});
|
|
512
|
-
|
|
513
465
|
if (slot) {
|
|
514
466
|
return h("div", {
|
|
515
467
|
"class": bem('input-wrapper'),
|
|
@@ -519,9 +471,7 @@ export default createComponent({
|
|
|
519
471
|
}
|
|
520
472
|
}, [slot, Input]);
|
|
521
473
|
}
|
|
522
|
-
|
|
523
474
|
var style;
|
|
524
|
-
|
|
525
475
|
if (this.previewSize) {
|
|
526
476
|
var size = this.previewSizeWithUnit;
|
|
527
477
|
style = {
|
|
@@ -529,7 +479,6 @@ export default createComponent({
|
|
|
529
479
|
height: size
|
|
530
480
|
};
|
|
531
481
|
}
|
|
532
|
-
|
|
533
482
|
return h("div", {
|
|
534
483
|
"class": bem('upload', {
|
|
535
484
|
readonly: this.readonly
|
package/es/uploader/utils.js
CHANGED
|
@@ -3,7 +3,6 @@ export function toArray(item) {
|
|
|
3
3
|
if (Array.isArray(item)) {
|
|
4
4
|
return item;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
6
|
return [item];
|
|
8
7
|
}
|
|
9
8
|
export function readFile(file, resultType) {
|
|
@@ -12,13 +11,10 @@ export function readFile(file, resultType) {
|
|
|
12
11
|
resolve(null);
|
|
13
12
|
return;
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
var reader = new FileReader();
|
|
17
|
-
|
|
18
15
|
reader.onload = function (event) {
|
|
19
16
|
resolve(event.target.result);
|
|
20
17
|
};
|
|
21
|
-
|
|
22
18
|
if (resultType === 'dataUrl') {
|
|
23
19
|
reader.readAsDataURL(file);
|
|
24
20
|
} else if (resultType === 'text') {
|
|
@@ -32,10 +28,8 @@ export function isOversize(files, maxSize) {
|
|
|
32
28
|
if (isFunction(maxSize)) {
|
|
33
29
|
return maxSize(file);
|
|
34
30
|
}
|
|
35
|
-
|
|
36
31
|
return file.size > maxSize;
|
|
37
32
|
}
|
|
38
|
-
|
|
39
33
|
return false;
|
|
40
34
|
});
|
|
41
35
|
}
|
|
@@ -49,18 +43,14 @@ export function isImageFile(item) {
|
|
|
49
43
|
if (item.isImage) {
|
|
50
44
|
return true;
|
|
51
45
|
}
|
|
52
|
-
|
|
53
46
|
if (item.file && item.file.type) {
|
|
54
47
|
return item.file.type.indexOf('image') === 0;
|
|
55
48
|
}
|
|
56
|
-
|
|
57
49
|
if (item.url) {
|
|
58
50
|
return isImageUrl(item.url);
|
|
59
51
|
}
|
|
60
|
-
|
|
61
52
|
if (item.content) {
|
|
62
53
|
return item.content.indexOf('data:image') === 0;
|
|
63
54
|
}
|
|
64
|
-
|
|
65
55
|
return false;
|
|
66
56
|
}
|
package/es/utils/constant.js
CHANGED
package/es/utils/create/bem.js
CHANGED
|
@@ -6,33 +6,29 @@
|
|
|
6
6
|
* b('text', { disabled }) // 'button__text button__text--disabled'
|
|
7
7
|
* b(['disabled', 'primary']) // 'button button--disabled button--primary'
|
|
8
8
|
*/
|
|
9
|
+
|
|
9
10
|
function gen(name, mods) {
|
|
10
11
|
if (!mods) {
|
|
11
12
|
return '';
|
|
12
13
|
}
|
|
13
|
-
|
|
14
14
|
if (typeof mods === 'string') {
|
|
15
15
|
return " " + name + "--" + mods;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
if (Array.isArray(mods)) {
|
|
19
18
|
return mods.reduce(function (ret, item) {
|
|
20
19
|
return ret + gen(name, item);
|
|
21
20
|
}, '');
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
return Object.keys(mods).reduce(function (ret, key) {
|
|
25
23
|
return ret + (mods[key] ? gen(name, key) : '');
|
|
26
24
|
}, '');
|
|
27
25
|
}
|
|
28
|
-
|
|
29
26
|
export function createBEM(name) {
|
|
30
27
|
return function (el, mods) {
|
|
31
28
|
if (el && typeof el !== 'string') {
|
|
32
29
|
mods = el;
|
|
33
30
|
el = '';
|
|
34
31
|
}
|
|
35
|
-
|
|
36
32
|
el = el ? name + "__" + el : name;
|
|
37
33
|
return "" + el + gen(el, mods);
|
|
38
34
|
};
|