@10yun/open-sdk 0.3.150 → 0.3.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/404-BAWDiC-U.js +1 -0
- package/dist/_plugin-vue_export-helper-CIcTI-Jf.js +1 -0
- package/dist/alone-Cg2fiIdZ.js +1 -0
- package/dist/helper-YcOU1zEa.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -3
- package/dist/{login-Br0TQufU.cjs → login-6avgyFW1.cjs} +1 -1
- package/dist/login-CASVkTsd.js +1 -0
- package/dist/none-B8w5qFdt.js +1 -0
- package/dist/opensdk-v3-Cd5TWMOZ.js +9 -0
- package/dist/opensdk-v3-DAufhFBK.cjs +9 -0
- package/dist/vite-plugin.cjs.js +1 -1
- package/dist/vite-plugin.es.js +2 -171
- package/package.json +1 -1
- package/dist/404-w_SpRP07.js +0 -10
- package/dist/_plugin-vue_export-helper-B52Kst-M.js +0 -8
- package/dist/alone-Cn4LOgev.js +0 -13
- package/dist/helper-Df0lZ8X0.js +0 -41
- package/dist/login-BhlhbQoh.js +0 -2688
- package/dist/none-BELtNrMy.js +0 -13
- package/dist/opensdk-v3-BdP48pba.js +0 -7411
- package/dist/opensdk-v3-CEh99NnQ.cjs +0 -9
- package/dist/redirect-BFuNu6b_.cjs +0 -1
- package/dist/redirect-C1DiKuMJ.js +0 -15
package/dist/vite-plugin.es.js
CHANGED
|
@@ -1,171 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import i from "path";
|
|
4
|
-
import a from "node:fs";
|
|
5
|
-
//#region vite-plugin-qiankun/es/index.js
|
|
6
|
-
function o(e, t) {
|
|
7
|
-
for (var n = 0, r = t.length, i = e.length; n < r; n++, i++) e[i] = t[n];
|
|
8
|
-
return e;
|
|
9
|
-
}
|
|
10
|
-
var s = function(e) {
|
|
11
|
-
return " const createDeffer = (hookName) => {const d = new Promise((resolve, reject) => { window.proxy && (window.proxy[`vite${hookName}`] = resolve)});return props => d.then(fn => fn(props)); }; const bootstrap = createDeffer('bootstrap'); const mount = createDeffer('mount'); const unmount = createDeffer('unmount');const update = createDeffer('update'); ;(global => {global.qiankunName = '" + e + "';global['" + e + "'] = { bootstrap, mount, unmount, update }; })(window);";
|
|
12
|
-
}, c = function(e) {
|
|
13
|
-
return " const qiankunLifeCycle = window.moudleQiankunAppLifeCycles && window.moudleQiankunAppLifeCycles['" + e + "']; if (qiankunLifeCycle) { window.proxy.vitemount((props) => qiankunLifeCycle.mount(props)); window.proxy.viteunmount((props) => qiankunLifeCycle.unmount(props)); window.proxy.vitebootstrap(() => qiankunLifeCycle.bootstrap()); window.proxy.viteupdate((props) => qiankunLifeCycle.update(props)); }";
|
|
14
|
-
};
|
|
15
|
-
function l(e, t) {
|
|
16
|
-
var n = e.match(/src=["']([^"']+)["']/);
|
|
17
|
-
if (!n) return e;
|
|
18
|
-
var r = n[1];
|
|
19
|
-
return "<script>" + ("import(" + t + "'" + r + "')") + "<\/script>";
|
|
20
|
-
}
|
|
21
|
-
var u = function(e, t) {
|
|
22
|
-
t === void 0 && (t = {});
|
|
23
|
-
var n, r = "";
|
|
24
|
-
return {
|
|
25
|
-
name: "qiankun-html-transform",
|
|
26
|
-
configResolved: function(e) {
|
|
27
|
-
n = e.command === "build" || e.isProduction, r = e.base;
|
|
28
|
-
},
|
|
29
|
-
configureServer: function(e) {
|
|
30
|
-
return function() {
|
|
31
|
-
e.middlewares.use(function(e, i, a) {
|
|
32
|
-
if (n || !t.useDevMode) {
|
|
33
|
-
a();
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
var s = i.end.bind(i);
|
|
37
|
-
i.end = function() {
|
|
38
|
-
var e = [...arguments], t = e[0], n = e.slice(1);
|
|
39
|
-
if (typeof t == "string") {
|
|
40
|
-
var i = "(window.proxy ? (window.proxy.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ + '..') : '') + ", a = RegExp("<script[^>]*src=[\"']" + r + "@vite/client[\"'][^>]*><\/script>");
|
|
41
|
-
t = t.replace(a, function(e) {
|
|
42
|
-
return l(e, i);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
s.apply(void 0, o([t], n));
|
|
46
|
-
}, a();
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
transformIndexHtml: function(r) {
|
|
51
|
-
for (var i = t.useDevMode && !n ? "(window.proxy ? (window.proxy.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ + '..') : '') + " : "", a = [], o = /<(script)([^>]*?)>([\s\S]*?)<\/script>/gi, u; u = o.exec(r);) {
|
|
52
|
-
var d = u[0], f = u[2];
|
|
53
|
-
(/type=["']module["']/.test(f) || /crossorigin=["']["']/.test(f)) && /src=["']/.test(f) && a.push({
|
|
54
|
-
original: d,
|
|
55
|
-
transformed: l(d, i)
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return a.length ? (a.forEach(function(t, n) {
|
|
59
|
-
var i = t.transformed;
|
|
60
|
-
n === a.length - 1 && (i = i.replace("<\/script>", ".finally(() => { " + c(e) + " })<\/script>")), r = r.replace(t.original, i);
|
|
61
|
-
}), r = r.replace("</body>", "<script>" + s(e) + "<\/script></body>"), r) : r;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
}, d = {};
|
|
65
|
-
function f(e, n) {
|
|
66
|
-
let r = [];
|
|
67
|
-
for (let i in n) {
|
|
68
|
-
let a = n[i];
|
|
69
|
-
if (a = t(a), d[a.name] && (a.name = a.name + "_" + i), a.isMenu == 0 && a.isRbac == 0) continue;
|
|
70
|
-
let o = {
|
|
71
|
-
title: a.title || a?.meta?.title,
|
|
72
|
-
path: a.path || "",
|
|
73
|
-
id: e + "@" + a.name || "",
|
|
74
|
-
name: a.name || "",
|
|
75
|
-
apiPermissions: a.apiPermissions || [],
|
|
76
|
-
isPage: !!a.path,
|
|
77
|
-
isMenu: a.isMenu || !1,
|
|
78
|
-
isRbac: a.isRbac || !1,
|
|
79
|
-
isWindw: a.isWindw || !1,
|
|
80
|
-
isAlone: a.isAlone || !1,
|
|
81
|
-
children: []
|
|
82
|
-
};
|
|
83
|
-
if (a.isMenu && (o.checked = !1, o.menuName = o.title, o.parentId = a.parentId || "", o.children = []), a.children) {
|
|
84
|
-
let n = a.children, r = 0, i = [];
|
|
85
|
-
for (let e in n) {
|
|
86
|
-
let t = n[e];
|
|
87
|
-
t.isMenu && (t.parentId = a.name, i.push(t));
|
|
88
|
-
}
|
|
89
|
-
let s = [];
|
|
90
|
-
for (let i in n) {
|
|
91
|
-
let o = n[i];
|
|
92
|
-
o = t(o), d[o.name] && (o.name = o.name + "_" + i), o.isRbac && (o.id = e + "@" + (o.name || a.name + "_" + ++r), o.optionsName = o.title || o.meta.title, o.checked = !1, s.push(o));
|
|
93
|
-
}
|
|
94
|
-
s.length > 0 && (o.menuOptionsList = s), i.length > 0 && (o = Object.assign({}, o, { children: f(e, [...i]) }));
|
|
95
|
-
}
|
|
96
|
-
r.push(o);
|
|
97
|
-
}
|
|
98
|
-
return r;
|
|
99
|
-
}
|
|
100
|
-
function p(e, t, n) {
|
|
101
|
-
let { RBAC_BASE_SIGN: r } = n, i = f(r || "", e), o = t + "/public/rbac.json", s = JSON.stringify(i, null, 2);
|
|
102
|
-
a.writeFileSync(o, s, "utf8"), console.log("--已经生成 rbac 文件---");
|
|
103
|
-
}
|
|
104
|
-
//#endregion
|
|
105
|
-
//#region vite-plugin-shiyun/build/plugin-common.js
|
|
106
|
-
function m(t, n, r, a) {
|
|
107
|
-
let o = process.cwd(), s = i.basename(o), { CICD_BUILD_DOMAIN_SCHEME: c, CICD_BUILD_DOMAIN_ALONE: l, CICD_BUILD_VERS_FULL: u, CICD_BUILD_VERS_CODE: d } = n, { VITE_SY_PRODUCT_PORT: f, VITE_SY_PRODUCT_SIGN: m } = t, h = m || s, g = "";
|
|
108
|
-
g = l == "on" ? c : `${c}/${h}/${u}/`;
|
|
109
|
-
let _ = "/";
|
|
110
|
-
return r === "production" && (_ = e(`${g}/`), p(a.menu_arr, o, { RBAC_BASE_SIGN: h })), {
|
|
111
|
-
name: "vite-plugin-shiyun-release-common",
|
|
112
|
-
config: (e, { mode: t, command: n }) => ({
|
|
113
|
-
base: _,
|
|
114
|
-
server: { port: f },
|
|
115
|
-
optimizeDeps: { exclude: ["@10yun/open-sdk/uncompiled"] },
|
|
116
|
-
build: {
|
|
117
|
-
target: "esnext",
|
|
118
|
-
sourcemap: !1,
|
|
119
|
-
cssCodeSplit: !1,
|
|
120
|
-
chunkSizeWarningLimit: 2e3,
|
|
121
|
-
minify: "oxc",
|
|
122
|
-
rolldownOptions: { output: {
|
|
123
|
-
minify: { compress: { dropConsole: !0 } },
|
|
124
|
-
codeSplitting: { groups: [{
|
|
125
|
-
name: "element-plus",
|
|
126
|
-
test: /[\\/]node_modules[\\/]element-plus[\\/]/
|
|
127
|
-
}, {
|
|
128
|
-
name: "@10yun-ui",
|
|
129
|
-
test: /[\\/]node_modules[\\/]@10yun[\\/]cv-pc-ui[\\/]/
|
|
130
|
-
}] }
|
|
131
|
-
} }
|
|
132
|
-
},
|
|
133
|
-
output: {
|
|
134
|
-
library: `${h}-[name]`,
|
|
135
|
-
libraryTarget: "umd",
|
|
136
|
-
jsonpFunction: `webpackJsonp_${h}`
|
|
137
|
-
}
|
|
138
|
-
}),
|
|
139
|
-
configResolved(e) {},
|
|
140
|
-
configureServer(e) {},
|
|
141
|
-
transformIndexHtml(e) {
|
|
142
|
-
r === "development" && (e = e.replace(/<script\b[^>]*?mode="pro"[^>]*>[\s\S]*?<\/script>/gi, ""), e = e.replace(/<(link|script)\b[^>]*?mode="pro"[^>]*>/gi, "")), r === "production" && l !== "on" && (e = e.replace(/<script\b[^>]*?mode="dev"[^>]*>[\s\S]*?<\/script>/gi, ""), e = e.replace(/<(link|script)\b[^>]*?mode="dev"[^>]*>/gi, ""));
|
|
143
|
-
let t = "saas软件,软件开发,软件制定,公众号,小程序,app,十云,十云科技,福州十云,ctocode,10yun.com", n = ` <meta name="description" content="${t}" />\n <meta name="keywords" content="${t}" />\n <meta name="author" content="十云_ctocode_技术支持_https://www.10yun.com" />\n <meta name="copyright" content="福州十云科技有限公司" />\n <meta name="website" content="https://www.10yun.com/" />\n` + (u ? ` <meta name="version" content="${u}_${d}" />\n` : "");
|
|
144
|
-
return e = e.replace("</head>", `\n${n}\n </head>`), e = e.replace(/\n\s*\n/g, "\n"), e;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region vite-plugin-shiyun/build/plugin-html.js
|
|
150
|
-
function h(e) {
|
|
151
|
-
return {
|
|
152
|
-
name: "vite-plugin-shiyun-html-minify",
|
|
153
|
-
apply: "build",
|
|
154
|
-
transformIndexHtml: {
|
|
155
|
-
order: "post",
|
|
156
|
-
handler: (t) => e === "production" ? t.replace(/<!--[\s\S]*?-->/g, "").replace(/\n/g, "").replace(/\s{2,}/g, " ").replace(/>\s+</g, "><").trim() : t
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region vite-plugin-shiyun/index.js
|
|
162
|
-
function g(e = { menu_arr: [] }) {
|
|
163
|
-
let t = process.cwd(), n = i.basename(t), a = process.env.NODE_ENV, o = r(a, t, "VITE_"), s = r(a, t, "CICD_");
|
|
164
|
-
return [
|
|
165
|
-
u(o.VITE_SY_PRODUCT_SIGN || n, { useDevMode: !0 }),
|
|
166
|
-
m(o, s, a, e),
|
|
167
|
-
h(a)
|
|
168
|
-
];
|
|
169
|
-
}
|
|
170
|
-
//#endregion
|
|
171
|
-
export { n as qiankunWindow, g as shiyunRelease };
|
|
1
|
+
import{a as e,r as t,t as n}from"./helper-YcOU1zEa.js";import{loadEnv as r}from"vite";import i from"path";import a from"node:fs";function o(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}var s=function(e){return" const createDeffer = (hookName) => {const d = new Promise((resolve, reject) => { window.proxy && (window.proxy[`vite${hookName}`] = resolve)});return props => d.then(fn => fn(props)); }; const bootstrap = createDeffer('bootstrap'); const mount = createDeffer('mount'); const unmount = createDeffer('unmount');const update = createDeffer('update'); ;(global => {global.qiankunName = '"+e+`';global['`+e+`'] = { bootstrap, mount, unmount, update }; })(window);`},c=function(e){return` const qiankunLifeCycle = window.moudleQiankunAppLifeCycles && window.moudleQiankunAppLifeCycles['`+e+`']; if (qiankunLifeCycle) { window.proxy.vitemount((props) => qiankunLifeCycle.mount(props)); window.proxy.viteunmount((props) => qiankunLifeCycle.unmount(props)); window.proxy.vitebootstrap(() => qiankunLifeCycle.bootstrap()); window.proxy.viteupdate((props) => qiankunLifeCycle.update(props)); }`};function l(e,t){var n=e.match(/src=["']([^"']+)["']/);if(!n)return e;var r=n[1];return`<script>`+(`import(`+t+`'`+r+`')`)+`<\/script>`}var u=function(e,t){t===void 0&&(t={});var n,r=``;return{name:`qiankun-html-transform`,configResolved:function(e){n=e.command===`build`||e.isProduction,r=e.base},configureServer:function(e){return function(){e.middlewares.use(function(e,i,a){if(n||!t.useDevMode){a();return}var s=i.end.bind(i);i.end=function(){var e=[...arguments],t=e[0],n=e.slice(1);if(typeof t==`string`){var i=`(window.proxy ? (window.proxy.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ + '..') : '') + `,a=RegExp(`<script[^>]*src=["']`+r+`@vite/client["'][^>]*><\/script>`);t=t.replace(a,function(e){return l(e,i)})}s.apply(void 0,o([t],n))},a()})}},transformIndexHtml:function(r){for(var i=t.useDevMode&&!n?`(window.proxy ? (window.proxy.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ + '..') : '') + `:``,a=[],o=/<(script)([^>]*?)>([\s\S]*?)<\/script>/gi,u;u=o.exec(r);){var d=u[0],f=u[2];(/type=["']module["']/.test(f)||/crossorigin=["']["']/.test(f))&&/src=["']/.test(f)&&a.push({original:d,transformed:l(d,i)})}return a.length?(a.forEach(function(t,n){var i=t.transformed;n===a.length-1&&(i=i.replace(`<\/script>`,`.finally(() => { `+c(e)+` })<\/script>`)),r=r.replace(t.original,i)}),r=r.replace(`</body>`,`<script>`+s(e)+`<\/script></body>`),r):r}}},d={};function f(e,n){let r=[];for(let i in n){let a=n[i];if(a=t(a),d[a.name]&&(a.name=a.name+`_`+i),a.isMenu==0&&a.isRbac==0)continue;let o={title:a.title||a?.meta?.title,path:a.path||``,id:e+`@`+a.name||``,name:a.name||``,apiPermissions:a.apiPermissions||[],isPage:!!a.path,isMenu:a.isMenu||!1,isRbac:a.isRbac||!1,isWindw:a.isWindw||!1,isAlone:a.isAlone||!1,children:[]};if(a.isMenu&&(o.checked=!1,o.menuName=o.title,o.parentId=a.parentId||``,o.children=[]),a.children){let n=a.children,r=0,i=[];for(let e in n){let t=n[e];t.isMenu&&(t.parentId=a.name,i.push(t))}let s=[];for(let i in n){let o=n[i];o=t(o),d[o.name]&&(o.name=o.name+`_`+i),o.isRbac&&(o.id=e+`@`+(o.name||a.name+`_`+ ++r),o.optionsName=o.title||o.meta.title,o.checked=!1,s.push(o))}s.length>0&&(o.menuOptionsList=s),i.length>0&&(o=Object.assign({},o,{children:f(e,[...i])}))}r.push(o)}return r}function p(e,t,n){let{RBAC_BASE_SIGN:r}=n,i=f(r||``,e),o=t+`/public/rbac.json`,s=JSON.stringify(i,null,2);a.writeFileSync(o,s,`utf8`)}function m(t,n,r,a){let o=process.cwd(),s=i.basename(o),{CICD_BUILD_DOMAIN_SCHEME:c,CICD_BUILD_DOMAIN_ALONE:l,CICD_BUILD_VERS_FULL:u,CICD_BUILD_VERS_CODE:d}=n,{VITE_SY_PRODUCT_PORT:f,VITE_SY_PRODUCT_SIGN:m}=t,h=m||s,g=``;g=l==`on`?c:`${c}/${h}/${u}/`;let _=`/`;return r===`production`&&(_=e(`${g}/`),p(a.menu_arr,o,{RBAC_BASE_SIGN:h})),{name:`vite-plugin-shiyun-release-common`,config:(e,{mode:t,command:n})=>({base:_,server:{port:f},optimizeDeps:{exclude:[`@10yun/open-sdk/uncompiled`]},build:{target:`esnext`,sourcemap:!1,cssCodeSplit:!1,chunkSizeWarningLimit:2e3,minify:`oxc`,rolldownOptions:{output:{minify:{compress:{dropConsole:!0}},codeSplitting:{groups:[{name:`element-plus`,test:/[\\/]node_modules[\\/]element-plus[\\/]/},{name:`@10yun-ui`,test:/[\\/]node_modules[\\/]@10yun[\\/]cv-pc-ui[\\/]/}]}}}},output:{library:`${h}-[name]`,libraryTarget:`umd`,jsonpFunction:`webpackJsonp_${h}`}}),configResolved(e){},configureServer(e){},transformIndexHtml(e){r===`development`&&(e=e.replace(/<script\b[^>]*?mode="pro"[^>]*>[\s\S]*?<\/script>/gi,``),e=e.replace(/<(link|script)\b[^>]*?mode="pro"[^>]*>/gi,``)),r===`production`&&l!==`on`&&(e=e.replace(/<script\b[^>]*?mode="dev"[^>]*>[\s\S]*?<\/script>/gi,``),e=e.replace(/<(link|script)\b[^>]*?mode="dev"[^>]*>/gi,``));let t=`saas软件,软件开发,软件制定,公众号,小程序,app,十云,十云科技,福州十云,ctocode,10yun.com`,n=` <meta name="description" content="${t}" />\n <meta name="keywords" content="${t}" />\n <meta name="author" content="十云_ctocode_技术支持_https://www.10yun.com" />\n <meta name="copyright" content="福州十云科技有限公司" />\n <meta name="website" content="https://www.10yun.com/" />\n`+(u?` <meta name="version" content="${u}_${d}" />\n`:``);return e=e.replace(`</head>`,`\n${n}\n </head>`),e=e.replace(/\n\s*\n/g,`
|
|
2
|
+
`),e}}}function h(e){return{name:`vite-plugin-shiyun-html-minify`,apply:`build`,transformIndexHtml:{order:`post`,handler:t=>e===`production`?t.replace(/<!--[\s\S]*?-->/g,``).replace(/\n/g,``).replace(/\s{2,}/g,` `).replace(/>\s+</g,`><`).trim():t}}}function g(e={menu_arr:[]}){let t=process.cwd(),n=i.basename(t),a=process.env.NODE_ENV,o=r(a,t,`VITE_`),s=r(a,t,`CICD_`);return[u(o.VITE_SY_PRODUCT_SIGN||n,{useDevMode:!0}),m(o,s,a,e),h(a)]}export{n as qiankunWindow,g as shiyunRelease};
|
package/package.json
CHANGED
package/dist/404-w_SpRP07.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-B52Kst-M.js";
|
|
2
|
-
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
|
-
//#region pages/404.vue
|
|
4
|
-
var i = {}, a = { class: "cloud-404-wrap" };
|
|
5
|
-
function o(e, i) {
|
|
6
|
-
return r(), t("div", a, [...i[0] ||= [n("div", { class: "cloud-404-box" }, [n("div", { class: "cloud-404-code" }, "404"), n("div", { class: "cloud-404-message" }, "Not Found")], -1)]]);
|
|
7
|
-
}
|
|
8
|
-
var s = /* @__PURE__ */ e(i, [["render", o]]);
|
|
9
|
-
//#endregion
|
|
10
|
-
export { s as default };
|
package/dist/alone-Cn4LOgev.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./_plugin-vue_export-helper-B52Kst-M.js";
|
|
2
|
-
import { createElementBlock as t, createElementVNode as n, openBlock as r } from "vue";
|
|
3
|
-
//#region pages/alone.vue
|
|
4
|
-
var i = {}, a = {
|
|
5
|
-
class: "cloud-none-wrap",
|
|
6
|
-
style: { "background-color": "none" }
|
|
7
|
-
};
|
|
8
|
-
function o(e, i) {
|
|
9
|
-
return r(), t("div", a, [...i[0] ||= [n("div", { class: "cloud-none-box" }, [n("div", { class: "cloud-none-code" }, "不建议,子应用单独运行~"), n("div", { class: "cloud-none-message" }, "Not Alone")], -1)]]);
|
|
10
|
-
}
|
|
11
|
-
var s = /* @__PURE__ */ e(i, [["render", o]]);
|
|
12
|
-
//#endregion
|
|
13
|
-
export { s as default };
|
package/dist/helper-Df0lZ8X0.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import "@10yun/cv-js-utils";
|
|
2
|
-
//#region common/common.js
|
|
3
|
-
function e(e) {
|
|
4
|
-
return typeof e == "string" && e.trim() !== "" && e !== "undefined";
|
|
5
|
-
}
|
|
6
|
-
var t = Math.floor(Math.random() * 22) + 1;
|
|
7
|
-
function n() {
|
|
8
|
-
return `https://10ui.cn/default/avatar/default_${t}.png`;
|
|
9
|
-
}
|
|
10
|
-
function r(e) {
|
|
11
|
-
return e = e.replace(/\/(undefined\/)+/g, "/"), e = e.replace(/([^:]\/)\/+/g, "$1"), e;
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region common/router.js
|
|
15
|
-
function i(e) {
|
|
16
|
-
return e = e.replace(/^\//, ""), e = e.replace(/\//g, "_"), e;
|
|
17
|
-
}
|
|
18
|
-
function a(e, t) {
|
|
19
|
-
t ||= 1;
|
|
20
|
-
let n = "";
|
|
21
|
-
e.path ? n = e.path : e.component && (n = e.component), e.component || (n = "");
|
|
22
|
-
let r = "";
|
|
23
|
-
if (r = e.name ? e.name : n ? i(n) : "temp_name_" + t, r = i(r), e.children && e.children.length > 0) {
|
|
24
|
-
let t = e.children, n = 0, r = 0;
|
|
25
|
-
t.forEach((e, t) => {
|
|
26
|
-
e.isMenu == 1 && n++, e.isRbac == 1 && r++;
|
|
27
|
-
}), e.children_menu_num = n, e.children_opt_num = r;
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
...e,
|
|
31
|
-
path: n,
|
|
32
|
-
name: r
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region vite-plugin-qiankun/es/helper.js
|
|
37
|
-
var o = typeof window < "u" ? window.proxy || window : {}, s = function(e) {
|
|
38
|
-
o?.__POWERED_BY_QIANKUN__ && (window.moudleQiankunAppLifeCycles || (window.moudleQiankunAppLifeCycles = {}), o.qiankunName && (window.moudleQiankunAppLifeCycles[o.qiankunName] = e));
|
|
39
|
-
};
|
|
40
|
-
//#endregion
|
|
41
|
-
export { r as a, e as i, s as n, n as o, a as r, o as t };
|