zartui 2.0.44 → 2.0.46
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/image/ReUpload.js +23 -0
- package/es/media-picker/index.css +1 -1
- package/es/media-picker/index.js +21 -8
- package/es/media-picker/index.less +23 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/media-picker/image/ReUpload.js +28 -0
- package/lib/media-picker/index.css +1 -1
- package/lib/media-picker/index.js +22 -8
- package/lib/media-picker/index.less +23 -0
- package/lib/zart.js +46 -9
- 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.46';
|
|
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];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
methods: {
|
|
3
|
+
onClick: function onClick(event) {
|
|
4
|
+
this.$emit('click', event);
|
|
5
|
+
}
|
|
6
|
+
},
|
|
7
|
+
render: function render() {
|
|
8
|
+
var h = arguments[0];
|
|
9
|
+
return h("svg", {
|
|
10
|
+
"attrs": {
|
|
11
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
12
|
+
"viewBox": "0 0 16 16"
|
|
13
|
+
},
|
|
14
|
+
"class": "design-iconfont"
|
|
15
|
+
}, [h("path", {
|
|
16
|
+
"attrs": {
|
|
17
|
+
"d": "M14,8.53848797 C13.8600005,9.24848809 13.6597642,9.88661678 13.3980387,10.4515597 C12.4989844,12.3774172 10.9640137,13.3878317 8.79171409,13.4815745 C7.76180434,13.523946 6.7895106,13.3827174 5.87349329,13.0578745 L5.87349329,13.0450459 L5.46780789,14.0465032 C5.38929753,14.1838747 5.30161403,14.277589 5.2061261,14.328989 C5.11056536,14.3803604 5.02029009,14.4034318 4.93783383,14.399589 C4.85537757,14.3957461 4.77163998,14.3739033 4.68918371,14.3354033 C4.60675657,14.2968747 4.54915513,14.2673604 4.51905852,14.2455175 C4.48897647,14.2237032 4.46409253,14.2044318 4.44708583,14.1877461 L2.39258093,10.7596884 C2.34022127,10.6659455 2.31015378,10.5761169 2.30098065,10.4900597 C2.29180752,10.4040312 2.29703475,10.3321454 2.314056,10.2718026 C2.33107726,10.2114597 2.36249888,10.1562311 2.4056854,10.104874 L2.40568532,10.1048741 C2.44496103,10.058011 2.48879084,10.0150085 2.53655533,9.97647403 C2.57974186,9.94183117 2.62815561,9.91230259 2.6805007,9.88660259 C2.73283124,9.86091687 2.7681842,9.84551687 2.78517633,9.84165972 C2.80218303,9.83783115 2.81525838,9.83143115 2.82441695,9.82241686 L6.41003406,8.88514527 C6.60240774,8.84277384 6.7542158,8.83121669 6.86805,8.85307384 C6.98189876,8.87487384 7.07480948,8.90057385 7.14940306,8.93007385 C7.22399664,8.95961671 7.27634173,9.01098815 7.30643834,9.08415959 C7.33653495,9.15734532 7.35616254,9.21895962 7.36533567,9.27033105 C7.37447968,9.32170249 7.37447968,9.3820025 7.36533567,9.45005966 C7.35616254,9.51807395 7.34831442,9.56301682 7.3391704,9.58490254 C7.32999727,9.60670254 7.32608049,9.62078826 7.32608049,9.62983112 L6.90731974,10.6312884 C7.64930963,10.8970456 8.34940888,11.0614028 9.00764662,11.1255742 C9.6658698,11.18976 10.22728,11.1743885 10.6891836,11.0806314 C11.15116,10.9868885 11.5816711,10.8328313 11.9781834,10.6184313 C12.3746957,10.404017 12.6887808,10.1921598 12.9203805,9.98288832 C13.1520094,9.77360257 13.3587689,9.5425311 13.5419694,9.2895882 C13.7251409,9.03667387 13.8403146,8.8633167 13.8887284,8.7696024 C13.9371858,8.67588809 13.9738201,8.59887379 14,8.53848797 L14,8.53848797 Z M2,7.22890203 C2.19234456,6.39051617 2.46194728,5.6535589 2.81134168,5.02054451 C3.81502792,3.24872991 5.40631878,2.38468691 7.58779148,2.42702977 C8.55616845,2.44372977 9.43686192,2.61064409 10.2311823,2.927787 L10.6630184,1.93914397 C10.7245076,1.84542967 10.7899571,1.76967251 10.8593235,1.71444393 C10.9286753,1.65922964 10.9941103,1.62458678 11.0555994,1.61177249 L11.0555993,1.6117725 C11.1179682,1.59866354 11.1822088,1.59648235 11.2453521,1.60532961 C11.310758,1.61431533 11.367049,1.6284439 11.4154773,1.65025819 C11.4638911,1.67207248 11.511038,1.69777249 11.5594372,1.72728678 C11.6078364,1.75681535 11.6353267,1.7760725 11.6444853,1.7850725 L11.683755,1.82360108 L13.6597641,5.29015882 C13.7029943,5.39287313 13.7291305,5.48660171 13.7383036,5.57264458 C13.7474476,5.65867317 13.7422204,5.7305589 13.7251991,5.79090177 C13.708207,5.85123035 13.6754749,5.90645893 13.6270757,5.95781608 C13.5786329,6.00914466 13.53284,6.05024467 13.4896826,6.07977324 L13.4896826,6.07977322 C13.4437954,6.11094694 13.3956796,6.13883808 13.3457086,6.16323023 L13.241033,6.21460167 C13.2240408,6.22355881 13.2109509,6.22743024 13.2017923,6.22743024 L9.59002452,7.07483039 C9.34529118,7.10951611 9.14901528,7.10437325 9.00115313,7.06200182 C8.85327642,7.01961609 8.75646347,6.96185894 8.71324783,6.88867321 C8.67006131,6.81548749 8.64779826,6.72818747 8.64779826,6.62547317 C8.64779826,6.52275887 8.6517296,6.44958742 8.66093186,6.40723027 C8.67006131,6.36484455 8.68313666,6.33020169 8.70018704,6.30451597 L9.14514218,5.31587294 C8.41231086,5.03343004 7.71481794,4.85367286 7.05135297,4.77664428 C6.387888,4.69961569 5.82777365,4.69961569 5.36977228,4.77664428 C4.91177091,4.85365858 4.47994936,4.99488717 4.07422028,5.20035864 C3.66854944,5.40575867 3.34795576,5.61118728 3.11241011,5.81663017 C2.87684991,6.02208735 2.66353819,6.24930168 2.47117907,6.49710172 C2.27880539,6.74490176 2.15712307,6.91694465 2.10476341,7.01067324 C2.05234551,7.10437325 2.01700711,7.17757326 2,7.22890203 L2,7.22890203 Z",
|
|
18
|
+
"fill": "#FFF",
|
|
19
|
+
"fill-rule": "nonzero"
|
|
20
|
+
}
|
|
21
|
+
})]);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt2-media-picker__hidden{display:none}.zt2-media-picker__title{position:relative;height:44px;line-height:44px;font-weight:700;font-size:16px;color:#2d4b73;padding:0 16px}.zt2-media-picker__title::before{position:absolute;width:4px;height:16px;background:#0091fa;left:0;top:14px;content:' '}.zt2-media-picker__title::after{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)}.zt2-media-picker__line{width:100%;height:92px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow-x:auto}.zt2-media-picker__line::-webkit-scrollbar{width:0;height:0}.zt2-media-picker__line::after{content:' ';min-width:16px;height:10px}.zt2-media-picker__box{width:48px;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-media-picker__box:first-child{margin-left:16px}.zt2-media-picker__box:not(:last-child){margin-right:24px}.zt2-media-picker__button{width:48px;height:48px;background-image:-webkit-linear-gradient(315deg,#e6ebf0 0,#fff 100%,#fff 100%);background-image:linear-gradient(135deg,#e6ebf0 0,#fff 100%,#fff 100%);box-shadow:-4px -4px 8px 0 #fff,4px 4px 8px 0 rgba(45,75,115,.1);border-radius:8px}.zt2-media-picker__label{margin-top:8px;font-size:12px;opacity:.8;color:#2d4b73;letter-spacing:0;text-align:center;line-height:16px}.zt2-media-picker__grid{padding:0 16px 8px 16px!important}.zt2-media-picker__delete{box-sizing:border-box;width:28px;height:28px;position:absolute;padding:4px;top:0;right:0}.zt2-media-picker .zt2-image{width:100%;height:100%}.zt2-media-picker .zt2-grid-item__content{padding:0}.zt2-media-picker__thumbnail{width:100%;height:100%}.zt2-media-picker__mask{position:absolute;top:0;right:0;bottom:0;left:0;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;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;color:#fff;background-color:rgba(50,50,51,.88);border-radius:4px}.zt2-media-picker__mask-icon{font-size:22px}.zt2-media-picker__mask-message{margin-top:6px;padding:0 4px;font-size:12px;line-height:14px}.zt2-media-picker__loading{width:22px;height:22px;color:#fff}.zt2-media-picker__certificate{width:300px;height:200px;display:block;margin:24px auto;padding:10px;background-size:100%;background-repeat:no-repeat;background-position:center}.zt2-media-picker__certificate-back{width:100%;height:100%;background-size:100%;background-repeat:no-repeat;background-position:center;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-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-media-picker__certificate-button{background-size:100%;background-repeat:no-repeat;background-position:center;width:100px;height:100px}.zt2-media-picker__certificate-text{font-size:16px;color:#2d4b73;letter-spacing:0;text-align:center;line-height:24px}
|
|
1
|
+
.zt2-media-picker__hidden{display:none}.zt2-media-picker__title{position:relative;height:44px;line-height:44px;font-weight:700;font-size:16px;color:#2d4b73;padding:0 16px}.zt2-media-picker__title::before{position:absolute;width:4px;height:16px;background:#0091fa;left:0;top:14px;content:' '}.zt2-media-picker__title::after{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)}.zt2-media-picker__line{width:100%;height:92px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;overflow-x:auto}.zt2-media-picker__line::-webkit-scrollbar{width:0;height:0}.zt2-media-picker__line::after{content:' ';min-width:16px;height:10px}.zt2-media-picker__box{width:48px;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-media-picker__box:first-child{margin-left:16px}.zt2-media-picker__box:not(:last-child){margin-right:24px}.zt2-media-picker__button{width:48px;height:48px;background-image:-webkit-linear-gradient(315deg,#e6ebf0 0,#fff 100%,#fff 100%);background-image:linear-gradient(135deg,#e6ebf0 0,#fff 100%,#fff 100%);box-shadow:-4px -4px 8px 0 #fff,4px 4px 8px 0 rgba(45,75,115,.1);border-radius:8px}.zt2-media-picker__label{margin-top:8px;font-size:12px;opacity:.8;color:#2d4b73;letter-spacing:0;text-align:center;line-height:16px}.zt2-media-picker__grid{padding:0 16px 8px 16px!important}.zt2-media-picker__delete{box-sizing:border-box;width:28px;height:28px;position:absolute;padding:4px;top:0;right:0}.zt2-media-picker .zt2-image{width:100%;height:100%}.zt2-media-picker .zt2-grid-item__content{padding:0}.zt2-media-picker__thumbnail{width:100%;height:100%}.zt2-media-picker__mask{position:absolute;top:0;right:0;bottom:0;left:0;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;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;color:#fff;background-color:rgba(50,50,51,.88);border-radius:4px}.zt2-media-picker__mask-icon{font-size:22px}.zt2-media-picker__mask-message{margin-top:6px;padding:0 4px;font-size:12px;line-height:14px}.zt2-media-picker__loading{width:22px;height:22px;color:#fff}.zt2-media-picker__certificate{width:300px;height:200px;display:block;margin:24px auto;padding:10px;background-size:100%;background-repeat:no-repeat;background-position:center}.zt2-media-picker__certificate-back{width:100%;height:100%;background-size:100%;background-repeat:no-repeat;background-position:center;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-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.zt2-media-picker__certificate-button{background-size:100%;background-repeat:no-repeat;background-position:center;width:100px;height:100px}.zt2-media-picker__certificate-text{font-size:16px;color:#2d4b73;letter-spacing:0;text-align:center;line-height:24px}.zt2-media-picker__reUpload{position:absolute;bottom:0;left:0;width:100%;height:40px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;background:rgba(45,75,115,.6);border-radius:0 0 4px 4px}.zt2-media-picker__reUpload-icon{width:16px;height:16px;margin-right:4px}.zt2-media-picker__reUpload-text{font-size:14px;color:#fff;line-height:40px}
|
package/es/media-picker/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import TakeVideoIcon from "./image/TakeVideoIcon";
|
|
|
20
20
|
import TakeAudioIcon from "./image/TakeAudioIcon";
|
|
21
21
|
import PickFileIcon from "./image/PickFileIcon";
|
|
22
22
|
import DeleteIcon from "./image/DeleteIcon";
|
|
23
|
+
import ReUploadIcon from "./image/ReUpload";
|
|
23
24
|
import DefaultVideoIcon from "./image/DefaultVideoIcon";
|
|
24
25
|
import DefaultAudioIcon from "./image/DefaultAudioIcon";
|
|
25
26
|
import DefaultFileIcon from "./image/DefaultFileIcon";
|
|
@@ -156,7 +157,11 @@ export default createComponent({
|
|
|
156
157
|
// 文件读取前的回调函数,返回 false 可终止文件读取,支持返回 Promise
|
|
157
158
|
beforeRead: Function,
|
|
158
159
|
// 文件删除前的回调函数,返回 false 可终止文件读取,支持返回 Promise
|
|
159
|
-
beforeDelete: Function
|
|
160
|
+
beforeDelete: Function,
|
|
161
|
+
reUploadText: {
|
|
162
|
+
type: String,
|
|
163
|
+
default: '重新拍摄'
|
|
164
|
+
}
|
|
160
165
|
},
|
|
161
166
|
model: {
|
|
162
167
|
prop: 'mediaList'
|
|
@@ -646,7 +651,7 @@ export default createComponent({
|
|
|
646
651
|
|
|
647
652
|
this.mediaPlayerVisible = true;
|
|
648
653
|
}
|
|
649
|
-
} else
|
|
654
|
+
} else {
|
|
650
655
|
Toast('暂不支持此类文件的预览');
|
|
651
656
|
}
|
|
652
657
|
},
|
|
@@ -864,16 +869,22 @@ export default createComponent({
|
|
|
864
869
|
if (this.mediaList && this.mediaList.length) {
|
|
865
870
|
var media = this.mediaList[0];
|
|
866
871
|
var showDelete = media.deletable && media.status !== MediaUploadStatus.UPLOADING;
|
|
867
|
-
var
|
|
868
|
-
"class": bem('
|
|
872
|
+
var reUpload = showDelete && h("div", {
|
|
873
|
+
"class": bem('reUpload'),
|
|
869
874
|
"on": {
|
|
870
875
|
"click": function click(event) {
|
|
871
876
|
event.stopPropagation();
|
|
872
877
|
|
|
873
878
|
_this8.onDelete(media, 0);
|
|
879
|
+
|
|
880
|
+
_this8.mediaPick(MediaType.PHOTO, MediaAddType.PICK);
|
|
874
881
|
}
|
|
875
882
|
}
|
|
876
|
-
}
|
|
883
|
+
}, [h(ReUploadIcon, {
|
|
884
|
+
"class": bem('reUpload-icon')
|
|
885
|
+
}), h("span", {
|
|
886
|
+
"class": bem('reUpload-text')
|
|
887
|
+
}, [this.reUploadText])]);
|
|
877
888
|
return h(ZtImage, {
|
|
878
889
|
"attrs": {
|
|
879
890
|
"src": this.mediaList[0].showSrc,
|
|
@@ -881,11 +892,13 @@ export default createComponent({
|
|
|
881
892
|
"radius": '4'
|
|
882
893
|
},
|
|
883
894
|
"on": {
|
|
884
|
-
"click": function click() {
|
|
885
|
-
|
|
895
|
+
"click": function click(event) {
|
|
896
|
+
event.stopPropagation(); // 证件照模式只有一张图片
|
|
897
|
+
|
|
898
|
+
_this8.previewMedia(media, 0);
|
|
886
899
|
}
|
|
887
900
|
}
|
|
888
|
-
}, [
|
|
901
|
+
}, [reUpload]);
|
|
889
902
|
} else {
|
|
890
903
|
return h("div", {
|
|
891
904
|
"class": bem('certificate-back'),
|
|
@@ -183,5 +183,28 @@
|
|
|
183
183
|
line-height: @uploader-certificate-text-line-height;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
+
&__reUpload {
|
|
187
|
+
position: absolute;
|
|
188
|
+
bottom: 0;
|
|
189
|
+
left: 0;
|
|
190
|
+
width: 100%;
|
|
191
|
+
height: 40px;
|
|
192
|
+
display: flex;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
align-items: center;
|
|
195
|
+
background: rgba(45, 75, 115, 0.6);
|
|
196
|
+
border-radius: 0 0 4px 4px;
|
|
186
197
|
|
|
198
|
+
&-icon {
|
|
199
|
+
width: 16px;
|
|
200
|
+
height: 16px;
|
|
201
|
+
margin-right: 4px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&-text {
|
|
205
|
+
font-size: 14px;
|
|
206
|
+
color: #fff;
|
|
207
|
+
line-height: 40px;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
187
210
|
}
|