zartui 2.0.31 → 2.0.32

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/field/index.js CHANGED
@@ -100,6 +100,12 @@ export default createComponent({
100
100
  this.resetValidation();
101
101
  this.validateWithTrigger('onChange');
102
102
  this.$nextTick(this.adjustSize);
103
+ },
104
+ autosize: {
105
+ deep: true,
106
+ handler: function handler() {
107
+ this.$nextTick(this.adjustSize);
108
+ }
103
109
  }
104
110
  },
105
111
  mounted: function mounted() {
package/es/index.js CHANGED
@@ -76,7 +76,7 @@ import Tag from './tag';
76
76
  import Timeline from './timeline';
77
77
  import Toast from './toast';
78
78
  import Uploader from './uploader';
79
- var version = '2.0.31';
79
+ var version = '2.0.32';
80
80
 
81
81
  function install(Vue) {
82
82
  var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, 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, 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/popup/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { createNamespace, isDef } from '../utils';
2
2
  import { PopupMixin } from '../mixins/popup';
3
3
  import Icon from '../icon';
4
+ import { unitToPx } from "../utils/format/unit";
4
5
 
5
6
  var _createNamespace = createNamespace('popup'),
6
7
  createComponent = _createNamespace[0],
@@ -42,6 +43,15 @@ export default createComponent({
42
43
  type: Number,
43
44
  default: 60
44
45
  },
46
+ // 控制滑动区域的高度,滑动的最小高
47
+ minDragHeight: {
48
+ type: String,
49
+ default: '40px'
50
+ },
51
+ maxDragHeight: {
52
+ type: String,
53
+ default: '85vh'
54
+ },
45
55
  sliderShow: {
46
56
  type: Boolean,
47
57
  default: false
@@ -69,13 +79,10 @@ export default createComponent({
69
79
  },
70
80
  data: function data() {
71
81
  return {
72
- positionY: 0,
73
82
  timerId: null,
74
83
  contentStyle: "height:" + this.sliderContentHeight + "px;",
75
84
  touchHeight: 0,
76
- touchPoint: 0,
77
- // 控制滑动区域的高度
78
- touchAreaHeight: 40
85
+ touchPoint: 0
79
86
  };
80
87
  },
81
88
  methods: {
@@ -98,14 +105,15 @@ export default createComponent({
98
105
  }
99
106
 
100
107
  var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
101
- this.positionY = event.touches[0].clientY;
108
+ var touchAreaHeight = unitToPx(this.minDragHeight);
109
+ var positionY = event.touches[0].clientY;
102
110
  this.timerId = setTimeout(function () {
103
- if (_this2.positionY === 0 || _this2.positionY < h * 0.15) {
111
+ if (positionY === 0 || positionY < h - unitToPx(_this2.maxDragHeight)) {
104
112
  return;
105
113
  }
106
114
 
107
- _this2.touchHeight = _this2.positionY - _this2.touchAreaHeight > h - _this2.touchAreaHeight ? h - _this2.touchAreaHeight + _this2.touchPoint : _this2.positionY;
108
- _this2.contentStyle = "height:" + (h - _this2.touchHeight - _this2.touchAreaHeight + _this2.touchPoint) + "px;";
115
+ _this2.touchHeight = positionY - touchAreaHeight > h - touchAreaHeight ? h - touchAreaHeight + _this2.touchPoint : positionY;
116
+ _this2.contentStyle = "height:" + (h - _this2.touchHeight - touchAreaHeight + _this2.touchPoint) + "px;";
109
117
  }, 10);
110
118
  },
111
119
  endMove: function endMove() {
@@ -154,7 +162,8 @@ export default createComponent({
154
162
  "touchmove": this.move,
155
163
  "touchend": this.endMove,
156
164
  "touchstart": this.startMove
157
- }
165
+ },
166
+ "style": "height:" + this.minDragHeight
158
167
  }, [h("div", {
159
168
  "class": bem('slider-bar')
160
169
  })]), h("div", {
@@ -116,6 +116,12 @@ var _default = createComponent({
116
116
  this.resetValidation();
117
117
  this.validateWithTrigger('onChange');
118
118
  this.$nextTick(this.adjustSize);
119
+ },
120
+ autosize: {
121
+ deep: true,
122
+ handler: function handler() {
123
+ this.$nextTick(this.adjustSize);
124
+ }
119
125
  }
120
126
  },
121
127
  mounted: function mounted() {
package/lib/index.js CHANGED
@@ -317,7 +317,7 @@ exports.Toast = _toast.default;
317
317
  var _uploader = _interopRequireDefault(require("./uploader"));
318
318
 
319
319
  exports.Uploader = _uploader.default;
320
- var version = '2.0.31';
320
+ var version = '2.0.32';
321
321
  exports.version = version;
322
322
 
323
323
  function install(Vue) {
@@ -11,6 +11,8 @@ var _popup = require("../mixins/popup");
11
11
 
12
12
  var _icon = _interopRequireDefault(require("../icon"));
13
13
 
14
+ var _unit = require("../utils/format/unit");
15
+
14
16
  var _createNamespace = (0, _utils.createNamespace)('popup'),
15
17
  createComponent = _createNamespace[0],
16
18
  bem = _createNamespace[1];
@@ -51,6 +53,15 @@ var _default = createComponent({
51
53
  type: Number,
52
54
  default: 60
53
55
  },
56
+ // 控制滑动区域的高度,滑动的最小高
57
+ minDragHeight: {
58
+ type: String,
59
+ default: '40px'
60
+ },
61
+ maxDragHeight: {
62
+ type: String,
63
+ default: '85vh'
64
+ },
54
65
  sliderShow: {
55
66
  type: Boolean,
56
67
  default: false
@@ -78,13 +89,10 @@ var _default = createComponent({
78
89
  },
79
90
  data: function data() {
80
91
  return {
81
- positionY: 0,
82
92
  timerId: null,
83
93
  contentStyle: "height:" + this.sliderContentHeight + "px;",
84
94
  touchHeight: 0,
85
- touchPoint: 0,
86
- // 控制滑动区域的高度
87
- touchAreaHeight: 40
95
+ touchPoint: 0
88
96
  };
89
97
  },
90
98
  methods: {
@@ -107,14 +115,15 @@ var _default = createComponent({
107
115
  }
108
116
 
109
117
  var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
110
- this.positionY = event.touches[0].clientY;
118
+ var touchAreaHeight = (0, _unit.unitToPx)(this.minDragHeight);
119
+ var positionY = event.touches[0].clientY;
111
120
  this.timerId = setTimeout(function () {
112
- if (_this2.positionY === 0 || _this2.positionY < h * 0.15) {
121
+ if (positionY === 0 || positionY < h - (0, _unit.unitToPx)(_this2.maxDragHeight)) {
113
122
  return;
114
123
  }
115
124
 
116
- _this2.touchHeight = _this2.positionY - _this2.touchAreaHeight > h - _this2.touchAreaHeight ? h - _this2.touchAreaHeight + _this2.touchPoint : _this2.positionY;
117
- _this2.contentStyle = "height:" + (h - _this2.touchHeight - _this2.touchAreaHeight + _this2.touchPoint) + "px;";
125
+ _this2.touchHeight = positionY - touchAreaHeight > h - touchAreaHeight ? h - touchAreaHeight + _this2.touchPoint : positionY;
126
+ _this2.contentStyle = "height:" + (h - _this2.touchHeight - touchAreaHeight + _this2.touchPoint) + "px;";
118
127
  }, 10);
119
128
  },
120
129
  endMove: function endMove() {
@@ -163,7 +172,8 @@ var _default = createComponent({
163
172
  "touchmove": this.move,
164
173
  "touchend": this.endMove,
165
174
  "touchstart": this.startMove
166
- }
175
+ },
176
+ "style": "height:" + this.minDragHeight
167
177
  }, [h("div", {
168
178
  "class": bem('slider-bar')
169
179
  })]), h("div", {
package/lib/zart.js CHANGED
@@ -204,7 +204,7 @@ var SlotsMixin = {
204
204
  }
205
205
  };
206
206
  // EXTERNAL MODULE: ./es/telemetry/index.js
207
- var telemetry = __webpack_require__(11);
207
+ var telemetry = __webpack_require__(12);
208
208
 
209
209
  // CONCATENATED MODULE: ./es/mixins/telemetry.js
210
210
 
@@ -307,7 +307,7 @@ function createNamespace(name) {
307
307
  return [createComponent(name), createBEM(name), createI18N(name)];
308
308
  }
309
309
  // EXTERNAL MODULE: ./es/utils/format/unit.js
310
- var unit = __webpack_require__(12);
310
+ var unit = __webpack_require__(11);
311
311
 
312
312
  // CONCATENATED MODULE: ./es/utils/index.js
313
313
 
@@ -634,67 +634,6 @@ function _assertThisInitialized(self) {
634
634
  /* 11 */
635
635
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
636
636
 
637
- "use strict";
638
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return TelemetryEvent; });
639
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Telemetry; });
640
- // eslint-disable-next-line max-classes-per-file
641
- var TelemetryEvent = function TelemetryEvent(name, attributes) {
642
- this.name = name;
643
-
644
- if (attributes) {
645
- this.attributes = attributes;
646
- } else {
647
- this.attributes = {};
648
- }
649
- };
650
- var Telemetry = /*#__PURE__*/function () {
651
- function Telemetry() {}
652
-
653
- var _proto = Telemetry.prototype;
654
-
655
- _proto.getRoute = function getRoute() {
656
- if (this.route instanceof Function) {
657
- var routeFunc = this.route;
658
- return routeFunc();
659
- }
660
-
661
- return this.route;
662
- };
663
-
664
- _proto.track = function track(event) {
665
- event.attributes.project = this.project;
666
- event.attributes.app = this.app;
667
- event.attributes.route = this.getRoute();
668
-
669
- if (this.send) {
670
- this.send(event);
671
- } else {// console.debug(JSON.stringify(event))
672
- }
673
- };
674
-
675
- _proto.trackClick = function trackClick(event) {
676
- event.attributes.click = 1;
677
- this.track(event);
678
- };
679
-
680
- _proto.trackAppear = function trackAppear(event) {
681
- event.attributes.appear = 1;
682
- this.track(event);
683
- };
684
-
685
- _proto.trackDisappear = function trackDisappear(event) {
686
- event.attributes.disappear = 1;
687
- this.track(event);
688
- };
689
-
690
- return Telemetry;
691
- }();
692
- Telemetry.sharedInstance = new Telemetry();
693
-
694
- /***/ }),
695
- /* 12 */
696
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
697
-
698
637
  "use strict";
699
638
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addUnit; });
700
639
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return unitToPx; });
@@ -760,6 +699,67 @@ function unitToPx(value) {
760
699
  return parseFloat(value);
761
700
  }
762
701
 
702
+ /***/ }),
703
+ /* 12 */
704
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
705
+
706
+ "use strict";
707
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return TelemetryEvent; });
708
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Telemetry; });
709
+ // eslint-disable-next-line max-classes-per-file
710
+ var TelemetryEvent = function TelemetryEvent(name, attributes) {
711
+ this.name = name;
712
+
713
+ if (attributes) {
714
+ this.attributes = attributes;
715
+ } else {
716
+ this.attributes = {};
717
+ }
718
+ };
719
+ var Telemetry = /*#__PURE__*/function () {
720
+ function Telemetry() {}
721
+
722
+ var _proto = Telemetry.prototype;
723
+
724
+ _proto.getRoute = function getRoute() {
725
+ if (this.route instanceof Function) {
726
+ var routeFunc = this.route;
727
+ return routeFunc();
728
+ }
729
+
730
+ return this.route;
731
+ };
732
+
733
+ _proto.track = function track(event) {
734
+ event.attributes.project = this.project;
735
+ event.attributes.app = this.app;
736
+ event.attributes.route = this.getRoute();
737
+
738
+ if (this.send) {
739
+ this.send(event);
740
+ } else {// console.debug(JSON.stringify(event))
741
+ }
742
+ };
743
+
744
+ _proto.trackClick = function trackClick(event) {
745
+ event.attributes.click = 1;
746
+ this.track(event);
747
+ };
748
+
749
+ _proto.trackAppear = function trackAppear(event) {
750
+ event.attributes.appear = 1;
751
+ this.track(event);
752
+ };
753
+
754
+ _proto.trackDisappear = function trackDisappear(event) {
755
+ event.attributes.disappear = 1;
756
+ this.track(event);
757
+ };
758
+
759
+ return Telemetry;
760
+ }();
761
+ Telemetry.sharedInstance = new Telemetry();
762
+
763
763
  /***/ }),
