eoss-ui 0.6.44 → 0.6.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/lib/button-group.js +22 -17
- package/lib/button.js +24 -19
- package/lib/cascader.js +2 -2
- package/lib/checkbox-group.js +22 -17
- package/lib/config/api.js +4 -1
- package/lib/data-table-form.js +22 -17
- package/lib/data-table.js +22 -17
- package/lib/date-picker.js +24 -19
- package/lib/dialog.js +22 -17
- package/lib/enable-drag.js +830 -0
- package/lib/enterprise.js +2 -2
- package/lib/eoss-ui.common.js +2217 -961
- package/lib/error-page.js +2 -2
- package/lib/flow-group.js +24 -19
- package/lib/flow-list.js +105 -100
- package/lib/flow.js +748 -312
- package/lib/form.js +46 -49
- package/lib/handle-user.js +24 -19
- package/lib/handler.js +49 -29
- package/lib/icon.js +31 -26
- package/lib/icons.js +2 -2
- package/lib/index.js +1 -1
- package/lib/input-number.js +24 -19
- package/lib/input.js +24 -19
- package/lib/label.js +2 -2
- package/lib/login.js +22 -17
- package/lib/main.js +524 -254
- package/lib/menu.js +2 -2
- package/lib/nav.js +51 -121
- package/lib/notify.js +24 -19
- package/lib/page.js +24 -19
- package/lib/pagination.js +24 -19
- package/lib/player.js +24 -19
- package/lib/qr-code.js +37 -32
- package/lib/radio-group.js +24 -19
- package/lib/retrial-auth.js +24 -19
- package/lib/select-ganged.js +24 -19
- package/lib/select.js +24 -19
- package/lib/selector-panel.js +22 -17
- package/lib/selector.js +31 -26
- package/lib/sizer.js +24 -19
- package/lib/steps.js +24 -19
- package/lib/switch.js +31 -26
- package/lib/table-form.js +49 -24
- package/lib/tabs-panel.js +2 -2
- package/lib/tabs.js +24 -19
- package/lib/theme-chalk/enable-drag.css +1 -0
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/lib/theme-chalk/main.css +1 -1
- package/lib/theme-chalk/nav.css +1 -1
- package/lib/theme-chalk/simplicity.css +1 -1
- package/lib/tips.js +24 -19
- package/lib/toolbar.js +2 -2
- package/lib/tree-group.js +24 -19
- package/lib/tree.js +24 -19
- package/lib/upload.js +32 -26
- package/lib/wujie.js +24 -19
- package/lib/wxlogin.js +167 -162
- package/package.json +159 -159
- package/packages/button/index.js +5 -5
- package/packages/button/src/main.vue +418 -418
- package/packages/button-group/index.js +5 -5
- package/packages/button-group/src/main.vue +298 -298
- package/packages/calendar/index.js +5 -5
- package/packages/card/index.js +5 -5
- package/packages/card/src/main.vue +156 -156
- package/packages/cascader/index.js +5 -5
- package/packages/cascader/src/main.vue +168 -168
- package/packages/checkbox-group/index.js +5 -5
- package/packages/checkbox-group/src/main.vue +333 -333
- package/packages/clients/index.js +5 -5
- package/packages/clients/src/main.vue +144 -144
- package/packages/data-table/index.js +5 -5
- package/packages/data-table/src/children.vue +39 -39
- package/packages/data-table/src/column.vue +989 -989
- package/packages/data-table/src/main.vue +1822 -1822
- package/packages/data-table/src/sizer.vue +195 -195
- package/packages/data-table-form/index.js +5 -5
- package/packages/data-table-form/src/checkbox.vue +101 -101
- package/packages/data-table-form/src/colgroup.vue +17 -17
- package/packages/data-table-form/src/main.vue +181 -181
- package/packages/data-table-form/src/radio.vue +65 -65
- package/packages/data-table-form/src/table.vue +233 -233
- package/packages/data-table-form/src/tbody.vue +336 -336
- package/packages/data-table-form/src/thead.vue +68 -68
- package/packages/date-picker/index.js +5 -5
- package/packages/date-picker/src/main.vue +236 -236
- package/packages/dialog/index.js +5 -5
- package/packages/enable-drag/index.js +5 -0
- package/packages/enable-drag/src/main.vue +355 -0
- package/packages/enterprise/index.js +5 -5
- package/packages/enterprise/src/main.vue +66 -66
- package/packages/error-page/index.js +5 -5
- package/packages/error-page/src/main.vue +44 -44
- package/packages/flow/index.js +5 -5
- package/packages/flow/src/component/CommonOpinions.vue +345 -345
- package/packages/flow/src/component/CustomPreset.vue +322 -322
- package/packages/flow/src/component/FileList.vue +99 -99
- package/packages/flow/src/component/Preset.vue +255 -255
- package/packages/flow/src/component/SendMsg.vue +229 -229
- package/packages/flow/src/component/TimeLimit.vue +190 -190
- package/packages/flow/src/component/taskUnionExamine.vue +611 -611
- package/packages/flow/src/form.vue +121 -121
- package/packages/flow/src/freeStartFlow.vue +2843 -2843
- package/packages/flow/src/main.vue +2964 -2952
- package/packages/flow/src/processForm.vue +1018 -1018
- package/packages/flow/src/processReject.vue +293 -293
- package/packages/flow/src/reset.vue +899 -899
- package/packages/flow/src/startTaskRead.vue +596 -596
- package/packages/flow/src/supervise.vue +138 -0
- package/packages/flow/src/table.vue +58 -58
- package/packages/flow-group/index.js +5 -5
- package/packages/flow-group/src/main.vue +688 -688
- package/packages/flow-list/index.js +5 -5
- package/packages/flow-list/src/main.vue +1183 -1183
- package/packages/form/index.js +5 -5
- package/packages/form/src/main.vue +3583 -3584
- package/packages/form/src/table.vue +1426 -1420
- package/packages/handle-user/index.js +5 -5
- package/packages/handle-user/src/main.vue +138 -138
- package/packages/handler/index.js +5 -5
- package/packages/handler/src/main.vue +491 -474
- package/packages/icon/index.js +5 -5
- package/packages/icon/src/main.vue +101 -101
- package/packages/icons/index.js +5 -5
- package/packages/icons/src/main.vue +81 -81
- package/packages/input/index.js +5 -5
- package/packages/input/src/main.vue +356 -356
- package/packages/input-number/index.js +5 -5
- package/packages/input-number/src/main.vue +106 -106
- package/packages/label/index.js +5 -5
- package/packages/label/src/main.vue +457 -457
- package/packages/layout/index.js +5 -5
- package/packages/layout/src/item.vue +152 -152
- package/packages/layout/src/main.vue +31 -31
- package/packages/login/index.js +5 -5
- package/packages/login/src/main.vue +1935 -1935
- package/packages/login/src/resetPassword.vue +562 -562
- package/packages/main/index.js +5 -5
- package/packages/main/src/default/index.vue +162 -3
- package/packages/main/src/default/message.vue +249 -249
- package/packages/main/src/default/notice.vue +157 -157
- package/packages/main/src/default/userinfo.vue +505 -505
- package/packages/main/src/public/online.vue +89 -89
- package/packages/main/src/public/search.vue +461 -461
- package/packages/main/src/public/settings.vue +221 -221
- package/packages/main/src/simplicity/apps.vue +388 -388
- package/packages/main/src/simplicity/avatar.vue +82 -82
- package/packages/main/src/simplicity/handler.vue +259 -259
- package/packages/main/src/simplicity/index.vue +2049 -2047
- package/packages/main/src/simplicity/lists.vue +84 -84
- package/packages/main/src/simplicity/menu-list.vue +128 -128
- package/packages/main/src/simplicity/message.vue +259 -259
- package/packages/main/src/simplicity/notice.vue +190 -190
- package/packages/main/src/simplicity/router-page.vue +45 -45
- package/packages/main/src/simplicity/sub-menu.vue +241 -241
- package/packages/main/src/simplicity/user.vue +257 -257
- package/packages/main/src/simplicity/userinfo.vue +312 -312
- package/packages/menu/index.js +5 -5
- package/packages/menu/src/main.vue +536 -536
- package/packages/nav/index.js +5 -5
- package/packages/nav/src/main.vue +351 -402
- package/packages/notify/index.js +5 -5
- package/packages/notify/src/main.vue +538 -538
- package/packages/page/index.js +5 -5
- package/packages/page/src/main.vue +167 -167
- package/packages/pagination/index.js +5 -5
- package/packages/pagination/src/main.vue +96 -96
- package/packages/player/index.js +5 -5
- package/packages/player/src/main.vue +194 -194
- package/packages/qr-code/index.js +5 -5
- package/packages/qr-code/src/main.vue +170 -170
- package/packages/radio-group/index.js +6 -6
- package/packages/radio-group/src/main.vue +319 -319
- package/packages/retrial-auth/index.js +5 -5
- package/packages/retrial-auth/src/main.vue +280 -280
- package/packages/select/index.js +5 -5
- package/packages/select/src/main.vue +775 -775
- package/packages/select-ganged/index.js +5 -5
- package/packages/select-ganged/src/main.vue +724 -724
- package/packages/selector/index.js +5 -5
- package/packages/selector/src/main.vue +689 -689
- package/packages/selector-panel/index.js +5 -5
- package/packages/selector-panel/src/main.vue +1027 -1027
- package/packages/selector-panel/src/selection.vue +177 -177
- package/packages/selector-panel/src/tree.vue +129 -129
- package/packages/sizer/index.js +5 -5
- package/packages/sizer/src/main.vue +254 -254
- package/packages/steps/index.js +5 -5
- package/packages/steps/src/main.vue +181 -181
- package/packages/switch/index.js +5 -5
- package/packages/switch/src/main.vue +154 -154
- package/packages/table-form/index.js +5 -5
- package/packages/tabs/index.js +5 -5
- package/packages/tabs/src/main.vue +788 -788
- package/packages/tabs-panel/index.js +5 -5
- package/packages/tabs-panel/src/main.vue +29 -29
- package/packages/theme-chalk/lib/enable-drag.css +1 -0
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/lib/main.css +1 -1
- package/packages/theme-chalk/lib/nav.css +1 -1
- package/packages/theme-chalk/lib/simplicity.css +1 -1
- package/packages/theme-chalk/src/base.scss +260 -260
- package/packages/theme-chalk/src/button-group.scss +175 -175
- package/packages/theme-chalk/src/button.scss +24 -24
- package/packages/theme-chalk/src/calendar.scss +113 -113
- package/packages/theme-chalk/src/card.scss +99 -99
- package/packages/theme-chalk/src/checkbox-group.scss +8 -8
- package/packages/theme-chalk/src/clients.scss +87 -87
- package/packages/theme-chalk/src/data-table-form.scss +67 -67
- package/packages/theme-chalk/src/data-table.scss +293 -293
- package/packages/theme-chalk/src/date-picker.scss +7 -7
- package/packages/theme-chalk/src/dialog.scss +77 -77
- package/packages/theme-chalk/src/enable-drag.scss +181 -0
- package/packages/theme-chalk/src/enterprise.scss +5 -5
- package/packages/theme-chalk/src/error-page.scss +18 -18
- package/packages/theme-chalk/src/flow-group.scss +110 -110
- package/packages/theme-chalk/src/flow-list.scss +36 -36
- package/packages/theme-chalk/src/flow.scss +318 -318
- package/packages/theme-chalk/src/form.scss +496 -496
- package/packages/theme-chalk/src/handle-user.scss +40 -40
- package/packages/theme-chalk/src/handler.scss +143 -143
- package/packages/theme-chalk/src/icon.scss +1789 -1789
- package/packages/theme-chalk/src/icons.scss +99 -99
- package/packages/theme-chalk/src/index.scss +1 -0
- package/packages/theme-chalk/src/input.scss +9 -9
- package/packages/theme-chalk/src/label.scss +24 -24
- package/packages/theme-chalk/src/layout.scss +46 -46
- package/packages/theme-chalk/src/login.scss +969 -947
- package/packages/theme-chalk/src/main.scss +656 -639
- package/packages/theme-chalk/src/menu.scss +222 -222
- package/packages/theme-chalk/src/mixins/color.scss +117 -117
- package/packages/theme-chalk/src/nav.scss +111 -125
- package/packages/theme-chalk/src/page.scss +3 -3
- package/packages/theme-chalk/src/pagination.scss +29 -29
- package/packages/theme-chalk/src/player.scss +9 -9
- package/packages/theme-chalk/src/qr-code.scss +17 -17
- package/packages/theme-chalk/src/radio-group.scss +9 -9
- package/packages/theme-chalk/src/retrial-auth.scss +38 -38
- package/packages/theme-chalk/src/select-ganged.scss +8 -8
- package/packages/theme-chalk/src/select.scss +8 -8
- package/packages/theme-chalk/src/selector-panel.scss +204 -204
- package/packages/theme-chalk/src/selector.scss +91 -91
- package/packages/theme-chalk/src/simplicity.scss +1265 -1262
- package/packages/theme-chalk/src/sizer.scss +36 -36
- package/packages/theme-chalk/src/steps.scss +88 -88
- package/packages/theme-chalk/src/switch.scss +3 -3
- package/packages/theme-chalk/src/table-form.scss +1 -1
- package/packages/theme-chalk/src/tabs.scss +87 -87
- package/packages/theme-chalk/src/tips.scss +7 -7
- package/packages/theme-chalk/src/toolbar.scss +179 -179
- package/packages/theme-chalk/src/tree-group.scss +72 -72
- package/packages/theme-chalk/src/tree.scss +165 -165
- package/packages/theme-chalk/src/upload.scss +167 -167
- package/packages/theme-chalk/src/wxlogin.scss +3 -3
- package/packages/tips/index.js +5 -5
- package/packages/tips/src/main.vue +141 -141
- package/packages/toolbar/index.js +5 -5
- package/packages/toolbar/src/main.vue +430 -430
- package/packages/tree/index.js +5 -5
- package/packages/tree-group/index.js +5 -5
- package/packages/upload/index.js +5 -5
- package/packages/upload/src/main.vue +1335 -1334
- package/packages/upload/src/picture.js +15 -15
- package/packages/wujie/index.js +5 -5
- package/packages/wujie/src/main.vue +145 -145
- package/packages/wxlogin/index.js +5 -5
- package/packages/wxlogin/src/main.vue +128 -128
- package/src/config/api.js +251 -248
- package/src/config/image.js +2 -2
- package/src/index.js +4 -1
- package/src/utils/bus.js +3 -3
- package/src/utils/date-util.js +312 -312
- package/src/utils/http.js +50 -50
- package/src/utils/rules.js +18 -18
- package/src/utils/store.js +21 -21
- package/src/utils/webSocket.js +107 -107
|
@@ -0,0 +1,830 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "/dist/";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 42);
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ 12:
|
|
91
|
+
/***/ (function(module, exports) {
|
|
92
|
+
|
|
93
|
+
module.exports = require("throttle-debounce");
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ 14:
|
|
98
|
+
/***/ (function(module, exports) {
|
|
99
|
+
|
|
100
|
+
module.exports = require("babel-runtime/regenerator");
|
|
101
|
+
|
|
102
|
+
/***/ }),
|
|
103
|
+
|
|
104
|
+
/***/ 3:
|
|
105
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
|
+
|
|
107
|
+
"use strict";
|
|
108
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
109
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
110
|
+
|
|
111
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
112
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
113
|
+
// be included in the final webpack user bundle.
|
|
114
|
+
|
|
115
|
+
function normalizeComponent(
|
|
116
|
+
scriptExports,
|
|
117
|
+
render,
|
|
118
|
+
staticRenderFns,
|
|
119
|
+
functionalTemplate,
|
|
120
|
+
injectStyles,
|
|
121
|
+
scopeId,
|
|
122
|
+
moduleIdentifier /* server only */,
|
|
123
|
+
shadowMode /* vue-cli only */
|
|
124
|
+
) {
|
|
125
|
+
// Vue.extend constructor export interop
|
|
126
|
+
var options =
|
|
127
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
128
|
+
|
|
129
|
+
// render functions
|
|
130
|
+
if (render) {
|
|
131
|
+
options.render = render
|
|
132
|
+
options.staticRenderFns = staticRenderFns
|
|
133
|
+
options._compiled = true
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// functional template
|
|
137
|
+
if (functionalTemplate) {
|
|
138
|
+
options.functional = true
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// scopedId
|
|
142
|
+
if (scopeId) {
|
|
143
|
+
options._scopeId = 'data-v-' + scopeId
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
var hook
|
|
147
|
+
if (moduleIdentifier) {
|
|
148
|
+
// server build
|
|
149
|
+
hook = function (context) {
|
|
150
|
+
// 2.3 injection
|
|
151
|
+
context =
|
|
152
|
+
context || // cached call
|
|
153
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
154
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
155
|
+
// 2.2 with runInNewContext: true
|
|
156
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
157
|
+
context = __VUE_SSR_CONTEXT__
|
|
158
|
+
}
|
|
159
|
+
// inject component styles
|
|
160
|
+
if (injectStyles) {
|
|
161
|
+
injectStyles.call(this, context)
|
|
162
|
+
}
|
|
163
|
+
// register component module identifier for async chunk inferrence
|
|
164
|
+
if (context && context._registeredComponents) {
|
|
165
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// used by ssr in case component is cached and beforeCreate
|
|
169
|
+
// never gets called
|
|
170
|
+
options._ssrRegister = hook
|
|
171
|
+
} else if (injectStyles) {
|
|
172
|
+
hook = shadowMode
|
|
173
|
+
? function () {
|
|
174
|
+
injectStyles.call(
|
|
175
|
+
this,
|
|
176
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
: injectStyles
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (hook) {
|
|
183
|
+
if (options.functional) {
|
|
184
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
185
|
+
// go through the normalizer
|
|
186
|
+
options._injectStyles = hook
|
|
187
|
+
// register for functional component in vue file
|
|
188
|
+
var originalRender = options.render
|
|
189
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
190
|
+
hook.call(context)
|
|
191
|
+
return originalRender(h, context)
|
|
192
|
+
}
|
|
193
|
+
} else {
|
|
194
|
+
// inject component registration as beforeCreate hook
|
|
195
|
+
var existing = options.beforeCreate
|
|
196
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return {
|
|
201
|
+
exports: scriptExports,
|
|
202
|
+
options: options
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
/***/ }),
|
|
208
|
+
|
|
209
|
+
/***/ 42:
|
|
210
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
211
|
+
|
|
212
|
+
"use strict";
|
|
213
|
+
// ESM COMPAT FLAG
|
|
214
|
+
__webpack_require__.r(__webpack_exports__);
|
|
215
|
+
|
|
216
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/enable-drag/src/main.vue?vue&type=template&id=40ac2863&scoped=true&
|
|
217
|
+
var render = function () {
|
|
218
|
+
var _vm = this
|
|
219
|
+
var _h = _vm.$createElement
|
|
220
|
+
var _c = _vm._self._c || _h
|
|
221
|
+
return _c(
|
|
222
|
+
"div",
|
|
223
|
+
{
|
|
224
|
+
staticClass: "es-enable-drag",
|
|
225
|
+
style:
|
|
226
|
+
!_vm.position.length || _vm.showBig
|
|
227
|
+
? _vm.styleObject
|
|
228
|
+
: _vm.positionObject,
|
|
229
|
+
on: { mousedown: _vm.dragStart, touchstart: _vm.dragStart },
|
|
230
|
+
},
|
|
231
|
+
[
|
|
232
|
+
_c(
|
|
233
|
+
"div",
|
|
234
|
+
{
|
|
235
|
+
directives: [
|
|
236
|
+
{
|
|
237
|
+
name: "show",
|
|
238
|
+
rawName: "v-show",
|
|
239
|
+
value: !_vm.position.length || _vm.showBig,
|
|
240
|
+
expression: "!position.length || showBig",
|
|
241
|
+
},
|
|
242
|
+
],
|
|
243
|
+
staticClass: "es-enable-content",
|
|
244
|
+
class: {
|
|
245
|
+
"show-animation-left":
|
|
246
|
+
_vm.iconStatus === "show" && _vm.position.includes("left"),
|
|
247
|
+
"show-animation-top":
|
|
248
|
+
_vm.iconStatus === "show" && _vm.position.includes("top"),
|
|
249
|
+
"show-animation-right":
|
|
250
|
+
_vm.iconStatus === "show" && _vm.position.includes("right"),
|
|
251
|
+
"show-animation-bottom":
|
|
252
|
+
_vm.iconStatus === "show" && _vm.position.includes("bottom"),
|
|
253
|
+
"hide-animation-left":
|
|
254
|
+
_vm.iconStatus === "hide" && _vm.position.includes("left"),
|
|
255
|
+
"hide-animation-top":
|
|
256
|
+
_vm.iconStatus === "hide" && _vm.position.includes("top"),
|
|
257
|
+
"hide-animation-right":
|
|
258
|
+
_vm.iconStatus === "hide" && _vm.position.includes("right"),
|
|
259
|
+
"hide-animation-bottom":
|
|
260
|
+
_vm.iconStatus === "hide" && _vm.position.includes("bottom"),
|
|
261
|
+
},
|
|
262
|
+
on: { mouseleave: _vm.leaveBigIcon },
|
|
263
|
+
},
|
|
264
|
+
[
|
|
265
|
+
_c(
|
|
266
|
+
"div",
|
|
267
|
+
{
|
|
268
|
+
on: {
|
|
269
|
+
mousedown: _vm.iconMousedown,
|
|
270
|
+
mouseup: _vm.iconMouseUp,
|
|
271
|
+
dblclick: _vm.handleDblClick,
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
[
|
|
275
|
+
_vm._t("handler", [
|
|
276
|
+
_c(
|
|
277
|
+
"el-button",
|
|
278
|
+
{
|
|
279
|
+
staticClass: "es-enable-drag-enter-button",
|
|
280
|
+
attrs: { round: "", type: "primary" },
|
|
281
|
+
},
|
|
282
|
+
[
|
|
283
|
+
_c("es-icon", {
|
|
284
|
+
staticClass: "es-enable-drag-enter-icon",
|
|
285
|
+
attrs: { contents: _vm.icon },
|
|
286
|
+
}),
|
|
287
|
+
],
|
|
288
|
+
1
|
|
289
|
+
),
|
|
290
|
+
]),
|
|
291
|
+
],
|
|
292
|
+
2
|
|
293
|
+
),
|
|
294
|
+
]
|
|
295
|
+
),
|
|
296
|
+
_c(
|
|
297
|
+
"div",
|
|
298
|
+
{
|
|
299
|
+
directives: [
|
|
300
|
+
{
|
|
301
|
+
name: "show",
|
|
302
|
+
rawName: "v-show",
|
|
303
|
+
value: _vm.position.length && !_vm.showBig,
|
|
304
|
+
expression: "position.length && !showBig",
|
|
305
|
+
},
|
|
306
|
+
],
|
|
307
|
+
staticClass: "es-enable-drag-small-icon-box",
|
|
308
|
+
on: { mouseenter: _vm.enterIcon },
|
|
309
|
+
},
|
|
310
|
+
[
|
|
311
|
+
_vm._t(
|
|
312
|
+
"small-icon",
|
|
313
|
+
[
|
|
314
|
+
_c(
|
|
315
|
+
"div",
|
|
316
|
+
{
|
|
317
|
+
staticClass: "es-enable-drag-small-icon",
|
|
318
|
+
class: {
|
|
319
|
+
"es-left": _vm.position.includes("left"),
|
|
320
|
+
"es-right": _vm.position.includes("right"),
|
|
321
|
+
"es-top":
|
|
322
|
+
_vm.position.includes("top") &&
|
|
323
|
+
!(
|
|
324
|
+
_vm.position.includes("right") ||
|
|
325
|
+
_vm.position.includes("left")
|
|
326
|
+
),
|
|
327
|
+
"es-bottom":
|
|
328
|
+
_vm.position.includes("bottom") &&
|
|
329
|
+
!(
|
|
330
|
+
_vm.position.includes("right") ||
|
|
331
|
+
_vm.position.includes("left")
|
|
332
|
+
),
|
|
333
|
+
},
|
|
334
|
+
attrs: { "data-content": _vm.smallText },
|
|
335
|
+
},
|
|
336
|
+
[
|
|
337
|
+
_c("i", {
|
|
338
|
+
directives: [
|
|
339
|
+
{
|
|
340
|
+
name: "show",
|
|
341
|
+
rawName: "v-show",
|
|
342
|
+
value: _vm.position.includes("right"),
|
|
343
|
+
expression: "position.includes('right')",
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
staticClass: "es-enable-drag-small-tri es-icon-tri-left",
|
|
347
|
+
}),
|
|
348
|
+
_c("i", {
|
|
349
|
+
directives: [
|
|
350
|
+
{
|
|
351
|
+
name: "show",
|
|
352
|
+
rawName: "v-show",
|
|
353
|
+
value: _vm.position.includes("left"),
|
|
354
|
+
expression: "position.includes('left')",
|
|
355
|
+
},
|
|
356
|
+
],
|
|
357
|
+
staticClass: "es-enable-drag-small-tri es-icon-tri-right",
|
|
358
|
+
}),
|
|
359
|
+
_c("i", {
|
|
360
|
+
directives: [
|
|
361
|
+
{
|
|
362
|
+
name: "show",
|
|
363
|
+
rawName: "v-show",
|
|
364
|
+
value:
|
|
365
|
+
_vm.position.includes("bottom") &&
|
|
366
|
+
!(
|
|
367
|
+
_vm.position.includes("right") ||
|
|
368
|
+
_vm.position.includes("left")
|
|
369
|
+
),
|
|
370
|
+
expression:
|
|
371
|
+
"\n position.includes('bottom') &&\n !(position.includes('right') || position.includes('left'))\n ",
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
staticClass: "es-enable-drag-small-tri es-icon-tri-up",
|
|
375
|
+
}),
|
|
376
|
+
_c("i", {
|
|
377
|
+
directives: [
|
|
378
|
+
{
|
|
379
|
+
name: "show",
|
|
380
|
+
rawName: "v-show",
|
|
381
|
+
value:
|
|
382
|
+
_vm.position.includes("top") &&
|
|
383
|
+
!(
|
|
384
|
+
_vm.position.includes("right") ||
|
|
385
|
+
_vm.position.includes("left")
|
|
386
|
+
),
|
|
387
|
+
expression:
|
|
388
|
+
"\n position.includes('top') &&\n !(position.includes('right') || position.includes('left'))\n ",
|
|
389
|
+
},
|
|
390
|
+
],
|
|
391
|
+
staticClass: "es-enable-drag-small-tri es-icon-tri-down",
|
|
392
|
+
}),
|
|
393
|
+
]
|
|
394
|
+
),
|
|
395
|
+
],
|
|
396
|
+
{ position: _vm.position }
|
|
397
|
+
),
|
|
398
|
+
],
|
|
399
|
+
2
|
|
400
|
+
),
|
|
401
|
+
]
|
|
402
|
+
)
|
|
403
|
+
}
|
|
404
|
+
var staticRenderFns = []
|
|
405
|
+
render._withStripped = true
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
// CONCATENATED MODULE: ./packages/enable-drag/src/main.vue?vue&type=template&id=40ac2863&scoped=true&
|
|
409
|
+
|
|
410
|
+
// EXTERNAL MODULE: external "babel-runtime/regenerator"
|
|
411
|
+
var regenerator_ = __webpack_require__(14);
|
|
412
|
+
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_);
|
|
413
|
+
|
|
414
|
+
// EXTERNAL MODULE: external "throttle-debounce"
|
|
415
|
+
var external_throttle_debounce_ = __webpack_require__(12);
|
|
416
|
+
|
|
417
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/enable-drag/src/main.vue?vue&type=script&lang=js&
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
|
|
421
|
+
|
|
422
|
+
//
|
|
423
|
+
//
|
|
424
|
+
//
|
|
425
|
+
//
|
|
426
|
+
//
|
|
427
|
+
//
|
|
428
|
+
//
|
|
429
|
+
//
|
|
430
|
+
//
|
|
431
|
+
//
|
|
432
|
+
//
|
|
433
|
+
//
|
|
434
|
+
//
|
|
435
|
+
//
|
|
436
|
+
//
|
|
437
|
+
//
|
|
438
|
+
//
|
|
439
|
+
//
|
|
440
|
+
//
|
|
441
|
+
//
|
|
442
|
+
//
|
|
443
|
+
//
|
|
444
|
+
//
|
|
445
|
+
//
|
|
446
|
+
//
|
|
447
|
+
//
|
|
448
|
+
//
|
|
449
|
+
//
|
|
450
|
+
//
|
|
451
|
+
//
|
|
452
|
+
//
|
|
453
|
+
//
|
|
454
|
+
//
|
|
455
|
+
//
|
|
456
|
+
//
|
|
457
|
+
//
|
|
458
|
+
//
|
|
459
|
+
//
|
|
460
|
+
//
|
|
461
|
+
//
|
|
462
|
+
//
|
|
463
|
+
//
|
|
464
|
+
//
|
|
465
|
+
//
|
|
466
|
+
//
|
|
467
|
+
//
|
|
468
|
+
//
|
|
469
|
+
//
|
|
470
|
+
//
|
|
471
|
+
//
|
|
472
|
+
//
|
|
473
|
+
//
|
|
474
|
+
//
|
|
475
|
+
//
|
|
476
|
+
//
|
|
477
|
+
//
|
|
478
|
+
//
|
|
479
|
+
//
|
|
480
|
+
//
|
|
481
|
+
//
|
|
482
|
+
//
|
|
483
|
+
//
|
|
484
|
+
//
|
|
485
|
+
//
|
|
486
|
+
//
|
|
487
|
+
//
|
|
488
|
+
//
|
|
489
|
+
//
|
|
490
|
+
//
|
|
491
|
+
//
|
|
492
|
+
//
|
|
493
|
+
//
|
|
494
|
+
//
|
|
495
|
+
//
|
|
496
|
+
//
|
|
497
|
+
//
|
|
498
|
+
//
|
|
499
|
+
//
|
|
500
|
+
//
|
|
501
|
+
//
|
|
502
|
+
//
|
|
503
|
+
//
|
|
504
|
+
//
|
|
505
|
+
//
|
|
506
|
+
//
|
|
507
|
+
//
|
|
508
|
+
//
|
|
509
|
+
//
|
|
510
|
+
//
|
|
511
|
+
//
|
|
512
|
+
//
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
|
516
|
+
name: 'EsEnableDrag',
|
|
517
|
+
props: {
|
|
518
|
+
//默认拖动按钮图标
|
|
519
|
+
icon: {
|
|
520
|
+
type: String,
|
|
521
|
+
default: 'es-icon-yingyonglan'
|
|
522
|
+
},
|
|
523
|
+
smallText: String,
|
|
524
|
+
//边界距离(小于这个距离就隐藏)
|
|
525
|
+
distance: {
|
|
526
|
+
type: Number,
|
|
527
|
+
default: 10,
|
|
528
|
+
validator: function validator(value) {
|
|
529
|
+
return value >= 0;
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
// 初始距离顶部的位置
|
|
533
|
+
topDistance: String,
|
|
534
|
+
// 初始距离左边的位置
|
|
535
|
+
leftDistance: String,
|
|
536
|
+
// 是否可以拖拽
|
|
537
|
+
isDragg: {
|
|
538
|
+
type: Boolean,
|
|
539
|
+
default: true
|
|
540
|
+
},
|
|
541
|
+
//允许隐藏的方位
|
|
542
|
+
berth: {
|
|
543
|
+
type: Array,
|
|
544
|
+
default: function _default() {
|
|
545
|
+
return ['right'];
|
|
546
|
+
},
|
|
547
|
+
|
|
548
|
+
validator: function validator(value) {
|
|
549
|
+
return value.length == 0 || value.includes('right') || value.includes('left') || value.includes('top') || value.includes('bottom');
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
// 列表数据
|
|
553
|
+
list: {
|
|
554
|
+
type: Array,
|
|
555
|
+
default: function _default() {
|
|
556
|
+
return [{}, {}];
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
// 自定义列表的时候传入的高度(有高度才有动画)
|
|
560
|
+
customHeight: {
|
|
561
|
+
type: String,
|
|
562
|
+
default: function _default() {
|
|
563
|
+
return '';
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
data: function data() {
|
|
568
|
+
return {
|
|
569
|
+
width: 0, // 元素的宽度
|
|
570
|
+
height: 0, // 元素的高度
|
|
571
|
+
clickState: false, // 是点击还是拖拽
|
|
572
|
+
dbClick: false, // 双击状态
|
|
573
|
+
canDrag: true, // 临时状态:是否可以拖拽
|
|
574
|
+
firstLoad: true, // 第一次加载
|
|
575
|
+
iconStatus: 'normal', // 大图标显示状态
|
|
576
|
+
showBig: false, // 是否显示大图标
|
|
577
|
+
moved: false, // 是否移动过
|
|
578
|
+
mouseX: 0, // 初始位置的X坐标
|
|
579
|
+
mouseY: 0, // 初始位置的Y坐标
|
|
580
|
+
// 拖拽位置的样式
|
|
581
|
+
styleObject: {
|
|
582
|
+
top: 0,
|
|
583
|
+
left: 0
|
|
584
|
+
},
|
|
585
|
+
positionObject: {},
|
|
586
|
+
position: [] // 是否贴边
|
|
587
|
+
};
|
|
588
|
+
},
|
|
589
|
+
|
|
590
|
+
computed: {},
|
|
591
|
+
created: function created() {},
|
|
592
|
+
mounted: function mounted() {
|
|
593
|
+
this.init();
|
|
594
|
+
},
|
|
595
|
+
|
|
596
|
+
methods: {
|
|
597
|
+
init: function init() {
|
|
598
|
+
var rect = this.$el.getBoundingClientRect();
|
|
599
|
+
this.width = rect.width;
|
|
600
|
+
this.height = rect.height;
|
|
601
|
+
console.log(this.width, this.height);
|
|
602
|
+
if (this.topDistance) {
|
|
603
|
+
this.styleObject.top = this.topDistance;
|
|
604
|
+
} else {
|
|
605
|
+
this.styleObject.top = window.innerHeight - this.distance - this.height + 'px';
|
|
606
|
+
}
|
|
607
|
+
if (this.leftDistance) {
|
|
608
|
+
this.styleObject.left = this.leftDistance;
|
|
609
|
+
} else {
|
|
610
|
+
this.styleObject.left = window.innerWidth - this.distance - this.width + 'px';
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* @description 双击
|
|
616
|
+
*/
|
|
617
|
+
handleDblClick: function handleDblClick(event) {
|
|
618
|
+
var _this = this;
|
|
619
|
+
|
|
620
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
621
|
+
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
622
|
+
while (1) {
|
|
623
|
+
switch (_context.prev = _context.next) {
|
|
624
|
+
case 0:
|
|
625
|
+
event && event.stopPropagation();
|
|
626
|
+
event && event.preventDefault();
|
|
627
|
+
// 说明触发了双击状态
|
|
628
|
+
_this.dbClick = true;
|
|
629
|
+
console.log('双击了---------------');
|
|
630
|
+
_this.$emit('DblClick');
|
|
631
|
+
|
|
632
|
+
case 5:
|
|
633
|
+
case 'end':
|
|
634
|
+
return _context.stop();
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
}, _callee, _this);
|
|
638
|
+
}))();
|
|
639
|
+
},
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* @description 是否打开智能助手
|
|
643
|
+
*/
|
|
644
|
+
iconMouseUp: function iconMouseUp() {
|
|
645
|
+
var _this2 = this;
|
|
646
|
+
|
|
647
|
+
this.T = setTimeout(function () {
|
|
648
|
+
// 不是双击
|
|
649
|
+
if (!_this2.dbClick) {
|
|
650
|
+
// 防止首次动画
|
|
651
|
+
_this2.firstLoad = false;
|
|
652
|
+
// 防止拖动影响到了click事件
|
|
653
|
+
if (_this2.clickState) {
|
|
654
|
+
// TODO 执行点击事件
|
|
655
|
+
console.log('单击了---------------');
|
|
656
|
+
_this2.$emit('click');
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}, 160);
|
|
660
|
+
},
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* @description 点击ai入口事件
|
|
664
|
+
*/
|
|
665
|
+
iconMousedown: function iconMousedown() {
|
|
666
|
+
// 发生点击就重置双击状态
|
|
667
|
+
this.dbClick = false;
|
|
668
|
+
// 说明发生了点击
|
|
669
|
+
this.clickState = true;
|
|
670
|
+
// 可以拖拽
|
|
671
|
+
this.canDrag = true;
|
|
672
|
+
this.T && clearTimeout(this.T);
|
|
673
|
+
this.T = null;
|
|
674
|
+
},
|
|
675
|
+
handleItem: function handleItem() {
|
|
676
|
+
console.log('点击了单个列表---------------');
|
|
677
|
+
this.$emit('handleItem');
|
|
678
|
+
},
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* @description 进入小图标
|
|
682
|
+
*/
|
|
683
|
+
enterIcon: function enterIcon(samll) {
|
|
684
|
+
if (samll) {
|
|
685
|
+
// 显示大图标
|
|
686
|
+
this.showBig = true;
|
|
687
|
+
// 大图标动画
|
|
688
|
+
this.iconStatus = 'show';
|
|
689
|
+
}
|
|
690
|
+
},
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* @description 离开大图标
|
|
694
|
+
*/
|
|
695
|
+
leaveBigIcon: function leaveBigIcon() {
|
|
696
|
+
// 显示大图标
|
|
697
|
+
this.showBig = false;
|
|
698
|
+
// 大图标动画
|
|
699
|
+
this.iconStatus = 'hide';
|
|
700
|
+
},
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* @description 检测位置合理性
|
|
704
|
+
*/
|
|
705
|
+
checkPosition: function checkPosition() {
|
|
706
|
+
if (this.position.includes('right')) {
|
|
707
|
+
this.styleObject.left = window.innerWidth + 'px';
|
|
708
|
+
}
|
|
709
|
+
if (this.position.includes('bottom')) {
|
|
710
|
+
this.styleObject.top = window.innerHeight + 'px';
|
|
711
|
+
}
|
|
712
|
+
this.moved = true;
|
|
713
|
+
this.dragEnd();
|
|
714
|
+
},
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* @description 拖拽开始
|
|
718
|
+
*/
|
|
719
|
+
dragStart: function dragStart(e) {
|
|
720
|
+
if (this.isDragg && this.canDrag) {
|
|
721
|
+
e.preventDefault();
|
|
722
|
+
this.moved = false;
|
|
723
|
+
var rect = this.$el.getBoundingClientRect();
|
|
724
|
+
this.mouseY = e.y - rect.y;
|
|
725
|
+
this.mouseX = e.x - rect.x;
|
|
726
|
+
document.addEventListener('mousemove', this.drag);
|
|
727
|
+
document.addEventListener('touchmove', this.drag);
|
|
728
|
+
document.addEventListener('mouseup', this.dragEnd);
|
|
729
|
+
document.addEventListener('touchend', this.dragEnd);
|
|
730
|
+
} else {
|
|
731
|
+
return false;
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* @description 拖拽中
|
|
737
|
+
*/
|
|
738
|
+
drag: function drag(e) {
|
|
739
|
+
this.moved = true;
|
|
740
|
+
var x = e.x - this.mouseX;
|
|
741
|
+
var y = e.y - this.mouseY;
|
|
742
|
+
this.styleObject.left = x + 'px';
|
|
743
|
+
this.styleObject.top = y + 'px';
|
|
744
|
+
},
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* @description 拖拽结束
|
|
748
|
+
*/
|
|
749
|
+
dragEnd: function dragEnd() {
|
|
750
|
+
if (this.moved) {
|
|
751
|
+
this.clickState = false;
|
|
752
|
+
var x = this.styleObject.left.replace('px', '');
|
|
753
|
+
var y = this.styleObject.top.replace('px', '');
|
|
754
|
+
this.position = [];
|
|
755
|
+
this.positionObject = { top: y, left: x };
|
|
756
|
+
if (x < this.distance) {
|
|
757
|
+
this.styleObject.left = this.distance + 'px';
|
|
758
|
+
this.berth.includes('left') && this.position.push('left');
|
|
759
|
+
this.positionObject.left = 0;
|
|
760
|
+
}
|
|
761
|
+
if (x > window.innerWidth - this.distance - this.width) {
|
|
762
|
+
this.styleObject.left = window.innerWidth - this.distance - this.width + 'px';
|
|
763
|
+
this.berth.includes('right') && this.position.push('right');
|
|
764
|
+
delete this.positionObject.left;
|
|
765
|
+
this.positionObject.right = 0;
|
|
766
|
+
}
|
|
767
|
+
if (y < this.distance) {
|
|
768
|
+
this.styleObject.top = this.distance + 'px';
|
|
769
|
+
this.berth.includes('top') && this.position.push('top');
|
|
770
|
+
this.positionObject.top = 0;
|
|
771
|
+
}
|
|
772
|
+
if (y > window.innerHeight - this.distance - this.height) {
|
|
773
|
+
this.styleObject.top = window.innerHeight - this.distance - this.height + 'px';
|
|
774
|
+
this.berth.includes('bottom') && this.position.push('bottom');
|
|
775
|
+
delete this.positionObject.top;
|
|
776
|
+
this.positionObject.bottom = 0;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
document.removeEventListener('mousemove', this.drag);
|
|
780
|
+
document.removeEventListener('touchmove', this.drag);
|
|
781
|
+
document.removeEventListener('mouseup', this.dragEnd);
|
|
782
|
+
document.removeEventListener('touchend', this.dragEnd);
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
destroyed: function destroyed() {
|
|
786
|
+
// 移除监听
|
|
787
|
+
window.removeEventListener('resize', this.onResize);
|
|
788
|
+
document.removeEventListener('mousemove', this.drag);
|
|
789
|
+
document.removeEventListener('touchmove', this.drag);
|
|
790
|
+
document.removeEventListener('mouseup', this.dragEnd);
|
|
791
|
+
document.removeEventListener('touchend', this.dragEnd);
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
// CONCATENATED MODULE: ./packages/enable-drag/src/main.vue?vue&type=script&lang=js&
|
|
795
|
+
/* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
|
|
796
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
797
|
+
var componentNormalizer = __webpack_require__(3);
|
|
798
|
+
|
|
799
|
+
// CONCATENATED MODULE: ./packages/enable-drag/src/main.vue
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
/* normalize component */
|
|
806
|
+
|
|
807
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
|
808
|
+
src_mainvue_type_script_lang_js_,
|
|
809
|
+
render,
|
|
810
|
+
staticRenderFns,
|
|
811
|
+
false,
|
|
812
|
+
null,
|
|
813
|
+
"40ac2863",
|
|
814
|
+
null
|
|
815
|
+
|
|
816
|
+
)
|
|
817
|
+
|
|
818
|
+
/* harmony default export */ var main = (component.exports);
|
|
819
|
+
// CONCATENATED MODULE: ./packages/enable-drag/index.js
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
main.install = function (Vue) {
|
|
823
|
+
return Vue.component(main.name, main);
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
/* harmony default export */ var enable_drag = __webpack_exports__["default"] = (main);
|
|
827
|
+
|
|
828
|
+
/***/ })
|
|
829
|
+
|
|
830
|
+
/******/ });
|