zartui 2.0.4 → 2.0.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.
Files changed (60) hide show
  1. package/es/cascader/index.css +1 -1
  2. package/es/cascader/index.js +18 -16
  3. package/es/cascader/index.less +20 -11
  4. package/es/cascader/style/index.js +2 -0
  5. package/es/cascader/style/less.js +2 -0
  6. package/es/cell/index.css +1 -1
  7. package/es/cell/index.js +1 -1
  8. package/es/cell/index.less +12 -0
  9. package/es/datetime-picker/shared.js +2 -1
  10. package/es/field/index.js +9 -3
  11. package/es/index.js +1 -1
  12. package/es/list/index.css +1 -1
  13. package/es/multiple-picker/MultiplePickerOptions.js +1 -1
  14. package/es/multiple-picker/index.css +1 -1
  15. package/es/multiple-picker/index.js +1 -1
  16. package/es/multiple-picker/index.less +5 -4
  17. package/es/picker/PickerColumn.js +5 -1
  18. package/es/picker/index.css +1 -1
  19. package/es/picker/index.js +2 -4
  20. package/es/picker/shared.js +1 -1
  21. package/es/pull-refresh/index.css +1 -1
  22. package/es/pull-refresh/index.less +1 -0
  23. package/es/style/base.css +1 -1
  24. package/es/style/normalize.css +1 -1
  25. package/es/style/normalize.less +6 -0
  26. package/es/style/var.less +17 -14
  27. package/es/switch/index.css +1 -1
  28. package/es/switch/index.less +6 -1
  29. package/lib/cascader/index.css +1 -1
  30. package/lib/cascader/index.js +19 -16
  31. package/lib/cascader/index.less +20 -11
  32. package/lib/cascader/style/index.js +2 -0
  33. package/lib/cascader/style/less.js +2 -0
  34. package/lib/cell/index.css +1 -1
  35. package/lib/cell/index.js +1 -1
  36. package/lib/cell/index.less +12 -0
  37. package/lib/datetime-picker/shared.js +2 -1
  38. package/lib/field/index.js +9 -3
  39. package/lib/index.css +1 -1
  40. package/lib/index.js +1 -1
  41. package/lib/list/index.css +1 -1
  42. package/lib/multiple-picker/MultiplePickerOptions.js +1 -1
  43. package/lib/multiple-picker/index.css +1 -1
  44. package/lib/multiple-picker/index.js +1 -1
  45. package/lib/multiple-picker/index.less +5 -4
  46. package/lib/picker/PickerColumn.js +5 -1
  47. package/lib/picker/index.css +1 -1
  48. package/lib/picker/index.js +2 -4
  49. package/lib/picker/shared.js +1 -1
  50. package/lib/pull-refresh/index.css +1 -1
  51. package/lib/pull-refresh/index.less +1 -0
  52. package/lib/style/base.css +1 -1
  53. package/lib/style/normalize.css +1 -1
  54. package/lib/style/normalize.less +6 -0
  55. package/lib/style/var.less +17 -14
  56. package/lib/switch/index.css +1 -1
  57. package/lib/switch/index.less +6 -1
  58. package/lib/zart.js +41 -30
  59. package/lib/zart.min.js +1 -1
  60. package/package.json +1 -1
@@ -13,6 +13,8 @@ var _tabs = _interopRequireDefault(require("../tabs"));
13
13
 
14
14
  var _icon = _interopRequireDefault(require("../icon"));
15
15
 
16
+ var _button = _interopRequireDefault(require("../button"));
17
+
16
18
  var _divider = _interopRequireDefault(require("../divider"));
17
19
 
18
20
  var _createNamespace = (0, _utils.createNamespace)('cascader'),
@@ -32,10 +34,6 @@ var _default2 = createComponent({
32
34
  default: function _default() {
33
35
  return [];
34
36
  }
35
- },
36
- closeable: {
37
- type: Boolean,
38
- default: true
39
37
  }
40
38
  },
41
39
  data: function data() {
@@ -191,8 +189,8 @@ var _default2 = createComponent({
191
189
  this.$emit('finish', eventParams);
192
190
  }
193
191
  },
194
- onClose: function onClose() {
195
- this.$emit('close');
192
+ onCancel: function onCancel() {
193
+ this.$emit('cancel');
196
194
  },
197
195
  renderHeader: function renderHeader() {
198
196
  var h = this.$createElement;
@@ -200,15 +198,7 @@ var _default2 = createComponent({
200
198
  "class": bem('header')
201
199
  }, [h("h2", {
202
200
  "class": bem('title')
203
- }, [this.slots('title') || this.title]), this.closeable ? h(_icon.default, {
204
- "attrs": {
205
- "name": "cross"
206
- },
207
- "class": bem('close-icon'),
208
- "on": {
209
- "click": this.onClose
210
- }
211
- }) : null]);
201
+ }, [this.slots('title') || this.title])]);
212
202
  },
