zartui 2.1.19 → 2.1.21
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 +91 -59
- package/es/speech-recognizer/index.js +8 -1
- package/lib/index.js +1 -1
- package/lib/media-picker/index.js +91 -59
- package/lib/speech-recognizer/index.js +8 -1
- package/lib/zart.js +3484 -65
- package/lib/zart.min.js +9 -2
- package/package.json +4 -2
package/es/index.js
CHANGED
|
@@ -76,7 +76,7 @@ import TextEllipsis from './text-ellipsis';
|
|
|
76
76
|
import Timeline from './timeline';
|
|
77
77
|
import Toast from './toast';
|
|
78
78
|
import Uploader from './uploader';
|
|
79
|
-
var version = '2.1.
|
|
79
|
+
var version = '2.1.21';
|
|
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, Picker, Popover, Popup, PullRefresh, Radio, RadioGroup, Rate, Row, Search, Signature, Skeleton, Slider, SpeechRecognizer, Step, Stepper, Steps, Sticky, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Table, Tabs, Tag, TextEllipsis, Timeline, Toast, Uploader];
|
|
82
82
|
components.forEach(function (item) {
|
package/es/media-picker/index.js
CHANGED
|
@@ -38,6 +38,7 @@ import { FRAME_CONTAINER, CERTIFICATE_BACKGROUND, CERTIFICATE_BUTTON } from './i
|
|
|
38
38
|
import { getFileUniqueCode, getUniqueFileName, isAudioType, isImageType, isVideoType, isPdfType, isDocType, isTextType, isPptType, isExcelType } from "./media-util";
|
|
39
39
|
import { isWeixin } from '../utils/device';
|
|
40
40
|
import { wxUploadImage } from './wx-util';
|
|
41
|
+
import Sortable from "sortablejs";
|
|
41
42
|
|
|
42
43
|
// 单个文件最大限制,单位为M(目前限制是100M)
|
|
43
44
|
var FILE_SIZE_LIMIT = 100;
|
|
@@ -182,6 +183,10 @@ export default createComponent({
|
|
|
182
183
|
default: function _default() {
|
|
183
184
|
return {};
|
|
184
185
|
}
|
|
186
|
+
},
|
|
187
|
+
sortable: {
|
|
188
|
+
type: Boolean,
|
|
189
|
+
default: false
|
|
185
190
|
}
|
|
186
191
|
},
|
|
187
192
|
model: {
|
|
@@ -195,7 +200,8 @@ export default createComponent({
|
|
|
195
200
|
actionVisible: false,
|
|
196
201
|
mediaPlayerVisible: false,
|
|
197
202
|
mediaTypeToPlay: '',
|
|
198
|
-
mediaUrlToPlay: ''
|
|
203
|
+
mediaUrlToPlay: '',
|
|
204
|
+
sort: undefined
|
|
199
205
|
};
|
|
200
206
|
},
|
|
201
207
|
computed: {
|
|
@@ -243,11 +249,36 @@ export default createComponent({
|
|
|
243
249
|
}
|
|
244
250
|
}];
|
|
245
251
|
}
|
|
252
|
+
},
|
|
253
|
+
showPreview: function showPreview() {
|
|
254
|
+
return this.mediaList.length > 0 && this.pickerMode !== "certificate";
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
watch: {
|
|
258
|
+
showPreview: function showPreview() {
|
|
259
|
+
var _this$$refs$grid,
|
|
260
|
+
_this2 = this;
|
|
261
|
+
if (this.sort || !this.sortable) return;
|
|
262
|
+
this.sort = Sortable.create((_this$$refs$grid = this.$refs.grid) == null ? void 0 : _this$$refs$grid.$el, {
|
|
263
|
+
animation: 200,
|
|
264
|
+
handle: ".zt2-grid-item",
|
|
265
|
+
onEnd: function onEnd(evt) {
|
|
266
|
+
var raws = _this2.exchangeArrayIndex(_this2.mediaList, evt.oldIndex, evt.newIndex);
|
|
267
|
+
_this2.$emit('input', raws);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
246
270
|
}
|
|
247
271
|
},
|
|
248
272
|
methods: {
|
|
273
|
+
exchangeArrayIndex: function exchangeArrayIndex(list, index, newIndex) {
|
|
274
|
+
var raws = [].concat(list);
|
|
275
|
+
var raw = raws[index];
|
|
276
|
+
raws.splice(index, 1);
|
|
277
|
+
raws.splice(newIndex, 0, raw);
|
|
278
|
+
return [].concat(raws);
|
|
279
|
+
},
|
|
249
280
|
mediaPick: function mediaPick(mediaType, mediaAddType) {
|
|
250
|
-
var
|
|
281
|
+
var _this3 = this;
|
|
251
282
|
if (this.disabled) {
|
|
252
283
|
return;
|
|
253
284
|
}
|
|
@@ -269,7 +300,7 @@ export default createComponent({
|
|
|
269
300
|
if (this.useWx && isWeixin() && window.wx) {
|
|
270
301
|
var type = mediaAddType === MediaAddType.TAKE ? 'camera' : 'album';
|
|
271
302
|
wxUploadImage(type).then(function (newMedias) {
|
|
272
|
-
|
|
303
|
+
_this3.$emit('input', [].concat(_this3.mediaList, newMedias));
|
|
273
304
|
});
|
|
274
305
|
} else {
|
|
275
306
|
if (mediaAddType === MediaAddType.TAKE) {
|
|
@@ -344,7 +375,7 @@ export default createComponent({
|
|
|
344
375
|
}
|
|
345
376
|
},
|
|
346
377
|
handleInputFiles: function handleInputFiles(event) {
|
|
347
|
-
var
|
|
378
|
+
var _this4 = this;
|
|
348
379
|
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
349
380
|
var files, response, data;
|
|
350
381
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -357,29 +388,29 @@ export default createComponent({
|
|
|
357
388
|
}
|
|
358
389
|
return _context.abrupt("return");
|
|
359
390
|
case 3:
|
|
360
|
-
if (
|
|
391
|
+
if (_this4.pickerMode === "certificate") {
|
|
361
392
|
files = [files[0]];
|
|
362
393
|
}
|
|
363
|
-
files =
|
|
394
|
+
files = _this4.filterValidFiles(files);
|
|
364
395
|
if (!(files.length === 0)) {
|
|
365
396
|
_context.next = 7;
|
|
366
397
|
break;
|
|
367
398
|
}
|
|
368
399
|
return _context.abrupt("return");
|
|
369
400
|
case 7:
|
|
370
|
-
if (
|
|
401
|
+
if (_this4.checkFileCountAfterAdd(files)) {
|
|
371
402
|
_context.next = 9;
|
|
372
403
|
break;
|
|
373
404
|
}
|
|
374
405
|
return _context.abrupt("return");
|
|
375
406
|
case 9:
|
|
376
|
-
if (!
|
|
407
|
+
if (!_this4.beforeRead) {
|
|
377
408
|
_context.next = 24;
|
|
378
409
|
break;
|
|
379
410
|
}
|
|
380
411
|
_context.prev = 10;
|
|
381
412
|
_context.next = 13;
|
|
382
|
-
return
|
|
413
|
+
return _this4.beforeRead(files);
|
|
383
414
|
case 13:
|
|
384
415
|
response = _context.sent;
|
|
385
416
|
if (response) {
|
|
@@ -392,9 +423,9 @@ export default createComponent({
|
|
|
392
423
|
data = response.filter(function (item) {
|
|
393
424
|
return !!item;
|
|
394
425
|
});
|
|
395
|
-
|
|
426
|
+
_this4.readFiles(data);
|
|
396
427
|
} else {
|
|
397
|
-
|
|
428
|
+
_this4.readFiles(files);
|
|
398
429
|
}
|
|
399
430
|
_context.next = 22;
|
|
400
431
|
break;
|
|
@@ -406,7 +437,7 @@ export default createComponent({
|
|
|
406
437
|
_context.next = 25;
|
|
407
438
|
break;
|
|
408
439
|
case 24:
|
|
409
|
-
|
|
440
|
+
_this4.readFiles(files);
|
|
410
441
|
case 25:
|
|
411
442
|
case "end":
|
|
412
443
|
return _context.stop();
|
|
@@ -415,12 +446,12 @@ export default createComponent({
|
|
|
415
446
|
}))();
|
|
416
447
|
},
|
|
417
448
|
readFiles: function readFiles(files) {
|
|
418
|
-
var
|
|
449
|
+
var _this5 = this;
|
|
419
450
|
// 处理非图片
|
|
420
451
|
var notImages = files.filter(function (f) {
|
|
421
452
|
return !isImageType(f);
|
|
422
453
|
}).map(function (f) {
|
|
423
|
-
return
|
|
454
|
+
return _this5.transformNotImageFile(f);
|
|
424
455
|
});
|
|
425
456
|
var newMedias = [];
|
|
426
457
|
if (notImages.length > 0) {
|
|
@@ -441,13 +472,13 @@ export default createComponent({
|
|
|
441
472
|
newMedias = newMedias.concat(medias);
|
|
442
473
|
}
|
|
443
474
|
}).finally(function () {
|
|
444
|
-
if (
|
|
445
|
-
|
|
475
|
+
if (_this5.pickerMode === "certificate") {
|
|
476
|
+
_this5.$emit('input', [].concat(newMedias));
|
|
446
477
|
} else {
|
|
447
|
-
|
|
478
|
+
_this5.$emit('input', [].concat(_this5.mediaList, newMedias));
|
|
448
479
|
}
|
|
449
|
-
if (
|
|
450
|
-
|
|
480
|
+
if (_this5.afterRead) {
|
|
481
|
+
_this5.afterRead(newMedias);
|
|
451
482
|
}
|
|
452
483
|
});
|
|
453
484
|
},
|
|
@@ -535,24 +566,24 @@ export default createComponent({
|
|
|
535
566
|
* @return {Promise<[Media]>}
|
|
536
567
|
*/
|
|
537
568
|
transformImageFiles: function transformImageFiles(files) {
|
|
538
|
-
var
|
|
569
|
+
var _this6 = this;
|
|
539
570
|
var promisesTodo = [];
|
|
540
571
|
var resizeOptions = new ResizeOptions(this.maxImageSideLength);
|
|
541
572
|
var compressOptions = new CompressOptions(this.maxImageFileSize);
|
|
542
573
|
var _loop = function _loop() {
|
|
543
574
|
var inputFile = files[i];
|
|
544
|
-
var watermarkEnabled =
|
|
575
|
+
var watermarkEnabled = _this6.watermarkOptions && _this6.watermarkOptions.watermarkConfigString && checkWatermarkConfigSupported(_this6.watermarkOptions.watermarkConfigString);
|
|
545
576
|
var watermarkOpt;
|
|
546
577
|
if (watermarkEnabled) {
|
|
547
578
|
watermarkOpt = new WatermarkOptions({
|
|
548
579
|
enabled: true,
|
|
549
|
-
watermarkConfigString: watermarkEnabled ?
|
|
580
|
+
watermarkConfigString: watermarkEnabled ? _this6.watermarkOptions.watermarkConfigString : '',
|
|
550
581
|
context: {
|
|
551
|
-
address:
|
|
552
|
-
humanName:
|
|
553
|
-
projectName:
|
|
554
|
-
logo:
|
|
555
|
-
applicationName:
|
|
582
|
+
address: _this6.watermarkOptions.address || "",
|
|
583
|
+
humanName: _this6.watermarkOptions.humanName || _this6.watermarkOptions.humanname || "",
|
|
584
|
+
projectName: _this6.watermarkOptions.projectName || "",
|
|
585
|
+
logo: _this6.watermarkOptions.logo || "",
|
|
586
|
+
applicationName: _this6.watermarkOptions.applicationName || "",
|
|
556
587
|
watermarkTime: new Date()
|
|
557
588
|
}
|
|
558
589
|
});
|
|
@@ -692,18 +723,18 @@ export default createComponent({
|
|
|
692
723
|
}
|
|
693
724
|
},
|
|
694
725
|
onDelete: function onDelete(media, index) {
|
|
695
|
-
var
|
|
726
|
+
var _this7 = this;
|
|
696
727
|
return _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
697
728
|
var response;
|
|
698
729
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
699
730
|
while (1) switch (_context2.prev = _context2.next) {
|
|
700
731
|
case 0:
|
|
701
|
-
if (!
|
|
732
|
+
if (!_this7.beforeDelete) {
|
|
702
733
|
_context2.next = 6;
|
|
703
734
|
break;
|
|
704
735
|
}
|
|
705
736
|
_context2.next = 3;
|
|
706
|
-
return
|
|
737
|
+
return _this7.beforeDelete(media);
|
|
707
738
|
case 3:
|
|
708
739
|
response = _context2.sent;
|
|
709
740
|
if (response) {
|
|
@@ -712,7 +743,7 @@ export default createComponent({
|
|
|
712
743
|
}
|
|
713
744
|
return _context2.abrupt("return");
|
|
714
745
|
case 6:
|
|
715
|
-
|
|
746
|
+
_this7.deleteMedia(media, index);
|
|
716
747
|
case 7:
|
|
717
748
|
case "end":
|
|
718
749
|
return _context2.stop();
|
|
@@ -727,7 +758,7 @@ export default createComponent({
|
|
|
727
758
|
this.$emit('delete', media, index);
|
|
728
759
|
},
|
|
729
760
|
hiddenInput: function hiddenInput() {
|
|
730
|
-
var
|
|
761
|
+
var _this8 = this;
|
|
731
762
|
var h = this.$createElement;
|
|
732
763
|
return [h("input", {
|
|
733
764
|
"attrs": {
|
|
@@ -740,7 +771,7 @@ export default createComponent({
|
|
|
740
771
|
"on": {
|
|
741
772
|
"change": this.handleInputFiles,
|
|
742
773
|
"click": function click() {
|
|
743
|
-
return
|
|
774
|
+
return _this8.resetInput(MediaType.PHOTO, MediaAddType.TAKE);
|
|
744
775
|
}
|
|
745
776
|
},
|
|
746
777
|
"class": bem('hidden')
|
|
@@ -754,7 +785,7 @@ export default createComponent({
|
|
|
754
785
|
"on": {
|
|
755
786
|
"change": this.handleInputFiles,
|
|
756
787
|
"click": function click() {
|
|
757
|
-
return
|
|
788
|
+
return _this8.resetInput(MediaType.PHOTO, MediaAddType.PICK);
|
|
758
789
|
}
|
|
759
790
|
},
|
|
760
791
|
"class": bem('hidden')
|
|
@@ -768,7 +799,7 @@ export default createComponent({
|
|
|
768
799
|
"on": {
|
|
769
800
|
"change": this.handleInputFiles,
|
|
770
801
|
"click": function click() {
|
|
771
|
-
return
|
|
802
|
+
return _this8.resetInput(MediaType.VIDEO, MediaAddType.TAKE);
|
|
772
803
|
}
|
|
773
804
|
},
|
|
774
805
|
"class": bem('hidden')
|
|
@@ -781,7 +812,7 @@ export default createComponent({
|
|
|
781
812
|
"on": {
|
|
782
813
|
"change": this.handleInputFiles,
|
|
783
814
|
"click": function click() {
|
|
784
|
-
return
|
|
815
|
+
return _this8.resetInput(MediaType.VIDEO, MediaAddType.PICK);
|
|
785
816
|
}
|
|
786
817
|
},
|
|
787
818
|
"class": bem('hidden')
|
|
@@ -795,7 +826,7 @@ export default createComponent({
|
|
|
795
826
|
"on": {
|
|
796
827
|
"change": this.handleInputFiles,
|
|
797
828
|
"click": function click() {
|
|
798
|
-
return
|
|
829
|
+
return _this8.resetInput(MediaType.AUDIO, MediaAddType.TAKE);
|
|
799
830
|
}
|
|
800
831
|
},
|
|
801
832
|
"class": bem('hidden')
|
|
@@ -808,7 +839,7 @@ export default createComponent({
|
|
|
808
839
|
"on": {
|
|
809
840
|
"change": this.handleInputFiles,
|
|
810
841
|
"click": function click() {
|
|
811
|
-
return
|
|
842
|
+
return _this8.resetInput(MediaType.AUDIO, MediaAddType.PICK);
|
|
812
843
|
}
|
|
813
844
|
},
|
|
814
845
|
"class": bem('hidden')
|
|
@@ -821,14 +852,14 @@ export default createComponent({
|
|
|
821
852
|
"on": {
|
|
822
853
|
"change": this.handleInputFiles,
|
|
823
854
|
"click": function click() {
|
|
824
|
-
return
|
|
855
|
+
return _this8.resetInput(MediaType.FILE, MediaAddType.PICK);
|
|
825
856
|
}
|
|
826
857
|
},
|
|
827
858
|
"class": bem('hidden')
|
|
828
859
|
})];
|
|
829
860
|
},
|
|
830
861
|
renderIcon: function renderIcon(mediaType, mediaAddType) {
|
|
831
|
-
var
|
|
862
|
+
var _this9 = this;
|
|
832
863
|
var h = this.$createElement;
|
|
833
864
|
if (mediaType === MediaType.PHOTO) {
|
|
834
865
|
if (mediaAddType === MediaAddType.TAKE) {
|
|
@@ -836,7 +867,7 @@ export default createComponent({
|
|
|
836
867
|
"class": bem('button'),
|
|
837
868
|
"on": {
|
|
838
869
|
"click": function click() {
|
|
839
|
-
return
|
|
870
|
+
return _this9.mediaPick(mediaType, mediaAddType);
|
|
840
871
|
}
|
|
841
872
|
}
|
|
842
873
|
});
|
|
@@ -845,7 +876,7 @@ export default createComponent({
|
|
|
845
876
|
"class": bem('button'),
|
|
846
877
|
"on": {
|
|
847
878
|
"click": function click() {
|
|
848
|
-
return
|
|
879
|
+
return _this9.mediaPick(mediaType, mediaAddType);
|
|
849
880
|
}
|
|
850
881
|
}
|
|
851
882
|
});
|
|
@@ -855,7 +886,7 @@ export default createComponent({
|
|
|
855
886
|
"class": bem('button'),
|
|
856
887
|
"on": {
|
|
857
888
|
"click": function click() {
|
|
858
|
-
return
|
|
889
|
+
return _this9.mediaPick(mediaType, mediaAddType);
|
|
859
890
|
}
|
|
860
891
|
}
|
|
861
892
|
});
|
|
@@ -864,7 +895,7 @@ export default createComponent({
|
|
|
864
895
|
"class": bem('button'),
|
|
865
896
|
"on": {
|
|
866
897
|
"click": function click() {
|
|
867
|
-
return
|
|
898
|
+
return _this9.mediaPick(mediaType, mediaAddType);
|
|
868
899
|
}
|
|
869
900
|
}
|
|
870
901
|
});
|
|
@@ -873,7 +904,7 @@ export default createComponent({
|
|
|
873
904
|
"class": bem('button'),
|
|
874
905
|
"on": {
|
|
875
906
|
"click": function click() {
|
|
876
|
-
return
|
|
907
|
+
return _this9.mediaPick(mediaType, mediaAddType);
|
|
877
908
|
}
|
|
878
909
|
}
|
|
879
910
|
});
|
|
@@ -914,7 +945,7 @@ export default createComponent({
|
|
|
914
945
|
}
|
|
915
946
|
},
|
|
916
947
|
renderCertificates: function renderCertificates() {
|
|
917
|
-
var
|
|
948
|
+
var _this10 = this;
|
|
918
949
|
var h = this.$createElement;
|
|
919
950
|
if (this.mediaList && this.mediaList.length) {
|
|
920
951
|
var media = this.mediaList[0];
|
|
@@ -924,8 +955,8 @@ export default createComponent({
|
|
|
924
955
|
"on": {
|
|
925
956
|
"click": function click(event) {
|
|
926
957
|
event.stopPropagation();
|
|
927
|
-
|
|
928
|
-
|
|
958
|
+
_this10.onDelete(media, 0);
|
|
959
|
+
_this10.mediaPick(MediaType.PHOTO, MediaAddType.PICK);
|
|
929
960
|
}
|
|
930
961
|
}
|
|
931
962
|
}, [h(ReUploadIcon, {
|
|
@@ -943,7 +974,7 @@ export default createComponent({
|
|
|
943
974
|
"click": function click(event) {
|
|
944
975
|
event.stopPropagation();
|
|
945
976
|
// 证件照模式只有一张图片
|
|
946
|
-
|
|
977
|
+
_this10.previewMedia(media, 0);
|
|
947
978
|
}
|
|
948
979
|
}
|
|
949
980
|
}, [reUpload]);
|
|
@@ -1078,7 +1109,7 @@ export default createComponent({
|
|
|
1078
1109
|
}
|
|
1079
1110
|
},
|
|
1080
1111
|
renderMediaList: function renderMediaList() {
|
|
1081
|
-
var
|
|
1112
|
+
var _this11 = this;
|
|
1082
1113
|
var h = this.$createElement;
|
|
1083
1114
|
return this.mediaList.map(function (media, index) {
|
|
1084
1115
|
var showDelete = media.deletable && media.status !== MediaUploadStatus.UPLOADING;
|
|
@@ -1087,7 +1118,7 @@ export default createComponent({
|
|
|
1087
1118
|
"on": {
|
|
1088
1119
|
"click": function click(event) {
|
|
1089
1120
|
event.stopPropagation();
|
|
1090
|
-
|
|
1121
|
+
_this11.onDelete(media, index);
|
|
1091
1122
|
}
|
|
1092
1123
|
}
|
|
1093
1124
|
});
|
|
@@ -1096,10 +1127,10 @@ export default createComponent({
|
|
|
1096
1127
|
"on": {
|
|
1097
1128
|
"click": function click(event) {
|
|
1098
1129
|
event.stopPropagation();
|
|
1099
|
-
|
|
1130
|
+
_this11.previewMedia(media, index);
|
|
1100
1131
|
}
|
|
1101
1132
|
}
|
|
1102
|
-
}, [
|
|
1133
|
+
}, [_this11.renderMediaBox(media), _this11.genThumbnailMask(media), deleteIcon]);
|
|
1103
1134
|
});
|
|
1104
1135
|
},
|
|
1105
1136
|
selectAction: function selectAction(action) {
|
|
@@ -1108,7 +1139,7 @@ export default createComponent({
|
|
|
1108
1139
|
}
|
|
1109
1140
|
},
|
|
1110
1141
|
render: function render() {
|
|
1111
|
-
var
|
|
1142
|
+
var _this12 = this;
|
|
1112
1143
|
var h = arguments[0];
|
|
1113
1144
|
var title = this.showTitle && h("div", {
|
|
1114
1145
|
"class": bem('title')
|
|
@@ -1121,9 +1152,9 @@ export default createComponent({
|
|
|
1121
1152
|
"mediaUrl": this.mediaUrlToPlay
|
|
1122
1153
|
}, this.mediaPlayerProps),
|
|
1123
1154
|
"model": {
|
|
1124
|
-
value:
|
|
1155
|
+
value: _this12.mediaPlayerVisible,
|
|
1125
1156
|
callback: function callback($$v) {
|
|
1126
|
-
|
|
1157
|
+
_this12.mediaPlayerVisible = $$v;
|
|
1127
1158
|
}
|
|
1128
1159
|
}
|
|
1129
1160
|
}), h(ZtActionSheet, {
|
|
@@ -1137,9 +1168,9 @@ export default createComponent({
|
|
|
1137
1168
|
"select": this.selectAction
|
|
1138
1169
|
},
|
|
1139
1170
|
"model": {
|
|
1140
|
-
value:
|
|
1171
|
+
value: _this12.actionVisible,
|
|
1141
1172
|
callback: function callback($$v) {
|
|
1142
|
-
|
|
1173
|
+
_this12.actionVisible = $$v;
|
|
1143
1174
|
}
|
|
1144
1175
|
}
|
|
1145
1176
|
}), this.pickerMode === "certificate" ? h("div", {
|
|
@@ -1150,9 +1181,10 @@ export default createComponent({
|
|
|
1150
1181
|
}, [this.renderCertificates()]) : h("div", {
|
|
1151
1182
|
"class": bem('line')
|
|
1152
1183
|
}, [this.renderButtons(), this.slots('extend')]), h(ZtGrid, {
|
|
1184
|
+
"ref": "grid",
|
|
1153
1185
|
"directives": [{
|
|
1154
1186
|
name: "show",
|
|
1155
|
-
value: this.
|
|
1187
|
+
value: this.showPreview
|
|
1156
1188
|
}],
|
|
1157
1189
|
"attrs": {
|
|
1158
1190
|
"column-num": '3',
|
|
@@ -24,7 +24,8 @@ export default createComponent({
|
|
|
24
24
|
closeOnClickOverlay: {
|
|
25
25
|
type: Boolean,
|
|
26
26
|
default: true
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
|
+
type: String
|
|
28
29
|
}),
|
|
29
30
|
data: function data() {
|
|
30
31
|
return {
|
|
@@ -94,6 +95,10 @@ export default createComponent({
|
|
|
94
95
|
_this2.mediaRecorder.ondataavailable = function (event) {
|
|
95
96
|
if (event.data && event.data.size > 0) {
|
|
96
97
|
_this2.recordedBlobs.push(event.data);
|
|
98
|
+
if (_this2.type === "raw") {
|
|
99
|
+
_this2.$emit("change", _this2.recordedBlobs);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
97
102
|
var blob = new Blob(_this2.recordedBlobs, {
|
|
98
103
|
type: "audio/wav"
|
|
99
104
|
});
|
|
@@ -117,12 +122,14 @@ export default createComponent({
|
|
|
117
122
|
this.mediaRecorder = undefined;
|
|
118
123
|
},
|
|
119
124
|
onTouchstart: function onTouchstart() {
|
|
125
|
+
this.$emit("onTouchstart");
|
|
120
126
|
this.isPlaying = true;
|
|
121
127
|
this.startRecording();
|
|
122
128
|
},
|
|
123
129
|
onTouchend: function onTouchend() {
|
|
124
130
|
this.isPlaying = false;
|
|
125
131
|
this.stopRecording();
|
|
132
|
+
this.$emit("onTouchend");
|
|
126
133
|
},
|
|
127
134
|
onInput: function onInput(value) {
|
|
128
135
|
this.$emit('update:value', value);
|
package/lib/index.js
CHANGED
|
@@ -161,7 +161,7 @@ var _toast = _interopRequireDefault(require("./toast"));
|
|
|
161
161
|
exports.Toast = _toast.default;
|
|
162
162
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
|
163
163
|
exports.Uploader = _uploader.default;
|
|
164
|
-
var version = exports.version = '2.1.
|
|
164
|
+
var version = exports.version = '2.1.21';
|
|
165
165
|
function install(Vue) {
|
|
166
166
|
var components = [_actionSheet.default, _area.default, _avatar.default, _backTop.default, _badge.default, _button.default, _calendar.default, _cascader.default, _cell.default, _cellGroup.default, _checkbox.default, _checkboxGroup.default, _col.default, _collapse.default, _collapseItem.default, _countDown.default, _datetimePicker.default, _dialog.default, _divider.default, _dropdownItem.default, _dropdownMenu.default, _empty.default, _field.default, _foldDialog.default, _form.default, _grid.default, _gridItem.default, _hierarchySelect.default, _icon.default, _image.default, _imagePreview.default, _indexAnchor.default, _indexBar.default, _info.default, _lazyload.default, _list.default, _loading.default, _locale.default, _mediaPicker.default, _mediaPlayer.default, _multiplePicker.default, _navBar.default, _noticeBar.default, _numberKeyboard.default, _overlay.default, _passwordInput.default, _picker.default, _popover.default, _popup.default, _pullRefresh.default, _radio.default, _radioGroup.default, _rate.default, _row.default, _search.default, _signature.default, _skeleton.default, _slider.default, _speechRecognizer.default, _step.default, _stepper.default, _steps.default, _sticky.default, _swipe.default, _swipeCell.default, _swipeItem.default, _switch.default, _switchCell.default, _tab.default, _tabbar.default, _tabbarItem.default, _table.default, _tabs.default, _tag.default, _textEllipsis.default, _timeline.default, _toast.default, _uploader.default];
|
|
167
167
|
components.forEach(function (item) {
|