zartui 2.0.1 → 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/button/index.css +1 -1
- package/es/cell/index.css +1 -1
- package/es/cell/index.js +3 -3
- package/es/cell/index.less +5 -5
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.less +10 -19
- package/es/field/index.css +1 -1
- package/es/field/index.js +16 -4
- package/es/field/index.less +21 -3
- package/es/index.js +1 -1
- package/es/media-picker/index.js +22 -17
- package/es/media-picker/style/index.js +4 -0
- package/es/media-picker/style/less.js +4 -0
- package/es/popup/index.css +1 -1
- package/es/popup/index.js +119 -48
- package/es/popup/index.less +29 -0
- package/es/radio/index.css +1 -1
- package/es/radio/index.less +9 -15
- package/es/search/index.css +1 -1
- package/es/search/index.js +1 -1
- package/es/search/index.less +31 -3
- package/es/style/var.less +16 -11
- package/es/switch-cell/index.css +1 -1
- package/lib/7893e51cf0a4877dac80.worker.js +10 -0
- package/lib/be09b519a460e229fd8d.worker.js +2527 -0
- package/lib/button/index.css +1 -1
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.js +3 -3
- package/lib/cell/index.less +5 -5
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.less +10 -19
- package/lib/field/index.css +1 -1
- package/lib/field/index.js +16 -4
- package/lib/field/index.less +21 -3
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +2 -2
- package/lib/media-picker/index.js +22 -11
- package/lib/media-picker/style/index.js +4 -0
- package/lib/media-picker/style/less.js +4 -0
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +119 -48
- package/lib/popup/index.less +29 -0
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.less +9 -15
- package/lib/search/index.css +1 -1
- package/lib/search/index.js +1 -1
- package/lib/search/index.less +31 -3
- package/lib/style/var.less +16 -11
- package/lib/switch-cell/index.css +1 -1
- package/lib/zart.js +17812 -49870
- package/lib/zart.min.js +4 -4
- package/package.json +2 -2
- package/lib/a037f57fc4d92a8a1f1e.worker.js +0 -60600
- package/lib/b7cf90b4775181215df7.worker.js +0 -10
package/lib/button/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-button{position:relative;display:inline-block;box-sizing:border-box;height:44px;margin:0;padding:0;font-size:16px;line-height:calc(var(16px) * 2 - 8px);text-align:center;border-radius:22px;cursor:pointer;-webkit-transition:opacity .2s;transition:opacity .2s;-webkit-appearance:none}.zt-button::before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:' '}.zt-button:active::before{opacity:.1}.zt-button--disabled::before,.zt-button--loading::before{display:none}.zt-button--default{color:#2d4b73;background:#f5faff;border:1px solid rgba(45,75,115,.2)}.zt-button--primary{color:#fff;background:-webkit-linear-gradient(135deg,#3cafff 0,#0091fa 100%);background:linear-gradient(-45deg,#3cafff 0,#0091fa 100%);border:1px solid #3caafa}.zt-button--primary-light{color:#0091fa;background:rgba(1,144,250,.1);border:none}.zt-button--danger{color:#fff;background:#ff5a5a;border:1px solid #ff5a5a}.zt-button--warning{color:#fff;background:#fa8500;border:1px solid #fa8500}.zt-button--success{color:#fff;background:#00e173;border:1px solid #00e173}.zt-button--plain{background
|
|
1
|
+
.zt-button{position:relative;display:inline-block;box-sizing:border-box;height:44px;margin:0;padding:0;font-size:16px;line-height:calc(var(16px) * 2 - 8px);text-align:center;border-radius:22px;cursor:pointer;-webkit-transition:opacity .2s;transition:opacity .2s;-webkit-appearance:none}.zt-button::before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:#000;border:inherit;border-color:#000;border-radius:inherit;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;content:' '}.zt-button:active::before{opacity:.1}.zt-button--disabled::before,.zt-button--loading::before{display:none}.zt-button--default{color:#2d4b73;background:#f5faff;border:1px solid rgba(45,75,115,.2)}.zt-button--primary{color:#fff;background:-webkit-linear-gradient(135deg,#3cafff 0,#0091fa 100%);background:linear-gradient(-45deg,#3cafff 0,#0091fa 100%);border:1px solid #3caafa}.zt-button--primary-light{color:#0091fa;background:rgba(1,144,250,.1);border:none}.zt-button--danger{color:#fff;background:#ff5a5a;border:1px solid #ff5a5a}.zt-button--warning{color:#fff;background:#fa8500;border:1px solid #fa8500}.zt-button--success{color:#fff;background:#00e173;border:1px solid #00e173}.zt-button--plain{background:0 0}.zt-button--plain.zt-button--primary{color:#3caafa}.zt-button--plain.zt-button--danger{color:#ff5a5a}.zt-button--plain.zt-button--warning{color:#fa8500}.zt-button--plain.zt-button--success{color:#00e173}.zt-button--large{width:100%;height:50px}.zt-button--normal{padding:0 24px;font-size:16px}.zt-button--medium{height:36px;padding:0 16px;font-size:14px}.zt-button--small{height:28px;padding:0 12px;font-size:14px}.zt-button__loading{color:inherit;font-size:inherit}.zt-button--mini{height:24px;padding:0 12px;font-size:12px}.zt-button--mini+.zt-button--mini{margin-left:4px}.zt-button--block{display:block;width:100%}.zt-button--block-inner{display:block;width:calc(100% - 2 * 16px);margin:0 16px}.zt-button--disabled{cursor:not-allowed;opacity:.4}.zt-button--loading{cursor:default}.zt-button--round{border-radius:999px;padding:0}.zt-button--round.zt-button--mini{width:24px}.zt-button--round.zt-button--small{width:28px}.zt-button--round.zt-button--medium{width:36px}.zt-button--round.zt-button--normal{width:44px}.zt-button--square{border-radius:0}.zt-button__content{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:100%}.zt-button__content::before{content:' '}.zt-button__icon{font-size:24px}.zt-button__icon--mini{font-size:16px}.zt-button__icon--small{font-size:20px}.zt-button__icon--medium{font-size:20px}.zt-button__icon+.zt-button__text,.zt-button__loading+.zt-button__text,.zt-button__text+.zt-button__icon,.zt-button__text+.zt-button__loading{margin-left:2px}.zt-button--hairline{border-width:0}.zt-button--hairline::after{border-color:inherit;border-radius:44px}.zt-button--hairline.zt-button--round::after{border-radius:999px}.zt-button--hairline.zt-button--square::after{border-radius:0}
|
package/lib/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/lib/cell/index.js
CHANGED
|
@@ -37,7 +37,7 @@ function Cell(h, props, slots, ctx) {
|
|
|
37
37
|
placeholder = props.placeholder,
|
|
38
38
|
direction = props.direction,
|
|
39
39
|
subtitle = props.subtitle;
|
|
40
|
-
var showTitle = slots.title || (0, _utils.isDef)(title);
|
|
40
|
+
var showTitle = slots.title || (0, _utils.isDef)(title) || icon || slots.icon;
|
|
41
41
|
var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;
|
|
42
42
|
|
|
43
43
|
function Label() {
|
|
@@ -118,14 +118,14 @@ function Cell(h, props, slots, ctx) {
|
|
|
118
118
|
return h(_icon.default, {
|
|
119
119
|
"class": bem('right-icon'),
|
|
120
120
|
"attrs": {
|
|
121
|
-
"name": arrowDirection ? "arrow-" + arrowDirection : 'arrow'
|
|
121
|
+
"name": arrowDirection ? "arrow-" + arrowDirection : 'arrow-right'
|
|
122
122
|
}
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
function Value() {
|
|
128
|
-
var showValue = slots.default || (0, _utils.isDef)(value) || clickable;
|
|
128
|
+
var showValue = slots.default || (0, _utils.isDef)(value) || clickable || slots['right-icon'];
|
|
129
129
|
|
|
130
130
|
if (showValue) {
|
|
131
131
|
return h("div", {
|
package/lib/cell/index.less
CHANGED
|
@@ -45,11 +45,10 @@
|
|
|
45
45
|
&-content {
|
|
46
46
|
flex: 18;
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
&__value {
|
|
51
|
+
justify-content: flex-end;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
&__placeholder {
|
|
@@ -141,6 +140,7 @@
|
|
|
141
140
|
box-sizing: border-box;
|
|
142
141
|
background-color: white;
|
|
143
142
|
align-items: center;
|
|
143
|
+
justify-content: flex-start;
|
|
144
144
|
.zt-icon {
|
|
145
145
|
flex: 2;
|
|
146
146
|
display: flex;
|
package/lib/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/lib/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,26 +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;
|
|
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);
|
|
43
41
|
transition-duration: @checkbox-transition-duration;
|
|
44
42
|
transition-property: color, border-color, background-color;
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
&--round {
|
|
48
46
|
.zt-icon {
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
align-items: center;
|
|
49
50
|
border-radius: 100%;
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -93,13 +94,3 @@
|
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
|
|
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/lib/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--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;
|
|
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}
|
package/lib/field/index.js
CHANGED
|
@@ -67,7 +67,10 @@ var _default = createComponent({
|
|
|
67
67
|
labelWidth: [Number, String],
|
|
68
68
|
labelClass: null,
|
|
69
69
|
labelAlign: String,
|
|
70
|
-
inputAlign:
|
|
70
|
+
inputAlign: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: 'left'
|
|
73
|
+
},
|
|
71
74
|
placeholder: String,
|
|
72
75
|
errorMessage: String,
|
|
73
76
|
errorMessageAlign: String,
|
|
@@ -541,7 +544,10 @@ var _default = createComponent({
|
|
|
541
544
|
"on": {
|
|
542
545
|
"click": this.onClickLeftIcon
|
|
543
546
|
}
|
|
544
|
-
}, [h(
|
|
547
|
+
}, [h(_icon.default, {
|
|
548
|
+
"attrs": {
|
|
549
|
+
"name": "search"
|
|
550
|
+
},
|
|
545
551
|
"class": bem('zt-left-icon-size')
|
|
546
552
|
})]);
|
|
547
553
|
} else if (this.leftIcon) {
|
|
@@ -720,9 +726,15 @@ var _default = createComponent({
|
|
|
720
726
|
"name": "eye-closed",
|
|
721
727
|
"color": this.iconColor
|
|
722
728
|
}
|
|
723
|
-
})]), this.genWordLimit(), this.
|
|
729
|
+
})]), this.genWordLimit(), this.type === "textarea" ? h("div", {
|
|
730
|
+
"class": bem("right-icon-box")
|
|
731
|
+
}, [this.genRightIcon(), slots('button') && h("div", {
|
|
732
|
+
"class": bem('button')
|
|
733
|
+
}, [slots('button')])]) : h("div", {
|
|
734
|
+
"class": bem("right-icon-box-row")
|
|
735
|
+
}, [this.genRightIcon(), slots('button') && h("div", {
|
|
724
736
|
"class": bem('button')
|
|
725
|
-
}, [slots('button')])])]), this.genMessage()]);
|
|
737
|
+
}, [slots('button')])])])]), this.genMessage()]);
|
|
726
738
|
}
|
|
727
739
|
|
|
728
740
|
return h("div", {
|
package/lib/field/index.less
CHANGED
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
.zt-field {
|
|
21
21
|
padding: 0;
|
|
22
22
|
// background-color: @field-background-color;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
line-height: 20px;
|
|
23
25
|
&::after {
|
|
24
26
|
display: none;
|
|
25
27
|
}
|
|
@@ -34,6 +36,10 @@
|
|
|
34
36
|
word-wrap: break-word;
|
|
35
37
|
vertical-align: middle;
|
|
36
38
|
flex: 4;
|
|
39
|
+
&-content {
|
|
40
|
+
color: #2D4B73;
|
|
41
|
+
|
|
42
|
+
}
|
|
37
43
|
&--center {
|
|
38
44
|
text-align: center;
|
|
39
45
|
}
|
|
@@ -58,6 +64,7 @@
|
|
|
58
64
|
&__body {
|
|
59
65
|
display: flex;
|
|
60
66
|
align-items: center;
|
|
67
|
+
width: 100%;
|
|
61
68
|
input {
|
|
62
69
|
caret-color: @blue;
|
|
63
70
|
}
|
|
@@ -73,7 +80,6 @@
|
|
|
73
80
|
padding: 0;
|
|
74
81
|
color: #2D4B73;
|
|
75
82
|
line-height: inherit;
|
|
76
|
-
text-align: left;
|
|
77
83
|
background-color: transparent;
|
|
78
84
|
border: 0;
|
|
79
85
|
resize: none;
|
|
@@ -164,6 +170,7 @@
|
|
|
164
170
|
&__zt-left-icon-size, &__zt-clear-size {
|
|
165
171
|
width: @field-zt-icon-size;
|
|
166
172
|
height: @field-zt-icon-size;
|
|
173
|
+
color: @field-zt-icon-color;
|
|
167
174
|
}
|
|
168
175
|
|
|
169
176
|
&__left-icon {
|
|
@@ -175,7 +182,7 @@
|
|
|
175
182
|
}
|
|
176
183
|
|
|
177
184
|
&__button {
|
|
178
|
-
padding
|
|
185
|
+
padding: 0 @padding-xs 0 @padding-xs;
|
|
179
186
|
}
|
|
180
187
|
|
|
181
188
|
&__error-message {
|
|
@@ -206,7 +213,7 @@
|
|
|
206
213
|
|
|
207
214
|
|
|
208
215
|
&__word-limit {
|
|
209
|
-
margin-top: @padding-base;
|
|
216
|
+
// margin-top: @padding-base;
|
|
210
217
|
color: @field-word-limit-color;
|
|
211
218
|
font-size: @field-word-limit-font-size;
|
|
212
219
|
line-height: @field-word-limit-line-height;
|
|
@@ -247,6 +254,17 @@
|
|
|
247
254
|
color: #2D4B73;
|
|
248
255
|
}
|
|
249
256
|
}
|
|
257
|
+
.zt-field__right-icon-box {
|
|
258
|
+
position: absolute;
|
|
259
|
+
right: 12px;
|
|
260
|
+
bottom: 12px;
|
|
261
|
+
display: flex;
|
|
262
|
+
align-items: center;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.zt-field__right-icon-box-row {
|
|
266
|
+
flex-shrink: 0;
|
|
267
|
+
}
|
|
250
268
|
|
|
251
269
|
.zt-field__value {
|
|
252
270
|
justify-content: flex-start;
|