213
203
  renderDivider: function renderDivider() {
214
204
  var h = this.$createElement;
@@ -286,13 +276,26 @@ var _default2 = createComponent({
286
276
  }
287
277
  }
288
278
  }, [this.tabs.map(this.renderTab)]);
279
+ },
280
+ renderMenu: function renderMenu() {
281
+ var h = this.$createElement;
282
+ return h(_button.default, {
283
+ "class": bem('cancel'),
284
+ "attrs": {
285
+ "background-color": "rgba(45, 75, 115, 0.04)",
286
+ "color": "#2D4B73"
287
+ },
288
+ "on": {
289
+ "click": this.onCancel
290
+ }
291
+ }, ["\u53D6\u6D88"]);
289
292
  }
290
293
  },
291
294
  render: function render() {
292
295
  var h = arguments[0];
293
296
  return h("div", {
294
297
  "class": bem()
295
- }, [this.renderHeader(), this.renderDivider(), this.renderTabs()]);
298
+ }, [this.renderHeader(), this.renderDivider(), this.renderTabs(), this.renderDivider(), this.renderMenu()]);
296
299
  }
297
300
  });
298
301
 
@@ -1,10 +1,11 @@
1
1
  @import '../style/var';
2
+ @import '../style/mixins/hairline';
2
3
 
3
4
  .zt-cascader {
4
5
  &__header {
5
6
  display: flex;
6
7
  align-items: center;
7
- justify-content: space-between;
8
+ justify-content: center;
8
9
  height: @cascader-header-height;
9
10
  padding: 0 @padding-md;
10
11
  }
@@ -13,15 +14,8 @@
13
14
  font-weight: @font-weight-bold;
14
15
  font-size: @cascader-title-font-size;
15
16
  line-height: @cascader-title-line-height;
16
- }
17
-
18
- &__close-icon {
19
- color: @cascader-close-icon-color;
20
- font-size: @cascader-close-icon-size;
17
+ color: @cascader-title-color;
21
18
 
22
- &:active {
23
- color: @cascader-close-icon-active-color;
24
- }
25
19
  }
26
20
 
27
21
  &__tabs {
@@ -31,8 +25,12 @@
31
25
  padding: 0;
32
26
  }
33
27
 
34
- &.zt-tabs--line .zt-tabs__wrap {
28
+ .zt-tabs__wrap {
29
+ position: relative;
35
30
  height: @cascader-tabs-height;
31
+ &::after {
32
+ .hairline-bottom()
33
+ }
36
34
  }
37
35
 
38
36
  .zt-tabs__nav--complete {
@@ -58,7 +56,7 @@
58
56
  align-items: center;
59
57
  font-family: PingFangSC-Regular;
60
58
  justify-content: space-between;
61
- color: @black;
59
+ color: #2D4B73;
62
60
  padding: 0 @padding-md;
63
61
  font-weight: normal;
64
62
  font-size: @font-size-md;
@@ -84,4 +82,15 @@
84
82
  overflow-y: auto;
85
83
  -webkit-overflow-scrolling: touch;
86
84
  }
85
+
86
+ .zt-tabs__nav {
87
+ background: #fff;
88
+ }
89
+
90
+ &__cancel {
91
+ margin: 8px 16px;
92
+ width: calc(100% - 32px);
93
+ background: rgba(45, 75, 115, 0.04);
94
+ border-radius: 20.5px;
95
+ }
87
96
  }
@@ -1,6 +1,8 @@
1
1
  require('../../style/base.css');
2
2
  require('../../info/index.css');
3
3
  require('../../icon/index.css');
4
+ require('../../loading/index.css');
5
+ require('../../button/index.css');
4
6
  require('../../tab/index.css');
5
7
  require('../../sticky/index.css');
6
8
  require('../../tabs/index.css');
@@ -1,6 +1,8 @@
1
1
  require('../../style/base.less');
2
2
  require('../../info/index.less');
3
3
  require('../../icon/index.less');
4
+ require('../../loading/index.less');
5
+ require('../../button/index.less');
4
6
  require('../../tab/index.less');
5
7
  require('../../sticky/index.less');
6
8
  require('../../tabs/index.less');