764
764
  /* 13 */
765
765
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
@@ -24540,11 +24540,15 @@ Icon.props = {
24540
24540
  }
24541
24541
  };
24542
24542
  /* harmony default export */ var es_icon = (icon_createComponent(Icon));
24543
+ // EXTERNAL MODULE: ./es/utils/format/unit.js
24544
+ var unit = __webpack_require__(11);
24545
+
24543
24546
  // CONCATENATED MODULE: ./es/popup/index.js
24544
24547
 
24545
24548
 
24546
24549
 
24547
24550
 
24551
+
24548
24552
  var popup_createNamespace = Object(utils["b" /* createNamespace */])('popup'),
24549
24553
  popup_createComponent = popup_createNamespace[0],
24550
24554
  popup_bem = popup_createNamespace[1];
@@ -24585,6 +24589,15 @@ var popup_createNamespace = Object(utils["b" /* createNamespace */])('popup'),
24585
24589
  type: Number,
24586
24590
  default: 60
24587
24591
  },
24592
+ // 控制滑动区域的高度,滑动的最小高
24593
+ minDragHeight: {
24594
+ type: String,
24595
+ default: '40px'
24596
+ },
24597
+ maxDragHeight: {
24598
+ type: String,
24599
+ default: '85vh'
24600
+ },
24588
24601
  sliderShow: {
24589
24602
  type: Boolean,
24590
24603
  default: false
@@ -24612,13 +24625,10 @@ var popup_createNamespace = Object(utils["b" /* createNamespace */])('popup'),
24612
24625
  },
