zartui 1.0.31 → 1.0.33
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/calendar/index.js +1 -1
- package/es/index.js +1 -1
- package/es/pull-refresh/index.js +21 -5
- package/es/radio-picker/index.js +5 -3
- package/es/utils/dom/scroll.js +18 -1
- package/lib/calendar/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/pull-refresh/index.js +20 -4
- package/lib/radio-picker/index.js +4 -4
- package/lib/utils/dom/scroll.js +22 -1
- package/lib/zart.js +1047 -1409
- package/lib/zart.min.js +4 -4
- package/package.json +1 -1
package/es/calendar/index.js
CHANGED
|
@@ -436,7 +436,6 @@ export default createComponent({
|
|
|
436
436
|
"lazyRender": this.lazyRender,
|
|
437
437
|
"currentDate": this.currentDate,
|
|
438
438
|
"showSubtitle": this.showSubtitle,
|
|
439
|
-
"showWeekDays": this.showWeekDays,
|
|
440
439
|
"allowSameDay": this.allowSameDay,
|
|
441
440
|
"showMonthTitle": showMonthTitle,
|
|
442
441
|
"firstDayOfWeek": this.dayOffset
|
|
@@ -496,6 +495,7 @@ export default createComponent({
|
|
|
496
495
|
"showTitle": this.showTitle,
|
|
497
496
|
"subtitle": this.subtitle,
|
|
498
497
|
"showSubtitle": this.showSubtitle,
|
|
498
|
+
"showWeekDays": this.showWeekDays,
|
|
499
499
|
"firstDayOfWeek": this.dayOffset
|
|
500
500
|
},
|
|
501
501
|
"scopedSlots": {
|
package/es/index.js
CHANGED
|
@@ -78,7 +78,7 @@ import Tag from './tag';
|
|
|
78
78
|
import Timeline from './timeline';
|
|
79
79
|
import Toast from './toast';
|
|
80
80
|
import Uploader from './uploader';
|
|
81
|
-
var version = '1.0.
|
|
81
|
+
var version = '1.0.33';
|
|
82
82
|
|
|
83
83
|
function install(Vue) {
|
|
84
84
|
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, PdfViewer, PdfViewerV2, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, RadioPicker, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader];
|
package/es/pull-refresh/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Utils
|
|
2
2
|
import { createNamespace } from '../utils';
|
|
3
3
|
import { preventDefault } from '../utils/dom/event';
|
|
4
|
-
import { getScrollTop, getScroller } from '../utils/dom/scroll'; // Mixins
|
|
4
|
+
import { getScrollTop, getScroller, getTargetDom } from '../utils/dom/scroll'; // Mixins
|
|
5
5
|
|
|
6
6
|
import { TouchMixin } from '../mixins/touch'; // Components
|
|
7
7
|
|
|
@@ -21,21 +21,25 @@ export default createComponent({
|
|
|
21
21
|
successText: String,
|
|
22
22
|
pullingText: {
|
|
23
23
|
type: String,
|
|
24
|
-
default:
|
|
24
|
+
default: '下拉即可刷新...'
|
|
25
25
|
},
|
|
26
26
|
loosingText: {
|
|
27
27
|
type: String,
|
|
28
|
-
default:
|
|
28
|
+
default: '释放即可刷新...'
|
|
29
29
|
},
|
|
30
30
|
loadingText: {
|
|
31
31
|
type: String,
|
|
32
|
-
default:
|
|
32
|
+
default: '加载中...'
|
|
33
33
|
},
|
|
34
34
|
pullDistance: [Number, String],
|
|
35
35
|
value: {
|
|
36
36
|
type: Boolean,
|
|
37
37
|
required: true
|
|
38
38
|
},
|
|
39
|
+
scrollElement: {
|
|
40
|
+
type: [String, Function, HTMLElement],
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
39
43
|
successDuration: {
|
|
40
44
|
type: [Number, String],
|
|
41
45
|
default: 500
|
|
@@ -66,6 +70,19 @@ export default createComponent({
|
|
|
66
70
|
height: this.headHeight + "px"
|
|
67
71
|
};
|
|
68
72
|
}
|
|
73
|
+
},
|
|
74
|
+
scrollEl: function scrollEl() {
|
|
75
|
+
if (this.scrollElement) {
|
|
76
|
+
var targetDom = getTargetDom(this.scrollElement);
|
|
77
|
+
|
|
78
|
+
if (targetDom) {
|
|
79
|
+
return targetDom;
|
|
80
|
+
} else {
|
|
81
|
+
console.warn('请检查props scroll-element元素是否存在!');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return getScroller(this.$el);
|
|
69
86
|
}
|
|
70
87
|
},
|
|
71
88
|
watch: {
|
|
@@ -83,7 +100,6 @@ export default createComponent({
|
|
|
83
100
|
},
|
|
84
101
|
mounted: function mounted() {
|
|
85
102
|
this.bindTouchEvent(this.$refs.track);
|
|
86
|
-
this.scrollEl = getScroller(this.$el);
|
|
87
103
|
},
|
|
88
104
|
methods: {
|
|
89
105
|
checkPullStart: function checkPullStart(event) {
|
package/es/radio-picker/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
// Utils
|
|
3
|
-
import debounce from 'lodash.debounce';
|
|
4
3
|
import { createNamespace } from '../utils';
|
|
5
4
|
import { preventDefault } from '../utils/dom/event';
|
|
6
5
|
import { unitToPx } from '../utils/format/unit';
|
|
7
|
-
import { DEFAULT_WRAP_HEIGHT, radioPickerProps } from './shared';
|
|
6
|
+
import { DEFAULT_WRAP_HEIGHT, radioPickerProps } from './shared';
|
|
7
|
+
|
|
8
|
+
var _ = require('lodash'); // Components
|
|
9
|
+
|
|
8
10
|
|
|
9
11
|
import Loading from '../loading';
|
|
10
12
|
import { PopupMixin } from '../mixins/popup';
|
|
@@ -394,7 +396,7 @@ export default createComponent({
|
|
|
394
396
|
handleSearch: function handleSearch() {
|
|
395
397
|
var _this6 = this;
|
|
396
398
|
|
|
397
|
-
return debounce(function (val) {
|
|
399
|
+
return _.debounce(function (val) {
|
|
398
400
|
_this6.searchVal = val;
|
|
399
401
|
}, 500);
|
|
400
402
|
},
|
package/es/utils/dom/scroll.js
CHANGED
|
@@ -66,4 +66,21 @@ export function getVisibleTop(el) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return el.getBoundingClientRect().top;
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
|
+
export var getTargetDom = function getTargetDom(target) {
|
|
71
|
+
if (target) {
|
|
72
|
+
if (typeof target === 'string') {
|
|
73
|
+
return document.querySelectorAll(target)[0];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (typeof target === 'function') {
|
|
77
|
+
return target();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (typeof target === 'object' && target instanceof window.HTMLElement) {
|
|
81
|
+
return target;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return document.body;
|
|
86
|
+
};
|
package/lib/calendar/index.js
CHANGED
|
@@ -452,7 +452,6 @@ var _default2 = (0, _utils.createComponent)({
|
|
|
452
452
|
"lazyRender": this.lazyRender,
|
|
453
453
|
"currentDate": this.currentDate,
|
|
454
454
|
"showSubtitle": this.showSubtitle,
|
|
455
|
-
"showWeekDays": this.showWeekDays,
|
|
456
455
|
"allowSameDay": this.allowSameDay,
|
|
457
456
|
"showMonthTitle": showMonthTitle,
|
|
458
457
|
"firstDayOfWeek": this.dayOffset
|
|
@@ -512,6 +511,7 @@ var _default2 = (0, _utils.createComponent)({
|
|
|
512
511
|
"showTitle": this.showTitle,
|
|
513
512
|
"subtitle": this.subtitle,
|
|
514
513
|
"showSubtitle": this.showSubtitle,
|
|
514
|
+
"showWeekDays": this.showWeekDays,
|
|
515
515
|
"firstDayOfWeek": this.dayOffset
|
|
516
516
|
},
|
|
517
517
|
"scopedSlots": {
|
package/lib/index.js
CHANGED
|
@@ -325,7 +325,7 @@ exports.Toast = _toast.default;
|
|
|
325
325
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
|
326
326
|
|
|
327
327
|
exports.Uploader = _uploader.default;
|
|
328
|
-
var version = '1.0.
|
|
328
|
+
var version = '1.0.33';
|
|
329
329
|
exports.version = version;
|
|
330
330
|
|
|
331
331
|
function install(Vue) {
|
|
@@ -33,21 +33,25 @@ var _default = createComponent({
|
|
|
33
33
|
successText: String,
|
|
34
34
|
pullingText: {
|
|
35
35
|
type: String,
|
|
36
|
-
default:
|
|
36
|
+
default: '下拉即可刷新...'
|
|
37
37
|
},
|
|
38
38
|
loosingText: {
|
|
39
39
|
type: String,
|
|
40
|
-
default:
|
|
40
|
+
default: '释放即可刷新...'
|
|
41
41
|
},
|
|
42
42
|
loadingText: {
|
|
43
43
|
type: String,
|
|
44
|
-
default:
|
|
44
|
+
default: '加载中...'
|
|
45
45
|
},
|
|
46
46
|
pullDistance: [Number, String],
|
|
47
47
|
value: {
|
|
48
48
|
type: Boolean,
|
|
49
49
|
required: true
|
|
50
50
|
},
|
|
51
|
+
scrollElement: {
|
|
52
|
+
type: [String, Function, HTMLElement],
|
|
53
|
+
required: false
|
|
54
|
+
},
|
|
51
55
|
successDuration: {
|
|
52
56
|
type: [Number, String],
|
|
53
57
|
default: 500
|
|
@@ -78,6 +82,19 @@ var _default = createComponent({
|
|
|
78
82
|
height: this.headHeight + "px"
|
|
79
83
|
};
|
|
80
84
|
}
|
|
85
|
+
},
|
|
86
|
+
scrollEl: function scrollEl() {
|
|
87
|
+
if (this.scrollElement) {
|
|
88
|
+
var targetDom = (0, _scroll.getTargetDom)(this.scrollElement);
|
|
89
|
+
|
|
90
|
+
if (targetDom) {
|
|
91
|
+
return targetDom;
|
|
92
|
+
} else {
|
|
93
|
+
console.warn('请检查props scroll-element元素是否存在!');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return (0, _scroll.getScroller)(this.$el);
|
|
81
98
|
}
|
|
82
99
|
},
|
|
83
100
|
watch: {
|
|
@@ -95,7 +112,6 @@ var _default = createComponent({
|
|
|
95
112
|
},
|
|
96
113
|
mounted: function mounted() {
|
|
97
114
|
this.bindTouchEvent(this.$refs.track);
|
|
98
|
-
this.scrollEl = (0, _scroll.getScroller)(this.$el);
|
|
99
115
|
},
|
|
100
116
|
methods: {
|
|
101
117
|
checkPullStart: function checkPullStart(event) {
|
|
@@ -7,8 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
|
|
10
|
-
var _lodash = _interopRequireDefault(require("lodash.debounce"));
|
|
11
|
-
|
|
12
10
|
var _utils = require("../utils");
|
|
13
11
|
|
|
14
12
|
var _event = require("../utils/dom/event");
|
|
@@ -28,7 +26,9 @@ var _search = _interopRequireDefault(require("../search"));
|
|
|
28
26
|
var _PickerColumn = _interopRequireDefault(require("./PickerColumn"));
|
|
29
27
|
|
|
30
28
|
// Utils
|
|
31
|
-
// Components
|
|
29
|
+
var _ = require('lodash'); // Components
|
|
30
|
+
|
|
31
|
+
|
|
32
32
|
var _createNamespace = (0, _utils.createNamespace)('radio-picker'),
|
|
33
33
|
createComponent = _createNamespace[0],
|
|
34
34
|
bem = _createNamespace[1],
|
|
@@ -411,7 +411,7 @@ var _default2 = createComponent({
|
|
|
411
411
|
handleSearch: function handleSearch() {
|
|
412
412
|
var _this6 = this;
|
|
413
413
|
|
|
414
|
-
return
|
|
414
|
+
return _.debounce(function (val) {
|
|
415
415
|
_this6.searchVal = val;
|
|
416
416
|
}, 500);
|
|
417
417
|
},
|
package/lib/utils/dom/scroll.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.setRootScrollTop = setRootScrollTop;
|
|
|
9
9
|
exports.getElementTop = getElementTop;
|
|
10
10
|
exports.getVisibleHeight = getVisibleHeight;
|
|
11
11
|
exports.getVisibleTop = getVisibleTop;
|
|
12
|
+
exports.getTargetDom = void 0;
|
|
12
13
|
|
|
13
14
|
function isWindow(val) {
|
|
14
15
|
return val === window;
|
|
@@ -86,4 +87,24 @@ function getVisibleTop(el) {
|
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
return el.getBoundingClientRect().top;
|
|
89
|
-
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
var getTargetDom = function getTargetDom(target) {
|
|
93
|
+
if (target) {
|
|
94
|
+
if (typeof target === 'string') {
|
|
95
|
+
return document.querySelectorAll(target)[0];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (typeof target === 'function') {
|
|
99
|
+
return target();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (typeof target === 'object' && target instanceof window.HTMLElement) {
|
|
103
|
+
return target;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return document.body;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
exports.getTargetDom = getTargetDom;
|