@fmdevui/fm-dev 1.0.9 → 1.0.10
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/core/index.d.ts +1 -0
- package/es/core/ui/loading/index.d.ts +9 -0
- package/es/index.mjs +1 -0
- package/es/packages/core/index.mjs +1 -0
- package/es/packages/core/ui/loading/index.mjs +40 -0
- package/index.js +39 -1
- package/index.min.js +34 -20
- package/index.min.mjs +36 -22
- package/index.mjs +40 -3
- package/lib/core/index.d.ts +1 -0
- package/lib/core/ui/loading/index.d.ts +9 -0
- package/lib/index.js +43 -41
- package/lib/packages/core/index.js +43 -41
- package/lib/packages/core/ui/loading/index.js +42 -0
- package/package.json +1 -1
package/es/core/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import installer from './defaults.mjs';
|
|
|
2
2
|
import './packages/core/index.mjs';
|
|
3
3
|
export { version } from './version.mjs';
|
|
4
4
|
export { FmLogin } from './packages/core/ui/login/index.mjs';
|
|
5
|
+
export { NextLoading } from './packages/core/ui/loading/index.mjs';
|
|
5
6
|
export { useBaseApi } from './packages/core/api/base/index.mjs';
|
|
6
7
|
export { feature, useSysApi } from './packages/core/api/sys/index.mjs';
|
|
7
8
|
export { useLoginApi } from './packages/core/api/login/index.mjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { FmLogin } from './ui/login/index.mjs';
|
|
2
|
+
export { NextLoading } from './ui/loading/index.mjs';
|
|
2
3
|
import './api/index.mjs';
|
|
3
4
|
export { directive } from './directive/index.mjs';
|
|
4
5
|
export { getCountryCode, i18n, iso_3166_1_CountryList, languageList, mergMessage, setupI18n } from './locales/index.mjs';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { nextTick } from 'vue';
|
|
2
|
+
|
|
3
|
+
const NextLoading = {
|
|
4
|
+
// 创建 loading
|
|
5
|
+
start: () => {
|
|
6
|
+
const bodys = document.body;
|
|
7
|
+
const div = document.createElement("div");
|
|
8
|
+
div.setAttribute("class", "loading-next");
|
|
9
|
+
const htmls = `
|
|
10
|
+
<div class="loading-next-box">
|
|
11
|
+
<div class="loading-next-box-warp">
|
|
12
|
+
<div class="loading-next-box-item"></div>
|
|
13
|
+
<div class="loading-next-box-item"></div>
|
|
14
|
+
<div class="loading-next-box-item"></div>
|
|
15
|
+
<div class="loading-next-box-item"></div>
|
|
16
|
+
<div class="loading-next-box-item"></div>
|
|
17
|
+
<div class="loading-next-box-item"></div>
|
|
18
|
+
<div class="loading-next-box-item"></div>
|
|
19
|
+
<div class="loading-next-box-item"></div>
|
|
20
|
+
<div class="loading-next-box-item"></div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
div.innerHTML = htmls;
|
|
25
|
+
bodys.insertBefore(div, bodys.childNodes[0]);
|
|
26
|
+
window.nextLoading = true;
|
|
27
|
+
},
|
|
28
|
+
// 移除 loading
|
|
29
|
+
done: (time = 0) => {
|
|
30
|
+
nextTick(() => {
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
window.nextLoading = false;
|
|
33
|
+
const el = document.querySelector(".loading-next");
|
|
34
|
+
el?.parentNode?.removeChild(el);
|
|
35
|
+
}, time);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { NextLoading };
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.10 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
|
|
@@ -46,6 +46,43 @@
|
|
|
46
46
|
|
|
47
47
|
var installer = makeInstaller([...plugins]);
|
|
48
48
|
|
|
49
|
+
const NextLoading = {
|
|
50
|
+
// 创建 loading
|
|
51
|
+
start: () => {
|
|
52
|
+
const bodys = document.body;
|
|
53
|
+
const div = document.createElement("div");
|
|
54
|
+
div.setAttribute("class", "loading-next");
|
|
55
|
+
const htmls = `
|
|
56
|
+
<div class="loading-next-box">
|
|
57
|
+
<div class="loading-next-box-warp">
|
|
58
|
+
<div class="loading-next-box-item"></div>
|
|
59
|
+
<div class="loading-next-box-item"></div>
|
|
60
|
+
<div class="loading-next-box-item"></div>
|
|
61
|
+
<div class="loading-next-box-item"></div>
|
|
62
|
+
<div class="loading-next-box-item"></div>
|
|
63
|
+
<div class="loading-next-box-item"></div>
|
|
64
|
+
<div class="loading-next-box-item"></div>
|
|
65
|
+
<div class="loading-next-box-item"></div>
|
|
66
|
+
<div class="loading-next-box-item"></div>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
`;
|
|
70
|
+
div.innerHTML = htmls;
|
|
71
|
+
bodys.insertBefore(div, bodys.childNodes[0]);
|
|
72
|
+
window.nextLoading = true;
|
|
73
|
+
},
|
|
74
|
+
// 移除 loading
|
|
75
|
+
done: (time = 0) => {
|
|
76
|
+
vue.nextTick(() => {
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
window.nextLoading = false;
|
|
79
|
+
const el = document.querySelector(".loading-next");
|
|
80
|
+
el?.parentNode?.removeChild(el);
|
|
81
|
+
}, time);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
49
86
|
function bind(fn, thisArg) {
|
|
50
87
|
return function wrap() {
|
|
51
88
|
return fn.apply(thisArg, arguments);
|
|
@@ -44989,6 +45026,7 @@
|
|
|
44989
45026
|
|
|
44990
45027
|
exports.FmLogin = FmLogin;
|
|
44991
45028
|
exports.Local = Local;
|
|
45029
|
+
exports.NextLoading = NextLoading;
|
|
44992
45030
|
exports.PUB = PUB;
|
|
44993
45031
|
exports.Session = Session;
|
|
44994
45032
|
exports.Watermark = Watermark;
|