24613
24626
  data: function data() {
24614
24627
  return {
24615
- positionY: 0,
24616
24628
  timerId: null,
24617
24629
  contentStyle: "height:" + this.sliderContentHeight + "px;",
24618
24630
  touchHeight: 0,
24619
- touchPoint: 0,
24620
- // 控制滑动区域的高度
24621
- touchAreaHeight: 40
24631
+ touchPoint: 0
24622
24632
  };
24623
24633
  },
24624
24634
  methods: {
@@ -24641,14 +24651,15 @@ var popup_createNamespace = Object(utils["b" /* createNamespace */])('popup'),
24641
24651
  }
24642
24652
 
24643
24653
  var h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
24644
- this.positionY = event.touches[0].clientY;
24654
+ var touchAreaHeight = Object(unit["b" /* unitToPx */])(this.minDragHeight);
24655
+ var positionY = event.touches[0].clientY;
24645
24656
  this.timerId = setTimeout(function () {
24646
- if (_this2.positionY === 0 || _this2.positionY < h * 0.15) {
24657
+ if (positionY === 0 || positionY < h - Object(unit["b" /* unitToPx */])(_this2.maxDragHeight)) {
24647
24658
  return;
24648
24659
  }
24649
24660
 
24650
- _this2.touchHeight = _this2.positionY - _this2.touchAreaHeight > h - _this2.touchAreaHeight ? h - _this2.touchAreaHeight + _this2.touchPoint : _this2.positionY;
24651
- _this2.contentStyle = "height:" + (h - _this2.touchHeight - _this2.touchAreaHeight + _this2.touchPoint) + "px;";
24661
+ _this2.touchHeight = positionY - touchAreaHeight > h - touchAreaHeight ? h - touchAreaHeight + _this2.touchPoint : positionY;
24662
+ _this2.contentStyle = "height:" + (h - _this2.touchHeight - touchAreaHeight + _this2.touchPoint) + "px;";
24652
24663
  }, 10);
24653
24664
  },
