zartui 2.0.63 → 2.0.64

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-cascader__header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:44px;padding:0 16px}.zt2-cascader__title{font-weight:700;font-size:14px;line-height:44px;color:rgba(45,75,115,.4)}.zt2-cascader__tabs .zt2-tab{-webkit-box-flex:0;-webkit-flex:none;flex:none;margin:0 8px;padding:0}.zt2-cascader__tabs .zt2-tabs__wrap{position:relative;height:44px}.zt2-cascader__tabs .zt2-tabs__wrap::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-cascader__tabs .zt2-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt2-cascader__tab{color:#2d4b73;font-weight:700;font-size:14px;line-height:44px}.zt2-cascader__tab--unselected{color:rgba(45,75,115,.4);font-weight:400}.zt2-cascader__option{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-family:PingFangSC-Regular;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;color:#2d4b73;padding:0 16px;font-weight:400;font-size:14px;line-height:44px}.zt2-cascader__option:active{background-color:rgba(0,0,0,.04)}.zt2-cascader__option--selected{color:#0091fa;font-weight:700}.zt2-cascader__selected-icon{font-size:24px}.zt2-cascader__options{box-sizing:border-box;height:352px;overflow-y:auto;-webkit-overflow-scrolling:touch}.zt2-cascader .zt2-tabs__nav{background:#fff}.zt2-cascader .zt2-cascader__cancel{margin:8px 16px;width:calc(100% - 32px);background:rgba(45,75,115,.04);border-radius:20.5px}
1
+ .zt2-cascader__header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:44px;padding:0 16px}.zt2-cascader__title{font-weight:700;font-size:14px;line-height:44px;color:rgba(45,75,115,.4)}.zt2-cascader__tabs .zt2-tab{-webkit-box-flex:0;-webkit-flex:none;flex:none;margin:0 8px;padding:0}.zt2-cascader__tabs .zt2-tabs__wrap{position:relative;height:44px}.zt2-cascader__tabs .zt2-tabs__wrap::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-cascader__tabs .zt2-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt2-cascader__tab{color:#2d4b73;font-weight:700;font-size:14px;line-height:44px}.zt2-cascader__tab--unselected{color:rgba(45,75,115,.4);font-weight:400}.zt2-cascader__option{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-family:PingFangSC-Regular;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;color:#2d4b73;padding:12px 16px;font-weight:400;font-size:14px;line-height:20px}.zt2-cascader__option:active{background-color:rgba(0,0,0,.04)}.zt2-cascader__option--selected{color:#0091fa;font-weight:700}.zt2-cascader__selected-icon{font-size:24px}.zt2-cascader__options{box-sizing:border-box;height:352px;overflow-y:auto;-webkit-overflow-scrolling:touch}.zt2-cascader .zt2-tabs__nav{background:#fff}.zt2-cascader .zt2-cascader__cancel{margin:8px 16px;width:calc(100% - 32px);background:rgba(45,75,115,.04);border-radius:20.5px}
@@ -57,10 +57,10 @@
57
57
  font-family: PingFangSC-Regular;
58
58
  justify-content: space-between;
59
59
  color: #2D4B73;
60
- padding: 0 @padding-md;
60
+ padding: @padding-sm @padding-md;
61
61
  font-weight: normal;
62
62
  font-size: @font-size-md;
63
- line-height: 44px;
63
+ line-height: @line-height-md;
64
64
 
65
65
  &:active {
66
66
  background-color: @active-color;
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.63';
77
+ var version = '2.0.64';
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];
package/es/tabs/Title.js CHANGED
@@ -50,6 +50,15 @@ export default createComponent({
50
50
 
51
51
  if (!this.scrollable) {
52
52
  style.maxWidth = this.maxWidth;
53
+ } else {
54
+ // tab之间的padding距离
55
+ var OPTIONS_LABEL_PADDING = 24; // 限制最大展示7个字
56
+
57
+ var LIMIT_WORDS_LEN = 7; // 根据实际是否激活状态,设置其字体宽度
58
+
59
+ var FONT_SIZE = isActive ? 16 : 14;
60
+ var scrollAbleWidth = OPTIONS_LABEL_PADDING + LIMIT_WORDS_LEN * FONT_SIZE + 'px';
61
+ style.maxWidth = scrollAbleWidth;
53
62
  }
54
63
 
55
64
  return style;
@@ -63,7 +72,7 @@ export default createComponent({
63
72
  var h = this.$createElement;
64
73
  var Text = h("span", {
65
74
  "class": bem('text', {
66
- ellipsis: !this.scrollable
75
+ ellipsis: true
67
76
  })
68
77
  }, [this.slots() || this.title]);
69
78
 
@@ -92,10 +101,11 @@ export default createComponent({
92
101
  active: this.isActive,
93
102
  disabled: this.disabled
94
103
  })],
95
- "style": this.style,
96
104
  "on": {
97
105
  "click": this.onClick
98
106
  }
99
- }, [this.genText()]);
107
+ }, [this.slots('prefix'), h("div", {
108
+ "style": this.style
109
+ }, [this.genText()]), this.slots('suffix')]);
100
110
  }
