zartui 2.0.42 → 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 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.42';
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];
@@ -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
- return _this9.previewMedia(media, index);
1054
+ "click": function click(event) {
1055
+ event.stopPropagation();
1056
+
1057
+ _this9.previewMedia(media, index);
1038
1058
  }
1039
1059
  }
1040
- }, [_this9.renderMediaThumbnail(media), _this9.genThumbnailMask(media), deleteIcon]);
1060
+ }, [_this9.renderMediaBox(media), _this9.genThumbnailMask(media), deleteIcon]);
1041
1061
  });
1042
1062
  },
1043
1063
  selectAction: function selectAction(action) {
@@ -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}
@@ -7,8 +7,7 @@ var _createNamespace = createNamespace('timeline'),
7
7
  bem = _createNamespace[1];
8
8
 
9
9
  import Switch from "../switch";
10
- import PassIcon from "./svg/pass";
11
- import CurrentIcon from "./svg/current";
10
+ import MediaPicker from '../media-picker';
12
11
 
13
12
  var defaultData = function defaultData() {
14
13
  return {
@@ -21,7 +20,7 @@ export default createComponent({
21
20
  props: {
22
21
  title: {
23
22
  type: String,
24
- default: "办理经过"
23
+ default: ""
25
24
  },
26
25
  // 默认折叠显示
27
26
  defaultFold: {
@@ -60,16 +59,24 @@ export default createComponent({
60
59
  return defaultData();
61
60
  },
62
61
  computed: {},
63
- watch: {},
62
+ watch: {
63
+ processes: {
64
+ deep: true,
65
+ handler: "updateProcess"
66
+ }
67
+ },
64
68
  mounted: function mounted() {
65
69
  this.isFold = this.defaultFold;
66
- this.computedProcesses = this.processes.map(function (v) {
67
- return _extends({}, v, {
68
- folded: false
69
- });
70
- });
70
+ this.updateProcess();
71
71
  },
72
72
  methods: {
73
+ updateProcess: function updateProcess() {
74
+ this.computedProcesses = this.processes.map(function (v) {
75
+ return _extends({}, v, {
76
+ folded: false
77
+ });
78
+ });
79
+ },
73
80
  genProcesses: function genProcesses() {
74
81
  var _this = this;
75
82
 
@@ -84,7 +91,7 @@ export default createComponent({
84
91
  });
85
92
  }
86
93
  },
87
- genAvatar: function genAvatar(item, avatarSlot, isLast) {
94
+ genAvatar: function genAvatar(item, avatarSlot) {
88
95
  var h = this.$createElement;
89
96
 
90
97
  if (avatarSlot) {
@@ -103,11 +110,13 @@ export default createComponent({
103
110
  }
104
111
  }) : h("div", {
105
112
  "class": bem("avatar")
106
- }, [item.human ? item.human.slice(-2) : ""]), isLast ? h(CurrentIcon, {
107
- "class": bem("status")
108
- }) : h(PassIcon, {
109
- "class": bem("status")
110
- })]);
113
+ }, [item.human ? item.human.slice(-2) : ""]), item.statusIcon ? h("img", {
114
+ "class": bem("status"),
115
+ "attrs": {
116
+ "src": item.statusIcon,
117
+ "alt": ""
118
+ }
119
+ }) : ""]);
111
120
  },
112
121
  genTitle: function genTitle(item, titleSlot) {
113
122
  var h = this.$createElement;
@@ -195,7 +204,23 @@ export default createComponent({
195
204
  "class": bem("opinion", item.opinion ? "" : "empty")
196
205
  }, [item.opinion || "无"])]);
197
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
+ },
198
221
  genProcessItem: function genProcessItem(item, isLast) {
222
+ var _item$fileList;
223
+
199
224
  var h = this.$createElement;
200
225
  var avatarSlot = this.slots("avatar", item);
201
226
  var titleSlot = this.slots("title", item);
@@ -219,13 +244,13 @@ export default createComponent({
219
244
  }
220
245
  }, [h("div", {
221
246
  "class": bem("left-container")
222
- }, [this.genAvatar(item, avatarSlot, isLast), h("div", {
247
+ }, [this.genAvatar(item, avatarSlot), h("div", {
223
248
  "class": bem("line")
224
249
  })]), h("div", {
225
250
  "class": bem("right-container")
226
251
  }, [this.genTitle(item, titleSlot), item.folded ? h() : h("div", {
227
252
  "class": bem("main-container")
228
- }, [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) : ""])])]);
229
254
  }
230
255
  },
231
256
  render: function render(h) {
@@ -235,8 +260,16 @@ export default createComponent({
235
260
  return h("div", {
236
261
  "class": bem()
237
262
  }, [h("div", {
263
+ "directives": [{
264
+ name: "show",
265
+ value: this.title || this.showFold
266
+ }],
238
267
  "class": [bem("top-bar" + " half-border-bottom"), BORDER_BOTTOM]
239
268
  }, [h("div", {
269
+ "directives": [{
270
+ name: "show",
271
+ value: this.title
272
+ }],
240
273
  "class": bem("top-left")
241
274
  }, [h("div", {
242
275
  "class": bem("bar")
@@ -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';