ele-admin-plus 1.2.0 → 1.2.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/ele-admin-layout/index.d.ts +11 -1
- package/es/ele-admin-layout/index.js +53 -47
- package/es/ele-admin-layout/props.d.ts +10 -0
- package/es/ele-admin-layout/props.js +10 -0
- package/es/ele-app/components/message-body.d.ts +6 -0
- package/es/ele-app/components/message-body.js +10 -4
- package/es/ele-app/components/message-box-icon.d.ts +30 -0
- package/es/ele-app/components/message-box-icon.js +63 -0
- package/es/ele-app/el.d.ts +7 -0
- package/es/ele-app/style/overwrite/message-box/index.scss +19 -0
- package/es/ele-card/index.js +1 -1
- package/es/ele-pro-layout/index.d.ts +12 -2
- package/es/ele-pro-layout/index.js +6 -1
- package/es/ele-pro-layout/props.d.ts +10 -0
- package/es/ele-pro-layout/props.js +10 -0
- package/es/ele-pro-table/types.d.ts +3 -3
- package/es/ele-qr-code/qrcodegen.js +34 -70
- package/es/icons/MenuOutlined.d.ts +2 -0
- package/es/icons/MenuOutlined.js +32 -0
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.js +84 -82
- package/es/utils/message-box.js +28 -2
- package/es/utils/message.js +36 -13
- package/lib/components.cjs +4 -5
- package/lib/core-export.cjs +28 -35
- package/lib/core.cjs +8 -10
- package/lib/ele-admin-layout/index.cjs +53 -47
- package/lib/ele-admin-layout/index.d.ts +11 -1
- package/lib/ele-admin-layout/props.cjs +10 -0
- package/lib/ele-admin-layout/props.d.ts +10 -0
- package/lib/ele-app/components/message-body.cjs +9 -3
- package/lib/ele-app/components/message-body.d.ts +6 -0
- package/lib/ele-app/components/message-box-icon.cjs +62 -0
- package/lib/ele-app/components/message-box-icon.d.ts +30 -0
- package/lib/ele-app/el.d.ts +7 -0
- package/lib/ele-app/style/overwrite/message-box/index.scss +19 -0
- package/lib/ele-card/index.cjs +1 -1
- package/lib/ele-pro-layout/index.cjs +6 -1
- package/lib/ele-pro-layout/index.d.ts +12 -2
- package/lib/ele-pro-layout/props.cjs +10 -0
- package/lib/ele-pro-layout/props.d.ts +10 -0
- package/lib/ele-pro-table/types.d.ts +3 -3
- package/lib/ele-qr-code/qrcodegen.cjs +34 -70
- package/lib/icons/MenuOutlined.cjs +31 -0
- package/lib/icons/MenuOutlined.d.ts +2 -0
- package/lib/icons/index.cjs +2 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/index.cjs +8 -10
- package/lib/utils/message-box.cjs +27 -1
- package/lib/utils/message.cjs +35 -12
- package/package.json +11 -11
package/lib/ele-app/el.d.ts
CHANGED
|
@@ -54,6 +54,8 @@ import type {
|
|
|
54
54
|
MenuItemGroupProps,
|
|
55
55
|
// ElMessage
|
|
56
56
|
MessageOptions,
|
|
57
|
+
// ElMessageBox
|
|
58
|
+
ElMessageBoxOptions as MessageBoxOptions,
|
|
57
59
|
// ElPopper
|
|
58
60
|
ElPopper,
|
|
59
61
|
ElPopover,
|
|
@@ -220,6 +222,11 @@ export type ElMenuItemGroupProps = ComponentProps<MenuItemGroupProps>;
|
|
|
220
222
|
*/
|
|
221
223
|
export type ElMessageOptions = Partial<MessageOptions>;
|
|
222
224
|
|
|
225
|
+
/**
|
|
226
|
+
* ElMessageBox
|
|
227
|
+
*/
|
|
228
|
+
export type ElMessageBoxOptions = Partial<MessageBoxOptions>;
|
|
229
|
+
|
|
223
230
|
/**
|
|
224
231
|
* ElPopper
|
|
225
232
|
*/
|
|
@@ -101,6 +101,25 @@ body .el-overlay.is-message-box > .el-overlay-message-box {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/* useMessageBox */
|
|
105
|
+
.ele-message-box > .el-message-box__content > .el-message-box__container {
|
|
106
|
+
gap: 0;
|
|
107
|
+
|
|
108
|
+
& > .el-message-box__status {
|
|
109
|
+
width: auto;
|
|
110
|
+
height: auto;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.ele-message-box-icon {
|
|
115
|
+
width: 1em;
|
|
116
|
+
height: 1em;
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
margin-right: 12px;
|
|
121
|
+
}
|
|
122
|
+
|
|
104
123
|
/* 容器 */
|
|
105
124
|
.ele-message-box-wrapper {
|
|
106
125
|
position: absolute;
|
package/lib/ele-card/index.cjs
CHANGED
|
@@ -90,7 +90,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
90
90
|
class: "ele-card-collapse-icon",
|
|
91
91
|
onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.handleCollapseClick && _ctx.handleCollapseClick(...args), ["stop"]))
|
|
92
92
|
}, [
|
|
93
|
-
vue.renderSlot(_ctx.$slots, "collapseIcon", {}, () => [
|
|
93
|
+
vue.renderSlot(_ctx.$slots, "collapseIcon", { collapse: _ctx.isCollapse }, () => [
|
|
94
94
|
vue.createVNode(_component_ElIcon, null, {
|
|
95
95
|
default: vue.withCtx(() => [
|
|
96
96
|
vue.createVNode(_component_ArrowUp)
|
|
@@ -902,6 +902,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
902
902
|
sideboxCustomStyle: _ctx.sideboxCustomStyle,
|
|
903
903
|
tabsCustomStyle: _ctx.tabsCustomStyle,
|
|
904
904
|
contentCustomStyle: _ctx.contentCustomStyle,
|
|
905
|
+
logoStyle: _ctx.logoStyle,
|
|
906
|
+
logoTitleStyle: _ctx.logoTitleStyle,
|
|
907
|
+
headerMenusStyle: _ctx.headerMenusStyle,
|
|
908
|
+
sidebarMenusStyle: _ctx.sidebarMenusStyle,
|
|
909
|
+
sideboxMenusStyle: _ctx.sideboxMenusStyle,
|
|
905
910
|
mobile: _ctx.mobile,
|
|
906
911
|
class: vue.normalizeClass(["ele-pro-layout", { "ele-admin-limited": !_ctx.fluid }]),
|
|
907
912
|
"onUpdate:collapse": _ctx.updateCollapse,
|
|
@@ -1015,7 +1020,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1015
1020
|
])
|
|
1016
1021
|
};
|
|
1017
1022
|
})
|
|
1018
|
-
]), 1032, ["height", "headerMenus", "headerActive", "sidebarMenus", "sidebarActive", "sideboxMenus", "sideboxActive", "tabs", "tabActive", "levels", "collapse", "compact", "maximized", "tabBar", "breadcrumb", "backTop", "headerMenuProps", "sidebarMenuProps", "sideboxMenuProps", "layout", "sidebarLayout", "headerStyle", "sidebarStyle", "tabStyle", "fixedHeader", "fixedSidebar", "fixedBody", "logoInHeader", "fixedHome", "homePath", "isHome", "tabContextMenu", "tabContextMenus", "tabSortable", "headerTitleSlot", "headerIconSlot", "sidebarTitleSlot", "sidebarIconSlot", "sideboxTitleSlot", "sideboxIconSlot", "headerCustomStyle", "sidebarCustomStyle", "sideboxCustomStyle", "tabsCustomStyle", "contentCustomStyle", "mobile", "class", "onUpdate:collapse", "onLogoClick", "onHeadMenuOpen", "onHeadMenuClose", "onHeadMenuItemClick", "onHeadMenuItemMouseenter", "onHeadMouseenter", "onHeadMouseleave", "onBoxMenuItemClick", "onBoxMenuItemMouseenter", "onBoxMouseenter", "onBoxMouseleave", "onSideMenuOpen", "onSideMenuClose", "onSideMenuItemClick", "onSideMouseenter", "onSideMouseleave", "onTabClick", "onTabRemove", "onTabContextMenu", "onTabSortChange"]);
|
|
1023
|
+
]), 1032, ["height", "headerMenus", "headerActive", "sidebarMenus", "sidebarActive", "sideboxMenus", "sideboxActive", "tabs", "tabActive", "levels", "collapse", "compact", "maximized", "tabBar", "breadcrumb", "backTop", "headerMenuProps", "sidebarMenuProps", "sideboxMenuProps", "layout", "sidebarLayout", "headerStyle", "sidebarStyle", "tabStyle", "fixedHeader", "fixedSidebar", "fixedBody", "logoInHeader", "fixedHome", "homePath", "isHome", "tabContextMenu", "tabContextMenus", "tabSortable", "headerTitleSlot", "headerIconSlot", "sidebarTitleSlot", "sidebarIconSlot", "sideboxTitleSlot", "sideboxIconSlot", "headerCustomStyle", "sidebarCustomStyle", "sideboxCustomStyle", "tabsCustomStyle", "contentCustomStyle", "logoStyle", "logoTitleStyle", "headerMenusStyle", "sidebarMenusStyle", "sideboxMenusStyle", "mobile", "class", "onUpdate:collapse", "onLogoClick", "onHeadMenuOpen", "onHeadMenuClose", "onHeadMenuItemClick", "onHeadMenuItemMouseenter", "onHeadMouseenter", "onHeadMouseleave", "onBoxMenuItemClick", "onBoxMenuItemMouseenter", "onBoxMouseenter", "onBoxMouseleave", "onSideMenuOpen", "onSideMenuClose", "onSideMenuItemClick", "onSideMouseenter", "onSideMouseleave", "onTabClick", "onTabRemove", "onTabContextMenu", "onTabSortChange"]);
|
|
1019
1024
|
}
|
|
1020
1025
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
1021
1026
|
module.exports = index;
|
|
@@ -123,6 +123,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
123
123
|
sideboxCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
124
124
|
tabsCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
125
125
|
contentCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
126
|
+
logoStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
127
|
+
logoTitleStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
128
|
+
headerMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
129
|
+
sidebarMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
130
|
+
sideboxMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
126
131
|
headerMenuProps: import('vue').PropType<EleMenusProps>;
|
|
127
132
|
sidebarMenuProps: import('vue').PropType<EleMenusProps>;
|
|
128
133
|
sideboxMenuProps: import('vue').PropType<EleMenusProps>;
|
|
@@ -145,7 +150,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
145
150
|
backTopVisibilityHeight: NumberConstructor;
|
|
146
151
|
backTopRight: NumberConstructor;
|
|
147
152
|
backTopBottom: NumberConstructor;
|
|
148
|
-
backTopTarget: StringConstructor;
|
|
153
|
+
backTopTarget: StringConstructor; /** 当前路由布局风格 */
|
|
149
154
|
}, {
|
|
150
155
|
layoutRef: import('vue').Ref<EleAdminLayoutInstance>;
|
|
151
156
|
navActive: import('vue').Ref<string | undefined>;
|
|
@@ -327,6 +332,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
327
332
|
sideboxCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
328
333
|
tabsCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
329
334
|
contentCustomStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
335
|
+
logoStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
336
|
+
logoTitleStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
337
|
+
headerMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
338
|
+
sidebarMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
339
|
+
sideboxMenusStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
330
340
|
headerMenuProps: import('vue').PropType<EleMenusProps>;
|
|
331
341
|
sidebarMenuProps: import('vue').PropType<EleMenusProps>;
|
|
332
342
|
sideboxMenuProps: import('vue').PropType<EleMenusProps>;
|
|
@@ -349,7 +359,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
349
359
|
backTopVisibilityHeight: NumberConstructor;
|
|
350
360
|
backTopRight: NumberConstructor;
|
|
351
361
|
backTopBottom: NumberConstructor;
|
|
352
|
-
backTopTarget: StringConstructor;
|
|
362
|
+
backTopTarget: StringConstructor; /** 当前路由布局风格 */
|
|
353
363
|
}>> & {
|
|
354
364
|
onTabClick?: ((_option: TabItemEventOption) => any) | undefined;
|
|
355
365
|
onTabRemove?: ((_option: TabItemEventOption) => any) | undefined;
|
|
@@ -165,6 +165,16 @@ const proLayoutProps = {
|
|
|
165
165
|
tabsCustomStyle: Object,
|
|
166
166
|
/** 内容区样式 */
|
|
167
167
|
contentCustomStyle: Object,
|
|
168
|
+
/** logo样式 */
|
|
169
|
+
logoStyle: Object,
|
|
170
|
+
/** logo文字样式 */
|
|
171
|
+
logoTitleStyle: Object,
|
|
172
|
+
/** 顶栏菜单样式 */
|
|
173
|
+
headerMenusStyle: Object,
|
|
174
|
+
/** 侧栏菜单样式 */
|
|
175
|
+
sidebarMenusStyle: Object,
|
|
176
|
+
/** 双侧栏一级菜单样式 */
|
|
177
|
+
sideboxMenusStyle: Object,
|
|
168
178
|
/** 顶栏菜单属性 */
|
|
169
179
|
headerMenuProps: Object,
|
|
170
180
|
/** 侧栏菜单属性 */
|
|
@@ -174,6 +174,16 @@ export declare const proLayoutProps: {
|
|
|
174
174
|
tabsCustomStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
175
175
|
/** 内容区样式 */
|
|
176
176
|
contentCustomStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
177
|
+
/** logo样式 */
|
|
178
|
+
logoStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
179
|
+
/** logo文字样式 */
|
|
180
|
+
logoTitleStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
181
|
+
/** 顶栏菜单样式 */
|
|
182
|
+
headerMenusStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
183
|
+
/** 侧栏菜单样式 */
|
|
184
|
+
sidebarMenusStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
185
|
+
/** 双侧栏一级菜单样式 */
|
|
186
|
+
sideboxMenusStyle: PropType<Partial<import('vue').CSSProperties>>;
|
|
177
187
|
/** 顶栏菜单属性 */
|
|
178
188
|
headerMenuProps: PropType<EleMenusProps>;
|
|
179
189
|
/** 侧栏菜单属性 */
|
|
@@ -327,7 +327,7 @@ export interface ExportDataItem {
|
|
|
327
327
|
rowspan?: number;
|
|
328
328
|
/** 是否是展开行的单元格 */
|
|
329
329
|
isExpandCell?: boolean;
|
|
330
|
-
/**
|
|
330
|
+
/** 是否显示树展开图标的单元格 */
|
|
331
331
|
isTreeCell?: boolean;
|
|
332
332
|
/** 是否是树叶子节点 */
|
|
333
333
|
isTreeLeaf?: boolean;
|
|
@@ -335,9 +335,9 @@ export interface ExportDataItem {
|
|
|
335
335
|
indent?: number;
|
|
336
336
|
/** 是否是层级序号 */
|
|
337
337
|
isTreeIndex?: boolean;
|
|
338
|
-
/**
|
|
338
|
+
/** 层级序号是否隐藏左边框 */
|
|
339
339
|
hideLeftBorder?: boolean;
|
|
340
|
-
/**
|
|
340
|
+
/** 层级序号是否隐藏右边框 */
|
|
341
341
|
hideRightBorder?: boolean;
|
|
342
342
|
}
|
|
343
343
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __publicField = (obj, key, value) =>
|
|
5
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
|
-
return value;
|
|
7
|
-
};
|
|
4
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
5
|
var qrcodegen;
|
|
9
6
|
((qrcodegen2) => {
|
|
10
7
|
const _QrCode = class _QrCode {
|
|
@@ -31,12 +28,10 @@ var qrcodegen;
|
|
|
31
28
|
this.errorCorrectionLevel = errorCorrectionLevel;
|
|
32
29
|
if (version < _QrCode.MIN_VERSION || version > _QrCode.MAX_VERSION)
|
|
33
30
|
throw "Version value out of range";
|
|
34
|
-
if (msk < -1 || msk > 7)
|
|
35
|
-
throw "Mask value out of range";
|
|
31
|
+
if (msk < -1 || msk > 7) throw "Mask value out of range";
|
|
36
32
|
this.size = version * 4 + 17;
|
|
37
33
|
let row = [];
|
|
38
|
-
for (let i = 0; i < this.size; i++)
|
|
39
|
-
row.push(false);
|
|
34
|
+
for (let i = 0; i < this.size; i++) row.push(false);
|
|
40
35
|
for (let i = 0; i < this.size; i++) {
|
|
41
36
|
this.modules.push(row.slice());
|
|
42
37
|
this.isFunction.push(row.slice());
|
|
@@ -118,8 +113,7 @@ var qrcodegen;
|
|
|
118
113
|
for (const seg of segs) {
|
|
119
114
|
appendBits(seg.mode.modeBits, 4, bb);
|
|
120
115
|
appendBits(seg.numChars, seg.mode.numCharCountBits(version), bb);
|
|
121
|
-
for (const b of seg.getData())
|
|
122
|
-
bb.push(b);
|
|
116
|
+
for (const b of seg.getData()) bb.push(b);
|
|
123
117
|
}
|
|
124
118
|
assert(bb.length == dataUsedBits);
|
|
125
119
|
const dataCapacityBits = _QrCode.getNumDataCodewords(version, ecl) * 8;
|
|
@@ -130,8 +124,7 @@ var qrcodegen;
|
|
|
130
124
|
for (let padByte = 236; bb.length < dataCapacityBits; padByte ^= 236 ^ 17)
|
|
131
125
|
appendBits(padByte, 8, bb);
|
|
132
126
|
let dataCodewords = [];
|
|
133
|
-
while (dataCodewords.length * 8 < bb.length)
|
|
134
|
-
dataCodewords.push(0);
|
|
127
|
+
while (dataCodewords.length * 8 < bb.length) dataCodewords.push(0);
|
|
135
128
|
bb.forEach(
|
|
136
129
|
(b, i) => dataCodewords[i >>> 3] |= b << 7 - (i & 7)
|
|
137
130
|
);
|
|
@@ -174,8 +167,7 @@ var qrcodegen;
|
|
|
174
167
|
drawFormatBits(mask) {
|
|
175
168
|
const data = this.errorCorrectionLevel.formatBits << 3 | mask;
|
|
176
169
|
let rem = data;
|
|
177
|
-
for (let i = 0; i < 10; i++)
|
|
178
|
-
rem = rem << 1 ^ (rem >>> 9) * 1335;
|
|
170
|
+
for (let i = 0; i < 10; i++) rem = rem << 1 ^ (rem >>> 9) * 1335;
|
|
179
171
|
const bits = (data << 10 | rem) ^ 21522;
|
|
180
172
|
assert(bits >>> 15 == 0);
|
|
181
173
|
for (let i = 0; i <= 5; i++)
|
|
@@ -194,11 +186,9 @@ var qrcodegen;
|
|
|
194
186
|
// Draws two copies of the version bits (with its own error correction code),
|
|
195
187
|
// based on this object's version field, iff 7 <= version <= 40.
|
|
196
188
|
drawVersion() {
|
|
197
|
-
if (this.version < 7)
|
|
198
|
-
return;
|
|
189
|
+
if (this.version < 7) return;
|
|
199
190
|
let rem = this.version;
|
|
200
|
-
for (let i = 0; i < 12; i++)
|
|
201
|
-
rem = rem << 1 ^ (rem >>> 11) * 7973;
|
|
191
|
+
for (let i = 0; i < 12; i++) rem = rem << 1 ^ (rem >>> 11) * 7973;
|
|
202
192
|
const bits = this.version << 12 | rem;
|
|
203
193
|
assert(bits >>> 18 == 0);
|
|
204
194
|
for (let i = 0; i < 18; i++) {
|
|
@@ -264,8 +254,7 @@ var qrcodegen;
|
|
|
264
254
|
);
|
|
265
255
|
k += dat.length;
|
|
266
256
|
const ecc = _QrCode.reedSolomonComputeRemainder(dat, rsDiv);
|
|
267
|
-
if (i < numShortBlocks)
|
|
268
|
-
dat.push(0);
|
|
257
|
+
if (i < numShortBlocks) dat.push(0);
|
|
269
258
|
blocks.push(dat.concat(ecc));
|
|
270
259
|
}
|
|
271
260
|
let result = [];
|
|
@@ -285,8 +274,7 @@ var qrcodegen;
|
|
|
285
274
|
throw "Invalid argument";
|
|
286
275
|
let i = 0;
|
|
287
276
|
for (let right = this.size - 1; right >= 1; right -= 2) {
|
|
288
|
-
if (right == 6)
|
|
289
|
-
right = 5;
|
|
277
|
+
if (right == 6) right = 5;
|
|
290
278
|
for (let vert = 0; vert < this.size; vert++) {
|
|
291
279
|
for (let j = 0; j < 2; j++) {
|
|
292
280
|
const x = right - j;
|
|
@@ -307,8 +295,7 @@ var qrcodegen;
|
|
|
307
295
|
// the same mask value a second time will undo the mask. A final well-formed
|
|
308
296
|
// QR Code needs exactly one (not zero, two, etc.) mask applied.
|
|
309
297
|
applyMask(mask) {
|
|
310
|
-
if (mask < 0 || mask > 7)
|
|
311
|
-
throw "Mask value out of range";
|
|
298
|
+
if (mask < 0 || mask > 7) throw "Mask value out of range";
|
|
312
299
|
for (let y = 0; y < this.size; y++) {
|
|
313
300
|
for (let x = 0; x < this.size; x++) {
|
|
314
301
|
let invert;
|
|
@@ -356,10 +343,8 @@ var qrcodegen;
|
|
|
356
343
|
for (let x = 0; x < this.size; x++) {
|
|
357
344
|
if (this.modules[y][x] == runColor) {
|
|
358
345
|
runX++;
|
|
359
|
-
if (runX == 5)
|
|
360
|
-
|
|
361
|
-
else if (runX > 5)
|
|
362
|
-
result++;
|
|
346
|
+
if (runX == 5) result += _QrCode.PENALTY_N1;
|
|
347
|
+
else if (runX > 5) result++;
|
|
363
348
|
} else {
|
|
364
349
|
this.finderPenaltyAddHistory(runX, runHistory);
|
|
365
350
|
if (!runColor)
|
|
@@ -377,10 +362,8 @@ var qrcodegen;
|
|
|
377
362
|
for (let y = 0; y < this.size; y++) {
|
|
378
363
|
if (this.modules[y][x] == runColor) {
|
|
379
364
|
runY++;
|
|
380
|
-
if (runY == 5)
|
|
381
|
-
|
|
382
|
-
else if (runY > 5)
|
|
383
|
-
result++;
|
|
365
|
+
if (runY == 5) result += _QrCode.PENALTY_N1;
|
|
366
|
+
else if (runY > 5) result++;
|
|
384
367
|
} else {
|
|
385
368
|
this.finderPenaltyAddHistory(runY, runHistory);
|
|
386
369
|
if (!runColor)
|
|
@@ -413,8 +396,7 @@ var qrcodegen;
|
|
|
413
396
|
// Each position is in the range [0,177), and are used on both the x and y axes.
|
|
414
397
|
// This could be implemented as lookup table of 40 variable-length lists of integers.
|
|
415
398
|
getAlignmentPatternPositions() {
|
|
416
|
-
if (this.version == 1)
|
|
417
|
-
return [];
|
|
399
|
+
if (this.version == 1) return [];
|
|
418
400
|
else {
|
|
419
401
|
const numAlign = Math.floor(this.version / 7) + 2;
|
|
420
402
|
const step = this.version == 32 ? 26 : Math.ceil((this.version * 4 + 4) / (numAlign * 2 - 2)) * 2;
|
|
@@ -434,8 +416,7 @@ var qrcodegen;
|
|
|
434
416
|
if (ver >= 2) {
|
|
435
417
|
const numAlign = Math.floor(ver / 7) + 2;
|
|
436
418
|
result -= (25 * numAlign - 10) * numAlign - 55;
|
|
437
|
-
if (ver >= 7)
|
|
438
|
-
result -= 36;
|
|
419
|
+
if (ver >= 7) result -= 36;
|
|
439
420
|
}
|
|
440
421
|
assert(208 <= result && result <= 29648);
|
|
441
422
|
return result;
|
|
@@ -449,18 +430,15 @@ var qrcodegen;
|
|
|
449
430
|
// Returns a Reed-Solomon ECC generator polynomial for the given degree. This could be
|
|
450
431
|
// implemented as a lookup table over all possible parameter values, instead of as an algorithm.
|
|
451
432
|
static reedSolomonComputeDivisor(degree) {
|
|
452
|
-
if (degree < 1 || degree > 255)
|
|
453
|
-
throw "Degree out of range";
|
|
433
|
+
if (degree < 1 || degree > 255) throw "Degree out of range";
|
|
454
434
|
let result = [];
|
|
455
|
-
for (let i = 0; i < degree - 1; i++)
|
|
456
|
-
result.push(0);
|
|
435
|
+
for (let i = 0; i < degree - 1; i++) result.push(0);
|
|
457
436
|
result.push(1);
|
|
458
437
|
let root = 1;
|
|
459
438
|
for (let i = 0; i < degree; i++) {
|
|
460
439
|
for (let j = 0; j < result.length; j++) {
|
|
461
440
|
result[j] = _QrCode.reedSolomonMultiply(result[j], root);
|
|
462
|
-
if (j + 1 < result.length)
|
|
463
|
-
result[j] ^= result[j + 1];
|
|
441
|
+
if (j + 1 < result.length) result[j] ^= result[j + 1];
|
|
464
442
|
}
|
|
465
443
|
root = _QrCode.reedSolomonMultiply(root, 2);
|
|
466
444
|
}
|
|
@@ -481,8 +459,7 @@ var qrcodegen;
|
|
|
481
459
|
// Returns the product of the two given field elements modulo GF(2^8/0x11D). The arguments and result
|
|
482
460
|
// are unsigned 8-bit integers. This could be implemented as a lookup table of 256*256 entries of uint8.
|
|
483
461
|
static reedSolomonMultiply(x, y) {
|
|
484
|
-
if (x >>> 8 != 0 || y >>> 8 != 0)
|
|
485
|
-
throw "Byte out of range";
|
|
462
|
+
if (x >>> 8 != 0 || y >>> 8 != 0) throw "Byte out of range";
|
|
486
463
|
let z = 0;
|
|
487
464
|
for (let i = 7; i >= 0; i--) {
|
|
488
465
|
z = z << 1 ^ (z >>> 7) * 285;
|
|
@@ -511,8 +488,7 @@ var qrcodegen;
|
|
|
511
488
|
}
|
|
512
489
|
// Pushes the given value to the front and drops the last value. A helper function for getPenaltyScore().
|
|
513
490
|
finderPenaltyAddHistory(currentRunLength, runHistory) {
|
|
514
|
-
if (runHistory[0] == 0)
|
|
515
|
-
currentRunLength += this.size;
|
|
491
|
+
if (runHistory[0] == 0) currentRunLength += this.size;
|
|
516
492
|
runHistory.pop();
|
|
517
493
|
runHistory.unshift(currentRunLength);
|
|
518
494
|
}
|
|
@@ -890,8 +866,7 @@ var qrcodegen;
|
|
|
890
866
|
let QrCode = _QrCode;
|
|
891
867
|
qrcodegen2.QrCode = QrCode;
|
|
892
868
|
function appendBits(val, len, bb) {
|
|
893
|
-
if (len < 0 || len > 31 || val >>> len != 0)
|
|
894
|
-
throw "Value out of range";
|
|
869
|
+
if (len < 0 || len > 31 || val >>> len != 0) throw "Value out of range";
|
|
895
870
|
for (let i = len - 1; i >= 0; i--)
|
|
896
871
|
bb.push(val >>> i & 1);
|
|
897
872
|
}
|
|
@@ -899,8 +874,7 @@ var qrcodegen;
|
|
|
899
874
|
return (x >>> i & 1) != 0;
|
|
900
875
|
}
|
|
901
876
|
function assert(cond) {
|
|
902
|
-
if (!cond)
|
|
903
|
-
throw "Assertion error";
|
|
877
|
+
if (!cond) throw "Assertion error";
|
|
904
878
|
}
|
|
905
879
|
const _QrSegment = class _QrSegment {
|
|
906
880
|
/*-- Constructor (low level) and fields --*/
|
|
@@ -911,8 +885,7 @@ var qrcodegen;
|
|
|
911
885
|
this.mode = mode;
|
|
912
886
|
this.numChars = numChars;
|
|
913
887
|
this.bitData = bitData;
|
|
914
|
-
if (numChars < 0)
|
|
915
|
-
throw "Invalid argument";
|
|
888
|
+
if (numChars < 0) throw "Invalid argument";
|
|
916
889
|
this.bitData = bitData.slice();
|
|
917
890
|
}
|
|
918
891
|
/*-- Static factory functions (mid level) --*/
|
|
@@ -921,8 +894,7 @@ var qrcodegen;
|
|
|
921
894
|
// can be converted to UTF-8 bytes and encoded as a byte mode segment.
|
|
922
895
|
static makeBytes(data) {
|
|
923
896
|
let bb = [];
|
|
924
|
-
for (const b of data)
|
|
925
|
-
appendBits(b, 8, bb);
|
|
897
|
+
for (const b of data) appendBits(b, 8, bb);
|
|
926
898
|
return new _QrSegment(_QrSegment.Mode.BYTE, data.length, bb);
|
|
927
899
|
}
|
|
928
900
|
// Returns a segment representing the given string of decimal digits encoded in numeric mode.
|
|
@@ -961,31 +933,25 @@ var qrcodegen;
|
|
|
961
933
|
// Returns a new mutable list of zero or more segments to represent the given Unicode text string.
|
|
962
934
|
// The result may use various segment modes and switch modes to optimize the length of the bit stream.
|
|
963
935
|
static makeSegments(text) {
|
|
964
|
-
if (text == "")
|
|
965
|
-
|
|
966
|
-
else if (_QrSegment.isNumeric(text))
|
|
967
|
-
return [_QrSegment.makeNumeric(text)];
|
|
936
|
+
if (text == "") return [];
|
|
937
|
+
else if (_QrSegment.isNumeric(text)) return [_QrSegment.makeNumeric(text)];
|
|
968
938
|
else if (_QrSegment.isAlphanumeric(text))
|
|
969
939
|
return [_QrSegment.makeAlphanumeric(text)];
|
|
970
|
-
else
|
|
971
|
-
return [_QrSegment.makeBytes(_QrSegment.toUtf8ByteArray(text))];
|
|
940
|
+
else return [_QrSegment.makeBytes(_QrSegment.toUtf8ByteArray(text))];
|
|
972
941
|
}
|
|
973
942
|
// Returns a segment representing an Extended Channel Interpretation
|
|
974
943
|
// (ECI) designator with the given assignment value.
|
|
975
944
|
static makeEci(assignVal) {
|
|
976
945
|
let bb = [];
|
|
977
|
-
if (assignVal < 0)
|
|
978
|
-
|
|
979
|
-
else if (assignVal < 1 << 7)
|
|
980
|
-
appendBits(assignVal, 8, bb);
|
|
946
|
+
if (assignVal < 0) throw "ECI assignment value out of range";
|
|
947
|
+
else if (assignVal < 1 << 7) appendBits(assignVal, 8, bb);
|
|
981
948
|
else if (assignVal < 1 << 14) {
|
|
982
949
|
appendBits(2, 2, bb);
|
|
983
950
|
appendBits(assignVal, 14, bb);
|
|
984
951
|
} else if (assignVal < 1e6) {
|
|
985
952
|
appendBits(6, 3, bb);
|
|
986
953
|
appendBits(assignVal, 21, bb);
|
|
987
|
-
} else
|
|
988
|
-
throw "ECI assignment value out of range";
|
|
954
|
+
} else throw "ECI assignment value out of range";
|
|
989
955
|
return new _QrSegment(_QrSegment.Mode.ECI, 0, bb);
|
|
990
956
|
}
|
|
991
957
|
// Tests whether the given string can be encoded as a segment in numeric mode.
|
|
@@ -1010,8 +976,7 @@ var qrcodegen;
|
|
|
1010
976
|
let result = 0;
|
|
1011
977
|
for (const seg of segs) {
|
|
1012
978
|
const ccbits = seg.mode.numCharCountBits(version);
|
|
1013
|
-
if (seg.numChars >= 1 << ccbits)
|
|
1014
|
-
return Infinity;
|
|
979
|
+
if (seg.numChars >= 1 << ccbits) return Infinity;
|
|
1015
980
|
result += 4 + ccbits + seg.bitData.length;
|
|
1016
981
|
}
|
|
1017
982
|
return result;
|
|
@@ -1021,8 +986,7 @@ var qrcodegen;
|
|
|
1021
986
|
str = encodeURI(str);
|
|
1022
987
|
let result = [];
|
|
1023
988
|
for (let i = 0; i < str.length; i++) {
|
|
1024
|
-
if (str.charAt(i) != "%")
|
|
1025
|
-
result.push(str.charCodeAt(i));
|
|
989
|
+
if (str.charAt(i) != "%") result.push(str.charCodeAt(i));
|
|
1026
990
|
else {
|
|
1027
991
|
result.push(Number.parseInt(str.substr(i + 1, 2), 16));
|
|
1028
992
|
i += 2;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const _sfc_main = vue.defineComponent({
|
|
4
|
+
name: "MenuOutlined"
|
|
5
|
+
});
|
|
6
|
+
const _export_sfc = (sfc, props) => {
|
|
7
|
+
const target = sfc.__vccOpts || sfc;
|
|
8
|
+
for (const [key, val] of props) {
|
|
9
|
+
target[key] = val;
|
|
10
|
+
}
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_1 = {
|
|
14
|
+
viewBox: "0 0 48 48",
|
|
15
|
+
fill: "none",
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
"stroke-width": "4"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M3 7H45" }, null, -1);
|
|
20
|
+
const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M3 24H44" }, null, -1);
|
|
21
|
+
const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M3 41H45" }, null, -1);
|
|
22
|
+
const _hoisted_5 = [
|
|
23
|
+
_hoisted_2,
|
|
24
|
+
_hoisted_3,
|
|
25
|
+
_hoisted_4
|
|
26
|
+
];
|
|
27
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
28
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _hoisted_5);
|
|
29
|
+
}
|
|
30
|
+
const MenuOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
31
|
+
module.exports = MenuOutlined;
|
package/lib/icons/index.cjs
CHANGED
|
@@ -67,6 +67,7 @@ const LogOutlined = require("./LogOutlined");
|
|
|
67
67
|
const MailOutlined = require("./MailOutlined");
|
|
68
68
|
const LogoutOutlined = require("./LogoutOutlined");
|
|
69
69
|
const MenuFoldOutlined = require("./MenuFoldOutlined");
|
|
70
|
+
const MenuOutlined = require("./MenuOutlined");
|
|
70
71
|
const MenuUnfoldOutlined = require("./MenuUnfoldOutlined");
|
|
71
72
|
const MessageOutlined = require("./MessageOutlined");
|
|
72
73
|
const MinusCircleOutlined = require("./MinusCircleOutlined");
|
|
@@ -175,6 +176,7 @@ exports.LogOutlined = LogOutlined;
|
|
|
175
176
|
exports.MailOutlined = MailOutlined;
|
|
176
177
|
exports.LogoutOutlined = LogoutOutlined;
|
|
177
178
|
exports.MenuFoldOutlined = MenuFoldOutlined;
|
|
179
|
+
exports.MenuOutlined = MenuOutlined;
|
|
178
180
|
exports.MenuUnfoldOutlined = MenuUnfoldOutlined;
|
|
179
181
|
exports.MessageOutlined = MessageOutlined;
|
|
180
182
|
exports.MinusCircleOutlined = MinusCircleOutlined;
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export { default as LogOutlined } from './LogOutlined';
|
|
|
65
65
|
export { default as MailOutlined } from './MailOutlined';
|
|
66
66
|
export { default as LogoutOutlined } from './LogoutOutlined';
|
|
67
67
|
export { default as MenuFoldOutlined } from './MenuFoldOutlined';
|
|
68
|
+
export { default as MenuOutlined } from './MenuOutlined';
|
|
68
69
|
export { default as MenuUnfoldOutlined } from './MenuUnfoldOutlined';
|
|
69
70
|
export { default as MessageOutlined } from './MessageOutlined';
|
|
70
71
|
export { default as MinusCircleOutlined } from './MinusCircleOutlined';
|
package/lib/index.cjs
CHANGED
|
@@ -8,16 +8,14 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
get: () => installer.installer
|
|
9
9
|
});
|
|
10
10
|
Object.keys(components).forEach((k) => {
|
|
11
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
11
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => components[k]
|
|
14
|
+
});
|
|
16
15
|
});
|
|
17
16
|
Object.keys(coreExport).forEach((k) => {
|
|
18
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
17
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => coreExport[k]
|
|
20
|
+
});
|
|
23
21
|
});
|
|
@@ -4,6 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const elementPlus = require("element-plus");
|
|
5
5
|
const receiver = require("../ele-config-provider/receiver");
|
|
6
6
|
const util = require("../ele-pro-layout/util");
|
|
7
|
+
const MessageBoxIcon = require("../ele-app/components/message-box-icon");
|
|
7
8
|
const core = require("./core");
|
|
8
9
|
function getWrapEl(bodyEl) {
|
|
9
10
|
const parent = bodyEl || document.body;
|
|
@@ -18,7 +19,8 @@ function useMessageBox(globalOpt) {
|
|
|
18
19
|
const layoutState = util.useLayoutState();
|
|
19
20
|
const globalProps = receiver.useGlobalProps("messageBox");
|
|
20
21
|
const appContext = (_b = (_a = vue.getCurrentInstance) == null ? void 0 : _a.call(vue)) == null ? void 0 : _b.appContext;
|
|
21
|
-
const state = { wrapEl: null, isActivated: true };
|
|
22
|
+
const state = { wrapEl: null, isActivated: true, id: 0 };
|
|
23
|
+
const instances = /* @__PURE__ */ new Map();
|
|
22
24
|
const hideClass = "is-hide";
|
|
23
25
|
vue.onActivated(() => {
|
|
24
26
|
state.isActivated = true;
|
|
@@ -28,7 +30,15 @@ function useMessageBox(globalOpt) {
|
|
|
28
30
|
state.isActivated = false;
|
|
29
31
|
state.wrapEl && state.wrapEl.classList.add(hideClass);
|
|
30
32
|
});
|
|
33
|
+
vue.onBeforeUnmount(() => {
|
|
34
|
+
for (const [_key, insDoClose] of instances) {
|
|
35
|
+
insDoClose && insDoClose();
|
|
36
|
+
}
|
|
37
|
+
instances.clear();
|
|
38
|
+
});
|
|
31
39
|
const getOption = (options) => {
|
|
40
|
+
state.id++;
|
|
41
|
+
const msgId = `m_${state.id}`;
|
|
32
42
|
const opt = {
|
|
33
43
|
...globalProps.value || {},
|
|
34
44
|
...globalOpt || {},
|
|
@@ -43,6 +53,22 @@ function useMessageBox(globalOpt) {
|
|
|
43
53
|
}
|
|
44
54
|
opt.lockScroll = false;
|
|
45
55
|
}
|
|
56
|
+
const classes = ["ele-message-box"];
|
|
57
|
+
if (opt.customClass) {
|
|
58
|
+
classes.push(opt.customClass);
|
|
59
|
+
}
|
|
60
|
+
opt.customClass = classes.join(" ");
|
|
61
|
+
opt.icon = vue.h(MessageBoxIcon, {
|
|
62
|
+
type: opt.type,
|
|
63
|
+
icon: opt.icon,
|
|
64
|
+
boxId: msgId,
|
|
65
|
+
onBoxDestroy: (boxId) => {
|
|
66
|
+
boxId && instances.delete(boxId);
|
|
67
|
+
},
|
|
68
|
+
onBoxMounted: ({ boxId, doClose }) => {
|
|
69
|
+
boxId && instances.set(boxId, doClose);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
46
72
|
return core.omit(opt, ["inner"]);
|
|
47
73
|
};
|
|
48
74
|
const messageBox = function(options) {
|