zartui 0.1.113 → 2.0.1
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/action-sheet/index.css +1 -1
- package/es/action-sheet/index.js +3 -3
- package/es/action-sheet/index.less +12 -8
- package/es/area/style/index.js +1 -0
- package/es/area/style/less.js +1 -0
- package/es/avatar/index.css +1 -1
- package/es/button/index.css +1 -1
- package/es/button/index.js +28 -13
- package/es/button/index.less +60 -27
- package/es/calendar/components/Header.js +1 -6
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.js +31 -8
- package/es/calendar/index.less +16 -10
- package/es/cell/index.css +1 -1
- package/es/cell/index.js +60 -38
- package/es/cell/index.less +67 -12
- package/es/cell/shared.js +2 -0
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.less +18 -6
- package/es/checkbox-group/index.js +1 -0
- package/es/datetime-picker/style/index.js +1 -0
- package/es/datetime-picker/style/less.js +1 -0
- package/es/field/index.css +1 -1
- package/es/field/index.js +80 -7
- package/es/field/index.less +60 -8
- package/es/icon/index.css +1 -1
- package/es/image/index.css +1 -1
- package/es/image-preview/ImagePreview.js +1 -1
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.less +4 -2
- package/es/index.js +1 -1
- package/es/loading/index.css +1 -1
- package/es/loading/index.js +3 -3
- package/es/loading/index.less +1 -1
- package/es/media-picker/image/PickFileIcon.js +2 -9
- package/es/media-picker/image/PickPhotoIcon.js +2 -9
- package/es/media-picker/image/TakeAudioIcon.js +2 -9
- package/es/media-picker/image/TakePhotoIcon.js +2 -9
- package/es/media-picker/image/TakeVideoIcon.js +2 -9
- package/es/media-picker/index.css +1 -1
- package/es/media-picker/index.less +6 -4
- package/es/mixins/checkbox.js +12 -30
- package/es/multiple-picker/index.css +1 -1
- package/es/multiple-picker/index.js +18 -11
- package/es/multiple-picker/index.less +11 -5
- package/es/multiple-picker/style/index.js +1 -0
- package/es/multiple-picker/style/less.js +1 -0
- package/es/pdf-viewer/style/index.js +1 -0
- package/es/pdf-viewer/style/less.js +1 -0
- package/es/picker/index.css +1 -1
- package/es/picker/index.js +18 -9
- package/es/picker/index.less +18 -2
- package/es/picker/style/index.js +1 -0
- package/es/picker/style/less.js +1 -0
- package/es/popup/index.css +1 -1
- package/es/popup/index.js +1 -1
- package/es/popup/index.less +2 -2
- package/es/radio/index.css +1 -1
- package/es/radio/index.less +23 -22
- package/es/radio-group/index.js +1 -0
- package/es/signature/index.js +7 -6
- package/es/signature/index.less +1 -1
- package/es/step/index.css +1 -1
- package/es/step/index.js +3 -5
- package/es/step/index.less +3 -1
- package/es/stepper/index.css +1 -1
- package/es/steps/index.css +1 -1
- package/es/steps/index.less +3 -3
- package/es/style/reset.css +1 -1
- package/es/style/var.less +92 -53
- package/es/switch-cell/index.css +1 -1
- package/es/tabs/Title.js +6 -1
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.js +2 -4
- package/es/tabs/index.less +18 -15
- package/es/toast/index.css +1 -1
- package/es/uploader/index.css +1 -1
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.js +3 -3
- package/lib/action-sheet/index.less +12 -8
- package/lib/area/style/index.js +1 -0
- package/lib/area/style/less.js +1 -0
- package/lib/avatar/index.css +1 -1
- package/lib/button/index.css +1 -1
- package/lib/button/index.js +28 -13
- package/lib/button/index.less +60 -27
- package/lib/calendar/components/Header.js +1 -6
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.js +31 -8
- package/lib/calendar/index.less +16 -10
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.js +60 -38
- package/lib/cell/index.less +67 -12
- package/lib/cell/shared.js +2 -0
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.less +18 -6
- package/lib/checkbox-group/index.js +1 -0
- package/lib/datetime-picker/style/index.js +1 -0
- package/lib/datetime-picker/style/less.js +1 -0
- package/lib/field/index.css +1 -1
- package/lib/field/index.js +80 -7
- package/lib/field/index.less +60 -8
- package/lib/icon/index.css +1 -1
- package/lib/image/index.css +1 -1
- package/lib/image-preview/ImagePreview.js +1 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.less +4 -2
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +1 -1
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.js +3 -3
- package/lib/loading/index.less +1 -1
- package/lib/media-picker/image/PickFileIcon.js +2 -9
- package/lib/media-picker/image/PickPhotoIcon.js +2 -9
- package/lib/media-picker/image/TakeAudioIcon.js +2 -9
- package/lib/media-picker/image/TakePhotoIcon.js +2 -9
- package/lib/media-picker/image/TakeVideoIcon.js +2 -9
- package/lib/media-picker/index.css +1 -1
- package/lib/media-picker/index.less +6 -4
- package/lib/mixins/checkbox.js +12 -30
- package/lib/multiple-picker/index.css +1 -1
- package/lib/multiple-picker/index.js +19 -11
- package/lib/multiple-picker/index.less +11 -5
- package/lib/multiple-picker/style/index.js +1 -0
- package/lib/multiple-picker/style/less.js +1 -0
- package/lib/pdf-viewer/style/index.js +1 -0
- package/lib/pdf-viewer/style/less.js +1 -0
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.js +19 -9
- package/lib/picker/index.less +18 -2
- package/lib/picker/style/index.js +1 -0
- package/lib/picker/style/less.js +1 -0
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +1 -1
- package/lib/popup/index.less +2 -2
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.less +23 -22
- package/lib/radio-group/index.js +1 -0
- package/lib/signature/index.js +7 -6
- package/lib/signature/index.less +1 -1
- package/lib/step/index.css +1 -1
- package/lib/step/index.js +3 -5
- package/lib/step/index.less +3 -1
- package/lib/stepper/index.css +1 -1
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.less +3 -3
- package/lib/style/reset.css +1 -1
- package/lib/style/var.less +92 -53
- package/lib/switch-cell/index.css +1 -1
- package/lib/tabs/Title.js +6 -1
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +2 -4
- package/lib/tabs/index.less +18 -15
- package/lib/toast/index.css +1 -1
- package/lib/uploader/index.css +1 -1
- package/lib/zart.js +547 -450
- package/lib/zart.min.js +1 -1
- package/package.json +3 -3
package/es/calendar/index.js
CHANGED
|
@@ -165,6 +165,9 @@ export default createComponent({
|
|
|
165
165
|
this.currentDate = date;
|
|
166
166
|
this.scrollIntoView();
|
|
167
167
|
},
|
|
168
|
+
onCancel: function onCancel() {
|
|
169
|
+
this.$emit('cancel');
|
|
170
|
+
},
|
|
168
171
|
init: function init() {
|
|
169
172
|
var _this = this;
|
|
170
173
|
|
|
@@ -455,7 +458,22 @@ export default createComponent({
|
|
|
455
458
|
|
|
456
459
|
if (this.showConfirm) {
|
|
457
460
|
var text = this.buttonDisabled ? this.confirmDisabledText : this.confirmText;
|
|
458
|
-
return h(Button, {
|
|
461
|
+
return [h(Button, {
|
|
462
|
+
"attrs": {
|
|
463
|
+
"block": true,
|
|
464
|
+
"color": this.color,
|
|
465
|
+
"disabled": this.buttonDisabled,
|
|
466
|
+
"nativeType": "button"
|
|
467
|
+
},
|
|
468
|
+
"class": bem('confirm'),
|
|
469
|
+
"on": {
|
|
470
|
+
"click": this.onCancel
|
|
471
|
+
},
|
|
472
|
+
"style": {
|
|
473
|
+
marginRight: "4px",
|
|
474
|
+
backgroundColor: "white"
|
|
475
|
+
}
|
|
476
|
+
}, [text || '取消']), h(Button, {
|
|
459
477
|
"attrs": {
|
|
460
478
|
"block": true,
|
|
461
479
|
"type": "primary",
|
|
@@ -466,8 +484,11 @@ export default createComponent({
|
|
|
466
484
|
"class": bem('confirm'),
|
|
467
485
|
"on": {
|
|
468
486
|
"click": this.onConfirm
|
|
487
|
+
},
|
|
488
|
+
"style": {
|
|
489
|
+
marginLeft: "4px"
|
|
469
490
|
}
|
|
470
|
-
}, [text || t('confirm')]);
|
|
491
|
+
}, [text || t('confirm')])];
|
|
471
492
|
}
|
|
472
493
|
},
|
|
473
494
|
genFooter: function genFooter() {
|
|
@@ -513,8 +534,6 @@ export default createComponent({
|
|
|
513
534
|
var h = arguments[0];
|
|
514
535
|
|
|
515
536
|
if (this.poppable) {
|
|
516
|
-
var _attrs;
|
|
517
|
-
|
|
518
537
|
var createListener = function createListener(name) {
|
|
519
538
|
return function () {
|
|
520
539
|
return _this5.$emit(name);
|
|
@@ -522,11 +541,15 @@ export default createComponent({
|
|
|
522
541
|
};
|
|
523
542
|
|
|
524
543
|
return h(Popup, {
|
|
525
|
-
"attrs": (_attrs = {
|
|
526
|
-
"round": true,
|
|
527
|
-
"value": this.value
|
|
528
|
-
}, _attrs["round"] = this.round, _attrs["position"] = this.position, _attrs["closeable"] = this.showTitle || this.showSubtitle, _attrs["getContainer"] = this.getContainer, _attrs["closeOnPopstate"] = this.closeOnPopstate, _attrs["closeOnClickOverlay"] = this.closeOnClickOverlay, _attrs),
|
|
529
544
|
"class": bem('popup'),
|
|
545
|
+
"attrs": {
|
|
546
|
+
"value": this.value,
|
|
547
|
+
"round": this.round,
|
|
548
|
+
"position": this.position,
|
|
549
|
+
"getContainer": this.getContainer,
|
|
550
|
+
"closeOnPopstate": this.closeOnPopstate,
|
|
551
|
+
"closeOnClickOverlay": this.closeOnClickOverlay
|
|
552
|
+
},
|
|
530
553
|
"on": {
|
|
531
554
|
"input": this.togglePopup,
|
|
532
555
|
"open": createListener('open'),
|
package/es/calendar/index.less
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
height: 100%;
|
|
8
8
|
background-color: @calendar-background-color;
|
|
9
|
+
color: #2D4B73;
|
|
9
10
|
|
|
10
11
|
&__popup {
|
|
11
12
|
&.zt-popup--top,
|
|
@@ -31,12 +32,17 @@
|
|
|
31
32
|
|
|
32
33
|
&__header-title {
|
|
33
34
|
height: @calendar-header-title-height;
|
|
34
|
-
font-weight:
|
|
35
|
+
font-weight: 400;
|
|
35
36
|
line-height: @calendar-header-title-height;
|
|
36
|
-
text-align: left;
|
|
37
|
-
padding-left: @padding-md;
|
|
38
37
|
position: relative;
|
|
39
|
-
|
|
38
|
+
color: #2D4B73;
|
|
39
|
+
font-size: 14px;
|
|
40
|
+
line-height: 20px;
|
|
41
|
+
opacity: 0.4;
|
|
42
|
+
display: flex;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
align-items: center;
|
|
45
|
+
border-bottom: 1px solid rgba(45,75,115,0.10);
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
&__header-title .hint-block {
|
|
@@ -47,6 +53,7 @@
|
|
|
47
53
|
width: 4px;
|
|
48
54
|
height: 16px;
|
|
49
55
|
background: #0091fa;
|
|
56
|
+
|
|
50
57
|
}
|
|
51
58
|
|
|
52
59
|
&__header-title::after {
|
|
@@ -71,9 +78,6 @@
|
|
|
71
78
|
text-align: center;
|
|
72
79
|
}
|
|
73
80
|
|
|
74
|
-
&__header-title {
|
|
75
|
-
font-size: @calendar-header-title-font-size;
|
|
76
|
-
}
|
|
77
81
|
|
|
78
82
|
&__header-subtitle {
|
|
79
83
|
font-size: @calendar-header-subtitle-font-size;
|
|
@@ -235,8 +239,11 @@
|
|
|
235
239
|
|
|
236
240
|
&__footer {
|
|
237
241
|
flex-shrink: 0;
|
|
238
|
-
padding-bottom: constant(safe-area-inset-bottom);
|
|
239
|
-
padding-bottom: env(safe-area-inset-bottom);
|
|
242
|
+
// padding-bottom: constant(safe-area-inset-bottom);
|
|
243
|
+
// padding-bottom: env(safe-area-inset-bottom);
|
|
244
|
+
display: flex;
|
|
245
|
+
padding: 8px 16px 8px 16px;
|
|
246
|
+
border-top: 1px solid rgba(45,75,115,0.10);
|
|
240
247
|
|
|
241
248
|
&--unfit {
|
|
242
249
|
padding-bottom: 0;
|
|
@@ -244,7 +251,6 @@
|
|
|
244
251
|
}
|
|
245
252
|
|
|
246
253
|
&__confirm {
|
|
247
|
-
border-radius: 0px;
|
|
248
254
|
//height: @calendar-confirm-button-height;
|
|
249
255
|
//margin: @calendar-confirm-button-margin;
|
|
250
256
|
}
|
package/es/cell/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:
|
|
1
|
+
.zt-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:16px 16px;overflow:hidden;color:#2d4b73;font-size:16px;line-height:24px;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__title .zt-icon,.zt-cell__value .zt-icon{-webkit-box-flex:1;-webkit-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:flex;-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:24px;font-size:16px;line-height:24px}.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}.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/es/cell/index.js
CHANGED
|
@@ -21,27 +21,65 @@ function Cell(h, props, slots, ctx) {
|
|
|
21
21
|
label = props.label,
|
|
22
22
|
value = props.value,
|
|
23
23
|
isLink = props.isLink,
|
|
24
|
-
placeholder = props.placeholder
|
|
24
|
+
placeholder = props.placeholder,
|
|
25
|
+
direction = props.direction,
|
|
26
|
+
subtitle = props.subtitle;
|
|
25
27
|
var showTitle = slots.title || isDef(title);
|
|
28
|
+
var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
|
|
26
29
|
|
|
27
30
|
function Label() {
|
|
28
31
|
var showLabel = slots.label || isDef(label);
|
|
29
32
|
|
|
30
|
-
if (showLabel) {
|
|
33
|
+
if (showLabel && direction !== "column") {
|
|
31
34
|
return h("div", {
|
|
32
35
|
"class": [bem('label'), props.labelClass]
|
|
33
36
|
}, [slots.label ? slots.label() : label]);
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
|
|
40
|
+
function LeftIcon() {
|
|
41
|
+
if (slots.icon) {
|
|
42
|
+
return slots.icon();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (icon) {
|
|
46
|
+
return h(Icon, {
|
|
47
|
+
"class": bem('left-icon'),
|
|
48
|
+
"attrs": {
|
|
49
|
+
"name": icon,
|
|
50
|
+
"classPrefix": props.iconPrefix
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
} // 渲染副标题
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
function renderSubTitle() {
|
|
58
|
+
if (direction === "column") {
|
|
59
|
+
if (slots != null && slots.subtitle) {
|
|
60
|
+
return h("div", {
|
|
61
|
+
"class": bem('title-subtitle')
|
|
62
|
+
}, [slots == null ? void 0 : slots.subtitle()]);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (subtitle) {
|
|
66
|
+
return h("div", {
|
|
67
|
+
"class": bem('title-subtitle')
|
|
68
|
+
}, [subtitle]);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
37
73
|
function Title() {
|
|
38
74
|
if (showTitle) {
|
|
39
75
|
return h("div", {
|
|
40
76
|
"class": [bem('title'), props.titleClass],
|
|
41
77
|
"style": props.titleStyle
|
|
42
|
-
}, [slots.title ? slots.title() : h("span",
|
|
78
|
+
}, [LeftIcon(), slots.title ? slots.title() : h("span", {
|
|
79
|
+
"class": bem('title-content')
|
|
80
|
+
}, [title, Label()]), props.required ? h("span", {
|
|
43
81
|
"style": "color:#ff5023;margin-left:4px;"
|
|
44
|
-
}, ["*"]) : ""]);
|
|
82
|
+
}, ["*"]) : "", renderSubTitle()]);
|
|
45
83
|
}
|
|
46
84
|
}
|
|
47
85
|
|
|
@@ -55,36 +93,6 @@ function Cell(h, props, slots, ctx) {
|
|
|
55
93
|
}
|
|
56
94
|
}
|
|
57
95
|
|
|
58
|
-
function Value() {
|
|
59
|
-
var showValue = slots.default || isDef(value);
|
|
60
|
-
|
|
61
|
-
if (showValue) {
|
|
62
|
-
return h("div", {
|
|
63
|
-
"class": [bem('value', {
|
|
64
|
-
alone: !showTitle
|
|
65
|
-
}), props.valueClass]
|
|
66
|
-
}, [slots.default ? slots.default() : value !== "" ? h("span", [value]) : PlaceholderSpan()]);
|
|
67
|
-
} else {
|
|
68
|
-
return PlaceholderSpan();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function LeftIcon() {
|
|
73
|
-
if (slots.icon) {
|
|
74
|
-
return slots.icon();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
if (icon) {
|
|
78
|
-
return h(Icon, {
|
|
79
|
-
"class": bem('left-icon'),
|
|
80
|
-
"attrs": {
|
|
81
|
-
"name": icon,
|
|
82
|
-
"classPrefix": props.iconPrefix
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
96
|
function RightIcon() {
|
|
89
97
|
var rightIconSlot = slots['right-icon'];
|
|
90
98
|
|
|
@@ -103,14 +111,28 @@ function Cell(h, props, slots, ctx) {
|
|
|
103
111
|
}
|
|
104
112
|
}
|
|
105
113
|
|
|
114
|
+
function Value() {
|
|
115
|
+
var showValue = slots.default || isDef(value) || clickable;
|
|
116
|
+
|
|
117
|
+
if (showValue) {
|
|
118
|
+
return h("div", {
|
|
119
|
+
"class": [bem('value', {
|
|
120
|
+
alone: !showTitle
|
|
121
|
+
}), props.valueClass, direction === 'column' && clickable ? bem('clickable') : '']
|
|
122
|
+
}, [slots.default ? slots.default() : value !== "" ? h("span", {
|
|
123
|
+
"class": bem('value-content')
|
|
124
|
+
}, [value]) : PlaceholderSpan(), slots.extra == null ? void 0 : slots.extra(), RightIcon()]);
|
|
125
|
+
} else {
|
|
126
|
+
return PlaceholderSpan();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
106
130
|
function onClick(event) {
|
|
107
131
|
emit(ctx, 'click', event);
|
|
108
132
|
functionalRoute(ctx);
|
|
109
133
|
}
|
|
110
134
|
|
|
111
|
-
var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
|
|
112
135
|
var classes = {
|
|
113
|
-
clickable: clickable,
|
|
114
136
|
center: props.center,
|
|
115
137
|
// required: props.required,
|
|
116
138
|
borderless: !props.border,
|
|
@@ -122,7 +144,7 @@ function Cell(h, props, slots, ctx) {
|
|
|
122
144
|
}
|
|
123
145
|
|
|
124
146
|
return h("div", _mergeJSXProps([{
|
|
125
|
-
"class": bem(classes),
|
|
147
|
+
"class": [bem(classes), direction === 'column' ? bem('direction-column') : '', clickable && direction !== 'column' ? bem('clickable') : ''],
|
|
126
148
|
"attrs": {
|
|
127
149
|
"role": clickable ? 'button' : null,
|
|
128
150
|
"tabindex": clickable ? 0 : null
|
|
@@ -130,7 +152,7 @@ function Cell(h, props, slots, ctx) {
|
|
|
130
152
|
"on": {
|
|
131
153
|
"click": onClick
|
|
132
154
|
}
|
|
133
|
-
}, inherit(ctx)]), [
|
|
155
|
+
}, inherit(ctx)]), [Title(), Value()]);
|
|
134
156
|
}
|
|
135
157
|
|
|
136
158
|
Cell.props = _extends({}, cellProps, routeProps);
|
package/es/cell/index.less
CHANGED
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
&::after {
|
|
26
|
-
|
|
27
|
-
}
|
|
25
|
+
// &::after {
|
|
26
|
+
// .hairline-bottom(@cell-border-color, @padding-md, );
|
|
27
|
+
// }
|
|
28
28
|
|
|
29
29
|
&:last-child::after,
|
|
30
30
|
&--borderless::after {
|
|
@@ -40,19 +40,28 @@
|
|
|
40
40
|
|
|
41
41
|
&__title,
|
|
42
42
|
&__value {
|
|
43
|
+
display: flex;
|
|
43
44
|
flex: 1;
|
|
45
|
+
&-content {
|
|
46
|
+
flex: 18;
|
|
47
|
+
}
|
|
48
|
+
.zt-icon {
|
|
49
|
+
flex: 1;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: flex-end;
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
|
|
46
55
|
&__placeholder {
|
|
47
56
|
color: @field-placeholder-text-color;
|
|
48
|
-
flex:
|
|
57
|
+
flex: 9;
|
|
49
58
|
text-align: right;
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
&__value {
|
|
53
62
|
position: relative;
|
|
54
63
|
overflow: hidden;
|
|
55
|
-
color: @cell-
|
|
64
|
+
color: @cell-text-color;
|
|
56
65
|
text-align: right;
|
|
57
66
|
vertical-align: middle;
|
|
58
67
|
word-wrap: break-word;
|
|
@@ -80,13 +89,7 @@
|
|
|
80
89
|
color: @cell-right-icon-color;
|
|
81
90
|
}
|
|
82
91
|
|
|
83
|
-
|
|
84
|
-
cursor: pointer;
|
|
85
|
-
|
|
86
|
-
&:active {
|
|
87
|
-
background-color: @cell-active-color;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
92
|
+
|
|
90
93
|
|
|
91
94
|
&--center {
|
|
92
95
|
align-items: center;
|
|
@@ -105,3 +108,55 @@
|
|
|
105
108
|
}
|
|
106
109
|
}
|
|
107
110
|
}
|
|
111
|
+
|
|
112
|
+
.zt-cell__direction-column {
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
background-color: #f5faff;
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
line-height: 20px;
|
|
117
|
+
.zt-cell__title {
|
|
118
|
+
margin-bottom: 8px;
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
&-content {
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
text-overflow: ellipsis;
|
|
125
|
+
flex: 1;
|
|
126
|
+
}
|
|
127
|
+
&-subtitle {
|
|
128
|
+
display: flex;
|
|
129
|
+
white-space: nowrap;
|
|
130
|
+
justify-content: flex-end;
|
|
131
|
+
flex: 1;
|
|
132
|
+
opacity: 0.4;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.zt-cell__value {
|
|
137
|
+
display: flex;
|
|
138
|
+
text-align: left;
|
|
139
|
+
min-height: 44px;
|
|
140
|
+
padding: 12px;
|
|
141
|
+
box-sizing: border-box;
|
|
142
|
+
background-color: white;
|
|
143
|
+
align-items: center;
|
|
144
|
+
.zt-icon {
|
|
145
|
+
flex: 2;
|
|
146
|
+
display: flex;
|
|
147
|
+
justify-content: flex-end;
|
|
148
|
+
}
|
|
149
|
+
&-content {
|
|
150
|
+
flex: 18;
|
|
151
|
+
word-break: break-all;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
.zt-cell__clickable {
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
&:active {
|
|
160
|
+
background-color: @cell-active-color;
|
|
161
|
+
}
|
|
162
|
+
}
|
package/es/cell/shared.js
CHANGED
package/es/checkbox/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-checkbox{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:
|
|
1
|
+
.zt-checkbox{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;user-select:none;padding:14px 0}.zt-checkbox--disabled{cursor:not-allowed}.zt-checkbox--label-disabled{cursor:default}.zt-checkbox--horizontal{margin-left:12px}.zt-checkbox__icon{-webkit-box-flex:0;-webkit-flex:none;flex:none;height:1em;font-size:24px;line-height:1em;cursor:pointer}.zt-checkbox__icon i,.zt-checkbox__icon img{-webkit-transform:scale(.8333);transform:scale(.8333);-webkit-transform-origin:center;transform-origin:center}.zt-checkbox__icon .zt-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:color,border-color,background-color;transition-property:color,border-color,background-color}.zt-checkbox__icon--round .zt-icon{border-radius:100%}.zt-checkbox__icon--checked .zt-icon{color:#fff;background:#0091fa;box-shadow:inset 1px 1px 2px 0 rgba(0,0,0,.2);border:1px solid rgba(255,255,255,.5)}.zt-checkbox__icon--disabled{cursor:not-allowed}.zt-checkbox__icon--disabled .zt-icon{border:1px solid rgba(255,255,255,.5);box-shadow:-1px -1px 2px 0 #fff,0 0 3px 0 rgba(45,75,115,.2);background-image:-webkit-linear-gradient(316deg,#e1e6eb 0,#e5edf5 100%);background-image:linear-gradient(134deg,#e1e6eb 0,#e5edf5 100%)}.zt-checkbox__icon--disabled.zt-checkbox__icon--checked .zt-icon{opacity:.4;background:#0091fa;color:#fff}.zt-checkbox__label{margin-left:8px;color:#000;line-height:24px}.zt-checkbox__label--left{margin:0 8px 0 0}.zt-checkbox__label--disabled{color:#c8c9cc}.zt-checkbox__disable-icon .zt-checkbox__icon--round:not(.zt-checkbox__icon--disabled,.zt-checkbox__icon--checked){width:18px;height:18px;border-radius:100%;background-image:-webkit-linear-gradient(315deg,#e6ebf0 0,#fff 100%);background-image:linear-gradient(135deg,#e6ebf0 0,#fff 100%);border:1px solid rgba(45,75,115,.13);box-shadow:-1px -1px 2px 0 #fff,0 0 3px 0 rgba(45,75,115,.2)}
|
package/es/checkbox/index.less
CHANGED
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
font-size: 0.8em;
|
|
41
41
|
line-height: 1.25;
|
|
42
42
|
text-align: center;
|
|
43
|
-
border: 1px solid @checkbox-border-color;
|
|
44
43
|
transition-duration: @checkbox-transition-duration;
|
|
45
44
|
transition-property: color, border-color, background-color;
|
|
46
45
|
}
|
|
@@ -54,8 +53,9 @@
|
|
|
54
53
|
&--checked {
|
|
55
54
|
.zt-icon {
|
|
56
55
|
color: @white;
|
|
57
|
-
background
|
|
58
|
-
|
|
56
|
+
background: @checkbox-checked-icon-color;
|
|
57
|
+
box-shadow: inset 1px 1px 2px 0 @gray-a2;
|
|
58
|
+
border: 1px solid rgba(255,255,255,0.50);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -63,15 +63,16 @@
|
|
|
63
63
|
cursor: not-allowed;
|
|
64
64
|
|
|
65
65
|
.zt-icon {
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
border: 1px solid @checkbox-disabled-border-color;
|
|
67
|
+
box-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45,75,115,0.20);
|
|
68
|
+
background-image: @gradient-white;
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
&--disabled&--checked {
|
|
72
73
|
.zt-icon {
|
|
73
74
|
opacity: .4;
|
|
74
|
-
background
|
|
75
|
+
background: @radio-checked-icon-color;
|
|
75
76
|
color: @white;
|
|
76
77
|
}
|
|
77
78
|
}
|
|
@@ -91,3 +92,14 @@
|
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
}
|
|
95
|
+
|
|
96
|
+
.zt-checkbox__disable-icon {
|
|
97
|
+
.zt-checkbox__icon--round:not(.zt-checkbox__icon--disabled,.zt-checkbox__icon--checked){
|
|
98
|
+
width: 18px;
|
|
99
|
+
height: 18px;
|
|
100
|
+
border-radius: 100%;
|
|
101
|
+
background-image: @gradient-white-1;
|
|
102
|
+
border: 1px solid @radio-border-color;
|
|
103
|
+
box-shadow: -1px -1px 2px 0 #FFF, 0 0 3px 0 rgba(45,75,115,0.20);
|
|
104
|
+
}
|
|
105
|
+
}
|
package/es/field/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-field__root{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;background-color:#fff;padding:10px 16px}.zt-field__root
|
|
1
|
+
.zt-field__root{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;background-color:#fff;padding:10px 16px}.zt-field__root--borderless::after,.zt-field__root:last-child::after{display:none}.zt-field{padding:0}.zt-field::after{display:none}.zt-field__label{-webkit-box-flex:0;-webkit-flex:none;flex:none;box-sizing:border-box;margin-right:12px;color:#646566;text-align:left;word-wrap:break-word;vertical-align:middle;-webkit-box-flex:4;-webkit-flex:4;flex:4}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field--disabled .zt-field__label{color:#c8c9cc}.zt-field__value{overflow:visible;-webkit-box-flex:6;-webkit-flex:6;flex:6;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-field__body{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-field__body input{caret-color:#0091fa}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:#2d4b73;line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;font-size:14px}.zt-field__control::-webkit-input-placeholder{color:#c8c9cc}.zt-field__control::placeholder{color:#c8c9cc}.zt-field__control:disabled{color:#c8c9cc;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#c8c9cc}.zt-field__control:read-only{cursor:default}.zt-field__control--center{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;text-align:center}.zt-field__control--right{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;text-align:right}.zt-field__control--custom{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;min-height:24px}.zt-field__control[type=date],.zt-field__control[type=datetime-local],.zt-field__control[type=time]{min-height:24px}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__button,.zt-field__clear,.zt-field__icon,.zt-field__right-icon{-webkit-flex-shrink:0;flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:-8px;padding:0 8px;line-height:inherit}.zt-field__zt-clear-icon{margin-right:-8px;padding:0 8px;height:20px}.zt-field__clear{color:#c8c9cc;font-size:16px;cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:16px;line-height:inherit}.zt-field__zt-left-icon{margin-right:4px;height:20px}.zt-field__zt-clear-size,.zt-field__zt-left-icon-size{width:20px;height:20px}.zt-field__left-icon{margin-right:4px}.zt-field__right-icon{color:#969799}.zt-field__button{padding-left:8px}.zt-field__error-message{position:relative;background-color:rgba(230,35,20,.08);margin-top:0;padding:5px 8px;color:#ff5023;font-size:12px;line-height:20px;text-align:left;word-break:break-all}.zt-field__error-message::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:0;left:0;border-top:1px solid #ff5023;-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{margin-top:4px;color:#646566;font-size:12px;line-height:16px;text-align:left}.zt-field--error .zt-field__control::-webkit-input-placeholder{color:#e62314;-webkit-text-fill-color:currentColor}.zt-field--error .zt-field__control,.zt-field--error .zt-field__control::placeholder{color:#e62314;-webkit-text-fill-color:currentColor}.zt-field--error-label span{color:#ff5023}.zt-field__column{background-color:#f5faff}.zt-field__column .zt-field__label{margin-right:0;line-height:20px}.zt-field__column .zt-field__label-content{color:#2d4b73}.zt-field__column .zt-field__value{-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.zt-field__column .zt-field__value .zt-field__body{-webkit-box-flex:8;-webkit-flex:8;flex:8}.zt-field__column .zt-field__value .zt-field__body textarea{padding-bottom:16px}.zt-field__column .zt-field__word-limit{position:absolute;bottom:12px}.zt-field__column .zt-field__no-error{background:rgba(45,75,115,.04);color:rgba(45,75,115,.6)}.zt-field__column .zt-field__no-error::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:0;right:0;left:0;border-top:1px solid #000;-webkit-transform:scaleY(.5);transform:scaleY(.5);opacity:.2}
|
package/es/field/index.js
CHANGED
|
@@ -68,7 +68,7 @@ export default createComponent({
|
|
|
68
68
|
},
|
|
69
69
|
error: {
|
|
70
70
|
type: Boolean,
|
|
71
|
-
default:
|
|
71
|
+
default: false
|
|
72
72
|
},
|
|
73
73
|
colon: {
|
|
74
74
|
type: Boolean,
|
|
@@ -585,7 +585,7 @@ export default createComponent({
|
|
|
585
585
|
if (message) {
|
|
586
586
|
var errorMessageAlign = this.getProp('errorMessageAlign');
|
|
587
587
|
return h("div", {
|
|
588
|
-
"class": bem('error-message', errorMessageAlign)
|
|
588
|
+
"class": [bem('error-message', errorMessageAlign), this.error ? '' : bem('no-error')]
|
|
589
589
|
}, [message]);
|
|
590
590
|
}
|
|
591
591
|
},
|
|
@@ -607,12 +607,14 @@ export default createComponent({
|
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
if (this.label) {
|
|
610
|
-
return h("span",
|
|
610
|
+
return h("span", {
|
|
611
|
+
"class": bem('label-content')
|
|
612
|
+
}, [this.label + colon]);
|
|
611
613
|
}
|
|
612
614
|
}
|
|
613
615
|
},
|
|
614
616
|
render: function render() {
|
|
615
|
-
var
|
|
617
|
+
var _bem2;
|
|
616
618
|
|
|
617
619
|
var h = arguments[0];
|
|
618
620
|
var slots = this.slots;
|
|
@@ -637,6 +639,76 @@ export default createComponent({
|
|
|
637
639
|
};
|
|
638
640
|
}
|
|
639
641
|
|
|
642
|
+
if (this.direction === 'column') {
|
|
643
|
+
var _bem;
|
|
644
|
+
|
|
645
|
+
return h("div", {
|
|
646
|
+
"class": [bem('root'), bem("column")]
|
|
647
|
+
}, [h(Cell, {
|
|
648
|
+
"attrs": {
|
|
649
|
+
"icon": this.leftIcon,
|
|
650
|
+
"size": this.size,
|
|
651
|
+
"center": this.center,
|
|
652
|
+
"border": this.border,
|
|
653
|
+
"isLink": this.isLink,
|
|
654
|
+
"required": this.required,
|
|
655
|
+
"clickable": this.clickable,
|
|
656
|
+
"titleStyle": this.labelStyle,
|
|
657
|
+
"valueClass": bem('value'),
|
|
658
|
+
"titleClass": [bem('label', labelAlign), this.labelClass, {
|
|
659
|
+
'zt-field--error-label': this.showErrorMessage
|
|
660
|
+
}],
|
|
661
|
+
"arrowDirection": this.arrowDirection,
|
|
662
|
+
"noFlex": this.type === 'textarea',
|
|
663
|
+
"direction": this.direction
|
|
664
|
+
},
|
|
665
|
+
"scopedSlots": scopedSlots,
|
|
666
|
+
"class": bem((_bem = {
|
|
667
|
+
error: this.showError,
|
|
668
|
+
disabled: disabled
|
|
669
|
+
}, _bem["label-" + labelAlign] = labelAlign, _bem['min-height'] = this.type === 'textarea' && !this.autosize, _bem)),
|
|
670
|
+
"on": {
|
|
671
|
+
"click": this.onClick
|
|
672
|
+
}
|
|
673
|
+
}, [h("div", {
|
|
674
|
+
"class": bem('body')
|
|
675
|
+
}, [this.genInput(), this.showClear &&
|
|
676
|
+
/*<Icon
|
|
677
|
+
name="clear"
|
|
678
|
+
class={bem('clear')}
|
|
679
|
+
onTouchstart={this.onClear}
|
|
680
|
+
/>*/
|
|
681
|
+
h("div", {
|
|
682
|
+
"class": bem('zt-clear-icon'),
|
|
683
|
+
"on": {
|
|
684
|
+
"touchstart": this.onClear,
|
|
685
|
+
"click": this.onClear
|
|
686
|
+
}
|
|
687
|
+
}, [h(ClearIcon, {
|
|
688
|
+
"class": bem('zt-clear-size'),
|
|
689
|
+
"attrs": {
|
|
690
|
+
"color": this.iconColor
|
|
691
|
+
}
|
|
692
|
+
})]), this.type === 'password' && h("div", {
|
|
693
|
+
"on": {
|
|
694
|
+
"click": this.togglePwdVisible
|
|
695
|
+
},
|
|
696
|
+
"style": "width:20px;height:20px;margin-left:12px;display:flex;justify-content:center;align-items:center;color:rgba(0,0,0,.4);"
|
|
697
|
+
}, [this.showPassword ? h(Icon, {
|
|
698
|
+
"attrs": {
|
|
699
|
+
"name": "eye-open",
|
|
700
|
+
"color": this.iconColor
|
|
701
|
+
}
|
|
702
|
+
}) : h(Icon, {
|
|
703
|
+
"attrs": {
|
|
704
|
+
"name": "eye-closed",
|
|
705
|
+
"color": this.iconColor
|
|
706
|
+
}
|
|
707
|
+
})]), this.genWordLimit(), this.genRightIcon(), slots('button') && h("div", {
|
|
708
|
+
"class": bem('button')
|
|
709
|
+
}, [slots('button')])])]), this.genMessage()]);
|
|
710
|
+
}
|
|
711
|
+
|
|
640
712
|
return h("div", {
|
|
641
713
|
"class": bem('root')
|
|
642
714
|
}, [h(Cell, {
|
|
@@ -654,13 +726,14 @@ export default createComponent({
|
|
|
654
726
|
'zt-field--error-label': this.showErrorMessage
|
|
655
727
|
}],
|
|
656
728
|
"arrowDirection": this.arrowDirection,
|
|
657
|
-
"noFlex": this.type === 'textarea'
|
|
729
|
+
"noFlex": this.type === 'textarea',
|
|
730
|
+
"direction": this.direction
|
|
658
731
|
},
|
|
659
732
|
"scopedSlots": scopedSlots,
|
|
660
|
-
"class": bem((
|
|
733
|
+
"class": bem((_bem2 = {
|
|
661
734
|
error: this.showError,
|
|
662
735
|
disabled: disabled
|
|
663
|
-
},
|
|
736
|
+
}, _bem2["label-" + labelAlign] = labelAlign, _bem2['min-height'] = this.type === 'textarea' && !this.autosize, _bem2)),
|
|
664
737
|
"on": {
|
|
665
738
|
"click": this.onClick
|
|
666
739
|
}
|