zartui 0.1.102 → 0.1.105
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/calendar/components/Header.js +7 -1
- package/es/calendar/components/Month.js +6 -2
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.js +2 -1
- package/es/calendar/index.less +1 -1
- package/es/dialog/index.css +1 -1
- package/es/dialog/index.less +9 -6
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.less +1 -1
- package/es/index.js +1 -1
- package/es/timeline/index.js +31 -8
- package/lib/7893e51cf0a4877dac80.worker.js +10 -0
- package/lib/be09b519a460e229fd8d.worker.js +2527 -0
- package/lib/calendar/components/Header.js +7 -1
- package/lib/calendar/components/Month.js +6 -2
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.js +2 -1
- package/lib/calendar/index.less +1 -1
- package/lib/dialog/index.css +1 -1
- package/lib/dialog/index.less +9 -6
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.less +1 -1
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/timeline/index.js +32 -8
- package/lib/zart.js +17397 -49509
- package/lib/zart.min.js +4 -4
- package/package.json +1 -1
- package/lib/a037f57fc4d92a8a1f1e.worker.js +0 -60600
- package/lib/b7cf90b4775181215df7.worker.js +0 -10
|
@@ -6,6 +6,7 @@ var _createNamespace = createNamespace('calendar-header'),
|
|
|
6
6
|
|
|
7
7
|
export default createComponent({
|
|
8
8
|
props: {
|
|
9
|
+
color: String,
|
|
9
10
|
title: String,
|
|
10
11
|
subtitle: String,
|
|
11
12
|
showTitle: Boolean,
|
|
@@ -20,7 +21,12 @@ export default createComponent({
|
|
|
20
21
|
var title = this.slots('title') || this.title || t('title');
|
|
21
22
|
return h("div", {
|
|
22
23
|
"class": bem('header-title')
|
|
23
|
-
}, [
|
|
24
|
+
}, [h("span", {
|
|
25
|
+
"class": "hint-block",
|
|
26
|
+
"style": {
|
|
27
|
+
"background": this.color
|
|
28
|
+
}
|
|
29
|
+
}), title]);
|
|
24
30
|
}
|
|
25
31
|
},
|
|
26
32
|
genSubtitle: function genSubtitle() {
|
|
@@ -30,7 +30,7 @@ export default createComponent({
|
|
|
30
30
|
},
|
|
31
31
|
computed: {
|
|
32
32
|
title: function title() {
|
|
33
|
-
return
|
|
33
|
+
return this.getMonthTitle();
|
|
34
34
|
},
|
|
35
35
|
rowHeightWithUnit: function rowHeightWithUnit() {
|
|
36
36
|
return addUnit(this.rowHeight);
|
|
@@ -96,6 +96,9 @@ export default createComponent({
|
|
|
96
96
|
|
|
97
97
|
return this.height;
|
|
98
98
|
},
|
|
99
|
+
getMonthTitle: function getMonthTitle() {
|
|
100
|
+
return formatMonthTitle(this.date);
|
|
101
|
+
},
|
|
99
102
|
scrollIntoView: function scrollIntoView(body) {
|
|
100
103
|
var _this$$refs = this.$refs,
|
|
101
104
|
days = _this$$refs.days,
|
|
@@ -232,9 +235,10 @@ export default createComponent({
|
|
|
232
235
|
var h = this.$createElement;
|
|
233
236
|
|
|
234
237
|
if (this.showMonthTitle) {
|
|
238
|
+
var currentTitle = this.getMonthTitle();
|
|
235
239
|
return h("div", {
|
|
236
240
|
"class": bem('month-title')
|
|
237
|
-
}, [
|
|
241
|
+
}, [currentTitle]);
|
|
238
242
|
}
|
|
239
243
|
},
|
|
240
244
|
genMark: function genMark() {
|
package/es/calendar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-calendar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff}.zt-calendar__popup.zt-popup--bottom,.zt-calendar__popup.zt-popup--top{height:80%}.zt-calendar__popup.zt-popup--left,.zt-calendar__popup.zt-popup--right{height:100%}.zt-calendar__popup .zt-popup__close-icon{top:11px}.zt-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 4px 8px 0 rgba(0,0,0,.1);margin-bottom:8px}.zt-calendar__header-title{height:44px;font-weight:700;line-height:44px;text-align:left;padding-left:16px;position:relative}.zt-calendar__header-title
|
|
1
|
+
.zt-calendar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;height:100%;background-color:#fff}.zt-calendar__popup.zt-popup--bottom,.zt-calendar__popup.zt-popup--top{height:80%}.zt-calendar__popup.zt-popup--left,.zt-calendar__popup.zt-popup--right{height:100%}.zt-calendar__popup .zt-popup__close-icon{top:11px}.zt-calendar__header{-webkit-flex-shrink:0;flex-shrink:0;box-shadow:0 4px 8px 0 rgba(0,0,0,.1);margin-bottom:8px}.zt-calendar__header-title{height:44px;font-weight:700;line-height:44px;text-align:left;padding-left:16px;position:relative}.zt-calendar__header-title .hint-block{position:absolute;content:'';top:14px;left:0;width:4px;height:16px;background:#0091fa}.zt-calendar__header-title::after{top:44px;left:0;content:'';position:absolute;box-sizing:border-box;content:' ';pointer-events:none;right:0;bottom:0;left:0;border-bottom:1px solid rgba(0,0,0,.1);-webkit-transform:scaleY(.5);transform:scaleY(.5)}.zt-calendar__header-subtitle{height:44px;font-weight:400;line-height:44px;text-align:center}.zt-calendar__month-title{height:44px;font-weight:400;line-height:44px;text-align:center}.zt-calendar__header-title{font-size:16px}.zt-calendar__header-subtitle{font-size:14px}.zt-calendar__month-title{font-size:14px}.zt-calendar__weekdays{display:-webkit-box;display:-webkit-flex;display:flex;background-color:rgba(0,0,0,.02)}.zt-calendar__weekday{-webkit-box-flex:1;-webkit-flex:1;flex:1;font-size:12px;line-height:30px;font-weight:700;text-align:center}.zt-calendar__body{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:auto;-webkit-overflow-scrolling:touch;background-color:#fff}.zt-calendar__days{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-webkit-user-select:none;user-select:none}.zt-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:rgba(242,243,245,.8);font-size:160px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);pointer-events:none}.zt-calendar__day,.zt-calendar__selected-day{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;text-align:center}.zt-calendar__day{position:relative;width:14.285%;height:14.285vw;font-size:16px;font-weight:400;cursor:pointer;outline:0}.zt-calendar__day--end,.zt-calendar__day--multiple-middle,.zt-calendar__day--multiple-selected,.zt-calendar__day--start,.zt-calendar__day--start-end{font-weight:700;color:#fff;background-color:#0091fa;box-shadow:0 0 0 3px rgba(0,145,250,.1)}@media (pointer:coarse){.zt-calendar__day--end,.zt-calendar__day--multiple-middle{margin-left:-1px}}.zt-calendar__day--start{font-weight:700;border-radius:7.143vw 0 0 7.143vw;border-right:none;box-shadow:0 0 0 3px rgba(0,145,250,.1)}.zt-calendar__day--end{font-weight:700;border-radius:0 7.143vw 7.143vw 0;border-left:none;box-shadow:0 0 0 3px rgba(0,145,250,.1)}.zt-calendar__day--multiple-selected,.zt-calendar__day--start-end{font-weight:700;border-radius:7.143vw;box-shadow:0 0 0 3px rgba(0,145,250,.1)}.zt-calendar__day--middle{color:#000}.zt-calendar__day--middle::after{position:absolute;top:0;right:0;bottom:0;left:0;color:#0091fa;background-color:currentColor;opacity:.11;content:''}.zt-calendar__day--disabled{color:#c8c9cc;cursor:default}.zt-calendar__bottom-info,.zt-calendar__top-info{position:absolute;right:0;left:0;font-size:10px;line-height:14px}@media (max-width:350px){.zt-calendar__bottom-info,.zt-calendar__top-info{font-size:9px}}.zt-calendar__top-info{top:6px}.zt-calendar__bottom-info{display:none;bottom:6px}.zt-calendar__selected-day{font-weight:700;width:14.285vw;height:14.285vw;color:#fff;background-color:#0091fa;border-radius:calc(14.285vw / 2);box-shadow:0 0 0 3px rgba(0,145,250,.1)}.zt-calendar__footer{-webkit-flex-shrink:0;flex-shrink:0;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.zt-calendar__footer--unfit{padding-bottom:0}.zt-calendar__confirm{border-radius:0}
|
package/es/calendar/index.js
CHANGED
|
@@ -302,7 +302,7 @@ export default createComponent({
|
|
|
302
302
|
/* istanbul ignore else */
|
|
303
303
|
|
|
304
304
|
if (currentMonth) {
|
|
305
|
-
this.subtitle = currentMonth.
|
|
305
|
+
this.subtitle = currentMonth.getMonthTitle();
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
onClickDay: function onClickDay(item) {
|
|
@@ -486,6 +486,7 @@ export default createComponent({
|
|
|
486
486
|
"class": bem()
|
|
487
487
|
}, [h(Header, {
|
|
488
488
|
"attrs": {
|
|
489
|
+
"color": this.color,
|
|
489
490
|
"title": this.title,
|
|
490
491
|
"showTitle": this.showTitle,
|
|
491
492
|
"subtitle": this.subtitle,
|
package/es/calendar/index.less
CHANGED
package/es/dialog/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-dialog{position:fixed;top:45%;left:50%;width:327px;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.3s;transition:.3s;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform}@media (max-width:328px){.zt-dialog{width:90%}}.zt-dialog__header{padding-top:24px;font-weight:700;line-height:24px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;word-break:break-all;padding-left:16px;padding-right:16px}.zt-dialog__header--isolated{padding:24px 0}.zt-dialog__header--custom-title{height:44px;padding-left:0;padding-right:0;padding-top:0}.zt-dialog__content{text-align:center;word-break:break-all}.zt-dialog__content--isolated{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;min-height:100px}.zt-dialog__message{max-height:60vh;padding:24px 16px;overflow-y:auto;font-size:16px;line-height:20px;color:rgba(0,0,0,.6);display:inline-block;text-align:left;white-space:pre-wrap;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:8px;font-size:14px}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__footer{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.zt-dialog__footer .zt-hairline--left::after{top:calc(-50% + 20px);bottom:calc(-50% + 20px)}.zt-dialog__cancel,.zt-dialog__confirm{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:44px;margin:0;border:0}.zt-dialog__confirm,.zt-dialog__confirm:active{color:#0091fa}.zt-dialog__cancel{color:#000;font-weight:400}.zt-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
|
1
|
+
.zt-dialog{position:fixed;top:45%;left:50%;width:327px;overflow:hidden;font-size:16px;background-color:#fff;border-radius:4px;-webkit-transform:translate3d(-50%,-50%,0);transform:translate3d(-50%,-50%,0);-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:.3s;transition:.3s;-webkit-transition-property:opacity,-webkit-transform;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform}@media (max-width:328px){.zt-dialog{width:90%}}.zt-dialog__header{padding-top:24px;font-weight:700;line-height:24px;text-align:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;word-break:break-all;padding-left:16px;padding-right:16px}.zt-dialog__header--isolated{padding:24px 0}.zt-dialog__header--custom-title{height:44px;padding-left:0;padding-right:0;padding-top:0}.zt-dialog__content{text-align:center;word-break:break-all}.zt-dialog__content--isolated{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;min-height:100px}.zt-dialog__message{max-height:60vh;padding:24px 16px;overflow-y:auto;font-size:16px;line-height:20px;color:rgba(0,0,0,.6);display:inline-block;text-align:left;white-space:pre-wrap;word-wrap:break-word;-webkit-overflow-scrolling:touch}.zt-dialog__message--has-title{padding-top:8px;font-size:14px}.zt-dialog__message--left{text-align:left}.zt-dialog__message--right{text-align:right}.zt-dialog__footer{display:-webkit-box;display:-webkit-flex;display:flex;overflow:hidden;-webkit-user-select:none;user-select:none}.zt-dialog__footer .zt-hairline--left::after{top:calc(-50% + 20px);bottom:calc(-50% + 20px)}.zt-dialog__cancel.zt-button,.zt-dialog__confirm.zt-button{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:44px;margin:0;border:0}.zt-dialog__confirm.zt-button,.zt-dialog__confirm.zt-button:active{color:#0091fa}.zt-dialog__cancel{color:#000;font-weight:400}.zt-dialog-bounce-enter{-webkit-transform:translate3d(-50%,-50%,0) scale(.7);transform:translate3d(-50%,-50%,0) scale(.7);opacity:0}.zt-dialog-bounce-leave-active{-webkit-transform:translate3d(-50%,-50%,0) scale(.9);transform:translate3d(-50%,-50%,0) scale(.9);opacity:0}
|
package/es/dialog/index.less
CHANGED
|
@@ -97,17 +97,20 @@
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
// 提高优先级避免被zt-button--default的样式覆盖了
|
|
100
101
|
&__confirm,
|
|
101
102
|
&__cancel {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
&.zt-button {
|
|
104
|
+
flex: 1;
|
|
105
|
+
height: @dialog-button-height;
|
|
106
|
+
margin: 0;
|
|
107
|
+
border: 0;
|
|
108
|
+
}
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
&__confirm {
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
&.zt-button,
|
|
113
|
+
&.zt-button:active {
|
|
111
114
|
color: @dialog-confirm-button-text-color;
|
|
112
115
|
}
|
|
113
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-image-preview{position:fixed;top:0;left:0;width:100%;height:100%}.zt-image-preview__swipe{height:100%}.zt-image-preview__swipe-item{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;overflow:hidden}.zt-image-preview__cover{position:absolute;top:0;left:0}.zt-image-preview__image{width:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.zt-image-preview__image--vertical{width:auto;height:100%}.zt-image-preview__image img{-webkit-user-drag:none}.zt-image-preview__image .zt-image__error{top:30%;height:40%}.zt-image-preview__image .zt-image__error-icon{font-size:36px}.zt-image-preview__image .zt-image__loading{background-color:transparent}.zt-image-preview__index{position:absolute;bottom:8px;left:40px;height:24px;line-height:24px;padding:4px 8px;border-radius:2px;background:rgba(0,0,0,.6);color:#fff;font-size:16px;text-shadow:0 1px 1px #323233;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);z-index:10}.zt-image-preview__overlay{background-color:#000}.zt-image-preview__close-icon{position:absolute;z-index:1;color:#c8c9cc;font-size:22px;cursor:pointer}.zt-image-preview__close-icon:active{color:#969799}.zt-image-preview__close-icon--top-left{top:16px;left:16px}.zt-image-preview__close-icon--top-right{top:16px;right:16px}.zt-image-preview__close-icon--bottom-left{bottom:16px;left:16px}.zt-image-preview__close-icon--bottom-right{right:16px;bottom:16px}.zt-image-preview__title{position:absolute;bottom:0;height:48px;width:100%;padding-left:70px;left:0;line-height:48px;font-size:18px;color:#fff;background:rgba(0,0,0,.4);z-index:9}
|
|
1
|
+
.zt-image-preview{position:fixed;top:0;left:0;width:100%;height:100%}.zt-image-preview__swipe{height:100%}.zt-image-preview__swipe-item{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;overflow:hidden}.zt-image-preview__cover{position:absolute;top:0;left:0}.zt-image-preview__image{width:100%;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.zt-image-preview__image--vertical{width:auto;height:100%}.zt-image-preview__image img{-webkit-user-drag:none}.zt-image-preview__image .zt-image__error{top:30%;height:40%}.zt-image-preview__image .zt-image__error-icon{font-size:36px}.zt-image-preview__image .zt-image__loading{background-color:transparent}.zt-image-preview__index{position:absolute;bottom:8px;left:40px;height:24px;line-height:24px;padding:4px 8px;border-radius:2px;background:rgba(0,0,0,.6);color:#fff;font-size:16px;text-shadow:0 1px 1px #323233;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);z-index:10}.zt-image-preview__overlay.zt-overlay{background-color:#000}.zt-image-preview__close-icon{position:absolute;z-index:1;color:#c8c9cc;font-size:22px;cursor:pointer}.zt-image-preview__close-icon:active{color:#969799}.zt-image-preview__close-icon--top-left{top:16px;left:16px}.zt-image-preview__close-icon--top-right{top:16px;right:16px}.zt-image-preview__close-icon--bottom-left{bottom:16px;left:16px}.zt-image-preview__close-icon--bottom-right{right:16px;bottom:16px}.zt-image-preview__title{position:absolute;bottom:0;height:48px;width:100%;padding-left:70px;left:0;line-height:48px;font-size:18px;color:#fff;background:rgba(0,0,0,.4);z-index:9}
|
package/es/index.js
CHANGED
|
@@ -75,7 +75,7 @@ import Tag from './tag';
|
|
|
75
75
|
import Timeline from './timeline';
|
|
76
76
|
import Toast from './toast';
|
|
77
77
|
import Uploader from './uploader';
|
|
78
|
-
var version = '0.1.
|
|
78
|
+
var version = '0.1.105';
|
|
79
79
|
|
|
80
80
|
function install(Vue) {
|
|
81
81
|
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, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, Timeline, Toast, Uploader];
|
package/es/timeline/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import { createNamespace } from '../utils';
|
|
2
3
|
|
|
3
4
|
var _createNamespace = createNamespace('timeline'),
|
|
@@ -8,7 +9,8 @@ import Switch from "../switch";
|
|
|
8
9
|
|
|
9
10
|
var defaultData = function defaultData() {
|
|
10
11
|
return {
|
|
11
|
-
isFold: false
|
|
12
|
+
isFold: false,
|
|
13
|
+
computedProcesses: []
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
16
|
|
|
@@ -37,6 +39,10 @@ export default createComponent({
|
|
|
37
39
|
opinionKey: {
|
|
38
40
|
type: String,
|
|
39
41
|
default: "处理意见"
|
|
42
|
+
},
|
|
43
|
+
enableSingleFold: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: true
|
|
40
46
|
}
|
|
41
47
|
},
|
|
42
48
|
data: function data() {
|
|
@@ -46,20 +52,24 @@ export default createComponent({
|
|
|
46
52
|
watch: {},
|
|
47
53
|
mounted: function mounted() {
|
|
48
54
|
this.isFold = this.defaultFold;
|
|
49
|
-
|
|
55
|
+
this.computedProcesses = this.processes.map(function (v) {
|
|
56
|
+
return _extends({}, v, {
|
|
57
|
+
folded: false
|
|
58
|
+
});
|
|
59
|
+
});
|
|
50
60
|
},
|
|
51
61
|
methods: {
|
|
52
62
|
genProcesses: function genProcesses() {
|
|
53
63
|
var _this = this;
|
|
54
64
|
|
|
55
65
|
if (this.isFold) {
|
|
56
|
-
var showProcesses = this.
|
|
66
|
+
var showProcesses = this.computedProcesses.slice(0, this.collapseCount);
|
|
57
67
|
return showProcesses.map(function (item, index) {
|
|
58
68
|
return _this.genProcessItem(item, index === showProcesses.length - 1);
|
|
59
69
|
});
|
|
60
70
|
} else {
|
|
61
|
-
return this.
|
|
62
|
-
return _this.genProcessItem(item, index === _this.
|
|
71
|
+
return this.computedProcesses.map(function (item, index) {
|
|
72
|
+
return _this.genProcessItem(item, index === _this.computedProcesses.length - 1);
|
|
63
73
|
});
|
|
64
74
|
}
|
|
65
75
|
},
|
|
@@ -141,15 +151,28 @@ export default createComponent({
|
|
|
141
151
|
var titleSlot = this.slots("title", item);
|
|
142
152
|
var contentSlot = this.slots("content", item);
|
|
143
153
|
var opinionSlot = this.slots("opinion", item);
|
|
154
|
+
var that = this;
|
|
155
|
+
|
|
156
|
+
function itemClicked() {
|
|
157
|
+
if (!that.enableSingleFold) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
item.folded = !item.folded;
|
|
162
|
+
}
|
|
163
|
+
|
|
144
164
|
return h("div", {
|
|
145
|
-
"class": bem("item") + (" " + (isLast ? "last-item" : ""))
|
|
165
|
+
"class": bem("item") + (" " + (isLast ? "last-item" : "")),
|
|
166
|
+
"on": {
|
|
167
|
+
"click": itemClicked
|
|
168
|
+
}
|
|
146
169
|
}, [h("div", {
|
|
147
170
|
"class": bem("left-container")
|
|
148
171
|
}, [this.genAvatar(item, avatarSlot), h("div", {
|
|
149
172
|
"class": bem("line")
|
|
150
173
|
})]), h("div", {
|
|
151
174
|
"class": bem("right-container")
|
|
152
|
-
}, [this.genTitle(item, titleSlot), h("div", {
|
|
175
|
+
}, [this.genTitle(item, titleSlot), item.folded ? h() : h("div", {
|
|
153
176
|
"class": bem("main-container") + " half-border"
|
|
154
177
|
}, [this.genContent(item, contentSlot), this.genOpinion(item, opinionSlot)])])]);
|
|
155
178
|
}
|
|
@@ -178,7 +201,7 @@ export default createComponent({
|
|
|
178
201
|
_this2.isFold = $$v;
|
|
179
202
|
}
|
|
180
203
|
}
|
|
181
|
-
})])]), this.
|
|
204
|
+
})])]), this.computedProcesses.length ? h("div", {
|
|
182
205
|
"class": bem("container")
|
|
183
206
|
}, [this.genProcesses()]) : h()]);
|
|
184
207
|
}
|