24654
24665
  endMove: function endMove() {
@@ -24697,7 +24708,8 @@ var popup_createNamespace = Object(utils["b" /* createNamespace */])('popup'),
24697
24708
  "touchmove": this.move,
24698
24709
  "touchend": this.endMove,
24699
24710
  "touchstart": this.startMove
24700
- }
24711
+ },
24712
+ "style": "height:" + this.minDragHeight
24701
24713
  }, [h("div", {
24702
24714
  "class": popup_bem('slider-bar')
24703
24715
  })]), h("div", {
@@ -25139,9 +25151,6 @@ var pickerProps = {
25139
25151
  default: true
25140
25152
  }
25141
25153
  };
25142
- // EXTERNAL MODULE: ./es/utils/format/unit.js
25143
- var unit = __webpack_require__(12);
25144
-
25145
25154
  // CONCATENATED MODULE: ./es/utils/deep-clone.js
25146
25155
 
25147
25156
  function deepClone(obj) {
@@ -25626,7 +25635,7 @@ var routeProps = {
25626
25635
  to: [String, Object]
25627
25636
  };
25628
25637
  // EXTERNAL MODULE: ./es/telemetry/index.js
25629
- var telemetry = __webpack_require__(11);
25638
+ var telemetry = __webpack_require__(12);
25630
25639
 
25631
25640
  // CONCATENATED MODULE: ./es/button/index.js
25632
25641
 
@@ -34691,6 +34700,12 @@ var field_createNamespace = Object(utils["b" /* createNamespace */])('field'),
34691
34700
  this.resetValidation();
34692
34701
  this.validateWithTrigger('onChange');
34693
34702
  this.$nextTick(this.adjustSize);
34703
+ },
34704
+ autosize: {
34705
+ deep: true,
34706
+ handler: function handler() {
34707
+ this.$nextTick(this.adjustSize);
34708
+ }
34694
34709
  }
34695
34710
  },
34696
34711
  mounted: function mounted() {
@@ -52787,7 +52802,7 @@ var uploader_createNamespace = Object(utils["b" /* createNamespace */])('uploade
52787
52802
 
52788
52803
 
52789
52804
 
52790
- var version = '2.0.31';
52805
+ var version = '2.0.32';
52791
52806
 
52792
52807
  function install(Vue) {
52793
52808
  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, pdf_viewer, pdf_viewer_v2, 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];