zartui 2.0.69 → 2.0.71

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.
@@ -1 +1 @@
1
- .zt2-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt2-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt2-dropdown-item .zt2-cell::after{border:none}.zt2-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt2-dropdown-item__option:last-child::before{display:none}.zt2-dropdown-item__option .zt2-cell__value{height:20px}.zt2-dropdown-item__option--active{color:#0091fa}.zt2-dropdown-item__option--active .zt2-dropdown-item__icon{color:#0091fa}.zt2-dropdown-item--up{top:0}.zt2-dropdown-item--down{bottom:0}.zt2-dropdown-item__content,.zt2-dropdown-item__content.zt2-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;z-index:1;width:100%;height:68px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.zt2-dropdown-item__button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;color:#ff9623;border-color:#ff9623;text-align:center;margin-top:12px;margin-left:16px;margin-right:4px;background:#fff}.zt2-dropdown-item__button-confirm{width:50%;background-color:#0091fa;font-weight:600;color:#f5f5fa;text-align:center;margin-top:12px;margin-left:4px;margin-right:16px}
1
+ .zt2-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt2-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt2-dropdown-item .zt2-cell::after{border:none}.zt2-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt2-dropdown-item__option:last-child::before{display:none}.zt2-dropdown-item__option .zt2-cell__value{height:20px}.zt2-dropdown-item__option--active{color:#0091fa}.zt2-dropdown-item__option--active .zt2-dropdown-item__icon{color:#0091fa}.zt2-dropdown-item--up{top:0}.zt2-dropdown-item--down{bottom:0}.zt2-dropdown-item__content,.zt2-dropdown-item__content.zt2-popup{position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;height:calc(100% - 68px);width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;bottom:0;z-index:1;width:100%;height:68px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.zt2-dropdown-item__button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;color:#ff9623;border-color:#ff9623;text-align:center;margin-top:12px;margin-left:16px;margin-right:4px;background:#fff}.zt2-dropdown-item__button-confirm{width:50%;background-color:#0091fa;font-weight:600;color:#f5f5fa;text-align:center;margin-top:12px;margin-left:4px;margin-right:16px}
@@ -51,7 +51,8 @@ export default createComponent({
51
51
  return {
52
52
  transition: true,
53
53
  showPopup: false,
54
- showWrapper: false
54
+ showWrapper: false,
55
+ innerValue: []
55
56
  };
56
57
  },
57
58
  computed: {
@@ -123,6 +124,7 @@ export default createComponent({
123
124
  this.showPopup = show;
124
125
 
125
126
  if (show) {
127
+ this.innerValue = [].concat(this.value);
126
128
  this.parent.updateOffset();
127
129
  this.showWrapper = true;
128
130
  }
@@ -142,28 +144,27 @@ export default createComponent({
142
144
  }
143
145
  },
144
146
  select: function select(value) {
145
- if (this.value.indexOf(value) >= 0) {
146
- this.value.splice(this.value.indexOf(value), 1);
147
+ if (this.innerValue.indexOf(value) >= 0) {
148
+ this.innerValue.splice(this.innerValue.indexOf(value), 1);
147
149
  } else {
148
- this.value.push(value);
150
+ this.innerValue.push(value);
149
151
  }
150
152
  },
151
153
  isSelect: function isSelect(value) {
152
- if (this.value.indexOf(value) >= 0) {
154
+ if (this.innerValue.indexOf(value) >= 0) {
153
155
  return true;
154
156
  }
155
157
 
156
158
  return false;
157
159
  },
158
160
  reset: function reset() {
159
- this.showPopup = false;
160
- this.$emit('input', []);
161
- this.$emit('reset', []);
161
+ this.innerValue = [];
162
162
  },
163
163
  confirm: function confirm() {
164
164
  this.showPopup = false;
165
- this.$emit('input', this.value);
166
- this.$emit('change', this.value);
165
+ this.$emit('input', this.innerValue);
166
+ this.$emit('change', this.innerValue);
167
+ this.$emit('confirm', this.innerValue);
167
168
  }
168
169
  },
169
170
  render: function render() {
@@ -182,7 +183,7 @@ export default createComponent({
182
183
 
183
184
  if (this.multiSelect) {
184
185
  Options = this.options.map(function (option, index) {
185
- var active = _this3.value.indexOf(option.value) >= 0;
186
+ var active = _this3.innerValue.indexOf(option.value) >= 0;
186
187
  return h(Cell, {
187
188
  "attrs": {
188
189
  "clickable": true,
@@ -246,25 +247,18 @@ export default createComponent({
246
247
  });
247
248
  }
248
249
 
249
- var buttonStyle = {};
250
- var optionStyle = {};
251
250
  var popupStyle = {};
252
251
 
253
252
  if (this.multiSelect) {
254
253
  var optionsLength = this.options.length;
255
254
 
256
- if (this.options.length < 4) {
257
- var height = optionsLength * 44;
255
+ if (this.options.length < 7) {
258
256
  var popupHeight = optionsLength * 44 + 68;
259
- buttonStyle.top = height + "px";
260
- optionStyle.height = height + "px";
261
257
  popupStyle.height = popupHeight + "px";
262
258
  popupStyle.paddingLeft = "0px";
263
259
  } else {
264
- buttonStyle.top = '176px';
265
- optionStyle.height = '174px';
266
260
  popupStyle.paddingLeft = "0px";
267
- popupStyle.height = "244px";
261
+ popupStyle.height = "378px";
268
262
  }
269
263
  }
270
264
 
@@ -327,14 +321,12 @@ export default createComponent({
327
321
  }]
328
322
  }, [Options]), h("div", {
329
323
  "class": bem('options'),
330
- "style": optionStyle,
331
324
  "directives": [{
332
325
  name: "show",
333
326
  value: this.multiSelect
334
327
  }]
335
328
  }, [Options]), h("div", {
336
329
  "class": bem('button'),
337
- "style": buttonStyle,
338
330
  "directives": [{
339
331
  name: "show",
340
332
  value: this.multiSelect
@@ -50,6 +50,8 @@
50
50
  &__content,
51
51
  &__content.@{base-prefix}-popup {
52
52
  position: absolute;
53
+ display: flex;
54
+ flex-direction: column;
53
55
  max-height: @dropdown-menu-content-max-height;
54
56
  padding-left: @padding-md;
55
57
  box-sizing: border-box;
@@ -57,12 +59,14 @@
57
59
 
58
60
  &__options {
59
61
  position: absolute;
60
- top: 0px;
62
+ top: 0;
63
+ height: calc(100% - 68px);
61
64
  width: 100%;
62
65
  overflow-y: scroll;
63
66
  }
64
67
  &__button {
65
68
  position: absolute;
69
+ bottom: 0;
66
70
  z-index: 1;
67
71
  width: 100%;
68
72
  height: 68px;
package/es/index.js CHANGED
@@ -74,7 +74,7 @@ import Tag from './tag';
74
74
  import Timeline from './timeline';
75
75
  import Toast from './toast';
76
76
  import Uploader from './uploader';
77
- var version = '2.0.69';
77
+ var version = '2.0.71';
78
78
 
79
79
  function install(Vue) {
80
80
  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, 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];
@@ -1,6 +1,6 @@
1
1
  import { createNamespace } from '../utils';
2
- import { MediaType } from "../media-picker/type";
3
- import Toast from '../toast';
2
+ import { MediaType } from "../media-picker/type"; // import Toast from '../toast';
3
+
4
4
  import Popup from '../popup';
5
5
  import Button from '../button';
6
6
  import { isIOS, isWeixin } from "../utils/device";
@@ -132,7 +132,8 @@ export default createComponent({
132
132
  "overlay": true,
133
133
  "safe-area-inset-bottom": true,
134
134
  "close-on-popstate": true,
135
- "customOnClickOverlay": this.onClose
135
+ "customOnClickOverlay": this.onClose,
136
+ "getContainer": this.getContainer
136
137
  },
137
138
  "on": {
138
139
  "open": this.onOpen
@@ -1 +1 @@
1
- .zt2-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt2-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt2-dropdown-item .zt2-cell::after{border:none}.zt2-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt2-dropdown-item__option:last-child::before{display:none}.zt2-dropdown-item__option .zt2-cell__value{height:20px}.zt2-dropdown-item__option--active{color:#0091fa}.zt2-dropdown-item__option--active .zt2-dropdown-item__icon{color:#0091fa}.zt2-dropdown-item--up{top:0}.zt2-dropdown-item--down{bottom:0}.zt2-dropdown-item__content,.zt2-dropdown-item__content.zt2-popup{position:absolute;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;z-index:1;width:100%;height:68px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.zt2-dropdown-item__button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;color:#ff9623;border-color:#ff9623;text-align:center;margin-top:12px;margin-left:16px;margin-right:4px;background:#fff}.zt2-dropdown-item__button-confirm{width:50%;background-color:#0091fa;font-weight:600;color:#f5f5fa;text-align:center;margin-top:12px;margin-left:4px;margin-right:16px}
1
+ .zt2-dropdown-item{position:fixed;right:0;left:0;z-index:10;overflow:hidden}.zt2-dropdown-item__icon{display:block;line-height:inherit;font-size:24px}.zt2-dropdown-item .zt2-cell::after{border:none}.zt2-dropdown-item__option{text-align:left;font-size:14px;padding-left:0}.zt2-dropdown-item__option:last-child::before{display:none}.zt2-dropdown-item__option .zt2-cell__value{height:20px}.zt2-dropdown-item__option--active{color:#0091fa}.zt2-dropdown-item__option--active .zt2-dropdown-item__icon{color:#0091fa}.zt2-dropdown-item--up{top:0}.zt2-dropdown-item--down{bottom:0}.zt2-dropdown-item__content,.zt2-dropdown-item__content.zt2-popup{position:absolute;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;max-height:80%;padding-left:16px;box-sizing:border-box}.zt2-dropdown-item__options{position:absolute;top:0;height:calc(100% - 68px);width:100%;overflow-y:scroll}.zt2-dropdown-item__button{position:absolute;bottom:0;z-index:1;width:100%;height:68px;display:-webkit-box;display:-webkit-flex;display:flex;border-top:1px solid rgba(0,0,0,.05)}.zt2-dropdown-item__button-reset{width:50%;font-family:PingFangSC-Regular;font-weight:400;color:#ff9623;border-color:#ff9623;text-align:center;margin-top:12px;margin-left:16px;margin-right:4px;background:#fff}.zt2-dropdown-item__button-confirm{width:50%;background-color:#0091fa;font-weight:600;color:#f5f5fa;text-align:center;margin-top:12px;margin-left:4px;margin-right:16px}
@@ -66,7 +66,8 @@ var _default2 = createComponent({
66
66
  return {
67
67
  transition: true,
68
68
  showPopup: false,
69
- showWrapper: false
69
+ showWrapper: false,
70
+ innerValue: []
70
71
  };
71
72
  },
72
73
  computed: {
@@ -138,6 +139,7 @@ var _default2 = createComponent({
138
139
  this.showPopup = show;
139
140
 
140
141
  if (show) {
142
+ this.innerValue = [].concat(this.value);
141
143
  this.parent.updateOffset();
142
144
  this.showWrapper = true;
143
145
  }
@@ -157,28 +159,27 @@ var _default2 = createComponent({
157
159
  }
158
160
  },
159
161
  select: function select(value) {
160
- if (this.value.indexOf(value) >= 0) {
161
- this.value.splice(this.value.indexOf(value), 1);
162
+ if (this.innerValue.indexOf(value) >= 0) {
163
+ this.innerValue.splice(this.innerValue.indexOf(value), 1);
162
164
  } else {
163
- this.value.push(value);
165
+ this.innerValue.push(value);
164
166
  }
165
167
  },
166
168
  isSelect: function isSelect(value) {
167
- if (this.value.indexOf(value) >= 0) {
169
+ if (this.innerValue.indexOf(value) >= 0) {
168
170
  return true;
169
171
  }
170
172
 
171
173
  return false;
172
174
  },
173
175
  reset: function reset() {
174
- this.showPopup = false;
175
- this.$emit('input', []);
176
- this.$emit('reset', []);
176
+ this.innerValue = [];
177
177
  },
178
178
  confirm: function confirm() {
179
179
  this.showPopup = false;
180
- this.$emit('input', this.value);
181
- this.$emit('change', this.value);
180
+ this.$emit('input', this.innerValue);
181
+ this.$emit('change', this.innerValue);
182
+ this.$emit('confirm', this.innerValue);
182
183
  }
183
184
  },
184
185
  render: function render() {
@@ -197,7 +198,7 @@ var _default2 = createComponent({
197
198
 
198
199
  if (this.multiSelect) {
199
200
  Options = this.options.map(function (option, index) {
200
- var active = _this3.value.indexOf(option.value) >= 0;
201
+ var active = _this3.innerValue.indexOf(option.value) >= 0;
201
202
  return h(_cell.default, {
202
203
  "attrs": {
203
204
  "clickable": true,
@@ -261,25 +262,18 @@ var _default2 = createComponent({
261
262
  });
262
263
  }
263
264
 
264
- var buttonStyle = {};
265
- var optionStyle = {};
266
265
  var popupStyle = {};
267
266
 
268
267
  if (this.multiSelect) {
269
268
  var optionsLength = this.options.length;
270
269
 
271
- if (this.options.length < 4) {
272
- var height = optionsLength * 44;
270
+ if (this.options.length < 7) {
273
271
  var popupHeight = optionsLength * 44 + 68;
274
- buttonStyle.top = height + "px";
275
- optionStyle.height = height + "px";
276
272
  popupStyle.height = popupHeight + "px";
277
273
  popupStyle.paddingLeft = "0px";
278
274
  } else {
279
- buttonStyle.top = '176px';
280
- optionStyle.height = '174px';
281
275
  popupStyle.paddingLeft = "0px";
282
- popupStyle.height = "244px";
276
+ popupStyle.height = "378px";
283
277
  }
284
278
  }
285
279
 
@@ -342,14 +336,12 @@ var _default2 = createComponent({
342
336
  }]
343
337
  }, [Options]), h("div", {
344
338
  "class": bem('options'),
345
- "style": optionStyle,
346
339
  "directives": [{
347
340
  name: "show",
348
341
  value: this.multiSelect
349
342
  }]
350
343
  }, [Options]), h("div", {
351
344
  "class": bem('button'),
352
- "style": buttonStyle,
353
345
  "directives": [{
354
346
  name: "show",
355
347
  value: this.multiSelect
@@ -50,6 +50,8 @@
50
50
  &__content,
51
51
  &__content.@{base-prefix}-popup {
52
52
  position: absolute;
53
+ display: flex;
54
+ flex-direction: column;
53
55
  max-height: @dropdown-menu-content-max-height;
54
56
  padding-left: @padding-md;
55
57
  box-sizing: border-box;
@@ -57,12 +59,14 @@
57
59
 
58
60
  &__options {
59
61
  position: absolute;
60
- top: 0px;
62
+ top: 0;
63
+ height: calc(100% - 68px);
61
64
  width: 100%;
62
65
  overflow-y: scroll;
63
66
  }
64
67
  &__button {
65
68
  position: absolute;
69
+ bottom: 0;
66
70
  z-index: 1;
67
71
  width: 100%;
68
72
  height: 68px;