101
111
  });
package/es/tabs/index.css CHANGED
@@ -1 +1 @@
1
- .zt2-tab{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0 16px;color:rgba(45,75,115,.6);font-size:14px;line-height:20px;cursor:pointer}.zt2-tab--active{color:#2d4b73;font-weight:700;font-size:16px}.zt2-tab--disabled{color:#c8c9cc;cursor:not-allowed}.zt2-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt2-tab__text-wrapper{position:relative}.zt2-tabs{position:relative}.zt2-tabs__wrap{overflow:hidden}.zt2-tabs__wrap--page-top{position:fixed}.zt2-tabs__wrap--content-bottom{top:auto;bottom:0}.zt2-tabs__wrap--scrollable .zt2-tab{-webkit-box-flex:1;-webkit-flex:1 0 auto;flex:1 0 auto;padding:0 12px}.zt2-tabs__wrap--scrollable .zt2-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt2-tabs__wrap--scrollable .zt2-tabs__nav::-webkit-scrollbar{display:none}.zt2-tabs__nav{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;background-color:#f5faff;-webkit-user-select:none;user-select:none}.zt2-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.zt2-tabs__nav--line.zt2-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt2-tabs__nav--card{-webkit-box-flex:1;-webkit-flex:1;flex:1;margin:0 60px;-webkit-justify-content:space-around;justify-content:space-around;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;height:32px;background:rgba(45,75,115,.04);box-shadow:inset 4px 4px 8px 0 rgba(45,75,115,.1);border-radius:16px}.zt2-tabs__nav--card .zt2-tab{color:#000}.zt2-tabs__nav--card .zt2-tab.zt2-tab--active{height:24px;color:#fff;font-size:14px;background-image:-webkit-linear-gradient(top,#3cafff 0,#0091fa 100%);background-image:linear-gradient(180deg,#3cafff 0,#0091fa 100%);box-shadow:0 2px 4px 0 rgba(0,145,250,.24);border-radius:14px}.zt2-tabs__nav--card .zt2-tab--disabled{color:#c8c9cc}.zt2-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:12px;height:4px;background-color:#0091fa;border-radius:2px}.zt2-tabs__track{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;width:100%;height:100%;will-change:left}.zt2-tabs__content--animated{overflow:hidden}.zt2-tabs--line .zt2-tabs__wrap{height:44px}.zt2-tabs--card>.zt2-tabs__wrap{height:32px}
1
+ .zt2-tab{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;box-sizing:border-box;padding:0 16px;color:rgba(45,75,115,.6);font-size:14px;line-height:20px;cursor:pointer}.zt2-tab--active{color:#2d4b73;font-weight:700;font-size:16px}.zt2-tab--disabled{color:#c8c9cc;cursor:not-allowed}.zt2-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.zt2-tab__text-wrapper{position:relative}.zt2-tabs{position:relative}.zt2-tabs__wrap{overflow:hidden}.zt2-tabs__wrap--page-top{position:fixed}.zt2-tabs__wrap--content-bottom{top:auto;bottom:0}.zt2-tabs__wrap--scrollable .zt2-tab{-webkit-box-flex:1;-webkit-flex:1 0 auto;flex:1 0 auto;padding:0 12px}.zt2-tabs__wrap--scrollable .zt2-tabs__nav{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.zt2-tabs__wrap--scrollable .zt2-tabs__nav::-webkit-scrollbar{display:none}.zt2-tabs__nav{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;background-color:#f5faff;-webkit-user-select:none;user-select:none}.zt2-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.zt2-tabs__nav--line.zt2-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt2-tabs__nav--card{-webkit-box-flex:1;-webkit-flex:1;flex:1;margin:0 60px;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;height:32px;background:rgba(45,75,115,.04);box-shadow:inset 4px 4px 8px 0 rgba(45,75,115,.1);border-radius:16px}.zt2-tabs__nav--card .zt2-tab{color:#000}.zt2-tabs__nav--card .zt2-tab.zt2-tab--active{height:24px;color:#fff;font-size:14px;background-image:-webkit-linear-gradient(top,#3cafff 0,#0091fa 100%);background-image:linear-gradient(180deg,#3cafff 0,#0091fa 100%);box-shadow:0 2px 4px 0 rgba(0,145,250,.24);border-radius:14px}.zt2-tabs__nav--card .zt2-tab--disabled{color:#c8c9cc}.zt2-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:12px;height:4px;background-color:#0091fa;border-radius:2px}.zt2-tabs__track{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;width:100%;height:100%;will-change:left}.zt2-tabs__content--animated{overflow:hidden}.zt2-tabs--line .zt2-tabs__wrap{height:44px}.zt2-tabs--card>.zt2-tabs__wrap{height:32px}
package/es/tabs/index.js CHANGED
@@ -79,7 +79,7 @@ export default createComponent({
79
79
  },
80
80
  swipeThreshold: {
81
81
  type: [Number, String],
82
- default: 5
82
+ default: 3
83
83
  },
84
84
  divider: {
85
85
  type: Boolean,
@@ -382,6 +382,12 @@ export default createComponent({
382
382
  "scopedSlots": {
383
383
  default: function _default() {
384
384
  return item.slots('title');
385
+ },
386
+ prefix: function prefix() {
387
+ return item.slots('prefix');
388
+ },
389
+ suffix: function suffix() {
390
+ return item.slots('suffix');
385
391
  }
386
392
  },
387
393
  "on": {
@@ -92,7 +92,7 @@
92
92
  &--card {
93
93
  flex: 1;
94
94
  margin: 0 60px;
95
- justify-content: space-around;
95
+ justify-content: flex-start;
96
96
  align-items: center;
97
97
  box-sizing: border-box;
98
98
  height: @tabs-card-height;
@@ -1 +1 @@
1
- .zt2-cascader__header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:44px;padding:0 16px}.zt2-cascader__title{font-weight:700;font-size:14px;line-height:44px;color:rgba(45,75,115,.4)}.zt2-cascader__tabs .zt2-tab{-webkit-box-flex:0;-webkit-flex:none;flex:none;margin:0 8px;padding:0}.zt2-cascader__tabs .zt2-tabs__wrap{position:relative;height:44px}.zt2-cascader__tabs .zt2-tabs__wrap::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-cascader__tabs .zt2-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt2-cascader__tab{color:#2d4b73;font-weight:700;font-size:14px;line-height:44px}.zt2-cascader__tab--unselected{color:rgba(45,75,115,.4);font-weight:400}.zt2-cascader__option{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-family:PingFangSC-Regular;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;color:#2d4b73;padding:0 16px;font-weight:400;font-size:14px;line-height:44px}.zt2-cascader__option:active{background-color:rgba(0,0,0,.04)}.zt2-cascader__option--selected{color:#0091fa;font-weight:700}.zt2-cascader__selected-icon{font-size:24px}.zt2-cascader__options{box-sizing:border-box;height:352px;overflow-y:auto;-webkit-overflow-scrolling:touch}.zt2-cascader .zt2-tabs__nav{background:#fff}.zt2-cascader .zt2-cascader__cancel{margin:8px 16px;width:calc(100% - 32px);background:rgba(45,75,115,.04);border-radius:20.5px}
1
+ .zt2-cascader__header{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:44px;padding:0 16px}.zt2-cascader__title{font-weight:700;font-size:14px;line-height:44px;color:rgba(45,75,115,.4)}.zt2-cascader__tabs .zt2-tab{-webkit-box-flex:0;-webkit-flex:none;flex:none;margin:0 8px;padding:0}.zt2-cascader__tabs .zt2-tabs__wrap{position:relative;height:44px}.zt2-cascader__tabs .zt2-tabs__wrap::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt2-cascader__tabs .zt2-tabs__nav--complete{padding-right:8px;padding-left:8px}.zt2-cascader__tab{color:#2d4b73;font-weight:700;font-size:14px;line-height:44px}.zt2-cascader__tab--unselected{color:rgba(45,75,115,.4);font-weight:400}.zt2-cascader__option{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-family:PingFangSC-Regular;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;color:#2d4b73;padding:12px 16px;font-weight:400;font-size:14px;line-height:20px}.zt2-cascader__option:active{background-color:rgba(0,0,0,.04)}.zt2-cascader__option--selected{color:#0091fa;font-weight:700}.zt2-cascader__selected-icon{font-size:24px}.zt2-cascader__options{box-sizing:border-box;height:352px;overflow-y:auto;-webkit-overflow-scrolling:touch}.zt2-cascader .zt2-tabs__nav{background:#fff}.zt2-cascader .zt2-cascader__cancel{margin:8px 16px;width:calc(100% - 32px);background:rgba(45,75,115,.04);border-radius:20.5px}
@@ -57,10 +57,10 @@
57
57
  font-family: PingFangSC-Regular;
58
58
  justify-content: space-between;
59
59
  color: #2D4B73;
60
- padding: 0 @padding-md;
60
+ padding: @padding-sm @padding-md;
61
61
  font-weight: normal;
62
62
  font-size: @font-size-md;
63
- line-height: 44px;
63
+ line-height: @line-height-md;
64
64
 
65
65
  &:active {
66
66
  background-color: @active-color;