eoss 0.1.0-alpha.23 → 0.1.0-alpha.24
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/0.js +1 -0
- package/lib/1.js +1 -0
- package/lib/10.js +1 -0
- package/lib/11.js +1 -0
- package/lib/12.js +1 -0
- package/lib/13.js +1 -0
- package/lib/14.js +1 -0
- package/lib/15.js +1 -0
- package/lib/16.js +1 -0
- package/lib/17.js +1 -0
- package/lib/18.js +1 -0
- package/lib/19.js +1 -0
- package/lib/20.js +1 -0
- package/lib/21.js +1 -0
- package/lib/22.js +1 -0
- package/lib/23.js +1 -0
- package/lib/24.js +1 -0
- package/lib/25.js +1 -0
- package/lib/26.js +1 -0
- package/lib/27.js +1 -0
- package/lib/28.js +1 -0
- package/lib/29.js +1 -0
- package/lib/3.js +1 -0
- package/lib/30.js +1 -0
- package/lib/31.js +1 -0
- package/lib/32.js +1 -0
- package/lib/33.js +1 -0
- package/lib/34.js +1 -0
- package/lib/35.js +1 -0
- package/lib/36.js +1 -0
- package/lib/37.js +1 -0
- package/lib/38.js +1 -0
- package/lib/39.js +1 -0
- package/lib/4.js +1 -0
- package/lib/40.js +1 -0
- package/lib/41.js +1 -0
- package/lib/42.js +1 -0
- package/lib/43.js +1 -0
- package/lib/44.js +1 -0
- package/lib/45.js +1 -0
- package/lib/46.js +1 -0
- package/lib/47.js +1 -0
- package/lib/48.js +1 -0
- package/lib/49.js +1 -0
- package/lib/5.js +1 -0
- package/lib/50.js +1 -0
- package/lib/51.js +1 -0
- package/lib/52.js +1 -0
- package/lib/53.js +1 -0
- package/lib/54.js +1 -0
- package/lib/55.js +1 -0
- package/lib/56.js +1 -0
- package/lib/57.js +1 -0
- package/lib/58.js +1 -0
- package/lib/59.js +1 -0
- package/lib/6.js +1 -0
- package/lib/60.js +1 -0
- package/lib/61.js +1 -0
- package/lib/62.js +1 -0
- package/lib/63.js +1 -0
- package/lib/64.js +1 -0
- package/lib/65.js +1 -0
- package/lib/66.js +1 -0
- package/lib/67.js +1 -0
- package/lib/68.js +1 -0
- package/lib/69.js +1 -0
- package/lib/7.js +1 -0
- package/lib/70.js +1 -0
- package/lib/71.js +1 -0
- package/lib/72.js +1 -0
- package/lib/73.js +1 -0
- package/lib/74.js +1 -0
- package/lib/75.js +1 -0
- package/lib/76.js +1 -0
- package/lib/77.js +1 -0
- package/lib/78.js +1 -0
- package/lib/79.js +1 -0
- package/lib/8.js +1 -0
- package/lib/80.js +1 -0
- package/lib/81.js +1 -0
- package/lib/9.js +1 -0
- package/lib/account-login.js +182 -165
- package/lib/autocomplete.js +73 -44
- package/lib/ca-login.js +74 -45
- package/lib/carousel-item.js +71 -42
- package/lib/carousel.js +71 -42
- package/lib/cascader-panel.js +84 -55
- package/lib/cascader.js +79 -50
- package/lib/checkbox-group.js +164 -155
- package/lib/collapse-item.js +194 -185
- package/lib/collapse.js +194 -185
- package/lib/data-table.js +164 -155
- package/lib/date-picker.js +71 -42
- package/lib/dialog.js +76 -47
- package/lib/dropdown.js +73 -44
- package/lib/email-login.js +165 -156
- package/lib/eoss.common.js +2989 -1278
- package/lib/flow-group.js +74 -45
- package/lib/flow.js +240 -231
- package/lib/flows.js +166 -157
- package/lib/form-item.js +75 -46
- package/lib/form.js +191 -182
- package/lib/icon.js +75 -46
- package/lib/image-viewer.js +75 -46
- package/lib/index.js +1 -1
- package/lib/input.js +73 -44
- package/lib/login.js +169 -160
- package/lib/lowcode.js +2581 -877
- package/lib/main.js +216 -207
- package/lib/marquee.js +75 -46
- package/lib/menu.js +73 -44
- package/lib/message-box.js +72 -43
- package/lib/message.js +72 -43
- package/lib/notification.js +72 -43
- package/lib/option.js +75 -46
- package/lib/pagination.js +72 -43
- package/lib/phone-login.js +164 -155
- package/lib/popover.js +71 -42
- package/lib/qrcode-login.js +164 -155
- package/lib/radio-group.js +164 -155
- package/lib/rate.js +73 -44
- package/lib/scrollbar.js +72 -43
- package/lib/select.js +177 -168
- package/lib/selector-panel.js +167 -158
- package/lib/selector.js +167 -158
- package/lib/static/codicon.805fb6a.ttf +0 -0
- package/lib/step.js +194 -185
- package/lib/steps.js +73 -44
- package/lib/switch.js +73 -44
- package/lib/table-column.js +74 -45
- package/lib/table.js +169 -160
- package/lib/tabs.js +71 -42
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/lowcode.css +1 -1
- package/lib/tips.js +164 -155
- package/lib/tooltip.js +71 -42
- package/lib/transfer.js +73 -44
- package/lib/tree-group.js +73 -44
- package/lib/tree.js +165 -156
- package/lib/upload.js +167 -158
- package/lib/utils/ajax.js +86 -105
- package/lib/utils/util.js +33 -5
- package/package.json +1 -1
- package/packages/account-login/src/account-login.vue +20 -6
- package/packages/lowcode/src/attribute/bind.vue +16 -3
- package/packages/lowcode/src/attribute/dependency.vue +60 -16
- package/packages/lowcode/src/attribute/function.vue +8 -5
- package/packages/lowcode/src/attribute/javascript.vue +69 -0
- package/packages/lowcode/src/attribute/property.vue +137 -151
- package/packages/lowcode/src/attribute/styles.vue +7 -1
- package/packages/lowcode/src/attribute.vue +142 -9
- package/packages/lowcode/src/canvas.vue +7 -3
- package/packages/lowcode/src/editor.vue +187 -35
- package/packages/lowcode/src/json-repair.js +147 -0
- package/packages/lowcode/src/json.vue +63 -18
- package/packages/lowcode/src/lowcode.vue +49 -5
- package/packages/lowcode/src/monaco-vue-completions.js +344 -0
- package/packages/lowcode/src/render.vue +21 -4
- package/packages/lowcode/src/source-generator.js +316 -0
- package/packages/lowcode/src/source-parser.js +407 -0
- package/packages/lowcode/src/source.vue +66 -17
- package/packages/theme-chalk/src/lowcode.scss +42 -0
- package/src/index.js +1 -1
- package/src/utils/ajax.js +90 -115
- package/src/utils/util.js +35 -4
package/lib/selector-panel.js
CHANGED
|
@@ -91,32 +91,32 @@ module.exports =
|
|
|
91
91
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
92
|
|
|
93
93
|
"use strict";
|
|
94
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
95
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
96
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
97
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
98
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
94
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return noop; });
|
|
95
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return hasOwn; });
|
|
96
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return toObject; });
|
|
97
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getValueByPath; });
|
|
98
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getPropByPath; });
|
|
99
99
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return generateId; });
|
|
100
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
100
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return valueEquals; });
|
|
101
101
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return escapeRegexpString; });
|
|
102
102
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return arrayFindIndex; });
|
|
103
103
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFind; });
|
|
104
104
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return coerceTruthyValueToArray; });
|
|
105
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
106
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
107
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
105
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return isIE; });
|
|
106
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return isEdge; });
|
|
107
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return isFirefox; });
|
|
108
108
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return autoprefixer; });
|
|
109
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
109
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return kebabCase; });
|
|
110
110
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return capitalize; });
|
|
111
111
|
/* unused harmony export looseEqual */
|
|
112
112
|
/* unused harmony export arrayEquals */
|
|
113
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
114
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
113
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return isEqual; });
|
|
114
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return rafThrottle; });
|
|
115
115
|
/* unused harmony export objToArray */
|
|
116
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
116
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return requestAnimationFrame; });
|
|
117
117
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return cancelAnimationFrame; });
|
|
118
118
|
/* unused harmony export debounce */
|
|
119
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
119
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return throttle; });
|
|
120
120
|
/* unused harmony export guid */
|
|
121
121
|
/* unused harmony export uid */
|
|
122
122
|
/* unused harmony export get */
|
|
@@ -124,7 +124,7 @@ module.exports =
|
|
|
124
124
|
/* unused harmony export cloneDeep */
|
|
125
125
|
/* unused harmony export grouping */
|
|
126
126
|
/* unused harmony export pager */
|
|
127
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
127
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getWinTop; });
|
|
128
128
|
/* unused harmony export getFileType */
|
|
129
129
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrUnique; });
|
|
130
130
|
/* unused harmony export average */
|
|
@@ -142,53 +142,54 @@ module.exports =
|
|
|
142
142
|
/* unused harmony export exportXls */
|
|
143
143
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return extend; });
|
|
144
144
|
/* unused harmony export getObjectType */
|
|
145
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
145
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getParams; });
|
|
146
146
|
/* unused harmony export getScript */
|
|
147
147
|
/* unused harmony export getStyle */
|
|
148
148
|
/* unused harmony export getTypeName */
|
|
149
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
149
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getTypePrefix; });
|
|
150
150
|
/* unused harmony export getValues */
|
|
151
151
|
/* unused harmony export getZoom */
|
|
152
152
|
/* unused harmony export getLength */
|
|
153
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
153
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return timestampUrl; });
|
|
154
154
|
/* unused harmony export hasChars */
|
|
155
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
156
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
157
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
158
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
155
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return identical; });
|
|
156
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return indexOfObj; });
|
|
157
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return isEmpty; });
|
|
158
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return isExist; });
|
|
159
159
|
/* unused harmony export isFunction */
|
|
160
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
161
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
162
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
160
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return isObjectEqual; });
|
|
161
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return joinUrl; });
|
|
162
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getHorizontalMargin; });
|
|
163
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return layoutWaterfall; });
|
|
163
164
|
/* unused harmony export loadJs */
|
|
164
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
165
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return loading; });
|
|
165
166
|
/* unused harmony export lowerCase */
|
|
166
167
|
/* unused harmony export overbrim */
|
|
167
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
168
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return queryParams; });
|
|
168
169
|
/* unused harmony export receiveMessage */
|
|
169
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
170
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return renderIcon; });
|
|
170
171
|
/* unused harmony export replenish */
|
|
171
172
|
/* unused harmony export rmbToCapital */
|
|
172
173
|
/* unused harmony export setScale */
|
|
173
174
|
/* unused harmony export sendMessage */
|
|
174
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
175
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return setFavicon; });
|
|
175
176
|
/* unused harmony export sum */
|
|
176
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
177
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return startWith; });
|
|
177
178
|
/* unused harmony export takeLeft */
|
|
178
179
|
/* unused harmony export takeRight */
|
|
179
180
|
/* unused harmony export trimWhitespace */
|
|
180
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
181
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return toFixed; });
|
|
181
182
|
/* unused harmony export toFunction */
|
|
182
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
183
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return updateTheme; });
|
|
183
184
|
/* unused harmony export upperType */
|
|
184
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
185
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
186
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
185
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return urlJoinParams; });
|
|
186
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return uuid; });
|
|
187
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return watermark; });
|
|
187
188
|
/* unused harmony export winTopOpen */
|
|
188
189
|
/* unused harmony export confirm */
|
|
189
190
|
/* unused harmony export success */
|
|
190
191
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return error; });
|
|
191
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "
|
|
192
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return warning; });
|
|
192
193
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
|
|
193
194
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
194
195
|
/* harmony import */ var _color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12);
|
|
@@ -2014,13 +2015,38 @@ var joinUrl = function joinUrl(_ref8) {
|
|
|
2014
2015
|
// 如果前缀类型无效,直接返回URL
|
|
2015
2016
|
return url;
|
|
2016
2017
|
};
|
|
2018
|
+
/**
|
|
2019
|
+
* 解析节点 style 里的 margin,返回左右水平总占用(px)
|
|
2020
|
+
* 支持 marginLeft/marginRight 分项、'20px' 单值简写、'10px 20px' 两值简写
|
|
2021
|
+
**/
|
|
2022
|
+
var getHorizontalMargin = function getHorizontalMargin(style) {
|
|
2023
|
+
if (!style) return 0;
|
|
2024
|
+
var toPx = function toPx(val) {
|
|
2025
|
+
return val ? parseFloat(val) || 0 : 0;
|
|
2026
|
+
};
|
|
2027
|
+
// 驼峰(marginLeft)和连字符(margin-left)两种键名都兼容
|
|
2028
|
+
var left = toPx(style.marginLeft || style['margin-left']);
|
|
2029
|
+
var right = toPx(style.marginRight || style['margin-right']);
|
|
2030
|
+
if (left || right) {
|
|
2031
|
+
return left + right;
|
|
2032
|
+
}
|
|
2033
|
+
if (style.margin) {
|
|
2034
|
+
var parts = String(style.margin).trim().split(/\s+/).map(toPx);
|
|
2035
|
+
if (parts.length === 1) {
|
|
2036
|
+
return parts[0] * 2;
|
|
2037
|
+
}
|
|
2038
|
+
if (parts.length >= 2) {
|
|
2039
|
+
return parts[1] * 2;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
return 0;
|
|
2043
|
+
};
|
|
2044
|
+
|
|
2017
2045
|
/**
|
|
2018
2046
|
* layoutWaterfall
|
|
2019
|
-
* @desc
|
|
2047
|
+
* @desc 瀑布流布局计算
|
|
2020
2048
|
* @author huangbo
|
|
2021
2049
|
* @date 2022年5月7日
|
|
2022
|
-
* @param {String} url - JS文件地址
|
|
2023
|
-
* @param {Function} [callback] - 回调函数
|
|
2024
2050
|
**/
|
|
2025
2051
|
var layoutWaterfall = function layoutWaterfall(self, container, pages, columns, gap) {
|
|
2026
2052
|
if (!container) return;
|
|
@@ -2070,7 +2096,10 @@ var layoutWaterfall = function layoutWaterfall(self, container, pages, columns,
|
|
|
2070
2096
|
// 计算元素宽度和位置
|
|
2071
2097
|
var existingWidth = item.style && item.style.width ? parseInt(item.style.width, 10) : null;
|
|
2072
2098
|
var hasSpan = item.style && item.style.span || item.span;
|
|
2073
|
-
|
|
2099
|
+
// margin 在盒模型之外也要占列槽,槽内可用宽度需扣除水平 margin,
|
|
2100
|
+
// 保证 width + margin 刚好填满 span 个列槽(border-box 下 border 已含在 width 里)
|
|
2101
|
+
var marginH = getHorizontalMargin(item.style);
|
|
2102
|
+
var calculatedWidth = columnWidth * span + gap * (span - 1) - marginH;
|
|
2074
2103
|
var useCustomWidth = !hasSpan && existingWidth;
|
|
2075
2104
|
var elementWidth = useCustomWidth ? existingWidth : calculatedWidth;
|
|
2076
2105
|
|
|
@@ -4107,7 +4136,7 @@ var getColor = function getColor($color, $n) {
|
|
|
4107
4136
|
var getLightness = function getLightness($v, $i, $isLight) {
|
|
4108
4137
|
var $value = $isLight ? $v + $brightnessStep1 * $i : $v - $brightnessStep2 * $i;
|
|
4109
4138
|
$value = $value < 1 ? $value : 1;
|
|
4110
|
-
return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "
|
|
4139
|
+
return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "V"])($value, 2);
|
|
4111
4140
|
};
|
|
4112
4141
|
|
|
4113
4142
|
/**
|
|
@@ -4131,7 +4160,7 @@ var getSaturation = function getSaturation($s, $i, $isLight) {
|
|
|
4131
4160
|
$saturation = 0.1;
|
|
4132
4161
|
}
|
|
4133
4162
|
$saturation = $saturation > 0.06 ? $saturation : 0.06;
|
|
4134
|
-
return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "
|
|
4163
|
+
return Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* toFixed */ "V"])($saturation, 2);
|
|
4135
4164
|
};
|
|
4136
4165
|
|
|
4137
4166
|
/**
|
|
@@ -5602,7 +5631,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
5602
5631
|
var flag = true;
|
|
5603
5632
|
this.checkboxs.forEach(function (item) {
|
|
5604
5633
|
if (Object(types["d" /* isObject */])(item)) {
|
|
5605
|
-
if (Object(util["
|
|
5634
|
+
if (Object(util["A" /* indexOfObj */])(val, item) === -1) {
|
|
5606
5635
|
flag = false;
|
|
5607
5636
|
return;
|
|
5608
5637
|
}
|
|
@@ -5669,7 +5698,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
5669
5698
|
}
|
|
5670
5699
|
} else {
|
|
5671
5700
|
selection.length && (this.checkeds = this.checkeds.filter(function (item) {
|
|
5672
|
-
return Object(util["
|
|
5701
|
+
return Object(util["A" /* indexOfObj */])(selection, item, _this2.valueKey) === -1;
|
|
5673
5702
|
}));
|
|
5674
5703
|
}
|
|
5675
5704
|
},
|
|
@@ -5748,7 +5777,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
5748
5777
|
handleChange: function handleChange() {},
|
|
5749
5778
|
handleConfirm: function handleConfirm() {
|
|
5750
5779
|
if (!this.checkeds || this.multiple && this.checkeds.length === 0) {
|
|
5751
|
-
Object(util["
|
|
5780
|
+
Object(util["bb" /* warning */])('请选择');
|
|
5752
5781
|
} else {
|
|
5753
5782
|
this.$emit('input', this.checkeds);
|
|
5754
5783
|
this.$emit('confirm', this.checkeds);
|
|
@@ -9704,6 +9733,7 @@ module.exports = require("eoss/lib/message-box");
|
|
|
9704
9733
|
"use strict";
|
|
9705
9734
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ajax; });
|
|
9706
9735
|
/* unused harmony export stream */
|
|
9736
|
+
/* unused harmony export initAuth */
|
|
9707
9737
|
/* unused harmony export isLogined */
|
|
9708
9738
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getMainConfig; });
|
|
9709
9739
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getSysCodeList; });
|
|
@@ -9762,7 +9792,8 @@ var statusMap = {
|
|
|
9762
9792
|
};
|
|
9763
9793
|
|
|
9764
9794
|
// let loginMsg;
|
|
9765
|
-
var
|
|
9795
|
+
var preAuth = void 0; // 二次鉴权定时器
|
|
9796
|
+
var loginExpired = false; // 登录失效提示锁,避免多个请求同时弹出提示
|
|
9766
9797
|
|
|
9767
9798
|
var FatalError = function (_Error) {
|
|
9768
9799
|
_inherits(FatalError, _Error);
|
|
@@ -9958,7 +9989,7 @@ var ajax = function ajax(_ref) {
|
|
|
9958
9989
|
delete params[key];
|
|
9959
9990
|
}
|
|
9960
9991
|
}
|
|
9961
|
-
url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "
|
|
9992
|
+
url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "Y"])({ url: url, param: encodedParams });
|
|
9962
9993
|
}
|
|
9963
9994
|
} else {
|
|
9964
9995
|
params = {};
|
|
@@ -10237,6 +10268,10 @@ var stream = function stream(_ref2) {
|
|
|
10237
10268
|
var responses = function responses(data) {
|
|
10238
10269
|
// 处理登录过期或账号在别处登录的情况
|
|
10239
10270
|
if ([64, 65, 67, 69].includes(data.rCode)) {
|
|
10271
|
+
// 已经处理过,直接返回
|
|
10272
|
+
if (loginExpired) return;
|
|
10273
|
+
loginExpired = true;
|
|
10274
|
+
|
|
10240
10275
|
// 清除存储的认证信息
|
|
10241
10276
|
Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* removeStorage */ "b"])(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
|
|
10242
10277
|
|
|
@@ -10248,12 +10283,12 @@ var responses = function responses(data) {
|
|
|
10248
10283
|
href = window.location.href;
|
|
10249
10284
|
}
|
|
10250
10285
|
|
|
10251
|
-
//
|
|
10286
|
+
// 不在登录页才弹提示
|
|
10252
10287
|
if (href.indexOf('/login.html') === -1) {
|
|
10253
|
-
|
|
10254
10288
|
eoss_packages_message__WEBPACK_IMPORTED_MODULE_9___default.a.warning({
|
|
10255
10289
|
message: data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!',
|
|
10256
10290
|
onClose: function onClose() {
|
|
10291
|
+
loginExpired = false; // 关闭提示后重置,允许下次触发
|
|
10257
10292
|
try {
|
|
10258
10293
|
redirectToLogin();
|
|
10259
10294
|
} catch (error) {
|
|
@@ -10263,11 +10298,14 @@ var responses = function responses(data) {
|
|
|
10263
10298
|
}
|
|
10264
10299
|
}
|
|
10265
10300
|
});
|
|
10301
|
+
} else {
|
|
10302
|
+
// 已在登录页,直接重置
|
|
10303
|
+
loginExpired = false;
|
|
10266
10304
|
}
|
|
10267
10305
|
} else if (data.rCode === 61) {
|
|
10268
10306
|
// 处理二次鉴权
|
|
10269
|
-
clearTimeout(
|
|
10270
|
-
|
|
10307
|
+
clearTimeout(preAuth);
|
|
10308
|
+
preAuth = setTimeout(function () {
|
|
10271
10309
|
eoss_packages_message_box__WEBPACK_IMPORTED_MODULE_8___default()({
|
|
10272
10310
|
title: '请进行二次鉴权',
|
|
10273
10311
|
closeOnClickModal: false,
|
|
@@ -10309,7 +10347,7 @@ function redirectToLogin() {
|
|
|
10309
10347
|
|
|
10310
10348
|
if (loginPage) {
|
|
10311
10349
|
// 处理相对路径
|
|
10312
|
-
if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "
|
|
10350
|
+
if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "S"])(loginPage, ['http', '/'], true)) {
|
|
10313
10351
|
var pathname = '';
|
|
10314
10352
|
try {
|
|
10315
10353
|
pathname = window.top.location.pathname;
|
|
@@ -10334,6 +10372,75 @@ function redirectToLogin() {
|
|
|
10334
10372
|
}
|
|
10335
10373
|
}
|
|
10336
10374
|
|
|
10375
|
+
/**
|
|
10376
|
+
* initAuth
|
|
10377
|
+
* @desc: 初始化认证(在 main.js 中调用,认证完成后再挂载 Vue)
|
|
10378
|
+
* 检查 URL 参数是否包含 serverId 和 authType,如果有则先完成认证
|
|
10379
|
+
* @returns {Promise} 认证完成后 resolve
|
|
10380
|
+
*/
|
|
10381
|
+
function initAuth() {
|
|
10382
|
+
var params = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "t"])();
|
|
10383
|
+
var token = Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('token') || Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* getStorage */ "a"])('Authorization');
|
|
10384
|
+
|
|
10385
|
+
// 已有 token 或没有认证参数,直接返回
|
|
10386
|
+
if (token || !params.serverId || !params.authType) {
|
|
10387
|
+
return Promise.resolve();
|
|
10388
|
+
}
|
|
10389
|
+
|
|
10390
|
+
var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "L"])('页面加载中...');
|
|
10391
|
+
|
|
10392
|
+
return ajax({
|
|
10393
|
+
method: 'post',
|
|
10394
|
+
url: _config_api__WEBPACK_IMPORTED_MODULE_7__[/* authCenter */ "b"],
|
|
10395
|
+
data: params
|
|
10396
|
+
}).then(function (res) {
|
|
10397
|
+
if (res.rCode === 0) {
|
|
10398
|
+
// 保存认证信息
|
|
10399
|
+
var results = res.results;
|
|
10400
|
+
if (results.statusCode === 0) {
|
|
10401
|
+
Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* setStorage */ "c"])({
|
|
10402
|
+
key: {
|
|
10403
|
+
ssId: results.ssId,
|
|
10404
|
+
token: results.token,
|
|
10405
|
+
Authorization: results.token,
|
|
10406
|
+
deviceUnique: results.deviceUnique
|
|
10407
|
+
}
|
|
10408
|
+
});
|
|
10409
|
+
// 清理 URL 参数并刷新
|
|
10410
|
+
try {
|
|
10411
|
+
var url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* delUrlParam */ "j"])({
|
|
10412
|
+
url: window.top.location.href,
|
|
10413
|
+
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
10414
|
+
});
|
|
10415
|
+
window.top.location.href = url;
|
|
10416
|
+
} catch (e) {
|
|
10417
|
+
var _url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* delUrlParam */ "j"])({
|
|
10418
|
+
url: window.location.href,
|
|
10419
|
+
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
10420
|
+
});
|
|
10421
|
+
window.location.href = _url;
|
|
10422
|
+
}
|
|
10423
|
+
} else if (results.statusCode === 3) {
|
|
10424
|
+
// 跳转到授权URL
|
|
10425
|
+
try {
|
|
10426
|
+
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(window.top.location.href));
|
|
10427
|
+
window.top.location.href = href;
|
|
10428
|
+
} catch (e) {
|
|
10429
|
+
var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(window.location.href));
|
|
10430
|
+
window.location.href = _href;
|
|
10431
|
+
}
|
|
10432
|
+
}
|
|
10433
|
+
} else {
|
|
10434
|
+
eoss_packages_message__WEBPACK_IMPORTED_MODULE_9___default.a.error(res.msg || '认证失败');
|
|
10435
|
+
}
|
|
10436
|
+
}).catch(function (error) {
|
|
10437
|
+
console.error('认证中心请求失败:', error);
|
|
10438
|
+
eoss_packages_message__WEBPACK_IMPORTED_MODULE_9___default.a.error('认证请求失败');
|
|
10439
|
+
}).finally(function () {
|
|
10440
|
+
loadingInstance.close();
|
|
10441
|
+
});
|
|
10442
|
+
}
|
|
10443
|
+
|
|
10337
10444
|
/**
|
|
10338
10445
|
* isLogined
|
|
10339
10446
|
* @desc:是否登录(用于路由守卫中)
|
|
@@ -10359,7 +10466,7 @@ var isLogined = function isLogined(_ref3) {
|
|
|
10359
10466
|
|
|
10360
10467
|
// 处理cookie参数
|
|
10361
10468
|
if (cookie === undefined) {
|
|
10362
|
-
cookie = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "
|
|
10469
|
+
cookie = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* getParams */ "t"])({ name: 'cookie' });
|
|
10363
10470
|
}
|
|
10364
10471
|
|
|
10365
10472
|
// 处理登录页面路径
|
|
@@ -10374,7 +10481,7 @@ var isLogined = function isLogined(_ref3) {
|
|
|
10374
10481
|
sessionStorage.setItem('loginPage', loginPage);
|
|
10375
10482
|
|
|
10376
10483
|
// 处理相对路径
|
|
10377
|
-
if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "
|
|
10484
|
+
if (!Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* startWith */ "S"])(loginPage, ['http', '/'], true)) {
|
|
10378
10485
|
if (pathname !== '/') {
|
|
10379
10486
|
var pathParts = pathname.split('/');
|
|
10380
10487
|
pathParts.splice(pathParts.length - 1);
|
|
@@ -10394,33 +10501,12 @@ var isLogined = function isLogined(_ref3) {
|
|
|
10394
10501
|
if (token || cookie === true || cookie === '1') {
|
|
10395
10502
|
next && next();
|
|
10396
10503
|
} else {
|
|
10397
|
-
//
|
|
10398
|
-
if (
|
|
10399
|
-
|
|
10400
|
-
var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "K"])('页面加载中...');
|
|
10401
|
-
|
|
10402
|
-
try {
|
|
10403
|
-
var res = ajax({
|
|
10404
|
-
method: 'post',
|
|
10405
|
-
url: _config_api__WEBPACK_IMPORTED_MODULE_7__[/* authCenter */ "b"],
|
|
10406
|
-
data: to.query
|
|
10407
|
-
});
|
|
10408
|
-
|
|
10409
|
-
if (res.rCode === 0) {
|
|
10410
|
-
handleAuthCenterResponse(res.results, loginPage, next);
|
|
10411
|
-
} else {
|
|
10412
|
-
handleAuthError(res.msg, loginPage, next);
|
|
10413
|
-
}
|
|
10414
|
-
} catch (error) {
|
|
10415
|
-
console.error('认证中心请求失败:', error);
|
|
10416
|
-
} finally {
|
|
10417
|
-
loadingInstance.close();
|
|
10418
|
-
}
|
|
10419
|
-
} else if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
|
|
10504
|
+
// 认证已在 main.js 的 initAuth 中完成,这里只检查登录状态
|
|
10505
|
+
if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
|
|
10420
10506
|
|
|
10421
10507
|
// 处理重定向
|
|
10422
10508
|
if (redirect && (to.path === '/main' || to.path === '/login')) {
|
|
10423
|
-
window.location.replace(Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "
|
|
10509
|
+
window.location.replace(Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "Y"])({ url: '.' + to.path + '.html', param: to.query }));
|
|
10424
10510
|
} else {
|
|
10425
10511
|
next();
|
|
10426
10512
|
}
|
|
@@ -10437,83 +10523,6 @@ var isLogined = function isLogined(_ref3) {
|
|
|
10437
10523
|
}
|
|
10438
10524
|
};
|
|
10439
10525
|
|
|
10440
|
-
/**
|
|
10441
|
-
* 处理认证中心响应
|
|
10442
|
-
* @param {Object} results - 认证结果
|
|
10443
|
-
* @param {String} loginPage - 登录页面地址
|
|
10444
|
-
* @param {Function} next - 路由跳转函数
|
|
10445
|
-
*/
|
|
10446
|
-
function handleAuthCenterResponse(results, loginPage, next) {
|
|
10447
|
-
switch (results.statusCode) {
|
|
10448
|
-
case 0:
|
|
10449
|
-
// 设置认证信息
|
|
10450
|
-
Object(_storage__WEBPACK_IMPORTED_MODULE_4__[/* setStorage */ "c"])({
|
|
10451
|
-
key: {
|
|
10452
|
-
ssId: results.ssId,
|
|
10453
|
-
token: results.token,
|
|
10454
|
-
Authorization: results.token,
|
|
10455
|
-
deviceUnique: results.deviceUnique
|
|
10456
|
-
}
|
|
10457
|
-
});
|
|
10458
|
-
|
|
10459
|
-
// 重定向到清理参数后的URL
|
|
10460
|
-
try {
|
|
10461
|
-
var url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* delUrlParam */ "j"])({
|
|
10462
|
-
url: window.top.location.href,
|
|
10463
|
-
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
10464
|
-
});
|
|
10465
|
-
window.top.location.href = url;
|
|
10466
|
-
setTimeout(function () {
|
|
10467
|
-
window.top.location.reload();
|
|
10468
|
-
}, 200);
|
|
10469
|
-
} catch (error) {
|
|
10470
|
-
var _url = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* delUrlParam */ "j"])({
|
|
10471
|
-
url: window.location.href,
|
|
10472
|
-
key: ['serverId', 'authType', 'code', 'sessionId']
|
|
10473
|
-
});
|
|
10474
|
-
window.location.href = _url;
|
|
10475
|
-
setTimeout(function () {
|
|
10476
|
-
window.location.reload();
|
|
10477
|
-
}, 200);
|
|
10478
|
-
}
|
|
10479
|
-
break;
|
|
10480
|
-
case 3:
|
|
10481
|
-
// 跳转到授权URL
|
|
10482
|
-
try {
|
|
10483
|
-
var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(window.top.location.href));
|
|
10484
|
-
window.top.location.href = href;
|
|
10485
|
-
} catch (error) {
|
|
10486
|
-
var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(window.location.href));
|
|
10487
|
-
window.location.href = _href;
|
|
10488
|
-
}
|
|
10489
|
-
break;
|
|
10490
|
-
case 4:
|
|
10491
|
-
// 账号未绑定
|
|
10492
|
-
eoss_packages_message__WEBPACK_IMPORTED_MODULE_9___default.a.error({
|
|
10493
|
-
message: results.msg || '账号未绑定,账号密码登录后自动绑定!',
|
|
10494
|
-
onClose: function onClose() {
|
|
10495
|
-
sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
|
|
10496
|
-
redirectToLoginPage(loginPage, next);
|
|
10497
|
-
} });
|
|
10498
|
-
break;
|
|
10499
|
-
}
|
|
10500
|
-
}
|
|
10501
|
-
|
|
10502
|
-
/**
|
|
10503
|
-
* 处理认证错误
|
|
10504
|
-
* @param {String} message - 错误消息
|
|
10505
|
-
* @param {String} loginPage - 登录页面地址
|
|
10506
|
-
* @param {Function} next - 路由跳转函数
|
|
10507
|
-
*/
|
|
10508
|
-
function handleAuthError(message, loginPage, next) {
|
|
10509
|
-
eoss_packages_message__WEBPACK_IMPORTED_MODULE_9___default.a.error({
|
|
10510
|
-
message: message,
|
|
10511
|
-
onClose: function onClose() {
|
|
10512
|
-
redirectToLoginPage(loginPage, next);
|
|
10513
|
-
}
|
|
10514
|
-
});
|
|
10515
|
-
}
|
|
10516
|
-
|
|
10517
10526
|
/**
|
|
10518
10527
|
* 重定向到登录页面(带错误处理)
|
|
10519
10528
|
* @param {String} loginPage - 登录页面地址
|
|
@@ -10700,7 +10709,7 @@ var downloadFile = function downloadFile(_ref6) {
|
|
|
10700
10709
|
|
|
10701
10710
|
// 拼接URL参数
|
|
10702
10711
|
if (Object.keys(params).length > 0) {
|
|
10703
|
-
downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "
|
|
10712
|
+
downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "Y"])({ url: downloadUrl, param: params });
|
|
10704
10713
|
}
|
|
10705
10714
|
} else if (file.raw) {
|
|
10706
10715
|
downloadUrl = URL.createObjectURL(file.raw);
|
|
@@ -10762,7 +10771,7 @@ var downloadZip = function downloadZip(_ref7) {
|
|
|
10762
10771
|
|
|
10763
10772
|
// 拼接URL参数
|
|
10764
10773
|
if (Object.keys(params).length > 0) {
|
|
10765
|
-
downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "
|
|
10774
|
+
downloadUrl = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* urlJoinParams */ "Y"])({ url: downloadUrl, param: params });
|
|
10766
10775
|
}
|
|
10767
10776
|
|
|
10768
10777
|
// 创建a标签
|
|
@@ -10867,7 +10876,7 @@ var getTableData = function getTableData(_ref9) {
|
|
|
10867
10876
|
onSuccess = _ref9.onSuccess,
|
|
10868
10877
|
onError = _ref9.onError;
|
|
10869
10878
|
|
|
10870
|
-
var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "
|
|
10879
|
+
var loadingInstance = Object(_util__WEBPACK_IMPORTED_MODULE_6__[/* loading */ "L"])('数据加载中...');
|
|
10871
10880
|
return new Promise(function (resolve, reject) {
|
|
10872
10881
|
ajax({
|
|
10873
10882
|
method: method,
|