zartui 2.0.43 → 2.0.44
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/index.js +1 -1
- package/es/media-picker/index.js +24 -4
- package/es/timeline/index.css +1 -1
- package/es/timeline/index.js +27 -2
- package/es/timeline/index.less +34 -0
- package/es/timeline/style/index.js +15 -0
- package/es/timeline/style/less.js +15 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +1 -1
- package/lib/media-picker/index.js +24 -4
- package/lib/timeline/index.css +1 -1
- package/lib/timeline/index.js +28 -2
- package/lib/timeline/index.less +34 -0
- package/lib/timeline/style/index.js +15 -0
- package/lib/timeline/style/less.js +15 -0
- package/lib/zart.js +52 -7
- package/lib/zart.min.js +1 -1
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -74,7 +74,7 @@ import Tag from './tag';
|
|
|
74
74
|
import Timeline from './timeline';
|
|
75
75
|
import Toast from './toast';
|
|
76
76
|
import Uploader from './uploader';
|
|
77
|
-
var version = '2.0.
|
|
77
|
+
var version = '2.0.44';
|
|
78
78
|
|
|
79
79
|
function install(Vue) {
|
|
80
80
|
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, 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/media-picker/index.js
CHANGED
|
@@ -141,6 +141,10 @@ export default createComponent({
|
|
|
141
141
|
return {};
|
|
142
142
|
}
|
|
143
143
|
},
|
|
144
|
+
showFileName: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: false
|
|
147
|
+
},
|
|
144
148
|
// 预览函数(返回true时不再执行默认行为)
|
|
145
149
|
// 参数:media,index
|
|
146
150
|
preview: Function,
|
|
@@ -630,7 +634,8 @@ export default createComponent({
|
|
|
630
634
|
url: image.showSrc
|
|
631
635
|
};
|
|
632
636
|
}),
|
|
633
|
-
startPosition: imageIndex
|
|
637
|
+
startPosition: imageIndex,
|
|
638
|
+
closeable: true
|
|
634
639
|
});
|
|
635
640
|
} else if (media.type === MediaType.AUDIO || media.type === MediaType.VIDEO) {
|
|
636
641
|
if (!media.file && !media.url) {
|
|
@@ -965,6 +970,19 @@ export default createComponent({
|
|
|
965
970
|
}, [message])]);
|
|
966
971
|
}
|
|
967
972
|
},
|
|
973
|
+
renderMediaBox: function renderMediaBox(media) {
|
|
974
|
+
var h = this.$createElement;
|
|
975
|
+
|
|
976
|
+
if (!this.showFileName) {
|
|
977
|
+
return this.renderMediaThumbnail(media);
|
|
978
|
+
} else {
|
|
979
|
+
return h("div", {
|
|
980
|
+
"class": bem('media-box')
|
|
981
|
+
}, [this.renderMediaThumbnail(media), h("div", {
|
|
982
|
+
"class": bem('media-name')
|
|
983
|
+
}, [media.name || media.fileName])]);
|
|
984
|
+
}
|
|
985
|
+
},
|
|
968
986
|
|
|
969
987
|
/**
|
|
970
988
|
* 多媒体对应展示的缩略图
|
|
@@ -1033,11 +1051,13 @@ export default createComponent({
|
|
|
1033
1051
|
return h(ZtGridItem, {
|
|
1034
1052
|
"key": media.uniqueCode,
|
|
1035
1053
|
"on": {
|
|
1036
|
-
"click": function click() {
|
|
1037
|
-
|
|
1054
|
+
"click": function click(event) {
|
|
1055
|
+
event.stopPropagation();
|
|
1056
|
+
|
|
1057
|
+
_this9.previewMedia(media, index);
|
|
1038
1058
|
}
|
|
1039
1059
|
}
|
|
1040
|
-
}, [_this9.
|
|
1060
|
+
}, [_this9.renderMediaBox(media), _this9.genThumbnailMask(media), deleteIcon]);
|
|
1041
1061
|
});
|
|
1042
1062
|
},
|
|
1043
1063
|
selectAction: function selectAction(action) {
|
package/es/timeline/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-timeline{background-color:#fff}.zt2-timeline .zt2-timeline__top-bar{height:44px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-timeline .zt2-timeline__top-left{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-timeline .zt2-timeline__bar{width:4px;height:16px;background:#0091fa;margin-right:12px}.zt2-timeline .zt2-timeline__top-right{padding-right:16px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-timeline .zt2-timeline__fold-text{font-size:14px;color:rgba(45,75,115,.6);line-height:24px;margin-right:8px}.zt2-timeline .zt2-timeline__container{padding-top:16px}.zt2-timeline .zt2-timeline__item{padding:0 16px 16px 16px;display:-webkit-box;display:-webkit-flex;display:flex}.zt2-timeline .zt2-timeline__item.last-item .zt2-timeline__line{height:0}.zt2-timeline .zt2-timeline__left-container{margin-right:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-timeline .zt2-timeline__right-container{-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt2-timeline .zt2-timeline__avatar-box{width:40px;height:40px;position:relative}.zt2-timeline .zt2-timeline__status{width:16px;height:16px;position:absolute;bottom:-4px;right:-4px}.zt2-timeline .zt2-timeline__avatar{width:40px;height:40px;background:rgba(0,145,250,.7);border-radius:4px;font-size:14px;font-weight:700;text-align:center;color:#fff;line-height:40px}.zt2-timeline .zt2-timeline__line{background-color:#f5f5f5;width:2px;height:100%;margin-top:4px;margin-bottom:-12px}.zt2-timeline .zt2-timeline__title-box{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin-bottom:8px}.zt2-timeline .zt2-timeline__main-title{font-size:16px;font-weight:700;color:#2d4b73;line-height:24px}.zt2-timeline .zt2-timeline__title{font-size:14px;font-weight:700;color:#2d4b73;line-height:24px}.zt2-timeline .zt2-timeline__time{font-size:12px;color:rgba(45,75,115,.8);line-height:16px}.zt2-timeline .zt2-timeline__content-box{font-size:14px;color:#2d4b73;line-height:20px;padding-bottom:8px;padding-top:4px}.zt2-timeline .zt2-timeline__human-box{padding-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap;overflow:hidden}.zt2-timeline .zt2-timeline__human-box .zt2-timeline__depart{font-size:14px;color:#2d4b73;line-height:20px;margin-right:8px}.zt2-timeline .zt2-timeline__human-box .zt2-timeline__human{font-weight:700;font-size:14px;color:#2d4b73;line-height:20px}.zt2-timeline .zt2-timeline__main-container{background:rgba(45,75,115,.04);border-radius:4px;padding:8px 12px}.zt2-timeline .zt2-timeline__main-container::before{border-radius:4px}.zt2-timeline .zt2-timeline__main-container .zt2-timeline__text-bold{font-weight:700;color:#2d4b73}.zt2-timeline .zt2-timeline__opinion-box{padding-top:7px}.zt2-timeline .zt2-timeline__opinion-box .zt2-timeline__opinion--empty{font-size:14px;color:rgba(45,75,115,.2)}.zt2-timeline .zt2-timeline__content-label,.zt2-timeline .zt2-timeline__opinion-label{margin-bottom:4px;font-size:14px;color:rgba(45,75,115,.6);line-height:20px}.zt2-timeline .zt2-timeline__opinion{font-size:14px;color:#2d4b73;line-height:20px}
|
|
1
|
+
.zt2-timeline{background-color:#fff}.zt2-timeline .zt2-timeline__top-bar{height:44px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-timeline .zt2-timeline__top-left{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-timeline .zt2-timeline__bar{width:4px;height:16px;background:#0091fa;margin-right:12px}.zt2-timeline .zt2-timeline__top-right{padding-right:16px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-timeline .zt2-timeline__fold-text{font-size:14px;color:rgba(45,75,115,.6);line-height:24px;margin-right:8px}.zt2-timeline .zt2-timeline__container{padding-top:16px}.zt2-timeline .zt2-timeline__item{padding:0 16px 16px 16px;display:-webkit-box;display:-webkit-flex;display:flex}.zt2-timeline .zt2-timeline__item.last-item .zt2-timeline__line{height:0}.zt2-timeline .zt2-timeline__left-container{margin-right:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-timeline .zt2-timeline__right-container{-webkit-box-flex:1;-webkit-flex:1;flex:1}.zt2-timeline .zt2-timeline__avatar-box{width:40px;height:40px;position:relative}.zt2-timeline .zt2-timeline__status{width:16px;height:16px;position:absolute;bottom:-4px;right:-4px}.zt2-timeline .zt2-timeline__avatar{width:40px;height:40px;background:rgba(0,145,250,.7);border-radius:4px;font-size:14px;font-weight:700;text-align:center;color:#fff;line-height:40px}.zt2-timeline .zt2-timeline__line{background-color:#f5f5f5;width:2px;height:100%;margin-top:4px;margin-bottom:-12px}.zt2-timeline .zt2-timeline__title-box{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;margin-bottom:8px}.zt2-timeline .zt2-timeline__main-title{font-size:16px;font-weight:700;color:#2d4b73;line-height:24px}.zt2-timeline .zt2-timeline__title{font-size:14px;font-weight:700;color:#2d4b73;line-height:24px}.zt2-timeline .zt2-timeline__time{font-size:12px;color:rgba(45,75,115,.8);line-height:16px}.zt2-timeline .zt2-timeline__content-box{font-size:14px;color:#2d4b73;line-height:20px;padding-bottom:8px;padding-top:4px}.zt2-timeline .zt2-timeline__human-box{padding-bottom:8px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-flex-wrap:wrap;flex-wrap:wrap;overflow:hidden}.zt2-timeline .zt2-timeline__human-box .zt2-timeline__depart{font-size:14px;color:#2d4b73;line-height:20px;margin-right:8px}.zt2-timeline .zt2-timeline__human-box .zt2-timeline__human{font-weight:700;font-size:14px;color:#2d4b73;line-height:20px}.zt2-timeline .zt2-timeline__main-container{background:rgba(45,75,115,.04);border-radius:4px;padding:8px 12px}.zt2-timeline .zt2-timeline__main-container::before{border-radius:4px}.zt2-timeline .zt2-timeline__main-container .zt2-timeline__text-bold{font-weight:700;color:#2d4b73}.zt2-timeline .zt2-timeline__main-container .zt2-media-picker{margin-top:12px}.zt2-timeline .zt2-timeline__main-container .zt2-media-picker .zt2-media-picker__line{display:none}.zt2-timeline .zt2-timeline__main-container .zt2-media-picker .zt2-media-picker__grid{padding:0!important}.zt2-timeline .zt2-timeline__main-container .zt2-media-picker .zt2-media-picker__grid .zt2-media-picker__media-box{width:100%;height:100%;position:relative}.zt2-timeline .zt2-timeline__main-container .zt2-media-picker .zt2-media-picker__grid .zt2-media-picker__media-box .zt2-media-picker__media-name{width:100%;height:20px;padding:0 12px;position:absolute;bottom:0;left:0;border-radius:0 0 4px 4px;background-color:rgba(45,75,115,.5);font-size:12px;color:#fff;text-align:center;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.zt2-timeline .zt2-timeline__opinion-box{padding-top:7px}.zt2-timeline .zt2-timeline__opinion-box .zt2-timeline__opinion--empty{font-size:14px;color:rgba(45,75,115,.2)}.zt2-timeline .zt2-timeline__content-label,.zt2-timeline .zt2-timeline__opinion-label{margin-bottom:4px;font-size:14px;color:rgba(45,75,115,.6);line-height:20px}.zt2-timeline .zt2-timeline__opinion{font-size:14px;color:#2d4b73;line-height:20px}
|
package/es/timeline/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var _createNamespace = createNamespace('timeline'),
|
|
|
7
7
|
bem = _createNamespace[1];
|
|
8
8
|
|
|
9
9
|
import Switch from "../switch";
|
|
10
|
+
import MediaPicker from '../media-picker';
|
|
10
11
|
|
|
11
12
|
var defaultData = function defaultData() {
|
|
12
13
|
return {
|
|
@@ -19,7 +20,7 @@ export default createComponent({
|
|
|
19
20
|
props: {
|
|
20
21
|
title: {
|
|
21
22
|
type: String,
|
|
22
|
-
default: "
|
|
23
|
+
default: ""
|
|
23
24
|
},
|
|
24
25
|
// 默认折叠显示
|
|
25
26
|
defaultFold: {
|
|
@@ -203,7 +204,23 @@ export default createComponent({
|
|
|
203
204
|
"class": bem("opinion", item.opinion ? "" : "empty")
|
|
204
205
|
}, [item.opinion || "无"])]);
|
|
205
206
|
},
|
|
207
|
+
genFiles: function genFiles(fileList) {
|
|
208
|
+
var h = this.$createElement;
|
|
209
|
+
return h(MediaPicker, {
|
|
210
|
+
"attrs": {
|
|
211
|
+
"showFileName": true
|
|
212
|
+
},
|
|
213
|
+
"model": {
|
|
214
|
+
value: fileList,
|
|
215
|
+
callback: function callback($$v) {
|
|
216
|
+
fileList = $$v;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
},
|
|
206
221
|
genProcessItem: function genProcessItem(item, isLast) {
|
|
222
|
+
var _item$fileList;
|
|
223
|
+
|
|
207
224
|
var h = this.$createElement;
|
|
208
225
|
var avatarSlot = this.slots("avatar", item);
|
|
209
226
|
var titleSlot = this.slots("title", item);
|
|
@@ -233,7 +250,7 @@ export default createComponent({
|
|
|
233
250
|
"class": bem("right-container")
|
|
234
251
|
}, [this.genTitle(item, titleSlot), item.folded ? h() : h("div", {
|
|
235
252
|
"class": bem("main-container")
|
|
236
|
-
}, [this.genHuman(item, humanSlot), this.genContent(item, contentSlot), this.genOpinion(item, opinionSlot)])])]);
|
|
253
|
+
}, [this.genHuman(item, humanSlot), this.genContent(item, contentSlot), this.genOpinion(item, opinionSlot), item != null && (_item$fileList = item.fileList) != null && _item$fileList.length ? this.genFiles(item.fileList) : ""])])]);
|
|
237
254
|
}
|
|
238
255
|
},
|
|
239
256
|
render: function render(h) {
|
|
@@ -243,8 +260,16 @@ export default createComponent({
|
|
|
243
260
|
return h("div", {
|
|
244
261
|
"class": bem()
|
|
245
262
|
}, [h("div", {
|
|
263
|
+
"directives": [{
|
|
264
|
+
name: "show",
|
|
265
|
+
value: this.title || this.showFold
|
|
266
|
+
}],
|
|
246
267
|
"class": [bem("top-bar" + " half-border-bottom"), BORDER_BOTTOM]
|
|
247
268
|
}, [h("div", {
|
|
269
|
+
"directives": [{
|
|
270
|
+
name: "show",
|
|
271
|
+
value: this.title
|
|
272
|
+
}],
|
|
248
273
|
"class": bem("top-left")
|
|
249
274
|
}, [h("div", {
|
|
250
275
|
"class": bem("bar")
|
package/es/timeline/index.less
CHANGED
|
@@ -141,6 +141,40 @@
|
|
|
141
141
|
font-weight: bold;
|
|
142
142
|
color: rgba(45, 75, 115, 1);
|
|
143
143
|
}
|
|
144
|
+
|
|
145
|
+
.zt2-media-picker {
|
|
146
|
+
margin-top: 12px;
|
|
147
|
+
.zt2-media-picker__line {
|
|
148
|
+
display: none;
|
|
149
|
+
}
|
|
150
|
+
.zt2-media-picker__grid {
|
|
151
|
+
padding: 0!important;
|
|
152
|
+
|
|
153
|
+
.zt2-media-picker__media-box {
|
|
154
|
+
width: 100%;
|
|
155
|
+
height: 100%;
|
|
156
|
+
position: relative;
|
|
157
|
+
|
|
158
|
+
.zt2-media-picker__media-name {
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 20px;
|
|
161
|
+
padding: 0 12px;
|
|
162
|
+
position: absolute;
|
|
163
|
+
bottom: 0;
|
|
164
|
+
left: 0;
|
|
165
|
+
border-radius: 0 0 4px 4px;
|
|
166
|
+
background-color: rgba(45, 75, 115, 0.5);
|
|
167
|
+
font-size: 12px;
|
|
168
|
+
color: #fff;
|
|
169
|
+
text-align: center;
|
|
170
|
+
line-height: 20px;
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
overflow: hidden;
|
|
173
|
+
text-overflow: ellipsis;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
144
178
|
}
|
|
145
179
|
.@{base-prefix}-timeline__opinion-box {
|
|
146
180
|
padding-top: 7px;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import '../../style/base.css';
|
|
2
|
+
import '../../overlay/index.css';
|
|
3
|
+
import '../../info/index.css';
|
|
4
|
+
import '../../icon/index.css';
|
|
5
|
+
import '../../image/index.css';
|
|
6
|
+
import '../../grid-item/index.css';
|
|
7
|
+
import '../../popup/index.css';
|
|
2
8
|
import '../../loading/index.css';
|
|
3
9
|
import '../../switch/index.css';
|
|
10
|
+
import '../../toast/index.css';
|
|
11
|
+
import '../../button/index.css';
|
|
12
|
+
import '../../action-sheet/index.css';
|
|
13
|
+
import '../../grid/index.css';
|
|
14
|
+
import '../../swipe/index.css';
|
|
15
|
+
import '../../swipe-item/index.css';
|
|
16
|
+
import '../../image-preview/index.css';
|
|
17
|
+
import '../../media-picker/index.css';
|
|
18
|
+
import '../../media-player/index.css';
|
|
4
19
|
import '../index.css';
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import '../../style/base.less';
|
|
2
|
+
import '../../overlay/index.less';
|
|
3
|
+
import '../../info/index.less';
|
|
4
|
+
import '../../icon/index.less';
|
|
5
|
+
import '../../image/index.less';
|
|
6
|
+
import '../../grid-item/index.less';
|
|
7
|
+
import '../../popup/index.less';
|
|
2
8
|
import '../../loading/index.less';
|
|
3
9
|
import '../../switch/index.less';
|
|
10
|
+
import '../../toast/index.less';
|
|
11
|
+
import '../../button/index.less';
|
|
12
|
+
import '../../action-sheet/index.less';
|
|
13
|
+
import '../../grid/index.less';
|
|
14
|
+
import '../../swipe/index.less';
|
|
15
|
+
import '../../swipe-item/index.less';
|
|
16
|
+
import '../../image-preview/index.less';
|
|
17
|
+
import '../../media-picker/index.less';
|
|
18
|
+
import '../../media-player/index.less';
|
|
4
19
|
import '../index.less';
|