zartui 2.0.77 → 2.0.79-beta.1

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/lib/index.js CHANGED
@@ -309,7 +309,7 @@ exports.Toast = _toast.default;
309
309
  var _uploader = _interopRequireDefault(require("./uploader"));
310
310
 
311
311
  exports.Uploader = _uploader.default;
312
- var version = '2.0.76';
312
+ var version = '2.0.79-beta.1';
313
313
  exports.version = version;
314
314
 
315
315
  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,17 @@ var _default = createComponent({
78
82
  height: this.headHeight + "px"
79
83
  };
80
84
  }
85
+ },
86
+ scrollEl: function scrollEl() {
87
+ if (this.scrollElement) {
88
+ if (this.scrollElement) {
89
+ return (0, _scroll.getTargetDom)(this.scrollElement);
90
+ }
91
+
92
+ return this.scrollElement();
93
+ }
94
+
95
+ return (0, _scroll.getScroller)(this.$el);
81
96
  }
82
97
  },
83
98
  watch: {
@@ -95,7 +110,6 @@ var _default = createComponent({
95
110
  },
96
111
  mounted: function mounted() {
97
112
  this.bindTouchEvent(this.$refs.track);
98
- this.scrollEl = (0, _scroll.getScroller)(this.$el);
99
113
  },
100
114
  methods: {
101
115
  checkPullStart: function checkPullStart(event) {
@@ -1 +1 @@
1
- .zt2-search{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:8px 16px;min-height:54px;background-color:#f5faff}.zt2-search__content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;background-color:rgba(45,75,115,.04);border:1px solid transparent;border-radius:2px;box-shadow:inset 4px 4px 8px 0 rgba(45,75,115,.1);background-clip:padding-box;position:relative}.zt2-search__content::before{content:'';position:absolute;top:0;right:0;left:0;bottom:0;z-index:-1;margin:-1px;border-radius:inherit;background:-webkit-linear-gradient(#fff,rgba(255,255,255,.4));background:linear-gradient(#fff,rgba(255,255,255,.4))}.zt2-search__content--round{border-radius:999px}.zt2-search__label{padding:8px 0 8px 12px;color:rgba(0,0,0,.6);font-weight:400;font-size:14px;line-height:20px}.zt2-search .zt2-field__root{background-color:transparent;padding:0}.zt2-search .zt2-field__label{margin-right:0}.zt2-search .zt2-cell__title.zt2-field__label{-webkit-box-flex:unset;-webkit-flex:unset;flex:unset}.zt2-search .zt2-cell{-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:8px 12px;background:0 0;line-height:20px;font-size:14px;font-weight:400}.zt2-search .zt2-cell__left-icon{color:#969799}.zt2-search .zt2-field{margin:0}.zt2-search .zt2-field__control{color:#2d4b73}.zt2-search--show-action{padding-right:0}.zt2-search input{caret-color:#0091fa}.zt2-search input::-webkit-search-cancel-button,.zt2-search input::-webkit-search-decoration,.zt2-search input::-webkit-search-results-button,.zt2-search input::-webkit-search-results-decoration{display:none}.zt2-search input::-webkit-input-placeholder{color:rgba(45,75,115,.2)}.zt2-search input::placeholder{color:rgba(45,75,115,.2)}.zt2-search__action{padding:0 16px 0 12px;color:#0091fa;font-size:14px;height:28px;cursor:pointer;-webkit-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}
1
+ .zt2-search{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:8px 16px;min-height:54px;background-color:#f5faff}.zt2-search__content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;background-color:rgba(45,75,115,.04);border:1px solid transparent;border-radius:2px;box-shadow:inset 4px 4px 8px 0 rgba(45,75,115,.1);background-clip:padding-box;position:relative}.zt2-search__content::before{content:'';position:absolute;top:0;right:0;left:0;bottom:0;z-index:-1;margin:-1px;border-radius:inherit;background:-webkit-linear-gradient(#fff,rgba(255,255,255,.4));background:linear-gradient(#fff,rgba(255,255,255,.4))}.zt2-search__content--round{border-radius:999px}.zt2-search__label{padding:8px 0 8px 12px;color:rgba(0,0,0,.6);font-weight:400;font-size:14px;line-height:20px}.zt2-search .zt2-field__root{background-color:transparent;padding:0}.zt2-search .zt2-field__root .zt2-cell{-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:8px 12px;background:0 0;line-height:20px;font-size:14px;font-weight:400}.zt2-search .zt2-field__root .zt2-cell__left-icon{color:#969799}.zt2-search .zt2-field__label{margin-right:0}.zt2-search .zt2-cell__title.zt2-field__label{-webkit-box-flex:unset;-webkit-flex:unset;flex:unset}.zt2-search .zt2-field{margin:0}.zt2-search .zt2-field__control{color:#2d4b73}.zt2-search--show-action{padding-right:0}.zt2-search input{caret-color:#0091fa}.zt2-search input::-webkit-search-cancel-button,.zt2-search input::-webkit-search-decoration,.zt2-search input::-webkit-search-results-button,.zt2-search input::-webkit-search-results-decoration{display:none}.zt2-search input::-webkit-input-placeholder{color:rgba(45,75,115,.2)}.zt2-search input::placeholder{color:rgba(45,75,115,.2)}.zt2-search__action{padding:0 16px 0 12px;color:#0091fa;font-size:14px;height:28px;cursor:pointer;-webkit-user-select:none;user-select:none;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}
@@ -47,6 +47,18 @@
47
47
  .@{base-prefix}-field__root {
48
48
  background-color: transparent;
49
49
  padding: 0;
50
+
51
+ .@{base-prefix}-cell {
52
+ flex: 1;
53
+ padding: @search-cell-padding;
54
+ background: transparent;
55
+ line-height: @search-input-height;
56
+ font-size: @font-size-md;
57
+ font-weight: 400;
58
+ &__left-icon {
59
+ color: @search-left-icon-color;
60
+ }
61
+ }
50
62
  }
51
63
 
52
64
  .@{base-prefix}-field__label {
@@ -57,18 +69,6 @@
57
69
  flex: unset;
58
70
  }
59
71
 
60
- .@{base-prefix}-cell {
61
- flex: 1;
62
- padding: @search-cell-padding;
63
- background: transparent;
64
- line-height: @search-input-height;
65
- font-size: @font-size-md;
66
- font-weight: 400;
67
- &__left-icon {
68
- color: @search-left-icon-color;
69
- }
70
- }
71
-
72
72
  .@{base-prefix}-field {
73
73
  margin: 0
74
74
  }
@@ -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;
package/lib/zart.js CHANGED
@@ -1654,6 +1654,23 @@ function getVisibleTop(el) {
1654
1654
 
1655
1655
  return el.getBoundingClientRect().top;
1656
1656
  }
1657
+ var getTargetDom = function getTargetDom(target) {
1658
+ if (target) {
1659
+ if (typeof target === 'string') {
1660
+ return document.querySelectorAll(target)[0];
1661
+ }
1662
+
1663
+ if (typeof target === 'function') {
1664
+ return target();
1665
+ }
1666
+
1667
+ if (typeof target === 'object' && target instanceof window.HTMLElement) {
1668
+ return target;
1669
+ }
1670
+ }
1671
+
1672
+ return document.body;
1673
+ };
1657
1674
  // CONCATENATED MODULE: ./es/mixins/touch.js
1658
1675
 
1659
1676
  var MIN_DISTANCE = 10;
@@ -26484,21 +26501,25 @@ var TEXT_STATUS = ['pulling', 'loosing', 'success'];
26484
26501
  successText: String,
26485
26502
  pullingText: {
26486
26503
  type: String,
26487
- default: "下拉即可刷新..."
26504
+ default: '下拉即可刷新...'
26488
26505
  },
26489
26506
  loosingText: {
26490
26507
  type: String,
26491
- default: "释放即可刷新..."
26508
+ default: '释放即可刷新...'
26492
26509
  },
26493
26510
  loadingText: {
26494
26511
  type: String,
26495
- default: "加载中..."
26512
+ default: '加载中...'
26496
26513
  },
26497
26514
  pullDistance: [Number, String],
26498
26515
  value: {
26499
26516
  type: Boolean,
26500
26517
  required: true
26501
26518
  },
26519
+ scrollElement: {
26520
+ type: [String, Function, HTMLElement],
26521
+ required: false
26522
+ },
26502
26523
  successDuration: {
26503
26524
  type: [Number, String],
26504
26525
  default: 500
@@ -26529,6 +26550,17 @@ var TEXT_STATUS = ['pulling', 'loosing', 'success'];
26529
26550
  height: this.headHeight + "px"
26530
26551
  };
26531
26552
  }
26553
+ },
26554
+ scrollEl: function scrollEl() {
26555
+ if (this.scrollElement) {
26556
+ if (this.scrollElement) {
26557
+ return getTargetDom(this.scrollElement);
26558
+ }
26559
+
26560
+ return this.scrollElement();
26561
+ }
26562
+
26563
+ return getScroller(this.$el);
26532
26564
  }
26533
26565
  },
26534
26566
  watch: {
@@ -26546,7 +26578,6 @@ var TEXT_STATUS = ['pulling', 'loosing', 'success'];
26546
26578
  },
26547
26579
  mounted: function mounted() {
26548
26580
  this.bindTouchEvent(this.$refs.track);
26549
- this.scrollEl = getScroller(this.$el);
26550
26581
  },
26551
26582
  methods: {
26552
26583
  checkPullStart: function checkPullStart(event) {
@@ -30702,7 +30733,7 @@ var uploader_createNamespace = Object(utils["b" /* createNamespace */])('uploade
30702
30733
 
30703
30734
 
30704
30735
 
30705
- var version = '2.0.76';
30736
+ var version = '2.0.79-beta.1';
30706
30737
 
30707
30738
  function install(Vue) {
30708
30739
  var components = [action_sheet, es_area, avatar, back_top, badge, es_button, calendar, cascader, cell, cell_group, es_checkbox, checkbox_group, col, collapse, collapse_item, count_down, datetime_picker, dialog, divider, dropdown_item, dropdown_menu, empty, es_field, fold_dialog, es_form, grid, grid_item, hierarchy_select, es_icon, es_image, image_preview, index_anchor, index_bar, es_info, lazyload, es_list, es_loading, locale["a" /* default */], media_picker, media_player, multiple_picker, nav_bar, notice_bar, number_keyboard, es_overlay, password_input, es_picker, popover, popup, pull_refresh, es_radio, radio_group, rate, row, search, signature, skeleton, slider, es_step, stepper, es_steps, es_sticky, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, table, tabs, es_tag, timeline, es_toast, uploader];