zartui 2.0.62 → 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.
- package/es/cascader/index.css +1 -1
- package/es/cascader/index.less +2 -2
- package/es/cell/index.css +1 -1
- package/es/cell/index.js +33 -5
- package/es/cell/index.less +14 -5
- package/es/cell/shared.js +2 -1
- package/es/cell/style/index.js +1 -0
- package/es/cell/style/less.js +1 -0
- package/es/collapse-item/style/index.js +1 -0
- package/es/collapse-item/style/less.js +1 -0
- package/es/dropdown-item/style/index.js +2 -1
- package/es/dropdown-item/style/less.js +2 -1
- package/es/index.js +1 -1
- package/es/style/var.less +2 -0
- package/es/switch-cell/style/index.js +2 -1
- package/es/switch-cell/style/less.js +2 -1
- package/es/tabs/Title.js +13 -3
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.js +7 -1
- package/es/tabs/index.less +1 -1
- package/lib/cascader/index.css +1 -1
- package/lib/cascader/index.less +2 -2
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.js +34 -4
- package/lib/cell/index.less +14 -5
- package/lib/cell/shared.js +2 -1
- package/lib/cell/style/index.js +1 -0
- package/lib/cell/style/less.js +1 -0
- package/lib/collapse-item/style/index.js +1 -0
- package/lib/collapse-item/style/less.js +1 -0
- package/lib/dropdown-item/style/index.js +2 -1
- package/lib/dropdown-item/style/less.js +2 -1
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +6 -6
- package/lib/style/var.less +2 -0
- package/lib/switch-cell/style/index.js +2 -1
- package/lib/switch-cell/style/less.js +2 -1
- package/lib/tabs/Title.js +13 -3
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +7 -1
- package/lib/tabs/index.less +1 -1
- package/lib/zart.js +77 -32
- package/lib/zart.min.js +1 -1
- package/package.json +1 -1
package/es/cascader/index.css
CHANGED
|
@@ -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:
|
|
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}
|
package/es/cascader/index.less
CHANGED
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
font-family: PingFangSC-Regular;
|
|
58
58
|
justify-content: space-between;
|
|
59
59
|
color: #2D4B73;
|
|
60
|
-
padding:
|
|
60
|
+
padding: @padding-sm @padding-md;
|
|
61
61
|
font-weight: normal;
|
|
62
62
|
font-size: @font-size-md;
|
|
63
|
-
line-height:
|
|
63
|
+
line-height: @line-height-md;
|
|
64
64
|
|
|
65
65
|
&:active {
|
|
66
66
|
background-color: @active-color;
|
package/es/cell/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-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:14px;line-height:20px;background-color:transparent}.zt2-cell--noFlex{display:block}.zt2-cell--noFlex .zt2-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt2-cell--borderless::after,.zt2-cell:last-child::after{display:none}.zt2-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt2-cell__placeholder{color:rgba(45,75,115,.2);-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt2-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word;border-radius:4px}.zt2-cell__value--alone{text-align:left}.zt2-cell__left-icon,.zt2-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt2-cell__left-icon{margin-right:4px}.zt2-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt2-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell--large{padding-top:12px;padding-bottom:12px}.zt2-cell--large .zt2-cell__title{font-size:16px}.zt2-cell--large .zt2-cell__label{font-size:14px}.zt2-cell__direction-row{position:relative;background-color:#fff}.zt2-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)}.zt2-cell__direction-row .zt2-cell__title{color:rgba(45,75,115,.8)}.zt2-cell__direction-row:last-child::after{display:none}.zt2-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;font-size:14px;line-height:20px}.zt2-cell__direction-column .zt2-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-column .zt2-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zt2-cell__direction-column .zt2-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}.zt2-cell__direction-column .zt2-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}.zt2-cell__direction-column .zt2-cell__value .zt2-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__direction-column .zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt2-cell__clickable{cursor:pointer}.zt2-cell__clickable:active{background-color:rgba(0,0,0,.04)}
|
|
1
|
+
.zt2-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:14px;line-height:20px;background-color:transparent}.zt2-cell--noFlex{display:block}.zt2-cell--noFlex .zt2-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt2-cell--borderless::after,.zt2-cell:last-child::after{display:none}.zt2-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt2-cell__placeholder{color:rgba(45,75,115,.2);-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt2-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word;border-radius:4px}.zt2-cell__value--alone{text-align:left}.zt2-cell__clear{color:rgba(45,75,115,.6);font-size:20px;width:20px;height:20px;margin:0 4px 0 8px;cursor:pointer;box-sizing:content-box}.zt2-cell__clear:last-child{margin-right:0}.zt2-cell__left-icon,.zt2-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt2-cell__left-icon{margin-right:4px}.zt2-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt2-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell--large{padding-top:12px;padding-bottom:12px}.zt2-cell--large .zt2-cell__title{font-size:16px}.zt2-cell--large .zt2-cell__label{font-size:14px}.zt2-cell__direction-row{position:relative;background-color:#fff}.zt2-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)}.zt2-cell__direction-row .zt2-cell__title{color:rgba(45,75,115,.8)}.zt2-cell__direction-row:last-child::after{display:none}.zt2-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;font-size:14px;line-height:20px}.zt2-cell__direction-column .zt2-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-column .zt2-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zt2-cell__direction-column .zt2-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}.zt2-cell__direction-column .zt2-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}.zt2-cell__direction-column .zt2-cell__value .zt2-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__direction-column .zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt2-cell__clickable{cursor:pointer}.zt2-cell__clickable:active{background-color:rgba(0,0,0,.04)}
|
package/es/cell/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
// Utils
|
|
4
4
|
import { createNamespace, isDef } from '../utils';
|
|
5
5
|
import { emit, inherit } from '../utils/functional';
|
|
6
6
|
import { routeProps, functionalRoute } from '../utils/router';
|
|
7
|
-
import { cellProps } from './shared';
|
|
7
|
+
import { cellProps } from './shared';
|
|
8
|
+
import { preventDefault } from '../utils/dom/event'; // Components
|
|
8
9
|
|
|
9
|
-
import Icon from '../icon';
|
|
10
|
+
import Icon from '../icon';
|
|
11
|
+
import ClearIcon from "../field/ClearIcon"; // Types
|
|
10
12
|
|
|
11
13
|
var _createNamespace = createNamespace('cell'),
|
|
12
14
|
createComponent = _createNamespace[0],
|
|
@@ -111,17 +113,43 @@ function Cell(h, props, slots, ctx) {
|
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
|
|
116
|
+
function onClear(event) {
|
|
117
|
+
preventDefault(event, true);
|
|
118
|
+
emit(ctx, 'clear', event);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function renderClearIcon() {
|
|
122
|
+
var clearIconWrapEvent = {
|
|
123
|
+
click: onClear
|
|
124
|
+
}; // 根据环境只监听一种事件,防止某些click模拟touch事件触发两次
|
|
125
|
+
|
|
126
|
+
if ('ontouchstart' in document.documentElement) {
|
|
127
|
+
clearIconWrapEvent = {
|
|
128
|
+
touchstart: onClear
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return h("div", {
|
|
133
|
+
"class": bem('clear'),
|
|
134
|
+
"on": _extends({}, clearIconWrapEvent)
|
|
135
|
+
}, [h(ClearIcon)]);
|
|
136
|
+
}
|
|
137
|
+
|
|
114
138
|
function Value() {
|
|
115
139
|
var showValue = slots.default || isDef(value) || clickable || slots['right-icon'];
|
|
140
|
+
var hasValue = isDef(value) && value !== '';
|
|
141
|
+
var showClearIcon = hasValue && props.clearable;
|
|
116
142
|
|
|
117
143
|
if (showValue) {
|
|
118
144
|
return h("div", {
|
|
119
145
|
"class": [bem('value', {
|
|
120
146
|
alone: !showTitle
|
|
121
|
-
}), props.valueClass, direction === 'column' && clickable ? bem('clickable'
|
|
147
|
+
}), props.valueClass, direction === 'column' && clickable ? bem('clickable', {
|
|
148
|
+
clearIcon: showClearIcon
|
|
149
|
+
}) : '']
|
|
122
150
|
}, [slots.default ? slots.default() : value !== "" ? h("span", {
|
|
123
151
|
"class": bem('value-content')
|
|
124
|
-
}, [value]) : PlaceholderSpan(), slots.extra == null ? void 0 : slots.extra(), RightIcon()]);
|
|
152
|
+
}, [value]) : PlaceholderSpan(), showClearIcon ? renderClearIcon() : null, slots.extra == null ? void 0 : slots.extra(), RightIcon()]);
|
|
125
153
|
} else {
|
|
126
154
|
return PlaceholderSpan();
|
|
127
155
|
}
|
package/es/cell/index.less
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
&-content {
|
|
46
46
|
flex: 18;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
&__placeholder {
|
|
@@ -69,6 +68,19 @@
|
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
|
|
71
|
+
&__clear {
|
|
72
|
+
color: @cell-clear-icon-color;
|
|
73
|
+
font-size: @cell-clear-icon-size;
|
|
74
|
+
width: @cell-clear-icon-size;
|
|
75
|
+
height: @cell-clear-icon-size;
|
|
76
|
+
margin: 0 @padding-base 0 @padding-xs;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
box-sizing: content-box;
|
|
79
|
+
&:last-child {
|
|
80
|
+
margin-right: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
72
84
|
&__left-icon,
|
|
73
85
|
&__right-icon {
|
|
74
86
|
height: @cell-line-height;
|
|
@@ -86,8 +98,6 @@
|
|
|
86
98
|
color: @cell-right-icon-color;
|
|
87
99
|
}
|
|
88
100
|
|
|
89
|
-
|
|
90
|
-
|
|
91
101
|
&--center {
|
|
92
102
|
align-items: center;
|
|
93
103
|
}
|
|
@@ -114,7 +124,7 @@
|
|
|
114
124
|
.hairline-bottom(@cell-border-color, @padding-md);
|
|
115
125
|
}
|
|
116
126
|
.@{base-prefix}-cell__title {
|
|
117
|
-
color: rgba(45,75,115,0.
|
|
127
|
+
color: rgba(45, 75, 115, 0.8);
|
|
118
128
|
}
|
|
119
129
|
|
|
120
130
|
&:last-child::after {
|
|
@@ -164,7 +174,6 @@
|
|
|
164
174
|
}
|
|
165
175
|
}
|
|
166
176
|
|
|
167
|
-
|
|
168
177
|
.@{base-prefix}-cell__clickable {
|
|
169
178
|
cursor: pointer;
|
|
170
179
|
&:active {
|
package/es/cell/shared.js
CHANGED
|
@@ -16,6 +16,7 @@ export var cellProps = {
|
|
|
16
16
|
arrowDirection: String,
|
|
17
17
|
direction: String,
|
|
18
18
|
subtitle: String,
|
|
19
|
+
clearable: Boolean,
|
|
19
20
|
border: {
|
|
20
21
|
type: Boolean,
|
|
21
22
|
default: true
|
|
@@ -26,6 +27,6 @@ export var cellProps = {
|
|
|
26
27
|
},
|
|
27
28
|
placeholder: {
|
|
28
29
|
type: String,
|
|
29
|
-
value:
|
|
30
|
+
value: ''
|
|
30
31
|
}
|
|
31
32
|
};
|
package/es/cell/style/index.js
CHANGED
package/es/cell/style/less.js
CHANGED
|
@@ -3,6 +3,7 @@ import '../../overlay/index.css';
|
|
|
3
3
|
import '../../info/index.css';
|
|
4
4
|
import '../../icon/index.css';
|
|
5
5
|
import '../../checkbox/index.css';
|
|
6
|
-
import '../../cell/index.css';
|
|
7
6
|
import '../../popup/index.css';
|
|
7
|
+
import '../../cell/index.css';
|
|
8
|
+
import '../../field/index.css';
|
|
8
9
|
import '../index.css';
|
|
@@ -3,6 +3,7 @@ import '../../overlay/index.less';
|
|
|
3
3
|
import '../../info/index.less';
|
|
4
4
|
import '../../icon/index.less';
|
|
5
5
|
import '../../checkbox/index.less';
|
|
6
|
-
import '../../cell/index.less';
|
|
7
6
|
import '../../popup/index.less';
|
|
7
|
+
import '../../cell/index.less';
|
|
8
|
+
import '../../field/index.less';
|
|
8
9
|
import '../index.less';
|
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.
|
|
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/style/var.less
CHANGED
|
@@ -285,6 +285,8 @@
|
|
|
285
285
|
@cell-label-line-height: @line-height-sm;
|
|
286
286
|
@cell-label-margin-top: 10px;
|
|
287
287
|
@cell-icon-size: 16px;
|
|
288
|
+
@cell-clear-icon-size: 20px;
|
|
289
|
+
@cell-clear-icon-color: rgba(45, 75, 115, .6);
|
|
288
290
|
@cell-right-icon-color: @gray-6;
|
|
289
291
|
@cell-large-vertical-padding: @padding-sm;
|
|
290
292
|
@cell-large-title-font-size: @font-size-lg;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import '../../style/base.css';
|
|
2
2
|
import '../../info/index.css';
|
|
3
3
|
import '../../icon/index.css';
|
|
4
|
-
import '../../cell/index.css';
|
|
5
4
|
import '../../loading/index.css';
|
|
6
5
|
import '../../switch/index.css';
|
|
6
|
+
import '../../cell/index.css';
|
|
7
|
+
import '../../field/index.css';
|
|
7
8
|
import '../index.css';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import '../../style/base.less';
|
|
2
2
|
import '../../info/index.less';
|
|
3
3
|
import '../../icon/index.less';
|
|
4
|
-
import '../../cell/index.less';
|
|
5
4
|
import '../../loading/index.less';
|
|
6
5
|
import '../../switch/index.less';
|
|
6
|
+
import '../../cell/index.less';
|
|
7
|
+
import '../../field/index.less';
|
|
7
8
|
import '../index.less';
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
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": {
|
package/es/tabs/index.less
CHANGED
package/lib/cascader/index.css
CHANGED
|
@@ -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:
|
|
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}
|
package/lib/cascader/index.less
CHANGED
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
font-family: PingFangSC-Regular;
|
|
58
58
|
justify-content: space-between;
|
|
59
59
|
color: #2D4B73;
|
|
60
|
-
padding:
|
|
60
|
+
padding: @padding-sm @padding-md;
|
|
61
61
|
font-weight: normal;
|
|
62
62
|
font-size: @font-size-md;
|
|
63
|
-
line-height:
|
|
63
|
+
line-height: @line-height-md;
|
|
64
64
|
|
|
65
65
|
&:active {
|
|
66
66
|
background-color: @active-color;
|
package/lib/cell/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-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:14px;line-height:20px;background-color:transparent}.zt2-cell--noFlex{display:block}.zt2-cell--noFlex .zt2-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt2-cell--borderless::after,.zt2-cell:last-child::after{display:none}.zt2-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt2-cell__placeholder{color:rgba(45,75,115,.2);-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt2-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word;border-radius:4px}.zt2-cell__value--alone{text-align:left}.zt2-cell__left-icon,.zt2-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt2-cell__left-icon{margin-right:4px}.zt2-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt2-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell--large{padding-top:12px;padding-bottom:12px}.zt2-cell--large .zt2-cell__title{font-size:16px}.zt2-cell--large .zt2-cell__label{font-size:14px}.zt2-cell__direction-row{position:relative;background-color:#fff}.zt2-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)}.zt2-cell__direction-row .zt2-cell__title{color:rgba(45,75,115,.8)}.zt2-cell__direction-row:last-child::after{display:none}.zt2-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;font-size:14px;line-height:20px}.zt2-cell__direction-column .zt2-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-column .zt2-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zt2-cell__direction-column .zt2-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}.zt2-cell__direction-column .zt2-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}.zt2-cell__direction-column .zt2-cell__value .zt2-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__direction-column .zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt2-cell__clickable{cursor:pointer}.zt2-cell__clickable:active{background-color:rgba(0,0,0,.04)}
|
|
1
|
+
.zt2-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:14px;line-height:20px;background-color:transparent}.zt2-cell--noFlex{display:block}.zt2-cell--noFlex .zt2-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt2-cell--borderless::after,.zt2-cell:last-child::after{display:none}.zt2-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt2-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt2-cell__placeholder{color:rgba(45,75,115,.2);-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt2-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word;border-radius:4px}.zt2-cell__value--alone{text-align:left}.zt2-cell__clear{color:rgba(45,75,115,.6);font-size:20px;width:20px;height:20px;margin:0 4px 0 8px;cursor:pointer;box-sizing:content-box}.zt2-cell__clear:last-child{margin-right:0}.zt2-cell__left-icon,.zt2-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt2-cell__left-icon{margin-right:4px}.zt2-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt2-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell--large{padding-top:12px;padding-bottom:12px}.zt2-cell--large .zt2-cell__title{font-size:16px}.zt2-cell--large .zt2-cell__label{font-size:14px}.zt2-cell__direction-row{position:relative;background-color:#fff}.zt2-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)}.zt2-cell__direction-row .zt2-cell__title{color:rgba(45,75,115,.8)}.zt2-cell__direction-row:last-child::after{display:none}.zt2-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;font-size:14px;line-height:20px}.zt2-cell__direction-column .zt2-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-cell__direction-column .zt2-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zt2-cell__direction-column .zt2-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}.zt2-cell__direction-column .zt2-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}.zt2-cell__direction-column .zt2-cell__value .zt2-icon{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt2-cell__direction-column .zt2-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt2-cell__clickable{cursor:pointer}.zt2-cell__clickable:active{background-color:rgba(0,0,0,.04)}
|
package/lib/cell/index.js
CHANGED
|
@@ -5,10 +5,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
|
|
10
8
|
var _babelHelperVueJsxMergeProps = _interopRequireDefault(require("@vue/babel-helper-vue-jsx-merge-props"));
|
|
11
9
|
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
12
|
var _utils = require("../utils");
|
|
13
13
|
|
|
14
14
|
var _functional = require("../utils/functional");
|
|
@@ -17,8 +17,12 @@ var _router = require("../utils/router");
|
|
|
17
17
|
|
|
18
18
|
var _shared = require("./shared");
|
|
19
19
|
|
|
20
|
+
var _event = require("../utils/dom/event");
|
|
21
|
+
|
|
20
22
|
var _icon = _interopRequireDefault(require("../icon"));
|
|
21
23
|
|
|
24
|
+
var _ClearIcon = _interopRequireDefault(require("../field/ClearIcon"));
|
|
25
|
+
|
|
22
26
|
// Utils
|
|
23
27
|
// Components
|
|
24
28
|
var _createNamespace = (0, _utils.createNamespace)('cell'),
|
|
@@ -124,17 +128,43 @@ function Cell(h, props, slots, ctx) {
|
|
|
124
128
|
}
|
|
125
129
|
}
|
|
126
130
|
|
|
131
|
+
function onClear(event) {
|
|
132
|
+
(0, _event.preventDefault)(event, true);
|
|
133
|
+
(0, _functional.emit)(ctx, 'clear', event);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function renderClearIcon() {
|
|
137
|
+
var clearIconWrapEvent = {
|
|
138
|
+
click: onClear
|
|
139
|
+
}; // 根据环境只监听一种事件,防止某些click模拟touch事件触发两次
|
|
140
|
+
|
|
141
|
+
if ('ontouchstart' in document.documentElement) {
|
|
142
|
+
clearIconWrapEvent = {
|
|
143
|
+
touchstart: onClear
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return h("div", {
|
|
148
|
+
"class": bem('clear'),
|
|
149
|
+
"on": (0, _extends2.default)({}, clearIconWrapEvent)
|
|
150
|
+
}, [h(_ClearIcon.default)]);
|
|
151
|
+
}
|
|
152
|
+
|
|
127
153
|
function Value() {
|
|
128
154
|
var showValue = slots.default || (0, _utils.isDef)(value) || clickable || slots['right-icon'];
|
|
155
|
+
var hasValue = (0, _utils.isDef)(value) && value !== '';
|
|
156
|
+
var showClearIcon = hasValue && props.clearable;
|
|
129
157
|
|
|
130
158
|
if (showValue) {
|
|
131
159
|
return h("div", {
|
|
132
160
|
"class": [bem('value', {
|
|
133
161
|
alone: !showTitle
|
|
134
|
-
}), props.valueClass, direction === 'column' && clickable ? bem('clickable'
|
|
162
|
+
}), props.valueClass, direction === 'column' && clickable ? bem('clickable', {
|
|
163
|
+
clearIcon: showClearIcon
|
|
164
|
+
}) : '']
|
|
135
165
|
}, [slots.default ? slots.default() : value !== "" ? h("span", {
|
|
136
166
|
"class": bem('value-content')
|
|
137
|
-
}, [value]) : PlaceholderSpan(), slots.extra == null ? void 0 : slots.extra(), RightIcon()]);
|
|
167
|
+
}, [value]) : PlaceholderSpan(), showClearIcon ? renderClearIcon() : null, slots.extra == null ? void 0 : slots.extra(), RightIcon()]);
|
|
138
168
|
} else {
|
|
139
169
|
return PlaceholderSpan();
|
|
140
170
|
}
|
package/lib/cell/index.less
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
&-content {
|
|
46
46
|
flex: 18;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
&__placeholder {
|
|
@@ -69,6 +68,19 @@
|
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
|
|
71
|
+
&__clear {
|
|
72
|
+
color: @cell-clear-icon-color;
|
|
73
|
+
font-size: @cell-clear-icon-size;
|
|
74
|
+
width: @cell-clear-icon-size;
|
|
75
|
+
height: @cell-clear-icon-size;
|
|
76
|
+
margin: 0 @padding-base 0 @padding-xs;
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
box-sizing: content-box;
|
|
79
|
+
&:last-child {
|
|
80
|
+
margin-right: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
72
84
|
&__left-icon,
|
|
73
85
|
&__right-icon {
|
|
74
86
|
height: @cell-line-height;
|
|
@@ -86,8 +98,6 @@
|
|
|
86
98
|
color: @cell-right-icon-color;
|
|
87
99
|
}
|
|
88
100
|
|
|
89
|
-
|
|
90
|
-
|
|
91
101
|
&--center {
|
|
92
102
|
align-items: center;
|
|
93
103
|
}
|
|
@@ -114,7 +124,7 @@
|
|
|
114
124
|
.hairline-bottom(@cell-border-color, @padding-md);
|
|
115
125
|
}
|
|
116
126
|
.@{base-prefix}-cell__title {
|
|
117
|
-
color: rgba(45,75,115,0.
|
|
127
|
+
color: rgba(45, 75, 115, 0.8);
|
|
118
128
|
}
|
|
119
129
|
|
|
120
130
|
&:last-child::after {
|
|
@@ -164,7 +174,6 @@
|
|
|
164
174
|
}
|
|
165
175
|
}
|
|
166
176
|
|
|
167
|
-
|
|
168
177
|
.@{base-prefix}-cell__clickable {
|
|
169
178
|
cursor: pointer;
|
|
170
179
|
&:active {
|
package/lib/cell/shared.js
CHANGED
|
@@ -20,6 +20,7 @@ var cellProps = {
|
|
|
20
20
|
arrowDirection: String,
|
|
21
21
|
direction: String,
|
|
22
22
|
subtitle: String,
|
|
23
|
+
clearable: Boolean,
|
|
23
24
|
border: {
|
|
24
25
|
type: Boolean,
|
|
25
26
|
default: true
|
|
@@ -30,7 +31,7 @@ var cellProps = {
|
|
|
30
31
|
},
|
|
31
32
|
placeholder: {
|
|
32
33
|
type: String,
|
|
33
|
-
value:
|
|
34
|
+
value: ''
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
exports.cellProps = cellProps;
|
package/lib/cell/style/index.js
CHANGED
package/lib/cell/style/less.js
CHANGED
|
@@ -3,6 +3,7 @@ require('../../overlay/index.css');
|
|
|
3
3
|
require('../../info/index.css');
|
|
4
4
|
require('../../icon/index.css');
|
|
5
5
|
require('../../checkbox/index.css');
|
|
6
|
-
require('../../cell/index.css');
|
|
7
6
|
require('../../popup/index.css');
|
|
7
|
+
require('../../cell/index.css');
|
|
8
|
+
require('../../field/index.css');
|
|
8
9
|
require('../index.css');
|
|
@@ -3,6 +3,7 @@ require('../../overlay/index.less');
|
|
|
3
3
|
require('../../info/index.less');
|
|
4
4
|
require('../../icon/index.less');
|
|
5
5
|
require('../../checkbox/index.less');
|
|
6
|
-
require('../../cell/index.less');
|
|
7
6
|
require('../../popup/index.less');
|
|
7
|
+
require('../../cell/index.less');
|
|
8
|
+
require('../../field/index.less');
|
|
8
9
|
require('../index.less');
|