@@ -1 +1 @@
1
- .zt-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:12px 16px;overflow:hidden;color:#2d4b73;font-size:16px;line-height:20px;background-color:#fff}.zt-cell--noFlex{display:block}.zt-cell--noFlex .zt-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt-cell--borderless::after,.zt-cell:last-child::after{display:none}.zt-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt-cell__title,.zt-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__title-content,.zt-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt-cell__value{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-cell__placeholder{color:#c8c9cc;-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word}.zt-cell__value--alone{color:rgba(0,0,0,.6);text-align:left}.zt-cell__left-icon,.zt-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt-cell__left-icon{margin-right:4px}.zt-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell--large{padding-top:12px;padding-bottom:12px}.zt-cell--large .zt-cell__title{font-size:16px}.zt-cell--large .zt-cell__label{font-size:14px}.zt-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;background-color:#f5faff;font-size:14px;line-height:20px}.zt-cell__direction-column .zt-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell__direction-column .zt-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__direction-column .zt-cell__title-subtitle{display:-webkit-box;display:-webkit-flex;display:flex;white-space:nowrap;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-flex:1;-webkit-flex:1;flex:1;opacity:.4}.zt-cell__direction-column .zt-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;text-align:left;min-height:44px;padding:12px;box-sizing:border-box;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.zt-cell__direction-column .zt-cell__value .zt-icon{-webkit-box-flex:2;-webkit-flex:2;flex:2;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-cell__direction-column .zt-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt-cell__clickable{cursor:pointer}.zt-cell__clickable:active{background-color:rgba(0,0,0,.04)}
1
+ .zt-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:12px 16px;overflow:hidden;color:#2d4b73;font-size:16px;line-height:20px;background-color:#fff}.zt-cell--noFlex{display:block}.zt-cell--noFlex .zt-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt-cell--borderless::after,.zt-cell:last-child::after{display:none}.zt-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt-cell__title,.zt-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__title-content,.zt-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt-cell__value{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-cell__placeholder{color:#c8c9cc;-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word}.zt-cell__value--alone{color:rgba(0,0,0,.6);text-align:left}.zt-cell__left-icon,.zt-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt-cell__left-icon{margin-right:4px}.zt-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell--large{padding-top:12px;padding-bottom:12px}.zt-cell--large .zt-cell__title{font-size:16px}.zt-cell--large .zt-cell__label{font-size:14px}.zt-cell__direction-row{position:relative}.zt-cell__direction-row::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-cell__direction-row:last-child::after{display:none}.zt-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;background-color:#f5faff;font-size:14px;line-height:20px}.zt-cell__direction-column .zt-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell__direction-column .zt-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__direction-column .zt-cell__title-subtitle{display:-webkit-box;display:-webkit-flex;display:flex;white-space:nowrap;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-flex:1;-webkit-flex:1;flex:1;opacity:.4}.zt-cell__direction-column .zt-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;text-align:left;min-height:44px;padding:12px;box-sizing:border-box;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.zt-cell__direction-column .zt-cell__value .zt-icon{-webkit-box-flex:2;-webkit-flex:2;flex:2;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-cell__direction-column .zt-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt-cell__clickable{cursor:pointer}.zt-cell__clickable:active{background-color:rgba(0,0,0,.04)}
package/lib/cell/index.js CHANGED
@@ -157,7 +157,7 @@ function Cell(h, props, slots, ctx) {
157
157
  }
158
158
 
159
159
  return h("div", (0, _babelHelperVueJsxMergeProps.default)([{
160
- "class": [bem(classes), direction === 'column' ? bem('direction-column') : '', clickable && direction !== 'column' ? bem('clickable') : ''],
160
+ "class": [bem(classes), direction === 'column' ? bem('direction-column') : bem('direction-row'), clickable && direction !== 'column' ? bem('clickable') : ''],
161
161
  "attrs": {
162
162
  "role": clickable ? 'button' : null,
163
163
  "tabindex": clickable ? 0 : null
@@ -108,6 +108,18 @@
108
108
  }
109
109
  }
110
110
 
111
+ .zt-cell__direction-row {
112
+ position: relative;
113
+
114
+ &::after {
115
+ .hairline-bottom(@cell-border-color, @padding-md);
116
+ }
117
+
118
+ &:last-child::after {
119
+ display: none;
120
+ }
121
+ }
122
+
111
123
  .zt-cell__direction-column {
112
124
  flex-direction: column;
113
125
  background-color: #f5faff;
@@ -158,12 +158,13 @@ var TimePickerMixin = {
158
158
  props[key] = _this5[key];
159
159
  });
160
160
  return h(_picker.default, {
161
- "ref": "picker",
162
161
  "attrs": {
162
+ "show-picker": this.showPicker,
163
163
  "headers": this.headers,
164
164
  "columns": this.columns,
165
165
  "readonly": this.readonly
166
166
  },
167
+ "ref": "picker",
167
168
  "scopedSlots": this.$scopedSlots,
168
169
  "on": {
169
170
  "change": this.onChange,
@@ -642,9 +642,15 @@ var _default = createComponent({
642
642
  var slots = this.slots;
643
643
  var disabled = this.getProp('disabled');
644
644
  var labelAlign = this.getProp('labelAlign');
645
- var scopedSlots = {
646
- icon: this.genLeftIcon
647
- };
645
+ var scopedSlots = {};
646
+ var SlotIcon = this.genLeftIcon();
647
+
648
+ if (SlotIcon) {
649
+ scopedSlots.icon = function () {
650
+ return SlotIcon;
651
+ };
652
+ }
653
+
648
654
  var Label = this.genLabel();
649
655
 
650
656
  if (Label) {