zartui 1.0.2 → 2.0.2
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 +62 -40
- 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 -15
- 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 +94 -9
- package/es/field/index.less +81 -11
- package/es/hierarchy-select/hierarchySelect.js +1 -8
- package/es/hierarchy-select/index.css +1 -1
- package/es/hierarchy-select/index.js +6 -14
- package/es/hierarchy-select/index.less +4 -5
- package/es/hierarchy-select/markList.js +1 -16
- 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 +3 -4
- 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.js +22 -17
- package/es/media-picker/index.less +6 -4
- package/es/media-picker/style/index.js +4 -0
- package/es/media-picker/style/less.js +4 -0
- 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 -7
- 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 +120 -49
- package/es/popup/index.less +31 -2
- package/es/radio/index.css +1 -1
- package/es/radio/index.less +24 -29
- package/es/radio-group/index.js +1 -0
- package/es/search/index.css +1 -1
- package/es/search/index.js +1 -1
- package/es/search/index.less +31 -3
- 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 +106 -62
- 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 +62 -40
- 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 -15
- 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 +94 -9
- package/lib/field/index.less +81 -11
- package/lib/hierarchy-select/hierarchySelect.js +1 -8
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/hierarchy-select/index.js +6 -15
- package/lib/hierarchy-select/index.less +4 -5
- package/lib/hierarchy-select/markList.js +1 -16
- 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 +2 -6
- package/lib/index.less +3 -4
- 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.js +22 -11
- package/lib/media-picker/index.less +6 -4
- package/lib/media-picker/style/index.js +4 -0
- package/lib/media-picker/style/less.js +4 -0
- 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 -7
- 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 +120 -49
- package/lib/popup/index.less +31 -2
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.less +24 -29
- package/lib/radio-group/index.js +1 -0
- package/lib/search/index.css +1 -1
- package/lib/search/index.js +1 -1
- package/lib/search/index.less +31 -3
- 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 +106 -62
- 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 +1199 -2181
- package/lib/zart.min.js +4 -4
- package/package.json +5 -6
- package/es/pdf-viewer-v2/index.css +0 -1
- package/es/pdf-viewer-v2/index.js +0 -231
- package/es/pdf-viewer-v2/index.less +0 -40
- package/es/pdf-viewer-v2/style/index.js +0 -8
- package/es/pdf-viewer-v2/style/less.js +0 -8
- package/lib/pdf-viewer-v2/index.css +0 -1
- package/lib/pdf-viewer-v2/index.js +0 -242
- package/lib/pdf-viewer-v2/index.less +0 -40
- package/lib/pdf-viewer-v2/style/index.js +0 -8
- package/lib/pdf-viewer-v2/style/less.js +0 -8
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:12px 16px;overflow:hidden;color:#2d4b73;font-size:16px;line-height:20px;background-color:#fff}.zt-cell--noFlex{display:block}.zt-cell--noFlex .zt-cell__title{margin-bottom:10px;width:100%;max-width:100%}.zt-cell--borderless::after,.zt-cell:last-child::after{display:none}.zt-cell__label{margin-top:10px;color:#2d4b73;font-size:14px;line-height:18px}.zt-cell__title,.zt-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__title-content,.zt-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18}.zt-cell__value{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-cell__placeholder{color:#c8c9cc;-webkit-box-flex:9;-webkit-flex:9;flex:9;text-align:right}.zt-cell__value{position:relative;overflow:hidden;color:#2d4b73;text-align:right;vertical-align:middle;word-wrap:break-word}.zt-cell__value--alone{color:rgba(0,0,0,.6);text-align:left}.zt-cell__left-icon,.zt-cell__right-icon{height:20px;font-size:16px;line-height:20px}.zt-cell__left-icon{margin-right:4px}.zt-cell__right-icon{margin:auto 0;margin-left:4px;color:#969799}.zt-cell--center{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell--large{padding-top:12px;padding-bottom:12px}.zt-cell--large .zt-cell__title{font-size:16px}.zt-cell--large .zt-cell__label{font-size:14px}.zt-cell__direction-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;background-color:#f5faff;font-size:14px;line-height:20px}.zt-cell__direction-column .zt-cell__title{margin-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-cell__direction-column .zt-cell__title-content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__direction-column .zt-cell__title-subtitle{display:-webkit-box;display:-webkit-flex;display:flex;white-space:nowrap;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-box-flex:1;-webkit-flex:1;flex:1;opacity:.4}.zt-cell__direction-column .zt-cell__value{display:-webkit-box;display:-webkit-flex;display:flex;text-align:left;min-height:44px;padding:12px;box-sizing:border-box;background-color:#fff;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.zt-cell__direction-column .zt-cell__value .zt-icon{-webkit-box-flex:2;-webkit-flex:2;flex:2;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.zt-cell__direction-column .zt-cell__value-content{-webkit-box-flex:18;-webkit-flex:18;flex:18;word-break:break-all}.zt-cell__clickable{cursor:pointer}.zt-cell__clickable:active{background-color:rgba(0,0,0,.04)}
|
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
|
|
25
|
-
|
|
24
|
+
placeholder = props.placeholder,
|
|
25
|
+
direction = props.direction,
|
|
26
|
+
subtitle = props.subtitle;
|
|
27
|
+
var showTitle = slots.title || isDef(title) || icon || slots.icon;
|
|
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
|
|
|
@@ -97,20 +105,34 @@ function Cell(h, props, slots, ctx) {
|
|
|
97
105
|
return h(Icon, {
|
|
98
106
|
"class": bem('right-icon'),
|
|
99
107
|
"attrs": {
|
|
100
|
-
"name": arrowDirection ? "arrow-" + arrowDirection : 'arrow'
|
|
108
|
+
"name": arrowDirection ? "arrow-" + arrowDirection : 'arrow-right'
|
|
101
109
|
}
|
|
102
110
|
});
|
|
103
111
|
}
|
|
104
112
|
}
|
|
105
113
|
|
|
114
|
+
function Value() {
|
|
115
|
+
var showValue = slots.default || isDef(value) || clickable || slots['right-icon'];
|
|
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,27 @@
|
|
|
40
40
|
|
|
41
41
|
&__title,
|
|
42
42
|
&__value {
|
|
43
|
+
display: flex;
|
|
43
44
|
flex: 1;
|
|
45
|
+
&-content {
|
|
46
|
+
flex: 18;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
&__value {
|
|
51
|
+
justify-content: flex-end;
|
|
44
52
|
}
|
|
45
53
|
|
|
46
54
|
&__placeholder {
|
|
47
55
|
color: @field-placeholder-text-color;
|
|
48
|
-
flex:
|
|
56
|
+
flex: 9;
|
|
49
57
|
text-align: right;
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
&__value {
|
|
53
61
|
position: relative;
|
|
54
62
|
overflow: hidden;
|
|
55
|
-
color: @cell-
|
|
63
|
+
color: @cell-text-color;
|
|
56
64
|
text-align: right;
|
|
57
65
|
vertical-align: middle;
|
|
58
66
|
word-wrap: break-word;
|
|
@@ -80,13 +88,7 @@
|
|
|
80
88
|
color: @cell-right-icon-color;
|
|
81
89
|
}
|
|
82
90
|
|
|
83
|
-
|
|
84
|
-
cursor: pointer;
|
|
85
|
-
|
|
86
|
-
&:active {
|
|
87
|
-
background-color: @cell-active-color;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
91
|
+
|
|
90
92
|
|
|
91
93
|
&--center {
|
|
92
94
|
align-items: center;
|
|
@@ -105,3 +107,56 @@
|
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
109
|
}
|
|
110
|
+
|
|
111
|
+
.zt-cell__direction-column {
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
background-color: #f5faff;
|
|
114
|
+
font-size: 14px;
|
|
115
|
+
line-height: 20px;
|
|
116
|
+
.zt-cell__title {
|
|
117
|
+
margin-bottom: 8px;
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
&-content {
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
text-overflow: ellipsis;
|
|
124
|
+
flex: 1;
|
|
125
|
+
}
|
|
126
|
+
&-subtitle {
|
|
127
|
+
display: flex;
|
|
128
|
+
white-space: nowrap;
|
|
129
|
+
justify-content: flex-end;
|
|
130
|
+
flex: 1;
|
|
131
|
+
opacity: 0.4;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.zt-cell__value {
|
|
136
|
+
display: flex;
|
|
137
|
+
text-align: left;
|
|
138
|
+
min-height: 44px;
|
|
139
|
+
padding: 12px;
|
|
140
|
+
box-sizing: border-box;
|
|
141
|
+
background-color: white;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: flex-start;
|
|
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
|
|
1
|
+
.zt-checkbox{display:-webkit-box;display:-webkit-flex;display:flex;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:20px;line-height:1em;cursor:pointer}.zt-checkbox__icon .zt-icon{display:block;box-sizing:border-box;width:1em;height:1em;color:transparent;font-size:1em;line-height:.95em;text-align:center;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);-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{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;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:20px}.zt-checkbox__label--left{margin:0 8px 0 0}.zt-checkbox__label--disabled{color:#c8c9cc}
|
package/es/checkbox/index.less
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
.zt-checkbox {
|
|
4
4
|
display: flex;
|
|
5
|
-
align-items: center;
|
|
6
5
|
overflow: hidden;
|
|
7
6
|
cursor: pointer;
|
|
8
7
|
user-select: none;
|
|
@@ -26,27 +25,28 @@
|
|
|
26
25
|
font-size: @checkbox-size;
|
|
27
26
|
line-height: 1em;
|
|
28
27
|
cursor: pointer;
|
|
29
|
-
i, img {
|
|
30
|
-
transform: scale(0.8333);
|
|
31
|
-
transform-origin: center;
|
|
32
|
-
}
|
|
33
28
|
|
|
34
29
|
.zt-icon {
|
|
35
30
|
display: block;
|
|
36
31
|
box-sizing: border-box;
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
32
|
+
width: 1em;
|
|
33
|
+
height: 1em;
|
|
39
34
|
color: transparent;
|
|
40
|
-
font-size:
|
|
41
|
-
line-height:
|
|
35
|
+
font-size: 1em;
|
|
36
|
+
line-height: 0.95em;
|
|
42
37
|
text-align: center;
|
|
43
|
-
|
|
38
|
+
background-image: @gradient-white-1;
|
|
39
|
+
border: 1px solid @radio-border-color;
|
|
40
|
+
box-shadow: -1px -1px 2px 0 #FFF, 0 0 3px 0 rgba(45,75,115,0.20);
|
|
44
41
|
transition-duration: @checkbox-transition-duration;
|
|
45
42
|
transition-property: color, border-color, background-color;
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
&--round {
|
|
49
46
|
.zt-icon {
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
50
50
|
border-radius: 100%;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -54,8 +54,9 @@
|
|
|
54
54
|
&--checked {
|
|
55
55
|
.zt-icon {
|
|
56
56
|
color: @white;
|
|
57
|
-
background
|
|
58
|
-
|
|
57
|
+
background: @checkbox-checked-icon-color;
|
|
58
|
+
box-shadow: inset 1px 1px 2px 0 @gray-a2;
|
|
59
|
+
border: 1px solid rgba(255,255,255,0.50);
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -63,15 +64,16 @@
|
|
|
63
64
|
cursor: not-allowed;
|
|
64
65
|
|
|
65
66
|
.zt-icon {
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
border: 1px solid @checkbox-disabled-border-color;
|
|
68
|
+
box-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45,75,115,0.20);
|
|
69
|
+
background-image: @gradient-white;
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
&--disabled&--checked {
|
|
72
74
|
.zt-icon {
|
|
73
75
|
opacity: .4;
|
|
74
|
-
background
|
|
76
|
+
background: @radio-checked-icon-color;
|
|
75
77
|
color: @white;
|
|
76
78
|
}
|
|
77
79
|
}
|
|
@@ -91,3 +93,4 @@
|
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
}
|
|
96
|
+
|
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;font-size:14px;line-height:20px}.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-content{color:#2d4b73}.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;width:100%}.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;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:20px}.zt-field__control[type=date],.zt-field__control[type=datetime-local],.zt-field__control[type=time]{min-height:20px}.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;color:rgba(45,75,115,.4)}.zt-field__left-icon{margin-right:4px}.zt-field__right-icon{color:#969799}.zt-field__button{padding:0 8px 0 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{color:#646566;font-size:12px;line-height:20px;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__right-icon-box{position:absolute;right:12px;bottom:12px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt-field__column .zt-field__right-icon-box-row{-webkit-flex-shrink:0;flex-shrink:0}.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}
|