zartui 1.0.9 → 1.0.11
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/cell/index.css +1 -1
- package/es/collapse-item/index.css +1 -1
- package/es/collapse-item/index.js +10 -0
- package/es/collapse-item/index.less +10 -11
- package/es/datetime-picker/DatePicker.js +48 -2
- package/es/field/index.css +1 -1
- package/es/index.js +1 -1
- package/es/number-keyboard/index.css +1 -1
- package/es/number-keyboard/index.less +0 -3
- package/es/style/var.less +7 -4
- package/es/timeline/index.js +19 -26
- package/es/utils/format/date-util.js +2 -0
- package/lib/a037f57fc4d92a8a1f1e.worker.js +60600 -0
- package/lib/b7cf90b4775181215df7.worker.js +10 -0
- package/lib/cell/index.css +1 -1
- package/lib/collapse-item/index.css +1 -1
- package/lib/collapse-item/index.js +11 -0
- package/lib/collapse-item/index.less +10 -11
- package/lib/datetime-picker/DatePicker.js +49 -2
- package/lib/field/index.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/number-keyboard/index.css +1 -1
- package/lib/number-keyboard/index.less +0 -3
- package/lib/style/var.less +7 -4
- package/lib/timeline/index.js +19 -25
- package/lib/utils/format/date-util.js +2 -0
- package/lib/zart.js +62926 -30648
- package/lib/zart.min.js +4 -4
- package/package.json +1 -1
- package/lib/7893e51cf0a4877dac80.worker.js +0 -10
- package/lib/be09b519a460e229fd8d.worker.js +0 -2527
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:10px 16px;overflow:hidden;color:rgba(0,0,0,.6);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::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-cell--borderless::after,.zt-cell:last-child::after{display:none}.zt-cell__label{margin-top:10px;color:#000;font-size:14px;line-height:18px}.zt-cell__title,.zt-cell__value{-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__placeholder{color
|
|
1
|
+
.zt-cell{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;width:100%;padding:10px 16px;overflow:hidden;color:rgba(0,0,0,.6);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::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-cell--borderless::after,.zt-cell:last-child::after{display:none}.zt-cell__label{margin-top:10px;color:#000;font-size:14px;line-height:18px}.zt-cell__title,.zt-cell__value{-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt-cell__placeholder{color:rgba(0,0,0,.2);-webkit-box-flex:1;-webkit-flex:1;flex:1;text-align:right}.zt-cell__value{position:relative;overflow:hidden;color:#000;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--clickable{cursor:pointer}.zt-cell--clickable:active{background-color:rgba(0,0,0,.04)}.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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-collapse-item{position:relative}.zt-collapse-item__container{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;background-color:#fff}.zt-collapse-item__container .zt-cell{padding-left:12px}.zt-collapse-item__bar{width:4px;height:16px;background:#0091fa}.zt-collapse-item__title--iconWhite .zt-icon::before{color:#fff!important}.zt-collapse-item__title .zt-cell__title{font-weight:700
|
|
1
|
+
.zt-collapse-item{position:relative}.zt-collapse-item__container{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;background-color:#fff}.zt-collapse-item__container .zt-cell{padding-left:12px}.zt-collapse-item__bar{width:4px;height:16px;background:#0091fa}.zt-collapse-item__title--iconWhite .zt-icon::before{color:#fff!important}.zt-collapse-item__title .zt-cell__title{font-weight:700}.zt-collapse-item__title .zt-collapse-item__right-icon::before{font-size:20px;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s;color:rgba(0,0,0,.2)}.zt-collapse-item__title::after{right:16px;display:none}.zt-collapse-item__title--expanded .zt-collapse-item__right-icon::before{-webkit-transform:rotate(-180deg);transform:rotate(-180deg);color:#0091fa}.zt-collapse-item__title--expanded::after{display:block}.zt-collapse-item__title--borderless::after{display:none}.zt-collapse-item__title--disabled{cursor:not-allowed}.zt-collapse-item__title--disabled,.zt-collapse-item__title--disabled .zt-cell__right-icon{color:#c8c9cc}.zt-collapse-item__title--disabled:active{background-color:#fff}.zt-collapse-item__wrapper{overflow:hidden;-webkit-transition:height .3s ease-in-out;transition:height .3s ease-in-out;will-change:height}.zt-collapse-item__content{color:#000;font-size:14px;line-height:20px;background-color:#fff}
|
|
@@ -6,6 +6,7 @@ import { raf, doubleRaf } from '../utils/dom/raf'; // Mixins
|
|
|
6
6
|
import { ChildrenMixin } from '../mixins/relation'; // Components
|
|
7
7
|
|
|
8
8
|
import Cell from '../cell';
|
|
9
|
+
import Icon from "../icon";
|
|
9
10
|
import { cellProps } from '../cell/shared';
|
|
10
11
|
|
|
11
12
|
var _createNamespace = createNamespace('collapse-item'),
|
|
@@ -138,6 +139,15 @@ export default createComponent({
|
|
|
138
139
|
expanded = this.expanded,
|
|
139
140
|
titleBG = this.titleBG;
|
|
140
141
|
var titleSlots = CELL_SLOTS.reduce(function (slots, name) {
|
|
142
|
+
slots['right-icon'] = function () {
|
|
143
|
+
return h(Icon, {
|
|
144
|
+
"class": bem('right-icon'),
|
|
145
|
+
"attrs": {
|
|
146
|
+
"name": 'keyboard-arrow-up'
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
|
|
141
151
|
if (_this3.slots(name)) {
|
|
142
152
|
slots[name] = function () {
|
|
143
153
|
return _this3.slots(name);
|
|
@@ -7,31 +7,30 @@
|
|
|
7
7
|
&__container {
|
|
8
8
|
display: flex;
|
|
9
9
|
align-items: center;
|
|
10
|
-
background-color:
|
|
10
|
+
background-color: @white;
|
|
11
11
|
.zt-cell {
|
|
12
|
-
padding-left:
|
|
12
|
+
padding-left: @collapse-item-content-padding;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
&__bar {
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
18
|
-
background:
|
|
16
|
+
width: @collapse-item-bar-width;
|
|
17
|
+
height: @collapse-item-bar-height;
|
|
18
|
+
background: @blue;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
&__title {
|
|
22
22
|
&--iconWhite {
|
|
23
23
|
.zt-icon::before {
|
|
24
|
-
color:
|
|
24
|
+
color: @white !important;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
.zt-cell__title {
|
|
28
28
|
font-weight: bold;
|
|
29
|
-
font-family: PingFangSC-Semibold;
|
|
30
29
|
}
|
|
31
|
-
.zt-
|
|
30
|
+
.zt-collapse-item__right-icon::before {
|
|
32
31
|
// using translateZ to fix safari rendering issues
|
|
33
32
|
// see: https://github.com/youzan/vant/issues/8608
|
|
34
|
-
|
|
33
|
+
font-size: @collapse-item-right-icon-font-size;
|
|
35
34
|
transition: transform @collapse-item-transition-duration;
|
|
36
35
|
color: @gray-a2;
|
|
37
36
|
}
|
|
@@ -42,8 +41,8 @@
|
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
&--expanded {
|
|
45
|
-
.zt-
|
|
46
|
-
transform: rotate(-
|
|
44
|
+
.zt-collapse-item__right-icon::before {
|
|
45
|
+
transform: rotate(-180deg);
|
|
47
46
|
color: @blue;
|
|
48
47
|
}
|
|
49
48
|
|
|
@@ -5,6 +5,7 @@ import { isDate } from '../utils/validate/date';
|
|
|
5
5
|
import { padZero } from '../utils/format/string';
|
|
6
6
|
import { getTrueValue, getMonthEndDay } from './utils';
|
|
7
7
|
import { sharedProps, TimePickerMixin } from './shared';
|
|
8
|
+
import { formatDateByDate, FORMAT } from '../utils/format/date-util';
|
|
8
9
|
var currentYear = new Date().getFullYear();
|
|
9
10
|
|
|
10
11
|
var _createNamespace = createNamespace('date-picker'),
|
|
@@ -295,9 +296,54 @@ export default createComponent({
|
|
|
295
296
|
updateColumnValue: function updateColumnValue() {
|
|
296
297
|
var _this5 = this;
|
|
297
298
|
|
|
298
|
-
|
|
299
|
+
// 根据type将默认时间和最大最小时间转换后再比较
|
|
300
|
+
// 如果调用者传入new Date(),与此处new Date()会有时间差,目前只支持到分钟,可以忽略时间差
|
|
301
|
+
var now = new Date();
|
|
302
|
+
var dStr = "";
|
|
303
|
+
var minStr = "";
|
|
304
|
+
var maxStr = "";
|
|
299
305
|
|
|
300
|
-
|
|
306
|
+
switch (this.type) {
|
|
307
|
+
case "date":
|
|
308
|
+
dStr = formatDateByDate(now, FORMAT.FORMAT_YMD);
|
|
309
|
+
minStr = formatDateByDate(this.minDate, FORMAT.FORMAT_YMD);
|
|
310
|
+
maxStr = formatDateByDate(this.maxDate, FORMAT.FORMAT_YMD);
|
|
311
|
+
break;
|
|
312
|
+
|
|
313
|
+
case "year-month":
|
|
314
|
+
dStr = formatDateByDate(now, FORMAT.FORMAT_YM);
|
|
315
|
+
minStr = formatDateByDate(this.minDate, FORMAT.FORMAT_YM);
|
|
316
|
+
maxStr = formatDateByDate(this.maxDate, FORMAT.FORMAT_YM);
|
|
317
|
+
break;
|
|
318
|
+
|
|
319
|
+
case "month-day":
|
|
320
|
+
dStr = formatDateByDate(now, FORMAT.FORMAT_MD);
|
|
321
|
+
minStr = formatDateByDate(this.minDate, FORMAT.FORMAT_MD);
|
|
322
|
+
maxStr = formatDateByDate(this.maxDate, FORMAT.FORMAT_MD);
|
|
323
|
+
break;
|
|
324
|
+
|
|
325
|
+
case "datetime":
|
|
326
|
+
dStr = formatDateByDate(now, FORMAT.FORMAT_YMDHM);
|
|
327
|
+
minStr = formatDateByDate(this.minDate, FORMAT.FORMAT_YMDHM);
|
|
328
|
+
maxStr = formatDateByDate(this.maxDate, FORMAT.FORMAT_YMDHM);
|
|
329
|
+
break;
|
|
330
|
+
|
|
331
|
+
case "datehour":
|
|
332
|
+
// "2022/11/11 14"这种格式无法使用new Date
|
|
333
|
+
dStr = formatDateByDate(now, FORMAT.FORMAT_YMDH) + ":00:00";
|
|
334
|
+
minStr = formatDateByDate(this.minDate, FORMAT.FORMAT_YMDH) + ":00:00";
|
|
335
|
+
maxStr = formatDateByDate(this.maxDate, FORMAT.FORMAT_YMDH) + ":00:00";
|
|
336
|
+
break;
|
|
337
|
+
|
|
338
|
+
default:
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
var defaultValue = new Date(dStr.replace(/-/g, "/"));
|
|
343
|
+
var minDate = new Date(minStr.replace(/-/g, "/"));
|
|
344
|
+
var maxDate = new Date(maxStr.replace(/-/g, "/"));
|
|
345
|
+
|
|
346
|
+
if (defaultValue < minDate || defaultValue > maxDate) {
|
|
301
347
|
defaultValue = this.minDate;
|
|
302
348
|
}
|
|
303
349
|
|
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::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-field__root--borderless::after,.zt-field__root:last-child::after{display:none}.zt-field{padding:0;background-color:#fff}.zt-field::after{display:none}.zt-field__label{-webkit-box-flex:0;-webkit-flex:none;flex:none;box-sizing:border-box;width:6.2em;margin-right:12px;color
|
|
1
|
+
.zt-field__root{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;background-color:#fff;padding:10px 16px}.zt-field__root::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:16px;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-field__root--borderless::after,.zt-field__root:last-child::after{display:none}.zt-field{padding:0;background-color:#fff}.zt-field::after{display:none}.zt-field__label{-webkit-box-flex:0;-webkit-flex:none;flex:none;box-sizing:border-box;width:6.2em;margin-right:12px;color:rgba(0,0,0,.6);text-align:left;word-wrap:break-word;vertical-align:middle}.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}.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:#000;line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none}.zt-field__control::-webkit-input-placeholder{color:rgba(0,0,0,.2)}.zt-field__control::placeholder{color:rgba(0,0,0,.2)}.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:10px;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}
|
package/es/index.js
CHANGED
|
@@ -76,7 +76,7 @@ import Tag from './tag';
|
|
|
76
76
|
import Timeline from './timeline';
|
|
77
77
|
import Toast from './toast';
|
|
78
78
|
import Uploader from './uploader';
|
|
79
|
-
var version = '1.0.
|
|
79
|
+
var version = '1.0.11';
|
|
80
80
|
|
|
81
81
|
function install(Vue) {
|
|
82
82
|
var components = [ActionSheet, Area, Avatar, BackTop, Badge, Button, Calendar, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Col, Collapse, CollapseItem, CountDown, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, FoldDialog, Form, Grid, GridItem, HierarchySelect, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, Lazyload, List, Loading, Locale, MediaPicker, MediaPlayer, MultiplePicker, NavBar, NoticeBar, NumberKeyboard, Overlay, PasswordInput, PdfViewer, PdfViewerV2, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-number-keyboard{position:fixed;bottom:0;left:0;z-index:100;width:calc(100% - 24px);padding:16px 8px 8px 16px;background-color:#f2f3f5;-webkit-user-select:none;user-select:none}.zt-number-keyboard--with-title{border-radius:20px 20px 0 0}.zt-number-keyboard__header{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;box-sizing:content-box;height:34px;padding-top:6px;color:#646566;font-size:16px}.zt-number-keyboard__title{display:inline-block;font-weight:400}.zt-number-keyboard__title-left{position:absolute;left:0}.zt-number-keyboard__body{display:-webkit-box;display:-webkit-flex;display:flex}.zt-number-keyboard__keys{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:3;-webkit-flex:3;flex:3;-webkit-flex-wrap:wrap;flex-wrap:wrap}.zt-number-keyboard__close{position:absolute;right:0;height:100%;padding:0 16px;color:#576b95;font-size:14px;background-color:transparent;border:none;cursor:pointer}.zt-number-keyboard__close:active{opacity:.7}.zt-number-keyboard__sidebar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.zt-number-keyboard--unfit{padding-bottom:0}.zt-key{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:44px;font-size:28px;line-height:1.5;background-color:#fff;border-radius:8px;cursor:pointer}.zt-key--large{position:absolute;top:0;right:6px;bottom:6px;left:0;height:auto}.zt-key--blue,.zt-key--delete{font-size:16px}.zt-key--active{background-color:#ebedf0}.zt-key--blue{color:#fff;background-color:#0091fa}.zt-key--blue.zt-key--active{background-color:#0073c7}.zt-key__wrapper{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-flex-basis:33%;flex-basis:33%;box-sizing:border-box;padding:0 8px 8px 0}.zt-key__wrapper--wider{-webkit-flex-basis:66%;flex-basis:66%}.zt-key__delete-icon{width:32px;height:22px}.zt-key__collapse-icon{width:30px;height:24px}.zt-key__loading-icon{color:#fff}
|
|
1
|
+
.zt-number-keyboard{position:fixed;bottom:0;left:0;z-index:100;width:calc(100% - 24px);padding:16px 8px 8px 16px;background-color:#f2f3f5;-webkit-user-select:none;user-select:none}.zt-number-keyboard--with-title{border-radius:20px 20px 0 0}.zt-number-keyboard__header{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;box-sizing:content-box;height:34px;padding-top:6px;color:#646566;font-size:16px}.zt-number-keyboard__title{display:inline-block;font-weight:400}.zt-number-keyboard__title-left{position:absolute;left:0}.zt-number-keyboard__body{display:-webkit-box;display:-webkit-flex;display:flex}.zt-number-keyboard__keys{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:3;-webkit-flex:3;flex:3;-webkit-flex-wrap:wrap;flex-wrap:wrap}.zt-number-keyboard__close{position:absolute;right:0;height:100%;padding:0 16px;color:#576b95;font-size:14px;background-color:transparent;border:none;cursor:pointer}.zt-number-keyboard__close:active{opacity:.7}.zt-number-keyboard__sidebar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.zt-number-keyboard--unfit{padding-bottom:0}.zt-key{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;height:44px;font-size:28px;line-height:1.5;background-color:#fff;border-radius:8px;cursor:pointer}.zt-key--large{position:absolute;top:0;right:6px;bottom:6px;left:0;height:auto}.zt-key--blue,.zt-key--delete{font-size:16px}.zt-key--active{background-color:#ebedf0}.zt-key--blue{color:#fff;background-color:#0091fa}.zt-key--blue.zt-key--active{background-color:#0073c7}.zt-key__wrapper{position:relative;-webkit-box-flex:1;-webkit-flex:1;flex:1;-webkit-flex-basis:33%;flex-basis:33%;box-sizing:border-box;padding:0 8px 8px 0}.zt-key__wrapper--wider{-webkit-flex-basis:66%;flex-basis:66%}.zt-key__delete-icon{width:32px;height:22px}.zt-key__collapse-icon{width:30px;height:24px}.zt-key__loading-icon{color:#fff}
|
package/es/style/var.less
CHANGED
|
@@ -288,12 +288,15 @@
|
|
|
288
288
|
|
|
289
289
|
// Collapse
|
|
290
290
|
@collapse-item-transition-duration: @animation-duration-base;
|
|
291
|
-
@collapse-item-content-padding:
|
|
291
|
+
@collapse-item-content-padding: 12px;
|
|
292
|
+
@collapse-item-bar-width: 4px;
|
|
293
|
+
@collapse-item-bar-height: 16px;
|
|
292
294
|
@collapse-item-content-font-size: @font-size-md;
|
|
293
295
|
@collapse-item-content-line-height: @line-height-md;
|
|
294
296
|
@collapse-item-content-text-color: @black;
|
|
295
297
|
@collapse-item-content-background-color: @white;
|
|
296
298
|
@collapse-item-title-disabled-color: @gray-5;
|
|
299
|
+
@collapse-item-right-icon-font-size: 20px;
|
|
297
300
|
|
|
298
301
|
// ContactCard
|
|
299
302
|
@contact-card-padding: @padding-md;
|
|
@@ -418,12 +421,12 @@
|
|
|
418
421
|
@field-vertical-padding: 10px;
|
|
419
422
|
@field-horizontal-padding: @padding-md;
|
|
420
423
|
@field-label-width: 6.2em;
|
|
421
|
-
@field-label-color: @gray-
|
|
424
|
+
@field-label-color: @gray-a6;
|
|
422
425
|
@field-label-margin-right: @padding-sm;
|
|
423
|
-
@field-input-text-color: @
|
|
426
|
+
@field-input-text-color: @black;
|
|
424
427
|
@field-input-error-text-color: @red;
|
|
425
428
|
@field-input-disabled-text-color: @gray-5;
|
|
426
|
-
@field-placeholder-text-color: @gray-
|
|
429
|
+
@field-placeholder-text-color: @gray-a2;
|
|
427
430
|
@field-icon-size: 16px;
|
|
428
431
|
@field-clear-icon-size: 16px;
|
|
429
432
|
@field-clear-icon-color: @gray-5;
|
package/es/timeline/index.js
CHANGED
|
@@ -7,14 +7,6 @@ var _createNamespace = createNamespace('timeline'),
|
|
|
7
7
|
bem = _createNamespace[1];
|
|
8
8
|
|
|
9
9
|
import Switch from "../switch";
|
|
10
|
-
|
|
11
|
-
var defaultData = function defaultData() {
|
|
12
|
-
return {
|
|
13
|
-
isFold: false,
|
|
14
|
-
computedProcesses: []
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
|
|
18
10
|
export default createComponent({
|
|
19
11
|
props: {
|
|
20
12
|
title: {
|
|
@@ -47,33 +39,34 @@ export default createComponent({
|
|
|
47
39
|
}
|
|
48
40
|
},
|
|
49
41
|
data: function data() {
|
|
50
|
-
return
|
|
42
|
+
return {
|
|
43
|
+
isFold: this.defaultFold
|
|
44
|
+
};
|
|
51
45
|
},
|
|
52
|
-
computed: {
|
|
53
|
-
|
|
54
|
-
mounted: function mounted() {
|
|
55
|
-
this.isFold = this.defaultFold;
|
|
56
|
-
this.computedProcesses = this.processes.map(function (v) {
|
|
57
|
-
return _extends({}, v, {
|
|
58
|
-
folded: false
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
methods: {
|
|
63
|
-
genProcesses: function genProcesses() {
|
|
46
|
+
computed: {
|
|
47
|
+
computedProcesses: function computedProcesses() {
|
|
64
48
|
var _this = this;
|
|
65
49
|
|
|
50
|
+
var wrapper = this.processes.map(function (v) {
|
|
51
|
+
return _extends({}, v, {
|
|
52
|
+
folded: false
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
66
56
|
if (this.isFold) {
|
|
67
|
-
var showProcesses =
|
|
57
|
+
var showProcesses = wrapper.slice(0, this.collapseCount);
|
|
68
58
|
return showProcesses.map(function (item, index) {
|
|
69
59
|
return _this.genProcessItem(item, index === showProcesses.length - 1);
|
|
70
60
|
});
|
|
71
61
|
} else {
|
|
72
|
-
return
|
|
73
|
-
return _this.genProcessItem(item, index ===
|
|
62
|
+
return wrapper.map(function (item, index) {
|
|
63
|
+
return _this.genProcessItem(item, index === wrapper.length - 1);
|
|
74
64
|
});
|
|
75
65
|
}
|
|
76
|
-
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
watch: {},
|
|
69
|
+
methods: {
|
|
77
70
|
genAvatar: function genAvatar(item, avatarSlot) {
|
|
78
71
|
var h = this.$createElement;
|
|
79
72
|
|
|
@@ -181,7 +174,7 @@ export default createComponent({
|
|
|
181
174
|
render: function render(h) {
|
|
182
175
|
var _this2 = this;
|
|
183
176
|
|
|
184
|
-
var processes = this.
|
|
177
|
+
var processes = this.computedProcesses;
|
|
185
178
|
return h("div", {
|
|
186
179
|
"class": bem()
|
|
187
180
|
}, [h("div", {
|
|
@@ -21,6 +21,8 @@ export var FORMAT = {
|
|
|
21
21
|
FORMAT_YMD_SLASH: "yyyy/MM/dd",
|
|
22
22
|
//英文简写(默认)如:2010-12
|
|
23
23
|
FORMAT_YM: "yyyy-MM",
|
|
24
|
+
//英文全称 如:2010-12-01 23
|
|
25
|
+
FORMAT_YMDH: "yyyy-MM-dd HH",
|
|
24
26
|
//英文全称 如:2010-12-01 23:15
|
|
25
27
|
FORMAT_YMDHM: "yyyy-MM-dd HH:mm",
|
|
26
28
|
//英文全称 如:2010-12-01 23:15:06
|