@web-utils/component 2.0.9 → 2.0.11
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/dist/chunks/3d28cc08.js +57 -0
- package/dist/chunks/{41a066be.js → 44b78389.js} +8 -8
- package/dist/chunks/5d33812d.js +147 -0
- package/dist/chunks/{61ad06b2.js → 822300f3.js} +3 -3
- package/dist/chunks/9d848bf6.js +99 -0
- package/dist/chunks/a0bb327b.js +96 -0
- package/dist/chunks/a8891d2c.js +30 -0
- package/dist/chunks/c69d5628.js +248 -0
- package/dist/chunks/de9fe802.js +24 -0
- package/dist/chunks/{5a78e0db.js → e1939731.js} +6 -5
- package/dist/components/address-input/index.js +56 -43
- package/dist/components/address-input/style.css +15 -1
- package/dist/components/aside-menu/index.js +36 -30
- package/dist/components/aside-menu/style.css +9 -1
- package/dist/components/awesome-button/index.js +35 -32
- package/dist/components/base.css +66 -1
- package/dist/components/capsule-tab/index.js +33 -27
- package/dist/components/capsule-tab/style.css +32 -1
- package/dist/components/chunk-file-uploader/index.js +88 -54
- package/dist/components/chunk-file-uploader/style.css +4 -1
- package/dist/components/chunk-file-uploader-button/index.js +31 -25
- package/dist/components/chunk-file-uploader-button/style.css +17 -1
- package/dist/components/chunk-file-uploader-drop/index.js +42 -28
- package/dist/components/chunk-file-uploader-drop/style.css +12 -1
- package/dist/components/chunk-file-uploader-file/index.js +212 -134
- package/dist/components/chunk-file-uploader-file/style.css +125 -1
- package/dist/components/chunk-file-uploader-files/index.js +34 -28
- package/dist/components/chunk-file-uploader-files/style.css +9 -1
- package/dist/components/chunk-file-uploader-list/index.js +35 -29
- package/dist/components/chunk-file-uploader-list/style.css +9 -1
- package/dist/components/chunk-file-uploader-un-support/index.js +38 -30
- package/dist/components/chunk-file-uploader-un-support/style.css +6 -1
- package/dist/components/code-mirror-editor/index.js +181 -153
- package/dist/components/code-mirror-editor/style.css +17 -1
- package/dist/components/color-picker/index.js +68 -49
- package/dist/components/confirm-button/index.js +21 -19
- package/dist/components/confirmable/index.js +19 -18
- package/dist/components/context-menu/index.js +130 -108
- package/dist/components/context-menu/style.css +88 -1
- package/dist/components/custom-scrollbar/index.js +67 -49
- package/dist/components/data-table-picker/index.js +81 -62
- package/dist/components/dynamic-table/index.js +113 -89
- package/dist/components/dynamic-table/style.css +30 -1
- package/dist/components/e-charts/index.js +201 -120
- package/dist/components/e-charts/style.css +10 -1
- package/dist/components/editable-progress/index.js +93 -60
- package/dist/components/editable-progress/style.css +37 -1
- package/dist/components/editable-tree/index.js +638 -423
- package/dist/components/editable-tree/style.css +82 -1
- package/dist/components/egd-collapse/index.js +46 -33
- package/dist/components/egd-collapse-item/index.js +76 -60
- package/dist/components/element-dialog/index.js +147 -95
- package/dist/components/element-dialog/style.css +102 -1
- package/dist/components/empty-view/index.js +34 -28
- package/dist/components/empty-view/style.css +17 -1
- package/dist/components/error-view/index.js +32 -26
- package/dist/components/error-view/style.css +17 -1
- package/dist/components/flex-column/index.js +40 -25
- package/dist/components/flex-item/index.js +57 -29
- package/dist/components/flex-row/index.js +40 -25
- package/dist/components/flex-scroller/index.js +32 -26
- package/dist/components/flex-scroller/style.css +20 -1
- package/dist/components/form-button/index.js +38 -34
- package/dist/components/form-cascader/index.js +81 -71
- package/dist/components/form-checkbox-group/index.js +113 -88
- package/dist/components/form-checkbox-group/style.css +51 -1
- package/dist/components/form-date-picker/index.js +132 -70
- package/dist/components/form-holder/index.js +39 -32
- package/dist/components/form-input/index.js +62 -56
- package/dist/components/form-input-email/index.js +60 -48
- package/dist/components/form-input-id-card/index.js +59 -53
- package/dist/components/form-input-number/index.js +68 -61
- package/dist/components/form-input-number/style.css +12 -1
- package/dist/components/form-input-phone-number/index.js +55 -49
- package/dist/components/form-input-time/index.js +59 -53
- package/dist/components/form-item/index.js +123 -80
- package/dist/components/form-item/style.css +11 -1
- package/dist/components/form-item-config-provider/index.js +26 -25
- package/dist/components/form-item-group/index.js +111 -85
- package/dist/components/form-item-group/style.css +30 -1
- package/dist/components/form-radio-group/index.js +104 -85
- package/dist/components/form-radio-group/style.css +53 -1
- package/dist/components/form-select/index.js +91 -76
- package/dist/components/form-switch/index.js +57 -51
- package/dist/components/form-textarea/index.js +57 -51
- package/dist/components/form-view/index.js +232 -165
- package/dist/components/form-view/style.css +158 -1
- package/dist/components/guide-steps/index.js +58 -44
- package/dist/components/guide-steps/style.css +34 -1
- package/dist/components/icon-card/index.js +35 -29
- package/dist/components/icon-card/style.css +56 -1
- package/dist/components/iframe-window/index.js +35 -29
- package/dist/components/iframe-window/style.css +20 -1
- package/dist/components/image-viewer/index.js +66 -48
- package/dist/components/image-viewer/style.css +21 -1
- package/dist/components/input-number/index.js +193 -127
- package/dist/components/input-number/style.css +15 -1
- package/dist/components/input-number-range/index.js +57 -45
- package/dist/components/input-number-range/style.css +12 -1
- package/dist/components/j-s-x-component/index.js +4 -4
- package/dist/components/keep-view-alive/index.js +120 -73
- package/dist/components/loading-view/index.js +32 -26
- package/dist/components/loading-view/style.css +17 -1
- package/dist/components/nav-bar/index.js +37 -27
- package/dist/components/nav-bar/style.css +17 -1
- package/dist/components/not-implement/index.js +31 -23
- package/dist/components/not-implement/style.css +15 -1
- package/dist/components/page/index.js +28 -22
- package/dist/components/page/style.css +12 -1
- package/dist/components/page-header/index.js +36 -30
- package/dist/components/page-header/style.css +14 -1
- package/dist/components/page-index/index.js +83 -62
- package/dist/components/page-index/style.css +23 -1
- package/dist/components/page-index-top/index.js +68 -53
- package/dist/components/page-skeleton/index.js +37 -31
- package/dist/components/page-skeleton/style.css +23 -1
- package/dist/components/page-skeleton-new/index.js +48 -42
- package/dist/components/page-skeleton-new/style.css +42 -1
- package/dist/components/pageable-table/index.js +253 -186
- package/dist/components/pageable-table/style.css +72 -1
- package/dist/components/pageable-view/index.js +199 -129
- package/dist/components/pageable-view/style.css +69 -1
- package/dist/components/photo-swipe/index.js +151 -110
- package/dist/components/photo-swipe/style.css +20 -1
- package/dist/components/resize-observer/index.js +68 -34
- package/dist/components/resize-observer/style.css +31 -1
- package/dist/components/search-popover/index.js +211 -153
- package/dist/components/search-popover/style.css +93 -1
- package/dist/components/sign-panel/index.js +142 -92
- package/dist/components/sign-panel/style.css +97 -1
- package/dist/components/split-pane/index.js +162 -101
- package/dist/components/split-pane/style.css +100 -1
- package/dist/components/stateful/index.js +34 -31
- package/dist/components/stateful/style.css +33 -1
- package/dist/components/static-pageable-table/index.js +44 -37
- package/dist/components/static-pageable-table/style.css +9 -1
- package/dist/components/swiper/index.js +150 -85
- package/dist/components/swiper/style.css +43 -1
- package/dist/components/tab/index.js +72 -54
- package/dist/components/tab/style.css +122 -1
- package/dist/components/tab-item/index.js +35 -30
- package/dist/components/table-column/index.js +32 -30
- package/dist/components/table-view/index.js +227 -156
- package/dist/components/table-view/style.css +95 -1
- package/dist/components/tag-render/index.js +58 -44
- package/dist/components/tag-render/style.css +33 -1
- package/dist/components/tinymce-editor/index.js +95 -79
- package/dist/components/tinymce-editor/style.css +43 -1
- package/dist/components/tinymce-wrapper/index.js +121 -92
- package/dist/components/tinymce-wrapper/style.css +36 -1
- package/dist/components/toolbar/index.js +84 -63
- package/dist/components/toolbar/style.css +39 -1
- package/dist/components/toolbar-button/index.js +48 -41
- package/dist/components/toolbar-button/style.css +21 -1
- package/dist/components/trigger/index.js +36 -29
- package/dist/components/vue-tags-input/index.js +308 -188
- package/dist/components/vue-tags-input/style.css +682 -1
- package/dist/components/watermark/index.js +37 -25
- package/dist/components/watermark/style.css +11 -1
- package/dist/components/x-dialog/index.js +93 -67
- package/dist/components/x-dialog/style.css +15 -1
- package/dist/index.css +1105 -193
- package/dist/index.es.js +7242 -4789
- package/package.json +2 -1
- package/web-types.json +1 -1
- package/dist/chunks/3a79781b.js +0 -75
- package/dist/chunks/5d4282fb.js +0 -30
- package/dist/chunks/76680a03.js +0 -24
- package/dist/chunks/8c0142e0.js +0 -81
- package/dist/chunks/97652d86.js +0 -26
- package/dist/chunks/b4acd3a6.js +0 -126
- package/dist/chunks/f71045fc.js +0 -184
|
@@ -1,33 +1,37 @@
|
|
|
1
|
-
import { chunk
|
|
2
|
-
import { n as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
1
|
+
import { chunk } from "lodash";
|
|
2
|
+
import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
|
|
3
|
+
var render = function() {
|
|
4
|
+
var _vm = this;
|
|
5
|
+
var _h = _vm.$createElement;
|
|
6
|
+
var _c = _vm._self._c || _h;
|
|
7
|
+
return _c("div", {
|
|
6
8
|
staticClass: "static-pageable-table"
|
|
7
|
-
}, [
|
|
9
|
+
}, [_c("ElTable", _vm._g(_vm._b({
|
|
8
10
|
attrs: {
|
|
9
|
-
size: "mini",
|
|
10
|
-
data:
|
|
11
|
+
"size": "mini",
|
|
12
|
+
"data": _vm.records
|
|
11
13
|
}
|
|
12
|
-
}, "ElTable",
|
|
13
|
-
return [
|
|
14
|
-
})], 2),
|
|
14
|
+
}, "ElTable", _vm.$attrs, false), _vm.$listeners), [_vm._t("default", function() {
|
|
15
|
+
return [_vm._v("请添加表格列")];
|
|
16
|
+
})], 2), _c("ElPagination", {
|
|
15
17
|
attrs: {
|
|
16
|
-
"current-page":
|
|
17
|
-
"hide-on-single-page":
|
|
18
|
-
"page-size":
|
|
19
|
-
total:
|
|
20
|
-
background: "",
|
|
21
|
-
layout: "total, prev, pager, next"
|
|
18
|
+
"current-page": _vm.page.page,
|
|
19
|
+
"hide-on-single-page": true,
|
|
20
|
+
"page-size": _vm.page.limit,
|
|
21
|
+
"total": _vm.page.total,
|
|
22
|
+
"background": "",
|
|
23
|
+
"layout": "total, prev, pager, next"
|
|
22
24
|
},
|
|
23
25
|
on: {
|
|
24
|
-
"current-change": function(
|
|
25
|
-
|
|
26
|
+
"current-change": function(curPage) {
|
|
27
|
+
_vm.page.page = curPage;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
})], 1);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
+
};
|
|
32
|
+
var staticRenderFns = [];
|
|
33
|
+
const StaticPageableTable_vue_vue_type_style_index_0_lang = "";
|
|
34
|
+
const __vue2_script = {
|
|
31
35
|
name: "StaticPageableTable",
|
|
32
36
|
props: {
|
|
33
37
|
rows: {
|
|
@@ -58,35 +62,38 @@ const c = {
|
|
|
58
62
|
this.page.page = 1;
|
|
59
63
|
},
|
|
60
64
|
observer: {
|
|
61
|
-
immediate:
|
|
65
|
+
immediate: true,
|
|
62
66
|
handler() {
|
|
63
|
-
this.page.total = this.rows.length
|
|
67
|
+
this.page.total = this.rows.length;
|
|
68
|
+
this.fetchData();
|
|
64
69
|
}
|
|
65
70
|
}
|
|
66
71
|
},
|
|
67
72
|
methods: {
|
|
68
73
|
fetchData() {
|
|
69
|
-
this.records =
|
|
74
|
+
this.records = chunk(this.rows, this.page.limit)[this.page.page - 1];
|
|
70
75
|
}
|
|
71
76
|
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
};
|
|
78
|
+
const __cssModules = {};
|
|
79
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
80
|
+
__vue2_script,
|
|
81
|
+
render,
|
|
82
|
+
staticRenderFns,
|
|
83
|
+
false,
|
|
84
|
+
__vue2_injectStyles,
|
|
79
85
|
null,
|
|
80
86
|
null,
|
|
81
87
|
null
|
|
82
88
|
);
|
|
83
|
-
function
|
|
84
|
-
for (let
|
|
85
|
-
this[
|
|
89
|
+
function __vue2_injectStyles(context) {
|
|
90
|
+
for (let o in __cssModules) {
|
|
91
|
+
this[o] = __cssModules[o];
|
|
92
|
+
}
|
|
86
93
|
}
|
|
87
|
-
const
|
|
88
|
-
return
|
|
94
|
+
const StaticPageableTable = /* @__PURE__ */ function() {
|
|
95
|
+
return __component__.exports;
|
|
89
96
|
}();
|
|
90
97
|
export {
|
|
91
|
-
|
|
98
|
+
StaticPageableTable as default
|
|
92
99
|
};
|
|
@@ -1,55 +1,61 @@
|
|
|
1
|
-
import { getEleWidth
|
|
2
|
-
import { n as
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
1
|
+
import { getEleWidth } from "@web-utils/core";
|
|
2
|
+
import { n as normalizeComponent } from "../../chunks/3d28cc08.js";
|
|
3
|
+
var render = function() {
|
|
4
|
+
var _vm = this;
|
|
5
|
+
var _h = _vm.$createElement;
|
|
6
|
+
var _c = _vm._self._c || _h;
|
|
7
|
+
return _c("div", {
|
|
6
8
|
staticClass: "egd-swiper"
|
|
7
|
-
}, [
|
|
9
|
+
}, [_c("ElButton", {
|
|
8
10
|
staticClass: "el-carousel__arrow el-carousel__arrow--left",
|
|
9
11
|
attrs: {
|
|
10
|
-
disabled:
|
|
11
|
-
icon: "el-icon-arrow-left"
|
|
12
|
+
"disabled": _vm.reachedLeft,
|
|
13
|
+
"icon": "el-icon-arrow-left"
|
|
12
14
|
},
|
|
13
15
|
on: {
|
|
14
|
-
click:
|
|
16
|
+
"click": _vm.clickLeft
|
|
15
17
|
}
|
|
16
|
-
}),
|
|
18
|
+
}), _c("div", {
|
|
17
19
|
ref: "swiperBox",
|
|
18
20
|
staticClass: "egd-swiper-box",
|
|
19
21
|
on: {
|
|
20
|
-
wheel: function(
|
|
21
|
-
|
|
22
|
+
"wheel": function($event) {
|
|
23
|
+
$event.stopPropagation();
|
|
24
|
+
$event.preventDefault();
|
|
25
|
+
return _vm.onMouseWheel.apply(null, arguments);
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
|
-
}, [
|
|
28
|
+
}, [_c("div", {
|
|
25
29
|
ref: "swiperContent",
|
|
26
30
|
staticClass: "egd-swiper-content",
|
|
27
|
-
style:
|
|
28
|
-
}, [
|
|
31
|
+
style: _vm.swiperContentStyle
|
|
32
|
+
}, [_vm._t("default")], 2)]), _c("ElButton", {
|
|
29
33
|
staticClass: "el-carousel__arrow el-carousel__arrow--right",
|
|
30
34
|
attrs: {
|
|
31
|
-
disabled:
|
|
32
|
-
icon: "el-icon-arrow-right"
|
|
35
|
+
"disabled": _vm.reachedRight,
|
|
36
|
+
"icon": "el-icon-arrow-right"
|
|
33
37
|
},
|
|
34
38
|
on: {
|
|
35
|
-
click:
|
|
39
|
+
"click": _vm.clickRight
|
|
36
40
|
}
|
|
37
|
-
}),
|
|
41
|
+
}), _c("ResizeObserver", {
|
|
38
42
|
on: {
|
|
39
|
-
notify:
|
|
43
|
+
"notify": _vm.resize
|
|
40
44
|
}
|
|
41
45
|
})], 1);
|
|
42
|
-
}
|
|
43
|
-
|
|
46
|
+
};
|
|
47
|
+
var staticRenderFns = [];
|
|
48
|
+
const Swiper_vue_vue_type_style_index_0_lang = "";
|
|
49
|
+
const __vue2_script = {
|
|
44
50
|
name: "Swiper",
|
|
45
51
|
data() {
|
|
46
52
|
return {
|
|
47
|
-
mouseDown:
|
|
53
|
+
mouseDown: false,
|
|
48
54
|
swiperBoxWith: 0,
|
|
49
55
|
swiperContentWidth: 0,
|
|
50
56
|
translateX: 0,
|
|
51
|
-
reachedLeft:
|
|
52
|
-
reachedRight:
|
|
57
|
+
reachedLeft: true,
|
|
58
|
+
reachedRight: false,
|
|
53
59
|
childrenWidth: [],
|
|
54
60
|
swiperContentStyle: {
|
|
55
61
|
transitionDuration: "0ms",
|
|
@@ -65,94 +71,153 @@ const d = {
|
|
|
65
71
|
},
|
|
66
72
|
methods: {
|
|
67
73
|
async layout() {
|
|
68
|
-
await this.$nextTick()
|
|
74
|
+
await this.$nextTick();
|
|
75
|
+
this.computeContentWidth();
|
|
76
|
+
this.resize();
|
|
69
77
|
},
|
|
70
78
|
resize() {
|
|
71
|
-
console.log(1)
|
|
79
|
+
console.log(1);
|
|
80
|
+
this.swiperBoxWith = this.$refs.swiperBox.offsetWidth;
|
|
72
81
|
},
|
|
73
82
|
computeContentWidth() {
|
|
74
|
-
let
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
let width = 0;
|
|
84
|
+
const childrenWidth = [];
|
|
85
|
+
const { children } = this.$refs.swiperContent;
|
|
86
|
+
Array.prototype.forEach.call(children, (el) => {
|
|
87
|
+
const cw = getEleWidth(el);
|
|
88
|
+
width += cw;
|
|
89
|
+
childrenWidth.push(cw);
|
|
90
|
+
});
|
|
91
|
+
this.childrenWidth = childrenWidth;
|
|
92
|
+
this.swiperContentWidth = width;
|
|
80
93
|
},
|
|
81
|
-
updateDuration(
|
|
82
|
-
this.swiperContentStyle.transitionDuration =
|
|
94
|
+
updateDuration(use) {
|
|
95
|
+
this.swiperContentStyle.transitionDuration = use ? "300ms" : "0ms";
|
|
83
96
|
},
|
|
84
|
-
setTranslateX(
|
|
85
|
-
|
|
97
|
+
setTranslateX(translateX) {
|
|
98
|
+
if (this.swiperContentWidth <= this.swiperBoxWith) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (translateX > 0) {
|
|
102
|
+
this.translateX = 0;
|
|
103
|
+
this.reachedLeft = true;
|
|
104
|
+
this.reachedRight = false;
|
|
105
|
+
} else if (translateX - this.swiperBoxWith < -this.swiperContentWidth) {
|
|
106
|
+
this.translateX = -this.swiperContentWidth + this.swiperBoxWith;
|
|
107
|
+
this.reachedLeft = false;
|
|
108
|
+
this.reachedRight = true;
|
|
109
|
+
} else {
|
|
110
|
+
this.translateX = translateX;
|
|
111
|
+
this.reachedLeft = false;
|
|
112
|
+
this.reachedRight = false;
|
|
113
|
+
}
|
|
114
|
+
this.swiperContentStyle.transform = `translate3d(${this.translateX}px, 0px, 0px)`;
|
|
86
115
|
},
|
|
87
116
|
clickLeft() {
|
|
88
|
-
this.updateDuration(
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
117
|
+
this.updateDuration(true);
|
|
118
|
+
let translateX = this.translateX + this.swiperBoxWith;
|
|
119
|
+
let width = translateX;
|
|
120
|
+
if (translateX < 0) {
|
|
121
|
+
width = 0;
|
|
122
|
+
translateX = -translateX;
|
|
123
|
+
for (let i = 0, len = this.childrenWidth.length; i < len; i++) {
|
|
124
|
+
width += this.childrenWidth[i];
|
|
125
|
+
if (width >= translateX) {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
width = -width;
|
|
95
130
|
}
|
|
96
|
-
this.setTranslateX(
|
|
131
|
+
this.setTranslateX(width);
|
|
97
132
|
},
|
|
98
133
|
clickRight() {
|
|
99
|
-
this.updateDuration(
|
|
100
|
-
const
|
|
101
|
-
let
|
|
102
|
-
for (let
|
|
103
|
-
|
|
104
|
-
|
|
134
|
+
this.updateDuration(true);
|
|
135
|
+
const translateX = Math.abs(this.translateX - this.swiperBoxWith);
|
|
136
|
+
let width = 0;
|
|
137
|
+
for (let i = 0, len = this.childrenWidth.length; i < len; i++) {
|
|
138
|
+
width += this.childrenWidth[i];
|
|
139
|
+
if (width >= translateX) {
|
|
140
|
+
if (width > translateX) {
|
|
141
|
+
width -= this.childrenWidth[i];
|
|
142
|
+
}
|
|
105
143
|
break;
|
|
106
144
|
}
|
|
107
|
-
|
|
145
|
+
}
|
|
146
|
+
this.setTranslateX(-width);
|
|
108
147
|
},
|
|
109
|
-
onMouseWheel(
|
|
110
|
-
this.updateDuration(
|
|
148
|
+
onMouseWheel(e) {
|
|
149
|
+
this.updateDuration(true);
|
|
150
|
+
if (e.deltaMode === WheelEvent.DOM_DELTA_LINE) {
|
|
151
|
+
this.setTranslateX(this.translateX - e.deltaY * 30);
|
|
152
|
+
} else if (e.deltaMode === WheelEvent.DOM_DELTA_PAGE) {
|
|
153
|
+
if (e.deltaY > 0) {
|
|
154
|
+
this.clickRight();
|
|
155
|
+
} else {
|
|
156
|
+
this.clickLeft();
|
|
157
|
+
}
|
|
158
|
+
} else {
|
|
159
|
+
this.setTranslateX(this.translateX - e.deltaY);
|
|
160
|
+
}
|
|
111
161
|
},
|
|
112
|
-
onMouseDown(
|
|
113
|
-
this.mouseDown =
|
|
162
|
+
onMouseDown(e) {
|
|
163
|
+
this.mouseDown = true;
|
|
164
|
+
this.startX = e.clientX;
|
|
165
|
+
this.translateXRaw = this.translateX;
|
|
166
|
+
window.addEventListener("mousemove", this.onMouseMove, { passive: false });
|
|
167
|
+
window.addEventListener("mouseup", this.onMouseUp, { passive: false });
|
|
114
168
|
},
|
|
115
|
-
onMouseUp(
|
|
116
|
-
this.mouseDown =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
169
|
+
onMouseUp(e) {
|
|
170
|
+
this.mouseDown = false;
|
|
171
|
+
this.updateDuration(true);
|
|
172
|
+
this.$refs.swiperContent.addEventListener("transitionend", this.transitionend);
|
|
173
|
+
this.$refs.swiperContent.addEventListener("webkitTransitionEnd", this.transitionend);
|
|
174
|
+
const t = e.clientX - this.startX;
|
|
175
|
+
if (t < 0) {
|
|
176
|
+
const translateX = this.translateX + t;
|
|
177
|
+
this.setTranslateX(translateX);
|
|
121
178
|
}
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
124
|
-
this.setTranslateX(
|
|
179
|
+
if (t > 0) {
|
|
180
|
+
const translateX = this.translateX + t;
|
|
181
|
+
this.setTranslateX(translateX);
|
|
125
182
|
}
|
|
126
|
-
window.removeEventListener("mousemove", this.onMouseMove)
|
|
183
|
+
window.removeEventListener("mousemove", this.onMouseMove);
|
|
184
|
+
window.removeEventListener("mouseup", this.onMouseUp);
|
|
127
185
|
},
|
|
128
|
-
onMouseMove(
|
|
129
|
-
this.mouseDown
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
186
|
+
onMouseMove(e) {
|
|
187
|
+
if (this.mouseDown) {
|
|
188
|
+
requestAnimationFrame(() => {
|
|
189
|
+
const disX = e.clientX - this.startX;
|
|
190
|
+
const translateX = this.translateXRaw + disX;
|
|
191
|
+
this.setTranslateX(translateX);
|
|
192
|
+
});
|
|
193
|
+
}
|
|
133
194
|
},
|
|
134
195
|
transitionend() {
|
|
135
|
-
this.updateDuration(
|
|
196
|
+
this.updateDuration(false);
|
|
197
|
+
this.$refs.swiperContent.removeEventListener("transitionend", this.transitionend);
|
|
198
|
+
this.$refs.swiperContent.removeEventListener("webkitTransitionEnd", this.transitionend);
|
|
136
199
|
}
|
|
137
200
|
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
201
|
+
};
|
|
202
|
+
const __cssModules = {};
|
|
203
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(
|
|
204
|
+
__vue2_script,
|
|
205
|
+
render,
|
|
206
|
+
staticRenderFns,
|
|
207
|
+
false,
|
|
208
|
+
__vue2_injectStyles,
|
|
145
209
|
null,
|
|
146
210
|
null,
|
|
147
211
|
null
|
|
148
212
|
);
|
|
149
|
-
function
|
|
150
|
-
for (let
|
|
151
|
-
this[
|
|
213
|
+
function __vue2_injectStyles(context) {
|
|
214
|
+
for (let o in __cssModules) {
|
|
215
|
+
this[o] = __cssModules[o];
|
|
216
|
+
}
|
|
152
217
|
}
|
|
153
|
-
const
|
|
154
|
-
return
|
|
218
|
+
const Swiper = /* @__PURE__ */ function() {
|
|
219
|
+
return __component__.exports;
|
|
155
220
|
}();
|
|
156
221
|
export {
|
|
157
|
-
|
|
222
|
+
Swiper as default
|
|
158
223
|
};
|
|
@@ -1 +1,43 @@
|
|
|
1
|
-
|
|
1
|
+
/* 全局公共颜色配置 */ /* 全局公共尺寸配置 */
|
|
2
|
+
/* 应用头部高度 */
|
|
3
|
+
/* 页面宽度 */
|
|
4
|
+
/* 侧栏宽度 */
|
|
5
|
+
/* 标签高度 */
|
|
6
|
+
/* 页面头部工具条高度 */
|
|
7
|
+
.egd-swiper {
|
|
8
|
+
position: relative;
|
|
9
|
+
height: 100%;
|
|
10
|
+
padding: 0 60px;
|
|
11
|
+
}
|
|
12
|
+
.egd-swiper .el-button.el-carousel__arrow {
|
|
13
|
+
padding: 0;
|
|
14
|
+
color: #fff;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
background-color: rgba(31, 45, 61, 0.11);
|
|
17
|
+
border-color: rgba(31, 45, 61, 0.01);
|
|
18
|
+
border-radius: 50%;
|
|
19
|
+
}
|
|
20
|
+
.egd-swiper .el-button.el-carousel__arrow i {
|
|
21
|
+
cursor: unset;
|
|
22
|
+
}
|
|
23
|
+
.egd-swiper .el-button.el-carousel__arrow.is-disabled {
|
|
24
|
+
color: white;
|
|
25
|
+
background-color: rgba(31, 45, 61, 0.11);
|
|
26
|
+
border-color: rgba(31, 45, 61, 0.01);
|
|
27
|
+
}
|
|
28
|
+
.egd-swiper .egd-swiper-box {
|
|
29
|
+
height: 100%;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
user-select: none;
|
|
32
|
+
}
|
|
33
|
+
.egd-swiper .egd-swiper-box .egd-swiper-content {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
flex-wrap: nowrap;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
padding-top: 14px;
|
|
40
|
+
overflow: visible;
|
|
41
|
+
transform: translate3d(0, 0, 0);
|
|
42
|
+
transition-property: transform;
|
|
43
|
+
}
|