zartui 1.0.2 → 2.0.2
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/action-sheet/index.css +1 -1
- package/es/action-sheet/index.js +3 -3
- package/es/action-sheet/index.less +12 -8
- package/es/area/style/index.js +1 -0
- package/es/area/style/less.js +1 -0
- package/es/avatar/index.css +1 -1
- package/es/button/index.css +1 -1
- package/es/button/index.js +28 -13
- package/es/button/index.less +60 -27
- package/es/calendar/components/Header.js +1 -6
- package/es/calendar/index.css +1 -1
- package/es/calendar/index.js +31 -8
- package/es/calendar/index.less +16 -10
- package/es/cell/index.css +1 -1
- package/es/cell/index.js +62 -40
- package/es/cell/index.less +67 -12
- package/es/cell/shared.js +2 -0
- package/es/checkbox/index.css +1 -1
- package/es/checkbox/index.less +18 -15
- package/es/checkbox-group/index.js +1 -0
- package/es/datetime-picker/style/index.js +1 -0
- package/es/datetime-picker/style/less.js +1 -0
- package/es/field/index.css +1 -1
- package/es/field/index.js +94 -9
- package/es/field/index.less +81 -11
- package/es/hierarchy-select/hierarchySelect.js +1 -8
- package/es/hierarchy-select/index.css +1 -1
- package/es/hierarchy-select/index.js +6 -14
- package/es/hierarchy-select/index.less +4 -5
- package/es/hierarchy-select/markList.js +1 -16
- package/es/icon/index.css +1 -1
- package/es/image/index.css +1 -1
- package/es/image-preview/ImagePreview.js +1 -1
- package/es/image-preview/index.css +1 -1
- package/es/image-preview/index.less +4 -2
- package/es/index.js +3 -4
- package/es/loading/index.css +1 -1
- package/es/loading/index.js +3 -3
- package/es/loading/index.less +1 -1
- package/es/media-picker/image/PickFileIcon.js +2 -9
- package/es/media-picker/image/PickPhotoIcon.js +2 -9
- package/es/media-picker/image/TakeAudioIcon.js +2 -9
- package/es/media-picker/image/TakePhotoIcon.js +2 -9
- package/es/media-picker/image/TakeVideoIcon.js +2 -9
- package/es/media-picker/index.css +1 -1
- package/es/media-picker/index.js +22 -17
- package/es/media-picker/index.less +6 -4
- package/es/media-picker/style/index.js +4 -0
- package/es/media-picker/style/less.js +4 -0
- package/es/mixins/checkbox.js +12 -30
- package/es/multiple-picker/index.css +1 -1
- package/es/multiple-picker/index.js +18 -11
- package/es/multiple-picker/index.less +11 -7
- package/es/multiple-picker/style/index.js +1 -0
- package/es/multiple-picker/style/less.js +1 -0
- package/es/pdf-viewer/style/index.js +1 -0
- package/es/pdf-viewer/style/less.js +1 -0
- package/es/picker/index.css +1 -1
- package/es/picker/index.js +18 -9
- package/es/picker/index.less +18 -2
- package/es/picker/style/index.js +1 -0
- package/es/picker/style/less.js +1 -0
- package/es/popup/index.css +1 -1
- package/es/popup/index.js +120 -49
- package/es/popup/index.less +31 -2
- package/es/radio/index.css +1 -1
- package/es/radio/index.less +24 -29
- package/es/radio-group/index.js +1 -0
- package/es/search/index.css +1 -1
- package/es/search/index.js +1 -1
- package/es/search/index.less +31 -3
- package/es/signature/index.js +7 -6
- package/es/signature/index.less +1 -1
- package/es/step/index.css +1 -1
- package/es/step/index.js +3 -5
- package/es/step/index.less +3 -1
- package/es/stepper/index.css +1 -1
- package/es/steps/index.css +1 -1
- package/es/steps/index.less +3 -3
- package/es/style/reset.css +1 -1
- package/es/style/var.less +106 -62
- package/es/switch-cell/index.css +1 -1
- package/es/tabs/Title.js +6 -1
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.js +2 -4
- package/es/tabs/index.less +18 -15
- package/es/toast/index.css +1 -1
- package/es/uploader/index.css +1 -1
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.js +3 -3
- package/lib/action-sheet/index.less +12 -8
- package/lib/area/style/index.js +1 -0
- package/lib/area/style/less.js +1 -0
- package/lib/avatar/index.css +1 -1
- package/lib/button/index.css +1 -1
- package/lib/button/index.js +28 -13
- package/lib/button/index.less +60 -27
- package/lib/calendar/components/Header.js +1 -6
- package/lib/calendar/index.css +1 -1
- package/lib/calendar/index.js +31 -8
- package/lib/calendar/index.less +16 -10
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.js +62 -40
- package/lib/cell/index.less +67 -12
- package/lib/cell/shared.js +2 -0
- package/lib/checkbox/index.css +1 -1
- package/lib/checkbox/index.less +18 -15
- package/lib/checkbox-group/index.js +1 -0
- package/lib/datetime-picker/style/index.js +1 -0
- package/lib/datetime-picker/style/less.js +1 -0
- package/lib/field/index.css +1 -1
- package/lib/field/index.js +94 -9
- package/lib/field/index.less +81 -11
- package/lib/hierarchy-select/hierarchySelect.js +1 -8
- package/lib/hierarchy-select/index.css +1 -1
- package/lib/hierarchy-select/index.js +6 -15
- package/lib/hierarchy-select/index.less +4 -5
- package/lib/hierarchy-select/markList.js +1 -16
- package/lib/icon/index.css +1 -1
- package/lib/image/index.css +1 -1
- package/lib/image-preview/ImagePreview.js +1 -1
- package/lib/image-preview/index.css +1 -1
- package/lib/image-preview/index.less +4 -2
- package/lib/index.css +1 -1
- package/lib/index.js +2 -6
- package/lib/index.less +3 -4
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.js +3 -3
- package/lib/loading/index.less +1 -1
- package/lib/media-picker/image/PickFileIcon.js +2 -9
- package/lib/media-picker/image/PickPhotoIcon.js +2 -9
- package/lib/media-picker/image/TakeAudioIcon.js +2 -9
- package/lib/media-picker/image/TakePhotoIcon.js +2 -9
- package/lib/media-picker/image/TakeVideoIcon.js +2 -9
- package/lib/media-picker/index.css +1 -1
- package/lib/media-picker/index.js +22 -11
- package/lib/media-picker/index.less +6 -4
- package/lib/media-picker/style/index.js +4 -0
- package/lib/media-picker/style/less.js +4 -0
- package/lib/mixins/checkbox.js +12 -30
- package/lib/multiple-picker/index.css +1 -1
- package/lib/multiple-picker/index.js +19 -11
- package/lib/multiple-picker/index.less +11 -7
- package/lib/multiple-picker/style/index.js +1 -0
- package/lib/multiple-picker/style/less.js +1 -0
- package/lib/pdf-viewer/style/index.js +1 -0
- package/lib/pdf-viewer/style/less.js +1 -0
- package/lib/picker/index.css +1 -1
- package/lib/picker/index.js +19 -9
- package/lib/picker/index.less +18 -2
- package/lib/picker/style/index.js +1 -0
- package/lib/picker/style/less.js +1 -0
- package/lib/popup/index.css +1 -1
- package/lib/popup/index.js +120 -49
- package/lib/popup/index.less +31 -2
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.less +24 -29
- package/lib/radio-group/index.js +1 -0
- package/lib/search/index.css +1 -1
- package/lib/search/index.js +1 -1
- package/lib/search/index.less +31 -3
- package/lib/signature/index.js +7 -6
- package/lib/signature/index.less +1 -1
- package/lib/step/index.css +1 -1
- package/lib/step/index.js +3 -5
- package/lib/step/index.less +3 -1
- package/lib/stepper/index.css +1 -1
- package/lib/steps/index.css +1 -1
- package/lib/steps/index.less +3 -3
- package/lib/style/reset.css +1 -1
- package/lib/style/var.less +106 -62
- package/lib/switch-cell/index.css +1 -1
- package/lib/tabs/Title.js +6 -1
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.js +2 -4
- package/lib/tabs/index.less +18 -15
- package/lib/toast/index.css +1 -1
- package/lib/uploader/index.css +1 -1
- package/lib/zart.js +1199 -2181
- package/lib/zart.min.js +4 -4
- package/package.json +5 -6
- package/es/pdf-viewer-v2/index.css +0 -1
- package/es/pdf-viewer-v2/index.js +0 -231
- package/es/pdf-viewer-v2/index.less +0 -40
- package/es/pdf-viewer-v2/style/index.js +0 -8
- package/es/pdf-viewer-v2/style/less.js +0 -8
- package/lib/pdf-viewer-v2/index.css +0 -1
- package/lib/pdf-viewer-v2/index.js +0 -242
- package/lib/pdf-viewer-v2/index.less +0 -40
- package/lib/pdf-viewer-v2/style/index.js +0 -8
- package/lib/pdf-viewer-v2/style/less.js +0 -8
package/lib/index.js
CHANGED
|
@@ -194,10 +194,6 @@ var _pdfViewer = _interopRequireDefault(require("./pdf-viewer"));
|
|
|
194
194
|
|
|
195
195
|
exports.PdfViewer = _pdfViewer.default;
|
|
196
196
|
|
|
197
|
-
var _pdfViewerV = _interopRequireDefault(require("./pdf-viewer-v2"));
|
|
198
|
-
|
|
199
|
-
exports.PdfViewerV2 = _pdfViewerV.default;
|
|
200
|
-
|
|
201
197
|
var _picker = _interopRequireDefault(require("./picker"));
|
|
202
198
|
|
|
203
199
|
exports.Picker = _picker.default;
|
|
@@ -317,11 +313,11 @@ exports.Toast = _toast.default;
|
|
|
317
313
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
|
318
314
|
|
|
319
315
|
exports.Uploader = _uploader.default;
|
|
320
|
-
var version = '
|
|
316
|
+
var version = '2.0.2';
|
|
321
317
|
exports.version = version;
|
|
322
318
|
|
|
323
319
|
function install(Vue) {
|
|
324
|
-
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, _pdfViewer.default,
|
|
320
|
+
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, _pdfViewer.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, _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, _timeline.default, _toast.default, _uploader.default];
|
|
325
321
|
components.forEach(function (item) {
|
|
326
322
|
if (item.install) {
|
|
327
323
|
Vue.use(item);
|
package/lib/index.less
CHANGED
|
@@ -26,12 +26,11 @@
|
|
|
26
26
|
@import "./switch-cell/index.less";
|
|
27
27
|
@import "./pull-refresh/index.less";
|
|
28
28
|
@import "./number-keyboard/index.less";
|
|
29
|
-
@import "./multiple-picker/index.less";
|
|
30
29
|
@import "./toast/index.less";
|
|
31
|
-
@import "./pdf-viewer-v2/index.less";
|
|
32
30
|
@import "./hierarchy-select/index.less";
|
|
33
31
|
@import "./button/index.less";
|
|
34
32
|
@import "./signature/index.less";
|
|
33
|
+
@import "./multiple-picker/index.less";
|
|
35
34
|
@import "./dialog/index.less";
|
|
36
35
|
@import "./calendar/index.less";
|
|
37
36
|
@import "./picker/index.less";
|
|
@@ -57,10 +56,10 @@
|
|
|
57
56
|
@import "./swipe-item/index.less";
|
|
58
57
|
@import "./image-preview/index.less";
|
|
59
58
|
@import "./uploader/index.less";
|
|
60
|
-
@import "./media-picker/index.less";
|
|
61
|
-
@import "./media-player/index.less";
|
|
62
59
|
@import "./index-anchor/index.less";
|
|
63
60
|
@import "./index-bar/index.less";
|
|
61
|
+
@import "./media-picker/index.less";
|
|
62
|
+
@import "./media-player/index.less";
|
|
64
63
|
@import "./password-input/index.less";
|
|
65
64
|
@import "./radio-group/index.less";
|
|
66
65
|
@import "./row/index.less";
|
package/lib/loading/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-loading{position:relative;color
|
|
1
|
+
.zt-loading{position:relative;color:rgba(45,75,115,.4);font-size:0;vertical-align:middle}.zt-loading__spinner{position:relative;display:inline-block;width:36px;max-width:100%;height:36px;max-height:100%;vertical-align:middle;-webkit-animation:zt-rotate .7s linear infinite;animation:zt-rotate .7s linear infinite}.zt-loading__spinner--spinner{-webkit-animation-timing-function:steps(12);animation-timing-function:steps(12)}.zt-loading__spinner--spinner i{position:absolute;top:0;left:0;width:100%;height:100%}.zt-loading__spinner--spinner i::before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:' '}.zt-loading__spinner--circular{-webkit-animation-duration:2s;animation-duration:2s}.zt-loading__circular{display:block;width:100%;height:100%}.zt-loading__circular circle{-webkit-animation:zt-circular 1.5s ease-in-out infinite;animation:zt-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.zt-loading__snake{display:block;width:100%;height:100%}.zt-loading__text{display:inline-block;margin-left:4px;color:rgba(45,75,115,.6);font-size:14px;line-height:20px;vertical-align:middle}.zt-loading--vertical{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}.zt-loading--vertical .zt-loading__text{margin:4px 0 0}.zt-loading--horizontal-with-text .zt-loading__spinner--snake{width:20px;height:20px}@-webkit-keyframes zt-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}@keyframes zt-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}100%{stroke-dasharray:90,150;stroke-dashoffset:-120}}.zt-loading__spinner--spinner i:nth-of-type(1){-webkit-transform:rotate(30deg);transform:rotate(30deg);opacity:1}.zt-loading__spinner--spinner i:nth-of-type(2){-webkit-transform:rotate(60deg);transform:rotate(60deg);opacity:.9375}.zt-loading__spinner--spinner i:nth-of-type(3){-webkit-transform:rotate(90deg);transform:rotate(90deg);opacity:.875}.zt-loading__spinner--spinner i:nth-of-type(4){-webkit-transform:rotate(120deg);transform:rotate(120deg);opacity:.8125}.zt-loading__spinner--spinner i:nth-of-type(5){-webkit-transform:rotate(150deg);transform:rotate(150deg);opacity:.75}.zt-loading__spinner--spinner i:nth-of-type(6){-webkit-transform:rotate(180deg);transform:rotate(180deg);opacity:.6875}.zt-loading__spinner--spinner i:nth-of-type(7){-webkit-transform:rotate(210deg);transform:rotate(210deg);opacity:.625}.zt-loading__spinner--spinner i:nth-of-type(8){-webkit-transform:rotate(240deg);transform:rotate(240deg);opacity:.5625}.zt-loading__spinner--spinner i:nth-of-type(9){-webkit-transform:rotate(270deg);transform:rotate(270deg);opacity:.5}.zt-loading__spinner--spinner i:nth-of-type(10){-webkit-transform:rotate(300deg);transform:rotate(300deg);opacity:.4375}.zt-loading__spinner--spinner i:nth-of-type(11){-webkit-transform:rotate(330deg);transform:rotate(330deg);opacity:.375}.zt-loading__spinner--spinner i:nth-of-type(12){-webkit-transform:rotate(360deg);transform:rotate(360deg);opacity:.3125}
|
package/lib/loading/index.js
CHANGED
|
@@ -42,7 +42,7 @@ function LoadingIcon(h, props) {
|
|
|
42
42
|
}
|
|
43
43
|
})]);
|
|
44
44
|
} else {
|
|
45
|
-
|
|
45
|
+
// 保证defs不会被重用
|
|
46
46
|
var firstHalfId = svgElementId++;
|
|
47
47
|
var secondHalfId = svgElementId++;
|
|
48
48
|
return h("svg", {
|
|
@@ -55,7 +55,7 @@ function LoadingIcon(h, props) {
|
|
|
55
55
|
}
|
|
56
56
|
}, [h("defs", [h("linearGradient", {
|
|
57
57
|
"attrs": {
|
|
58
|
-
"id": secondHalfId
|
|
58
|
+
"id": secondHalfId + ''
|
|
59
59
|
}
|
|
60
60
|
}, [h("stop", {
|
|
61
61
|
"attrs": {
|
|
@@ -71,7 +71,7 @@ function LoadingIcon(h, props) {
|
|
|
71
71
|
}
|
|
72
72
|
})]), h("linearGradient", {
|
|
73
73
|
"attrs": {
|
|
74
|
-
"id": firstHalfId
|
|
74
|
+
"id": firstHalfId + ''
|
|
75
75
|
}
|
|
76
76
|
}, [h("stop", {
|
|
77
77
|
"attrs": {
|
package/lib/loading/index.less
CHANGED
|
@@ -20,17 +20,10 @@ var _default = {
|
|
|
20
20
|
}
|
|
21
21
|
}, [h("g", {
|
|
22
22
|
"attrs": {
|
|
23
|
-
"fill": "#
|
|
23
|
+
"fill": "#2D4B73",
|
|
24
24
|
"fill-rule": "evenodd"
|
|
25
25
|
}
|
|
26
|
-
}, [h("
|
|
27
|
-
"attrs": {
|
|
28
|
-
"opacity": ".04317801",
|
|
29
|
-
"width": "48",
|
|
30
|
-
"height": "48",
|
|
31
|
-
"rx": "4"
|
|
32
|
-
}
|
|
33
|
-
}), h("path", {
|
|
26
|
+
}, [h("path", {
|
|
34
27
|
"attrs": {
|
|
35
28
|
"d": "M29,8 L29,15 C29,15.5522847 29.4477153,16 30,16 L30,16 L37,16 L37,38 C37,39.1045695 36.1045695,40 35,40 L13,40 C11.8954305,40 11,39.1045695 11,38 L11,10 C11,8.8954305 11.8954305,8 13,8 L29,8 Z M29,31 L19,31 C18.4477153,31 18,31.4477153 18,32 C18,32.5522847 18.4477153,33 19,33 L19,33 L29,33 C29.5522847,33 30,32.5522847 30,32 C30,31.4477153 29.5522847,31 29,31 L29,31 Z M24.7071068,15.7071068 C24.3165825,15.3165825 23.6834175,15.3165825 23.2928932,15.7071068 L23.2928932,15.7071068 L17.8535534,21.1464466 C17.7597852,21.2402148 17.7071068,21.3673918 17.7071068,21.5 C17.7071068,21.7761424 17.9309644,22 18.2071068,22 L18.2071068,22 L21,22 L21,28 C21,28.5522847 21.4477153,29 22,29 L22,29 L26,29 C26.5522847,29 27,28.5522847 27,28 L27,28 L27,22 L29.7928932,22 C29.9255015,22 30.0526784,21.9473216 30.1464466,21.8535534 C30.3417088,21.6582912 30.3417088,21.3417088 30.1464466,21.1464466 L30.1464466,21.1464466 Z",
|
|
36
29
|
"fill-opacity": ".8"
|
|
@@ -20,17 +20,10 @@ var _default = {
|
|
|
20
20
|
}
|
|
21
21
|
}, [h("g", {
|
|
22
22
|
"attrs": {
|
|
23
|
-
"fill": "#
|
|
23
|
+
"fill": "#2D4B73",
|
|
24
24
|
"fill-rule": "evenodd"
|
|
25
25
|
}
|
|
26
|
-
}, [h("
|
|
27
|
-
"attrs": {
|
|
28
|
-
"opacity": ".04317801",
|
|
29
|
-
"width": "48",
|
|
30
|
-
"height": "48",
|
|
31
|
-
"rx": "4"
|
|
32
|
-
}
|
|
33
|
-
}), h("path", {
|
|
26
|
+
}, [h("path", {
|
|
34
27
|
"attrs": {
|
|
35
28
|
"d": "M37.9982567,12 C39.103789,12 40,12.8970262 40,14.0049466 L40,33.9950534 C40,35.1023548 39.1107383,36 37.9982567,36 L37.764,35.999 L37.7634277,36 L10.8161621,36 L10.814,35.999 L10.0017433,36 C8.89621101,36 8,35.1029738 8,33.9950534 L8,14.0049466 C8,12.8976452 8.88926172,12 10.0017433,12 L37.9982567,12 Z M37.0034652,14 L10.9965348,14 C10.4398131,14 10,14.4440454 10,14.9918031 L10,14.9918031 L10,33.0081969 C10,33.0530776 10.0031223,33.0973902 10.0091668,33.1409155 L17.1114918,24.34032 C18.1544861,23.047797 19.8867064,22.9975446 20.9981014,24.247864 L27,31 L30.4453768,28.2436986 C31.3039715,27.5568228 32.7078383,27.5510237 33.578186,28.2285544 L37.999,31.669 L38,14.9918031 C38,14.4936268 37.6152975,14.0654579 37.1196822,14.0068326 L37.0034652,14 Z",
|
|
36
29
|
"fill-opacity": ".8"
|
|
@@ -20,17 +20,10 @@ var _default = {
|
|
|
20
20
|
}
|
|
21
21
|
}, [h("g", {
|
|
22
22
|
"attrs": {
|
|
23
|
-
"fill": "#
|
|
23
|
+
"fill": "#2D4B73",
|
|
24
24
|
"fill-rule": "evenodd"
|
|
25
25
|
}
|
|
26
|
-
}, [h("
|
|
27
|
-
"attrs": {
|
|
28
|
-
"opacity": ".04317801",
|
|
29
|
-
"width": "48",
|
|
30
|
-
"height": "48",
|
|
31
|
-
"rx": "4"
|
|
32
|
-
}
|
|
33
|
-
}), h("path", {
|
|
26
|
+
}, [h("path", {
|
|
34
27
|
"attrs": {
|
|
35
28
|
"d": "M23,35 L25,35 L25,39 L28.9975267,39 C29.5116309,39 29.9353477,39.3827202 29.9932556,39.8826674 L30,40 C30,40.5522847 29.544239,41 28.9975267,41 L19.0024733,41 C18.4488226,41 18,40.5561352 18,40 C18,39.4477153 18.455761,39 19.0024733,39 L23,39 L23,35 Z M24,7 C28.9706612,7 33,10.7806433 33,15.4055441 L33,22.5944559 C33,27.2367538 28.9605566,31 24,31 C19.0296047,31 15,27.2193567 15,22.5944559 L15,15.4055441 C15,10.7632462 19.0397093,7 24,7 Z M28.0046024,23 L19.9953976,23 C19.4556644,23 19,23.4477153 19,24 C19,24.5164112 19.3842635,24.9360179 19.8793132,24.993327 L19.9953976,25 L28.0046024,25 C28.5057832,25 28.9344762,24.6139598 28.993161,24.1166211 L29,24 L28.9933032,23.8826674 C28.935804,23.3827202 28.515078,23 28.0046024,23 Z M28.0046024,18 L19.9953976,18 C19.4556644,18 19,18.4477153 19,19 C19,19.5164112 19.3842635,19.9360179 19.8793132,19.993327 L19.9953976,20 L28.0046024,20 C28.5057832,20 28.9344762,19.6139598 28.993161,19.1166211 L29,19 L28.9933032,18.8826674 C28.935804,18.3827202 28.515078,18 28.0046024,18 Z M28.0046024,13 L19.9953976,13 C19.4556644,13 19,13.4477153 19,14 C19,14.5164112 19.3842635,14.9360179 19.8793132,14.993327 L19.9953976,15 L28.0046024,15 C28.5057832,15 28.9344762,14.6139598 28.993161,14.1166211 L29,14 L28.9933032,13.8826674 C28.935804,13.3827202 28.515078,13 28.0046024,13 Z",
|
|
36
29
|
"fill-opacity": ".8"
|
|
@@ -20,17 +20,10 @@ var _default = {
|
|
|
20
20
|
}
|
|
21
21
|
}, [h("g", {
|
|
22
22
|
"attrs": {
|
|
23
|
-
"fill": "#
|
|
23
|
+
"fill": "#2D4B73",
|
|
24
24
|
"fill-rule": "evenodd"
|
|
25
25
|
}
|
|
26
|
-
}, [h("
|
|
27
|
-
"attrs": {
|
|
28
|
-
"opacity": ".04317801",
|
|
29
|
-
"width": "48",
|
|
30
|
-
"height": "48",
|
|
31
|
-
"rx": "4"
|
|
32
|
-
}
|
|
33
|
-
}), h("path", {
|
|
26
|
+
}, [h("path", {
|
|
34
27
|
"attrs": {
|
|
35
28
|
"d": "M33.9975267,12 C34.5511774,12 35.1438351,12.4315052 35.3169059,12.9507178 L36.333,15.999 L37.9982567,16 C39.103789,16 40,16.8982124 40,17.9907951 L40,34.0092049 C40,35.1086907 39.1107383,36 37.9982567,36 L10.0017433,36 C8.89621101,36 8,35.1017876 8,34.0092049 L8,17.9907951 C8,16.8913093 8.88926172,16 10.0017433,16 L21.666,15.999 L22.6830941,12.9507178 C22.8581164,12.4256509 23.455761,12 24.0024733,12 L33.9975267,12 Z M29,19 C25.1340068,19 22,22.1340068 22,26 C22,29.8659932 25.1340068,33 29,33 C32.8659932,33 36,29.8659932 36,26 C36,22.1340068 32.8659932,19 29,19 Z M14.5,18 L14.3546371,18.0068666 C13.5897719,18.0795513 13,18.7203039 13,19.5 C13,20.3342028 13.6715729,21 14.5,21 L14.5,21 L14.6453629,20.9931334 C15.4102281,20.9204487 16,20.2796961 16,19.5 L16,19.5 L15.9931334,19.3546371 C15.9204487,18.5897719 15.2796961,18 14.5,18 L14.5,18 Z",
|
|
36
29
|
"fill-opacity": ".8"
|
|
@@ -20,17 +20,10 @@ var _default = {
|
|
|
20
20
|
}
|
|
21
21
|
}, [h("g", {
|
|
22
22
|
"attrs": {
|
|
23
|
-
"fill": "#
|
|
23
|
+
"fill": "#2D4B73",
|
|
24
24
|
"fill-rule": "evenodd"
|
|
25
25
|
}
|
|
26
|
-
}, [h("
|
|
27
|
-
"attrs": {
|
|
28
|
-
"opacity": ".04317801",
|
|
29
|
-
"width": "48",
|
|
30
|
-
"height": "48",
|
|
31
|
-
"rx": "4"
|
|
32
|
-
}
|
|
33
|
-
}), h("path", {
|
|
26
|
+
}, [h("path", {
|
|
34
27
|
"attrs": {
|
|
35
28
|
"d": "M29.9944797,11 C32.2066675,11 34,12.7924676 34,14.99923 L34,27.00077 C34,29.2094838 32.2129147,31 29.9944797,31 L12.0055203,31 C9.7933325,31 8,29.2075324 8,27.00077 L8,14.99923 C8,12.7905162 9.78708529,11 12.0055203,11 L29.9944797,11 Z M19.5047388,16.9404618 C18.6820755,16.4262972 18,16.7952661 18,17.7762766 L18,17.7762766 L18,24.2237234 C18,25.1985621 18.6736945,25.5789409 19.5047388,25.0595382 L19.5047388,25.0595382 L24.4952612,21.9404618 C25.3179245,21.4262972 25.3263055,20.5789409 24.4952612,20.0595382 L24.4952612,20.0595382 Z",
|
|
36
29
|
"fill-opacity": ".8"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-media-
|
|
1
|
+
.zt-media-picker__hidden{display:none}.zt-media-picker__title{position:relative;height:44px;line-height:44px;font-weight:700;font-size:16px;color:#2d4b73;padding:0 16px}.zt-media-picker__title::before{position:absolute;width:4px;height:16px;background:#0091fa;left:0;top:14px;content:' '}.zt-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)}.zt-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}.zt-media-picker__line::-webkit-scrollbar{width:0;height:0}.zt-media-picker__line::after{content:' ';min-width:16px;height:10px}.zt-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}.zt-media-picker__box:first-child{margin-left:16px}.zt-media-picker__box:not(:last-child){margin-right:24px}.zt-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}.zt-media-picker__label{margin-top:8px;font-size:12px;opacity:.8;color:#2d4b73;letter-spacing:0;text-align:center;line-height:16px}.zt-media-picker__grid{padding:0 16px 8px 16px!important}.zt-media-picker__delete{width:20px;height:20px;position:absolute;padding:4px;top:0;right:0}.zt-media-picker .zt-image{width:100%;height:100%}.zt-media-picker .zt-grid-item__content{padding:0}.zt-media-picker__thumbnail{width:100%;height:100%}.zt-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}.zt-media-picker__mask-icon{font-size:22px}.zt-media-picker__mask-message{margin-top:6px;padding:0 4px;font-size:12px;line-height:14px}.zt-media-picker__loading{width:22px;height:22px;color:#fff}
|
|
@@ -7,6 +7,20 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _utils = require("../utils");
|
|
9
9
|
|
|
10
|
+
var _icon = _interopRequireDefault(require("../icon"));
|
|
11
|
+
|
|
12
|
+
var _loading = _interopRequireDefault(require("../loading"));
|
|
13
|
+
|
|
14
|
+
var _image = _interopRequireDefault(require("../image"));
|
|
15
|
+
|
|
16
|
+
var _gridItem = _interopRequireDefault(require("../grid-item"));
|
|
17
|
+
|
|
18
|
+
var _mediaPlayer = _interopRequireDefault(require("../media-player"));
|
|
19
|
+
|
|
20
|
+
var _actionSheet = _interopRequireDefault(require("../action-sheet"));
|
|
21
|
+
|
|
22
|
+
var _grid = _interopRequireDefault(require("../grid"));
|
|
23
|
+
|
|
10
24
|
var _type = require("./type");
|
|
11
25
|
|
|
12
26
|
var _media = require("@egova/media");
|
|
@@ -35,19 +49,16 @@ var _DefaultFileIcon = _interopRequireDefault(require("./image/DefaultFileIcon")
|
|
|
35
49
|
|
|
36
50
|
var _mediaUtil = require("./media-util");
|
|
37
51
|
|
|
38
|
-
var _icon = _interopRequireDefault(require("../icon"));
|
|
39
|
-
|
|
40
|
-
var _loading = _interopRequireDefault(require("../loading"));
|
|
41
|
-
|
|
42
52
|
// Utils
|
|
43
53
|
// Types
|
|
54
|
+
// import components
|
|
55
|
+
// Images
|
|
44
56
|
// 单个文件最大限制,单位为M(目前限制是100M)
|
|
45
57
|
var FILE_SIZE_LIMIT = 100;
|
|
46
58
|
|
|
47
59
|
var _createNamespace = (0, _utils.createNamespace)('media-picker'),
|
|
48
60
|
createComponent = _createNamespace[0],
|
|
49
|
-
bem = _createNamespace[1];
|
|
50
|
-
|
|
61
|
+
bem = _createNamespace[1];
|
|
51
62
|
|
|
52
63
|
var _default2 = createComponent({
|
|
53
64
|
props: {
|
|
@@ -919,7 +930,7 @@ var _default2 = createComponent({
|
|
|
919
930
|
var h = this.$createElement;
|
|
920
931
|
|
|
921
932
|
if (media.showSrc) {
|
|
922
|
-
return h(
|
|
933
|
+
return h(_image.default, {
|
|
923
934
|
"attrs": {
|
|
924
935
|
"src": media.showSrc,
|
|
925
936
|
"fit": 'fill',
|
|
@@ -956,7 +967,7 @@ var _default2 = createComponent({
|
|
|
956
967
|
}
|
|
957
968
|
}
|
|
958
969
|
});
|
|
959
|
-
return h(
|
|
970
|
+
return h(_gridItem.default, {
|
|
960
971
|
"key": media.uniqueCode,
|
|
961
972
|
"on": {
|
|
962
973
|
"click": function click() {
|
|
@@ -980,7 +991,7 @@ var _default2 = createComponent({
|
|
|
980
991
|
}, [this.title]);
|
|
981
992
|
return h("div", {
|
|
982
993
|
"class": bem()
|
|
983
|
-
}, [title, this.hiddenInput(), h(
|
|
994
|
+
}, [title, this.hiddenInput(), h(_mediaPlayer.default, {
|
|
984
995
|
"attrs": {
|
|
985
996
|
"mediaType": this.mediaTypeToPlay,
|
|
986
997
|
"mediaUrl": this.mediaUrlToPlay
|
|
@@ -991,7 +1002,7 @@ var _default2 = createComponent({
|
|
|
991
1002
|
_this9.mediaPlayerVisible = $$v;
|
|
992
1003
|
}
|
|
993
1004
|
}
|
|
994
|
-
}), h(
|
|
1005
|
+
}), h(_actionSheet.default, {
|
|
995
1006
|
"attrs": {
|
|
996
1007
|
"actions": this.actionOptions,
|
|
997
1008
|
"title": '请选择',
|
|
@@ -1009,7 +1020,7 @@ var _default2 = createComponent({
|
|
|
1009
1020
|
}
|
|
1010
1021
|
}), h("div", {
|
|
1011
1022
|
"class": bem('line')
|
|
1012
|
-
}, [this.renderButtons()]), h(
|
|
1023
|
+
}, [this.renderButtons()]), h(_grid.default, {
|
|
1013
1024
|
"directives": [{
|
|
1014
1025
|
name: "show",
|
|
1015
1026
|
value: this.mediaList.length
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@import '../style/mixins/hairline';
|
|
3
3
|
|
|
4
4
|
.zt-media-picker {
|
|
5
|
-
background-color: white;
|
|
6
5
|
|
|
7
6
|
&__hidden {
|
|
8
7
|
display: none;
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
line-height: 44px;
|
|
15
14
|
font-weight: bold;
|
|
16
15
|
font-size: 16px;
|
|
17
|
-
color:
|
|
16
|
+
color: #2D4B73;
|
|
18
17
|
padding: 0 16px;
|
|
19
18
|
|
|
20
19
|
&::before {
|
|
@@ -73,13 +72,16 @@
|
|
|
73
72
|
&__button {
|
|
74
73
|
width: 48px;
|
|
75
74
|
height: 48px;
|
|
75
|
+
background-image: linear-gradient(135deg, #E6EBF0 0%, #FFF 100%, #FFF 100%);
|
|
76
|
+
box-shadow: -4px -4px 8px 0 #FFF, 4px 4px 8px 0 rgba(45,75,115,0.10);
|
|
77
|
+
border-radius: 8px;
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
&__label {
|
|
79
|
-
margin-top:
|
|
81
|
+
margin-top: 8px;
|
|
80
82
|
font-size: 12px;
|
|
81
83
|
opacity: 0.8;
|
|
82
|
-
color: #
|
|
84
|
+
color: #2D4B73;
|
|
83
85
|
letter-spacing: 0;
|
|
84
86
|
text-align: center;
|
|
85
87
|
line-height: 16px;
|
|
@@ -3,10 +3,14 @@ require('../../overlay/index.css');
|
|
|
3
3
|
require('../../info/index.css');
|
|
4
4
|
require('../../icon/index.css');
|
|
5
5
|
require('../../image/index.css');
|
|
6
|
+
require('../../grid-item/index.css');
|
|
6
7
|
require('../../popup/index.css');
|
|
7
8
|
require('../../loading/index.css');
|
|
8
9
|
require('../../toast/index.css');
|
|
10
|
+
require('../../action-sheet/index.css');
|
|
11
|
+
require('../../grid/index.css');
|
|
9
12
|
require('../../swipe/index.css');
|
|
10
13
|
require('../../swipe-item/index.css');
|
|
11
14
|
require('../../image-preview/index.css');
|
|
15
|
+
require('../../media-player/index.css');
|
|
12
16
|
require('../index.css');
|
|
@@ -3,10 +3,14 @@ require('../../overlay/index.less');
|
|
|
3
3
|
require('../../info/index.less');
|
|
4
4
|
require('../../icon/index.less');
|
|
5
5
|
require('../../image/index.less');
|
|
6
|
+
require('../../grid-item/index.less');
|
|
6
7
|
require('../../popup/index.less');
|
|
7
8
|
require('../../loading/index.less');
|
|
8
9
|
require('../../toast/index.less');
|
|
10
|
+
require('../../action-sheet/index.less');
|
|
11
|
+
require('../../grid/index.less');
|
|
9
12
|
require('../../swipe/index.less');
|
|
10
13
|
require('../../swipe-item/index.less');
|
|
11
14
|
require('../../image-preview/index.less');
|
|
15
|
+
require('../../media-player/index.less');
|
|
12
16
|
require('../index.less');
|
package/lib/mixins/checkbox.js
CHANGED
|
@@ -28,6 +28,8 @@ var CheckboxMixin = function CheckboxMixin(_ref) {
|
|
|
28
28
|
disabled: Boolean,
|
|
29
29
|
iconSize: [Number, String],
|
|
30
30
|
checkedColor: String,
|
|
31
|
+
boxShadow: String,
|
|
32
|
+
border: String,
|
|
31
33
|
iconColor: String,
|
|
32
34
|
labelPosition: String,
|
|
33
35
|
labelDisabled: Boolean,
|
|
@@ -52,12 +54,15 @@ var CheckboxMixin = function CheckboxMixin(_ref) {
|
|
|
52
54
|
},
|
|
53
55
|
iconStyle: function iconStyle() {
|
|
54
56
|
var checkedColor = this.checkedColor || this.parent && this.parent.checkedColor;
|
|
57
|
+
var boxShadow = this.boxShadow || this.parent && this.parent.boxShadow;
|
|
58
|
+
var border = this.border || this.parent && this.parent.border;
|
|
55
59
|
var iconColor = this.iconColor || this.parent && this.parent.iconColor;
|
|
56
60
|
|
|
57
|
-
if (checkedColor && this.checked && !this.isDisabled) {
|
|
61
|
+
if ((boxShadow || checkedColor) && this.checked && !this.isDisabled) {
|
|
58
62
|
return {
|
|
59
63
|
color: iconColor,
|
|
60
|
-
|
|
64
|
+
boxShadow: boxShadow,
|
|
65
|
+
border: border,
|
|
61
66
|
backgroundColor: checkedColor
|
|
62
67
|
};
|
|
63
68
|
}
|
|
@@ -104,35 +109,11 @@ var CheckboxMixin = function CheckboxMixin(_ref) {
|
|
|
104
109
|
}
|
|
105
110
|
}, [this.slots('icon', {
|
|
106
111
|
checked: checked
|
|
107
|
-
}) ||
|
|
112
|
+
}) || h(_icon.default, {
|
|
108
113
|
"attrs": {
|
|
109
|
-
"name": "
|
|
114
|
+
"name": role === 'radio' ? "radio-round" : "checkBox-select"
|
|
110
115
|
},
|
|
111
116
|
"style": this.iconStyle
|
|
112
|
-
}))]);
|
|
113
|
-
},
|
|
114
|
-
genRadioIcon: function genRadioIcon() {
|
|
115
|
-
var h = this.$createElement;
|
|
116
|
-
var iconSize = this.iconSize || this.parent && this.parent.iconSize;
|
|
117
|
-
return h("svg", {
|
|
118
|
-
"attrs": {
|
|
119
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
120
|
-
"viewBox": "0 0 24 24"
|
|
121
|
-
},
|
|
122
|
-
"class": bem("custom-svg"),
|
|
123
|
-
"style": {
|
|
124
|
-
width: iconSize,
|
|
125
|
-
height: iconSize
|
|
126
|
-
}
|
|
127
|
-
}, [h("path", {
|
|
128
|
-
"style": {
|
|
129
|
-
fill: this.checkedColor
|
|
130
|
-
},
|
|
131
|
-
"attrs": {
|
|
132
|
-
"d": "M12,2 C17.5228475,2 22,6.4771525 22,12 C22,17.5228475 17.5228475,22 12,22 C6.4771525,22 2,17.5228475 2,12 C2,6.4771525 6.4771525,2 12,2 Z M12,7 C9.23857625,7 7,9.23857625 7,12 C7,14.7614237 9.23857625,17 12,17 C14.7614237,17 17,14.7614237 17,12 C17,9.23857625 14.7614237,7 12,7 Z",
|
|
133
|
-
"fill": "#0091FA",
|
|
134
|
-
"fill-rule": "nonzero"
|
|
135
|
-
}
|
|
136
117
|
})]);
|
|
137
118
|
},
|
|
138
119
|
genLabel: function genLabel() {
|
|
@@ -158,16 +139,17 @@ var CheckboxMixin = function CheckboxMixin(_ref) {
|
|
|
158
139
|
Children.push(this.genLabel());
|
|
159
140
|
}
|
|
160
141
|
|
|
142
|
+
var checked = this.checked;
|
|
161
143
|
return h("div", {
|
|
162
144
|
"attrs": {
|
|
163
145
|
"role": role,
|
|
164
146
|
"tabindex": this.tabindex,
|
|
165
147
|
"aria-checked": String(this.checked)
|
|
166
148
|
},
|
|
167
|
-
"class": bem([{
|
|
149
|
+
"class": [bem([{
|
|
168
150
|
disabled: this.isDisabled,
|
|
169
151
|
'label-disabled': this.labelDisabled
|
|
170
|
-
}, this.direction]),
|
|
152
|
+
}, this.direction]), checked ? '' : bem('disable-icon')],
|
|
171
153
|
"on": {
|
|
172
154
|
"click": this.onClick
|
|
173
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[class*=zt-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid rgba(0,0,0,.1);-webkit-transform:scale(.5);transform:scale(.5)}.zt-hairline,.zt-hairline--bottom,.zt-hairline--left,.zt-hairline--right,.zt-hairline--surround,.zt-hairline--top,.zt-hairline--top-bottom{position:relative}.zt-hairline--top::after{border-top-width:1px}.zt-hairline--left::after{border-left-width:1px}.zt-hairline--right::after{border-right-width:1px}.zt-hairline--bottom::after{border-bottom-width:1px}.zt-hairline--top-bottom::after,.zt-hairline-unset--top-bottom::after{border-width:1px 0}.zt-hairline--surround::after{border-width:1px}.zt-multiple-picker{position:relative;background-color:#fff;-webkit-user-select:none;user-select:none}.zt-multiple-picker__toolbar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;height:44px}.zt-multiple-picker__border{position:relative}.zt-multiple-picker__border::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)}.zt-multiple-picker__cancel,.zt-multiple-picker__confirm{height:100%;padding:0 16px;font-size:
|
|
1
|
+
[class*=zt-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid rgba(0,0,0,.1);-webkit-transform:scale(.5);transform:scale(.5)}.zt-hairline,.zt-hairline--bottom,.zt-hairline--left,.zt-hairline--right,.zt-hairline--surround,.zt-hairline--top,.zt-hairline--top-bottom{position:relative}.zt-hairline--top::after{border-top-width:1px}.zt-hairline--left::after{border-left-width:1px}.zt-hairline--right::after{border-right-width:1px}.zt-hairline--bottom::after{border-bottom-width:1px}.zt-hairline--top-bottom::after,.zt-hairline-unset--top-bottom::after{border-width:1px 0}.zt-hairline--surround::after{border-width:1px}.zt-multiple-picker{position:relative;background-color:#fff;-webkit-user-select:none;user-select:none}.zt-multiple-picker__toolbar{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;height:44px;padding:8px 16px;border-top:1px solid rgba(45,75,115,.1)}.zt-multiple-picker__border{position:relative}.zt-multiple-picker__border::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)}.zt-multiple-picker__cancel,.zt-multiple-picker__confirm{height:100%;padding:0 16px;font-size:14px;background-color:transparent;border:none;cursor:pointer}.zt-multiple-picker__cancel:active,.zt-multiple-picker__confirm:active{opacity:.7}.zt-multiple-picker__confirm{color:#0091fa;font-weight:700}.zt-multiple-picker__cancel{color:#000;font-weight:400}.zt-multiple-picker__title{font-weight:400;font-size:14px;line-height:20px;text-align:center;color:#2d4b73;opacity:.4;padding:12px 0;border-bottom:1px solid rgba(45,75,115,.1)}.zt-multiple-picker__header{width:100%;height:40px;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;font-size:14px;font-weight:400}.zt-multiple-picker__header>li{-webkit-box-flex:1;-webkit-flex:auto;flex:auto;text-align:center}.zt-multiple-picker__options{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;cursor:grab}.zt-multiple-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;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;color:#0091fa;background-color:rgba(255,255,255,.9)}.zt-multiple-picker-options{-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:scroll;font-size:14px}.zt-multiple-picker-options__wrapper{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;background-color:#fff;padding:12px 16px 4px 16px}.zt-multiple-picker-options__item{color:rgba(0,0,0,.6);padding:0 4px 8px 0;box-sizing:border-box;border-radius:2px;text-align:center;font-size:14px}.zt-multiple-picker-options__item .zt-ellipsis{height:28px;line-height:28px;border:1px solid rgba(45,75,115,.2);border-radius:18px}.zt-multiple-picker-options__item--disabled{cursor:not-allowed;opacity:.3}.zt-multiple-picker-options__item--last{padding-right:0}.zt-multiple-picker-options__item--selected .zt-ellipsis{background:rgba(0,145,250,.1);border:1px solid rgba(0,145,250,.6);border-radius:18px;color:#0091fa}
|
|
@@ -23,6 +23,8 @@ var _popup2 = require("../mixins/popup");
|
|
|
23
23
|
|
|
24
24
|
var _deepClone = require("../utils/deep-clone");
|
|
25
25
|
|
|
26
|
+
var _button = _interopRequireDefault(require("../button"));
|
|
27
|
+
|
|
26
28
|
// Utils
|
|
27
29
|
// Components
|
|
28
30
|
var _createNamespace = (0, _utils.createNamespace)('multiple-picker'),
|
|
@@ -51,7 +53,7 @@ var _default2 = createComponent({
|
|
|
51
53
|
},
|
|
52
54
|
toolbarPosition: {
|
|
53
55
|
type: String,
|
|
54
|
-
default: '
|
|
56
|
+
default: 'bottom'
|
|
55
57
|
},
|
|
56
58
|
valueKey: {
|
|
57
59
|
type: String,
|
|
@@ -140,11 +142,15 @@ var _default2 = createComponent({
|
|
|
140
142
|
},
|
|
141
143
|
genCancel: function genCancel() {
|
|
142
144
|
var h = this.$createElement;
|
|
143
|
-
return h(
|
|
145
|
+
return h(_button.default, {
|
|
144
146
|
"attrs": {
|
|
145
|
-
"
|
|
147
|
+
"size": "normal",
|
|
148
|
+
"block": true
|
|
149
|
+
},
|
|
150
|
+
"style": {
|
|
151
|
+
marginRigth: "4px",
|
|
152
|
+
backgroundColor: "white"
|
|
146
153
|
},
|
|
147
|
-
"class": bem('cancel'),
|
|
148
154
|
"on": {
|
|
149
155
|
"click": this.cancel
|
|
150
156
|
}
|
|
@@ -152,11 +158,15 @@ var _default2 = createComponent({
|
|
|
152
158
|
},
|
|
153
159
|
genConfirm: function genConfirm() {
|
|
154
160
|
var h = this.$createElement;
|
|
155
|
-
return h(
|
|
161
|
+
return h(_button.default, {
|
|
156
162
|
"attrs": {
|
|
157
|
-
"type": "
|
|
163
|
+
"type": "primary",
|
|
164
|
+
"size": "normal",
|
|
165
|
+
"block": true
|
|
166
|
+
},
|
|
167
|
+
"style": {
|
|
168
|
+
marginLeft: "4px"
|
|
158
169
|
},
|
|
159
|
-
"class": bem('confirm'),
|
|
160
170
|
"on": {
|
|
161
171
|
"click": this.confirm
|
|
162
172
|
}
|
|
@@ -168,7 +178,7 @@ var _default2 = createComponent({
|
|
|
168
178
|
if (this.showToolbar) {
|
|
169
179
|
return h("div", {
|
|
170
180
|
"class": bem('toolbar')
|
|
171
|
-
}, [this.slots() || [this.genCancel(), this.
|
|
181
|
+
}, [this.slots() || [this.genCancel(), this.genConfirm()]]);
|
|
172
182
|
}
|
|
173
183
|
},
|
|
174
184
|
genOptions: function genOptions() {
|
|
@@ -240,9 +250,7 @@ var _default2 = createComponent({
|
|
|
240
250
|
}, [h("div", {
|
|
241
251
|
"class": bem(),
|
|
242
252
|
"ref": 'columnParent'
|
|
243
|
-
}, [this.
|
|
244
|
-
"class": bem('border')
|
|
245
|
-
}) : h(), this.loading ? h(_loading.default, {
|
|
253
|
+
}, [this.genTitle(), this.loading ? h(_loading.default, {
|
|
246
254
|
"class": bem('loading')
|
|
247
255
|
}) : h(), this.genOptions(), this.toolbarPosition === 'bottom' ? this.genToolbar() : h()])]);
|
|
248
256
|
}
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
align-items: center;
|
|
12
12
|
justify-content: space-between;
|
|
13
13
|
height: @picker-toolbar-height;
|
|
14
|
+
padding: 8px 16px;
|
|
15
|
+
border-top: 1px solid rgba(45,75,115,0.10);
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
&__border {
|
|
@@ -46,12 +48,14 @@
|
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
&__title {
|
|
49
|
-
max-width: 50%;
|
|
50
51
|
font-weight: @plain-font-weight;
|
|
51
52
|
font-size: @picker-title-font-size;
|
|
52
53
|
line-height: @picker-title-line-height;
|
|
53
54
|
text-align: center;
|
|
54
|
-
color:
|
|
55
|
+
color: #2D4B73;
|
|
56
|
+
opacity: 0.4;
|
|
57
|
+
padding: 12px 0;
|
|
58
|
+
border-bottom: 1px solid rgba(45,75,115,0.10);
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
&__header {
|
|
@@ -107,12 +111,12 @@
|
|
|
107
111
|
border-radius: 2px;
|
|
108
112
|
text-align: center;
|
|
109
113
|
font-size: 14px;
|
|
114
|
+
|
|
110
115
|
.zt-ellipsis {
|
|
111
116
|
height: 28px;
|
|
112
117
|
line-height: 28px;
|
|
113
|
-
|
|
114
|
-
border:
|
|
115
|
-
border-radius: 2px;
|
|
118
|
+
border: 1px solid rgba(45,75,115,0.20);
|
|
119
|
+
border-radius: 18px;
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
&--disabled {
|
|
@@ -127,8 +131,8 @@
|
|
|
127
131
|
&--selected {
|
|
128
132
|
.zt-ellipsis {
|
|
129
133
|
background: rgba(0,145,250,0.10);
|
|
130
|
-
border: 1px solid
|
|
131
|
-
border-radius:
|
|
134
|
+
border: 1px solid rgba(0,145,250,0.60);
|
|
135
|
+
border-radius: 18px;
|
|
132
136
|
color: #0091FA;
|
|
133
137
|
}
|
|
134
138
|
}
|