inl-ui 0.1.74 → 0.1.76
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/components/index.cjs +505 -447
- package/dist/components/index.d.ts +6 -6
- package/dist/components/index.js +508 -450
- package/dist/index.cjs +439 -439
- package/dist/index.d.ts +7 -7
- package/dist/index.js +441 -441
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios$2);
|
|
|
43
43
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
44
44
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
45
45
|
|
|
46
|
-
var version = "0.1.
|
|
46
|
+
var version = "0.1.75";
|
|
47
47
|
|
|
48
48
|
const setTheme = theme => {
|
|
49
49
|
if (theme === "dark") {
|
|
@@ -940,8 +940,6 @@ const Events$1 = {
|
|
|
940
940
|
WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
|
|
941
941
|
CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
|
|
942
942
|
};
|
|
943
|
-
const VERSION$1 = "1.0.1";
|
|
944
|
-
const BUILD_DATE = "Sat Mar 30 2024 13:57:14 GMT+0800 (\u4E2D\u56FD\u6807\u51C6\u65F6\u95F4)";
|
|
945
943
|
function isFirefox() {
|
|
946
944
|
return window.navigator.userAgent.match("Firefox") !== null;
|
|
947
945
|
}
|
|
@@ -971,7 +969,6 @@ class Resolution {
|
|
|
971
969
|
}
|
|
972
970
|
}
|
|
973
971
|
let logDisabled_ = true;
|
|
974
|
-
let deprecationWarnings_ = true;
|
|
975
972
|
function extractVersion(uastring, expr, pos) {
|
|
976
973
|
const match = uastring.match(expr);
|
|
977
974
|
return match && match.length >= pos && parseInt(match[pos], 10);
|
|
@@ -1049,7 +1046,6 @@ function disableWarnings(bool) {
|
|
|
1049
1046
|
if (typeof bool !== "boolean") {
|
|
1050
1047
|
return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
|
|
1051
1048
|
}
|
|
1052
|
-
deprecationWarnings_ = !bool;
|
|
1053
1049
|
return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
|
|
1054
1050
|
}
|
|
1055
1051
|
function log$1() {
|
|
@@ -1057,17 +1053,8 @@ function log$1() {
|
|
|
1057
1053
|
if (logDisabled_) {
|
|
1058
1054
|
return;
|
|
1059
1055
|
}
|
|
1060
|
-
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
1061
|
-
console.log.apply(console, arguments);
|
|
1062
|
-
}
|
|
1063
1056
|
}
|
|
1064
1057
|
}
|
|
1065
|
-
function deprecated(oldMethod, newMethod) {
|
|
1066
|
-
if (!deprecationWarnings_) {
|
|
1067
|
-
return;
|
|
1068
|
-
}
|
|
1069
|
-
console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
|
|
1070
|
-
}
|
|
1071
1058
|
function detectBrowser(window2) {
|
|
1072
1059
|
const result = {
|
|
1073
1060
|
browser: null,
|
|
@@ -1326,7 +1313,6 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
|
|
|
1326
1313
|
return;
|
|
1327
1314
|
}
|
|
1328
1315
|
if (typeof getSourceId !== "function") {
|
|
1329
|
-
console.error("shimGetDisplayMedia: getSourceId argument is not a function");
|
|
1330
1316
|
return;
|
|
1331
1317
|
}
|
|
1332
1318
|
window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
|
|
@@ -1912,9 +1898,7 @@ function filterIceServers$1(iceServers, edgeVersion) {
|
|
|
1912
1898
|
return iceServers.filter(server => {
|
|
1913
1899
|
if (server && (server.urls || server.url)) {
|
|
1914
1900
|
let urls = server.urls || server.url;
|
|
1915
|
-
if (server.url && !server.urls)
|
|
1916
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
1917
|
-
}
|
|
1901
|
+
if (server.url && !server.urls) ;
|
|
1918
1902
|
const isString2 = typeof urls === "string";
|
|
1919
1903
|
if (isString2) {
|
|
1920
1904
|
urls = [urls];
|
|
@@ -2586,9 +2570,7 @@ function filterIceServers(iceServers, edgeVersion) {
|
|
|
2586
2570
|
return iceServers.filter(function (server) {
|
|
2587
2571
|
if (server && (server.urls || server.url)) {
|
|
2588
2572
|
var urls = server.urls || server.url;
|
|
2589
|
-
if (server.url && !server.urls)
|
|
2590
|
-
console.warn("RTCIceServer.url is deprecated! Use urls instead.");
|
|
2591
|
-
}
|
|
2573
|
+
if (server.url && !server.urls) ;
|
|
2592
2574
|
var isString2 = typeof urls === "string";
|
|
2593
2575
|
if (isString2) {
|
|
2594
2576
|
urls = [urls];
|
|
@@ -3447,7 +3429,6 @@ var rtcpeerconnection = function (window2, edgeVersion) {
|
|
|
3447
3429
|
}
|
|
3448
3430
|
pc.transceivers.forEach(function (transceiver) {
|
|
3449
3431
|
if (transceiver.iceTransport && transceiver.iceTransport.state === "new" && transceiver.iceTransport.getRemoteCandidates().length > 0) {
|
|
3450
|
-
console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification");
|
|
3451
3432
|
transceiver.iceTransport.addRemoteCandidate({});
|
|
3452
3433
|
}
|
|
3453
3434
|
});
|
|
@@ -4030,7 +4011,6 @@ function shimGetUserMedia$1(window2, browserDetails) {
|
|
|
4030
4011
|
const navigator2 = window2 && window2.navigator;
|
|
4031
4012
|
const MediaStreamTrack = window2 && window2.MediaStreamTrack;
|
|
4032
4013
|
navigator2.getUserMedia = function (constraints, onSuccess, onError) {
|
|
4033
|
-
deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
|
|
4034
4014
|
navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
|
|
4035
4015
|
};
|
|
4036
4016
|
if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
|
|
@@ -4211,7 +4191,6 @@ function shimRemoveStream(window2) {
|
|
|
4211
4191
|
return;
|
|
4212
4192
|
}
|
|
4213
4193
|
window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
|
|
4214
|
-
deprecated("removeStream", "removeTrack");
|
|
4215
4194
|
this.getSenders().forEach(sender => {
|
|
4216
4195
|
if (sender.track && stream.getTracks().includes(sender.track)) {
|
|
4217
4196
|
this.removeTrack(sender);
|
|
@@ -4543,7 +4522,6 @@ function shimRTCIceServerUrls(window2) {
|
|
|
4543
4522
|
for (let i = 0; i < pcConfig.iceServers.length; i++) {
|
|
4544
4523
|
let server = pcConfig.iceServers[i];
|
|
4545
4524
|
if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
|
|
4546
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
4547
4525
|
server = JSON.parse(JSON.stringify(server));
|
|
4548
4526
|
server.urls = server.url;
|
|
4549
4527
|
delete server.url;
|
|
@@ -4923,7 +4901,6 @@ function adapterFactory({
|
|
|
4923
4901
|
shimEdge: true,
|
|
4924
4902
|
shimSafari: true
|
|
4925
4903
|
}) {
|
|
4926
|
-
const logging2 = log$1;
|
|
4927
4904
|
const browserDetails = detectBrowser(window2);
|
|
4928
4905
|
const adapter = {
|
|
4929
4906
|
browserDetails,
|
|
@@ -4935,14 +4912,11 @@ function adapterFactory({
|
|
|
4935
4912
|
switch (browserDetails.browser) {
|
|
4936
4913
|
case "chrome":
|
|
4937
4914
|
if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
|
|
4938
|
-
logging2("Chrome shim is not included in this adapter release.");
|
|
4939
4915
|
return adapter;
|
|
4940
4916
|
}
|
|
4941
4917
|
if (browserDetails.version === null) {
|
|
4942
|
-
logging2("Chrome shim can not determine version, not shimming.");
|
|
4943
4918
|
return adapter;
|
|
4944
4919
|
}
|
|
4945
|
-
logging2("adapter.js shimming chrome.");
|
|
4946
4920
|
adapter.browserShim = chromeShim;
|
|
4947
4921
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4948
4922
|
shimGetUserMedia$3(window2, browserDetails);
|
|
@@ -4962,10 +4936,8 @@ function adapterFactory({
|
|
|
4962
4936
|
break;
|
|
4963
4937
|
case "firefox":
|
|
4964
4938
|
if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
|
|
4965
|
-
logging2("Firefox shim is not included in this adapter release.");
|
|
4966
4939
|
return adapter;
|
|
4967
4940
|
}
|
|
4968
|
-
logging2("adapter.js shimming firefox.");
|
|
4969
4941
|
adapter.browserShim = firefoxShim;
|
|
4970
4942
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4971
4943
|
shimGetUserMedia$1(window2, browserDetails);
|
|
@@ -4986,10 +4958,8 @@ function adapterFactory({
|
|
|
4986
4958
|
break;
|
|
4987
4959
|
case "edge":
|
|
4988
4960
|
if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
|
|
4989
|
-
logging2("MS edge shim is not included in this adapter release.");
|
|
4990
4961
|
return adapter;
|
|
4991
4962
|
}
|
|
4992
|
-
logging2("adapter.js shimming edge.");
|
|
4993
4963
|
adapter.browserShim = edgeShim;
|
|
4994
4964
|
shimGetUserMedia$2(window2);
|
|
4995
4965
|
shimGetDisplayMedia$1(window2);
|
|
@@ -5000,10 +4970,8 @@ function adapterFactory({
|
|
|
5000
4970
|
break;
|
|
5001
4971
|
case "safari":
|
|
5002
4972
|
if (!safariShim || !options.shimSafari) {
|
|
5003
|
-
logging2("Safari shim is not included in this adapter release.");
|
|
5004
4973
|
return adapter;
|
|
5005
4974
|
}
|
|
5006
|
-
logging2("adapter.js shimming safari.");
|
|
5007
4975
|
adapter.browserShim = safariShim;
|
|
5008
4976
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
5009
4977
|
shimRTCIceServerUrls(window2);
|
|
@@ -5019,9 +4987,6 @@ function adapterFactory({
|
|
|
5019
4987
|
shimSendThrowTypeError(window2);
|
|
5020
4988
|
removeExtmapAllowMixed(window2, browserDetails);
|
|
5021
4989
|
break;
|
|
5022
|
-
default:
|
|
5023
|
-
logging2("Unsupported browser!");
|
|
5024
|
-
break;
|
|
5025
4990
|
}
|
|
5026
4991
|
return adapter;
|
|
5027
4992
|
}
|
|
@@ -6100,7 +6065,6 @@ validators$1.transitional = function transitional2(validator2, version, message)
|
|
|
6100
6065
|
}
|
|
6101
6066
|
if (version && !deprecatedWarnings[opt]) {
|
|
6102
6067
|
deprecatedWarnings[opt] = true;
|
|
6103
|
-
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
6104
6068
|
}
|
|
6105
6069
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
6106
6070
|
};
|
|
@@ -6632,8 +6596,6 @@ class RTCEndpoint extends Event$1 {
|
|
|
6632
6596
|
return this._localStream;
|
|
6633
6597
|
}
|
|
6634
6598
|
}
|
|
6635
|
-
console.log("build date:", BUILD_DATE);
|
|
6636
|
-
console.log("version:", VERSION$1);
|
|
6637
6599
|
const Events = Events$1;
|
|
6638
6600
|
const Endpoint = RTCEndpoint;
|
|
6639
6601
|
|
|
@@ -6741,7 +6703,6 @@ class WebRtcMt$1 {
|
|
|
6741
6703
|
if (res.code === 0) {
|
|
6742
6704
|
this.startPlay(plays);
|
|
6743
6705
|
} else {
|
|
6744
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
6745
6706
|
setTimeout(() => {
|
|
6746
6707
|
this.rePlay();
|
|
6747
6708
|
}, 3 * 60 * 1e3);
|
|
@@ -6749,7 +6710,6 @@ class WebRtcMt$1 {
|
|
|
6749
6710
|
resolve(res);
|
|
6750
6711
|
});
|
|
6751
6712
|
}).catch(err => {
|
|
6752
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
6753
6713
|
setTimeout(() => {
|
|
6754
6714
|
this.rePlay();
|
|
6755
6715
|
}, 3 * 60 * 1e3);
|
|
@@ -6760,11 +6720,6 @@ class WebRtcMt$1 {
|
|
|
6760
6720
|
switch (type) {
|
|
6761
6721
|
case "err":
|
|
6762
6722
|
throw new Error(text);
|
|
6763
|
-
case "warn":
|
|
6764
|
-
console.log(text);
|
|
6765
|
-
break;
|
|
6766
|
-
default:
|
|
6767
|
-
console.log(text);
|
|
6768
6723
|
}
|
|
6769
6724
|
}
|
|
6770
6725
|
// 停止播放0
|
|
@@ -6808,7 +6763,6 @@ class WebRtcMt$1 {
|
|
|
6808
6763
|
this.rePlay(videoElm);
|
|
6809
6764
|
});
|
|
6810
6765
|
player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
|
|
6811
|
-
console.log("webrtc:" + state);
|
|
6812
6766
|
if (state === "disconnected" || state === "failed") {
|
|
6813
6767
|
this.rePlay(videoElm);
|
|
6814
6768
|
}
|
|
@@ -6816,10 +6770,8 @@ class WebRtcMt$1 {
|
|
|
6816
6770
|
}
|
|
6817
6771
|
// 重播
|
|
6818
6772
|
rePlay(videoElm) {
|
|
6819
|
-
console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
|
|
6820
6773
|
this.stopPlay();
|
|
6821
6774
|
setTimeout(() => {
|
|
6822
|
-
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6823
6775
|
this.init(this.opt);
|
|
6824
6776
|
}, 5 * 1e3);
|
|
6825
6777
|
}
|
|
@@ -7390,7 +7342,7 @@ function useActiveMenu(menuList, extraPages, isNav = false, watchOnce = false, i
|
|
|
7390
7342
|
return menu;
|
|
7391
7343
|
}
|
|
7392
7344
|
|
|
7393
|
-
function _isSlot$
|
|
7345
|
+
function _isSlot$e(s) {
|
|
7394
7346
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
7395
7347
|
}
|
|
7396
7348
|
const Header$1 = vue.defineComponent({
|
|
@@ -7485,7 +7437,7 @@ const Header$1 = vue.defineComponent({
|
|
|
7485
7437
|
"selectedKeys": acitveMenuKey.value,
|
|
7486
7438
|
"onUpdate:selectedKeys": $event => acitveMenuKey.value = $event,
|
|
7487
7439
|
"onSelect": handleMenuSelected
|
|
7488
|
-
}, _isSlot$
|
|
7440
|
+
}, _isSlot$e(_slot = props.menu.map(item => vue.createVNode(antDesignVue.MenuItem, {
|
|
7489
7441
|
"key": item.id,
|
|
7490
7442
|
"title": item.name
|
|
7491
7443
|
}, {
|
|
@@ -7553,7 +7505,7 @@ const Header$1 = vue.defineComponent({
|
|
|
7553
7505
|
}
|
|
7554
7506
|
});
|
|
7555
7507
|
|
|
7556
|
-
function _isSlot$
|
|
7508
|
+
function _isSlot$d(s) {
|
|
7557
7509
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
7558
7510
|
}
|
|
7559
7511
|
const renderMenuItem = item => {
|
|
@@ -7635,7 +7587,7 @@ const SideMenu$1 = vue.defineComponent({
|
|
|
7635
7587
|
"onUpdate:openKeys": $event => expandKeys.value = $event,
|
|
7636
7588
|
"selectedKeys": activeMenu.value,
|
|
7637
7589
|
"onSelect": handleMenuSelect
|
|
7638
|
-
}, _isSlot$
|
|
7590
|
+
}, _isSlot$d(_slot = props.menu.map(item => renderMenuItem(item))) ? _slot : {
|
|
7639
7591
|
default: () => [_slot]
|
|
7640
7592
|
});
|
|
7641
7593
|
};
|
|
@@ -7720,6 +7672,75 @@ function onAddExtraTabs(handler) {
|
|
|
7720
7672
|
});
|
|
7721
7673
|
}
|
|
7722
7674
|
|
|
7675
|
+
function useChildTheme(containerRef, isFullscreen, loadAppList) {
|
|
7676
|
+
const theme = core.useLocalStorage("theme", "default");
|
|
7677
|
+
const globalTheme = useQiankunStateValue("theme");
|
|
7678
|
+
globalTheme.value = theme.value;
|
|
7679
|
+
vue.watch([theme, globalTheme, isFullscreen, loadAppList, containerRef], async () => {
|
|
7680
|
+
if (containerRef.value) {
|
|
7681
|
+
await vue.nextTick();
|
|
7682
|
+
const childContainerList = containerRef.value.querySelectorAll("[id^='__qiankun_microapp_wrapper_for_']");
|
|
7683
|
+
const themeText = globalTheme.value === "dark" ? "dark" : "light";
|
|
7684
|
+
for (const child of Array.from(childContainerList)) {
|
|
7685
|
+
child.setAttribute("data-theme", themeText);
|
|
7686
|
+
child.setAttribute("data-doc-theme", themeText);
|
|
7687
|
+
if (isFullscreen.value) {
|
|
7688
|
+
child.setAttribute("fullscreen", "");
|
|
7689
|
+
} else {
|
|
7690
|
+
child.removeAttribute("fullscreen");
|
|
7691
|
+
}
|
|
7692
|
+
}
|
|
7693
|
+
}
|
|
7694
|
+
}, {
|
|
7695
|
+
immediate: true,
|
|
7696
|
+
deep: true
|
|
7697
|
+
});
|
|
7698
|
+
}
|
|
7699
|
+
|
|
7700
|
+
function useFullscreenLogic(containerRef, iframeList, activeKey) {
|
|
7701
|
+
const isFullscreenIframe = vue.ref(false);
|
|
7702
|
+
const {
|
|
7703
|
+
isFullscreen,
|
|
7704
|
+
enter
|
|
7705
|
+
} = core.useFullscreen(containerRef);
|
|
7706
|
+
const {
|
|
7707
|
+
elementY
|
|
7708
|
+
} = core.useMouseInElement(containerRef);
|
|
7709
|
+
const isTabsShow = vue.ref(false);
|
|
7710
|
+
vue.watchEffect(() => {
|
|
7711
|
+
if (isFullscreen.value) {
|
|
7712
|
+
isTabsShow.value = false;
|
|
7713
|
+
}
|
|
7714
|
+
});
|
|
7715
|
+
vue.watchEffect(() => {
|
|
7716
|
+
if (elementY.value < 10) {
|
|
7717
|
+
isTabsShow.value = true;
|
|
7718
|
+
}
|
|
7719
|
+
});
|
|
7720
|
+
const isPadding = vue.computed(() => {
|
|
7721
|
+
let iframePadding = false;
|
|
7722
|
+
if (activeKey.value) {
|
|
7723
|
+
const currentIframe = iframeList.value.find(item => item.id === activeKey.value);
|
|
7724
|
+
if (currentIframe) {
|
|
7725
|
+
iframePadding = currentIframe.url.includes("hasPadding");
|
|
7726
|
+
if (!iframePadding) return false;
|
|
7727
|
+
}
|
|
7728
|
+
}
|
|
7729
|
+
if (isFullscreen.value) return false;
|
|
7730
|
+
return !isFullscreenIframe.value;
|
|
7731
|
+
});
|
|
7732
|
+
const handleFullscreen = tab => {
|
|
7733
|
+
isFullscreenIframe.value = tab.mode === 2;
|
|
7734
|
+
enter();
|
|
7735
|
+
};
|
|
7736
|
+
return {
|
|
7737
|
+
isFullscreen,
|
|
7738
|
+
isTabsShow,
|
|
7739
|
+
isPadding,
|
|
7740
|
+
handleFullscreen
|
|
7741
|
+
};
|
|
7742
|
+
}
|
|
7743
|
+
|
|
7723
7744
|
function setParam(searchParams, obj) {
|
|
7724
7745
|
for (const key in obj) {
|
|
7725
7746
|
if (!searchParams.has(key)) {
|
|
@@ -7838,7 +7859,7 @@ const TabList = vue.defineComponent({
|
|
|
7838
7859
|
}
|
|
7839
7860
|
});
|
|
7840
7861
|
vue.onBeforeUnmount(() => tabList.value = []);
|
|
7841
|
-
core.watchArray(tabList, async (
|
|
7862
|
+
core.watchArray(tabList, async (_val, _prev, _added, removed) => {
|
|
7842
7863
|
for (const tab of removed) {
|
|
7843
7864
|
if (tab.isExtraTab) {
|
|
7844
7865
|
const idx = qiankunState.value.extraTabs.findIndex(item => item.key === tab.key && item.uniqueKey === tab.uniqueKey);
|
|
@@ -8086,32 +8107,33 @@ const TabList = vue.defineComponent({
|
|
|
8086
8107
|
}
|
|
8087
8108
|
});
|
|
8088
8109
|
|
|
8089
|
-
const
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
required: true
|
|
8101
|
-
},
|
|
8102
|
-
appList: {
|
|
8103
|
-
type: Array,
|
|
8104
|
-
required: true
|
|
8105
|
-
},
|
|
8106
|
-
showTabList: {
|
|
8107
|
-
type: Boolean,
|
|
8108
|
-
default: true
|
|
8109
|
-
},
|
|
8110
|
-
pageContainerRef: {
|
|
8111
|
-
type: Object,
|
|
8112
|
-
required: true
|
|
8113
|
-
}
|
|
8110
|
+
const Props$1 = {
|
|
8111
|
+
currMenu: {
|
|
8112
|
+
type: Object
|
|
8113
|
+
},
|
|
8114
|
+
menu: {
|
|
8115
|
+
type: Array,
|
|
8116
|
+
default: () => []
|
|
8117
|
+
},
|
|
8118
|
+
extraPages: {
|
|
8119
|
+
type: Array,
|
|
8120
|
+
required: true
|
|
8114
8121
|
},
|
|
8122
|
+
appList: {
|
|
8123
|
+
type: Array,
|
|
8124
|
+
required: true
|
|
8125
|
+
},
|
|
8126
|
+
showTabList: {
|
|
8127
|
+
type: Boolean,
|
|
8128
|
+
default: true
|
|
8129
|
+
},
|
|
8130
|
+
pageContainerRef: {
|
|
8131
|
+
type: Object,
|
|
8132
|
+
required: true
|
|
8133
|
+
}
|
|
8134
|
+
};
|
|
8135
|
+
const PageContent = vue.defineComponent({
|
|
8136
|
+
props: Props$1,
|
|
8115
8137
|
setup(props, {
|
|
8116
8138
|
emit
|
|
8117
8139
|
}) {
|
|
@@ -8139,12 +8161,12 @@ const PageContent = vue.defineComponent({
|
|
|
8139
8161
|
extraPageList.value.splice(idx, 1);
|
|
8140
8162
|
}
|
|
8141
8163
|
};
|
|
8142
|
-
const handleMenuChange = val => {
|
|
8164
|
+
const handleMenuChange = (val, isFromMenu = false) => {
|
|
8143
8165
|
if (!val) return;
|
|
8144
8166
|
const routeQuery = {
|
|
8145
8167
|
...route.query
|
|
8146
8168
|
};
|
|
8147
|
-
const queryCombine = Object.assign(val.params
|
|
8169
|
+
const queryCombine = Object.assign({}, val.params, routeQuery);
|
|
8148
8170
|
if (val.isExtra) {
|
|
8149
8171
|
const exist = extraPageList.value.find(item => item.key === val.key && item.uniqueKey === val.uniqueKey);
|
|
8150
8172
|
if (!exist) {
|
|
@@ -8182,15 +8204,15 @@ const PageContent = vue.defineComponent({
|
|
|
8182
8204
|
const tab = ___default["default"].cloneDeep(val);
|
|
8183
8205
|
switch (mode) {
|
|
8184
8206
|
case 0:
|
|
8185
|
-
if (
|
|
8207
|
+
if (isOpened) {
|
|
8208
|
+
openedTab.params = isFromMenu ? val.params : queryCombine;
|
|
8209
|
+
val.params = isFromMenu ? val.params : queryCombine;
|
|
8210
|
+
} else {
|
|
8186
8211
|
tabList.value.push({
|
|
8187
8212
|
...tab,
|
|
8188
8213
|
key: key ?? id,
|
|
8189
8214
|
type: "menu"
|
|
8190
8215
|
});
|
|
8191
|
-
} else {
|
|
8192
|
-
openedTab.params = queryCombine;
|
|
8193
|
-
val.params = queryCombine;
|
|
8194
8216
|
}
|
|
8195
8217
|
const [path, currSearch = ""] = url.split("?");
|
|
8196
8218
|
const searchObj = new URLSearchParams(currSearch);
|
|
@@ -8274,7 +8296,7 @@ const PageContent = vue.defineComponent({
|
|
|
8274
8296
|
}, {
|
|
8275
8297
|
immediate: true
|
|
8276
8298
|
});
|
|
8277
|
-
vue.watch(() => props.currMenu, handleMenuChange, {
|
|
8299
|
+
vue.watch(() => props.currMenu, val => handleMenuChange(val, true), {
|
|
8278
8300
|
immediate: true
|
|
8279
8301
|
});
|
|
8280
8302
|
core.useEventListener("message", e => {
|
|
@@ -8303,85 +8325,38 @@ const PageContent = vue.defineComponent({
|
|
|
8303
8325
|
}, {
|
|
8304
8326
|
immediate: true
|
|
8305
8327
|
});
|
|
8306
|
-
vue.watch(() => qiankunState.value.activeTabKey, val =>
|
|
8328
|
+
vue.watch(() => qiankunState.value.activeTabKey, val => {
|
|
8329
|
+
if (activeKey !== val) {
|
|
8330
|
+
requestAnimationFrame(() => {
|
|
8331
|
+
activeKey.value = val;
|
|
8332
|
+
});
|
|
8333
|
+
}
|
|
8334
|
+
});
|
|
8307
8335
|
onAddExtraTabs(added => {
|
|
8308
8336
|
tabList.value.push(...added);
|
|
8309
8337
|
});
|
|
8310
|
-
const isFullscreenIframe = vue.ref(false);
|
|
8311
8338
|
const {
|
|
8312
8339
|
isFullscreen,
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
} = core.useMouseInElement(containerRef);
|
|
8318
|
-
const isTabsShow = vue.ref(false);
|
|
8319
|
-
vue.watchEffect(() => {
|
|
8320
|
-
if (isFullscreen.value) {
|
|
8321
|
-
isTabsShow.value = false;
|
|
8322
|
-
}
|
|
8323
|
-
});
|
|
8324
|
-
vue.watchEffect(() => {
|
|
8325
|
-
if (elementY.value < 10) {
|
|
8326
|
-
isTabsShow.value = true;
|
|
8327
|
-
}
|
|
8328
|
-
});
|
|
8329
|
-
const isPadding = vue.computed(() => {
|
|
8330
|
-
let iframePadding = false;
|
|
8331
|
-
if (activeKey.value) {
|
|
8332
|
-
const currentIframe = iframeList.value.find(item => item.id === activeKey.value);
|
|
8333
|
-
if (currentIframe) {
|
|
8334
|
-
iframePadding = currentIframe.url.includes("hasPadding");
|
|
8335
|
-
if (!iframePadding) return false;
|
|
8336
|
-
}
|
|
8337
|
-
}
|
|
8338
|
-
if (isFullscreen.value) return false;
|
|
8339
|
-
return !isFullscreenIframe.value;
|
|
8340
|
-
});
|
|
8341
|
-
const handleFullscreen = tab => {
|
|
8342
|
-
isFullscreenIframe.value = tab.mode === 2;
|
|
8343
|
-
enter();
|
|
8344
|
-
};
|
|
8340
|
+
handleFullscreen,
|
|
8341
|
+
isPadding,
|
|
8342
|
+
isTabsShow
|
|
8343
|
+
} = useFullscreenLogic(containerRef, iframeList, activeKey);
|
|
8345
8344
|
const handleRefreshIframe = async ({
|
|
8346
8345
|
id
|
|
8347
8346
|
}) => {
|
|
8348
8347
|
const iframe = iframeList.value.find(item => item.id === id);
|
|
8349
|
-
if (iframe)
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
}
|
|
8348
|
+
if (!iframe) return;
|
|
8349
|
+
iframe.refreshKey = Date.now();
|
|
8350
|
+
const reqCode = await checkIframeUrl(iframe.url);
|
|
8351
|
+
iframe.reqCode = reqCode;
|
|
8354
8352
|
};
|
|
8355
8353
|
const handleRefreshExtraPage = ({
|
|
8356
8354
|
key
|
|
8357
8355
|
}) => {
|
|
8358
8356
|
const page = extraPageList.value.find(item => item.key === key);
|
|
8359
|
-
|
|
8360
|
-
page.refreshKey = Date.now();
|
|
8361
|
-
}
|
|
8357
|
+
page && (page.refreshKey = Date.now());
|
|
8362
8358
|
};
|
|
8363
|
-
|
|
8364
|
-
const globalTheme = useQiankunStateValue("theme");
|
|
8365
|
-
globalTheme.value = theme.value;
|
|
8366
|
-
vue.watch([theme, globalTheme, isFullscreen, loadAppList, containerRef], async () => {
|
|
8367
|
-
if (containerRef.value) {
|
|
8368
|
-
await vue.nextTick();
|
|
8369
|
-
const childContainerList = containerRef.value.querySelectorAll("[id^='__qiankun_microapp_wrapper_for_']");
|
|
8370
|
-
const themeText = globalTheme.value === "dark" ? "dark" : "light";
|
|
8371
|
-
for (const child of Array.from(childContainerList)) {
|
|
8372
|
-
child.setAttribute("data-theme", themeText);
|
|
8373
|
-
child.setAttribute("data-doc-theme", themeText);
|
|
8374
|
-
if (isFullscreen.value) {
|
|
8375
|
-
child.setAttribute("fullscreen", "");
|
|
8376
|
-
} else {
|
|
8377
|
-
child.removeAttribute("fullscreen");
|
|
8378
|
-
}
|
|
8379
|
-
}
|
|
8380
|
-
}
|
|
8381
|
-
}, {
|
|
8382
|
-
immediate: true,
|
|
8383
|
-
deep: true
|
|
8384
|
-
});
|
|
8359
|
+
useChildTheme(containerRef, isFullscreen, loadAppList);
|
|
8385
8360
|
const closeExtraPage = tab => {
|
|
8386
8361
|
tabListRef.value?.closeTab(tab);
|
|
8387
8362
|
};
|
|
@@ -8390,122 +8365,186 @@ const PageContent = vue.defineComponent({
|
|
|
8390
8365
|
app.app.unmount();
|
|
8391
8366
|
}
|
|
8392
8367
|
});
|
|
8393
|
-
return () =>
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
}, null), [[vue.vShow, !isFullscreen.value || isTabsShow.value]]), vue.createVNode("div", {
|
|
8411
|
-
"class": ["page-container", {
|
|
8368
|
+
return () => {
|
|
8369
|
+
const tabs = vue.withDirectives(vue.createVNode(TabList, {
|
|
8370
|
+
"ref": tabListRef,
|
|
8371
|
+
"activeKey": activeKey.value,
|
|
8372
|
+
"onUpdate:activeKey": $event => activeKey.value = $event,
|
|
8373
|
+
"list": tabList.value,
|
|
8374
|
+
"onUpdate:list": $event => tabList.value = $event,
|
|
8375
|
+
"containerRef": containerRef,
|
|
8376
|
+
"onTabSelect": onTabSelect,
|
|
8377
|
+
"onCloseExtraPage": handleExtraPageClose,
|
|
8378
|
+
"onCloseIframePage": handleIframePageClose,
|
|
8379
|
+
"onFullscreen": handleFullscreen,
|
|
8380
|
+
"onRefreshIframe": handleRefreshIframe,
|
|
8381
|
+
"onRefreshExtraPage": handleRefreshExtraPage,
|
|
8382
|
+
"onMouseLeave": () => isTabsShow.value = false
|
|
8383
|
+
}, null), [[vue.vShow, !isFullscreen.value || isTabsShow.value]]);
|
|
8384
|
+
const containerCns = {
|
|
8412
8385
|
padding: isPadding.value,
|
|
8413
8386
|
fullscreen: isFullscreen.value
|
|
8414
|
-
}
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8387
|
+
};
|
|
8388
|
+
const iframeRender = item => {
|
|
8389
|
+
const show = item.id === activeKey.value;
|
|
8390
|
+
if (item.reqCode === 200 || item.reqCode === void 0) {
|
|
8391
|
+
return vue.createVNode("iframe", {
|
|
8392
|
+
"class": "menu-iframe",
|
|
8393
|
+
"key": item.id + item.refreshKey,
|
|
8394
|
+
"id": "iframe" + item.id,
|
|
8395
|
+
"style": {
|
|
8396
|
+
zIndex: show ? "" : "-100"
|
|
8397
|
+
},
|
|
8398
|
+
"src": item.url,
|
|
8399
|
+
"frameborder": "0"
|
|
8400
|
+
}, null);
|
|
8401
|
+
}
|
|
8402
|
+
let src = "/micro-assets/platform_web/developing.png";
|
|
8403
|
+
if (item.reqCode === 404) {
|
|
8404
|
+
src = "/micro-assets/platform_web/page404.png";
|
|
8405
|
+
}
|
|
8406
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
8407
|
+
"class": "iframe-fallback"
|
|
8408
|
+
}, [vue.createVNode("img", {
|
|
8409
|
+
"src": src,
|
|
8410
|
+
"alt": ""
|
|
8411
|
+
}, null)]), [[vue.vShow, show]]);
|
|
8412
|
+
};
|
|
8413
|
+
const childTypes = [];
|
|
8414
|
+
childTypes.push(vue.createVNode(vue.Fragment, null, [appDomList.value.map(item => vue.withDirectives(vue.createVNode("div", {
|
|
8415
|
+
"key": item.id,
|
|
8416
|
+
"id": item.id
|
|
8417
|
+
}, null), [[vue.vShow, item.name === activeAppName.value]]))]));
|
|
8418
|
+
childTypes.push(vue.createVNode(vue.Fragment, null, [iframeList.value.map(iframeRender)]));
|
|
8419
|
+
childTypes.push(vue.createVNode(vue.Fragment, null, [extraPageList.value.map(item => {
|
|
8420
|
+
const extraPageShoe = getTabUniqueKey(item) === activeKey.value;
|
|
8421
|
+
return vue.withDirectives(vue.createVNode("div", {
|
|
8422
|
+
"key": item.key + item.refreshKey,
|
|
8426
8423
|
"style": {
|
|
8427
|
-
|
|
8428
|
-
}
|
|
8429
|
-
|
|
8430
|
-
"
|
|
8431
|
-
}, null);
|
|
8432
|
-
}
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
}
|
|
8437
|
-
|
|
8438
|
-
"
|
|
8439
|
-
}, [
|
|
8440
|
-
|
|
8441
|
-
"alt": ""
|
|
8442
|
-
}, null)]), [[vue.vShow, show]]);
|
|
8443
|
-
}), extraPageList.value.map(item => vue.withDirectives(vue.createVNode("div", {
|
|
8444
|
-
"key": item.key + item.refreshKey,
|
|
8445
|
-
"style": {
|
|
8446
|
-
"min-height": "100%"
|
|
8447
|
-
}
|
|
8448
|
-
}, [vue.createVNode(item.component, {
|
|
8449
|
-
"onClose": () => closeExtraPage(item)
|
|
8450
|
-
}, null)]), [[vue.vShow, getTabUniqueKey(item) === activeKey.value]]))])]);
|
|
8424
|
+
"min-height": "100%"
|
|
8425
|
+
}
|
|
8426
|
+
}, [vue.createVNode(item.component, {
|
|
8427
|
+
"onClose": () => closeExtraPage(item)
|
|
8428
|
+
}, null)]), [[vue.vShow, extraPageShoe]]);
|
|
8429
|
+
})]));
|
|
8430
|
+
return vue.createVNode("div", {
|
|
8431
|
+
"class": "page-content",
|
|
8432
|
+
"ref": containerRef
|
|
8433
|
+
}, [props.showTabList && tabs, vue.createVNode("div", {
|
|
8434
|
+
"class": ["page-container", containerCns],
|
|
8435
|
+
"ref": props.pageContainerRef
|
|
8436
|
+
}, [childTypes])]);
|
|
8437
|
+
};
|
|
8451
8438
|
}
|
|
8452
8439
|
});
|
|
8453
8440
|
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
required: true
|
|
8470
|
-
},
|
|
8471
|
-
// 额外的页面
|
|
8472
|
-
extraPages: {
|
|
8473
|
-
type: Array,
|
|
8474
|
-
default: () => []
|
|
8475
|
-
},
|
|
8476
|
-
// 未读消息
|
|
8477
|
-
messageCount: {
|
|
8478
|
-
type: Number,
|
|
8479
|
-
default: 0
|
|
8480
|
-
},
|
|
8481
|
-
// 网页logo
|
|
8482
|
-
logo: {
|
|
8483
|
-
type: String
|
|
8484
|
-
},
|
|
8485
|
-
appList: {
|
|
8486
|
-
type: Array,
|
|
8487
|
-
required: true
|
|
8488
|
-
},
|
|
8489
|
-
// 展示菜单
|
|
8490
|
-
withMenu: {
|
|
8491
|
-
type: Boolean,
|
|
8492
|
-
default: true
|
|
8493
|
-
},
|
|
8494
|
-
// 展示在左侧的菜单(不展示菜单模式)
|
|
8495
|
-
sideMenu: {
|
|
8496
|
-
type: Array
|
|
8497
|
-
},
|
|
8498
|
-
// 展示导航栏菜单和搜索框
|
|
8499
|
-
showNav: {
|
|
8500
|
-
type: Boolean,
|
|
8501
|
-
default: true
|
|
8502
|
-
},
|
|
8503
|
-
// 是否展示我的消息
|
|
8504
|
-
showNotice: {
|
|
8505
|
-
type: Boolean,
|
|
8506
|
-
default: true
|
|
8441
|
+
function useFakeModal(pageContainerRef) {
|
|
8442
|
+
const showMask = vue.ref(false);
|
|
8443
|
+
core.useEventListener("message", e => {
|
|
8444
|
+
const {
|
|
8445
|
+
data: event
|
|
8446
|
+
} = e;
|
|
8447
|
+
const {
|
|
8448
|
+
type,
|
|
8449
|
+
val,
|
|
8450
|
+
delay = 0
|
|
8451
|
+
} = event;
|
|
8452
|
+
if (type === "toggleMask") {
|
|
8453
|
+
setTimeout(() => {
|
|
8454
|
+
showMask.value = val;
|
|
8455
|
+
}, delay);
|
|
8507
8456
|
}
|
|
8457
|
+
});
|
|
8458
|
+
const pageBounding = core.useElementBounding(pageContainerRef);
|
|
8459
|
+
const modalPath = vue.computed(() => {
|
|
8460
|
+
const {
|
|
8461
|
+
top,
|
|
8462
|
+
bottom,
|
|
8463
|
+
left,
|
|
8464
|
+
right
|
|
8465
|
+
} = pageBounding;
|
|
8466
|
+
const topDis = Math.round(top.value);
|
|
8467
|
+
const rightDis = Math.round(window.innerWidth - right.value);
|
|
8468
|
+
const bottomDis = Math.round(window.innerHeight - bottom.value);
|
|
8469
|
+
const leftDis = Math.round(left.value);
|
|
8470
|
+
return `polygon(
|
|
8471
|
+
0% 0%,
|
|
8472
|
+
0% 100%,
|
|
8473
|
+
${leftDis}px 100%,
|
|
8474
|
+
${leftDis}px ${topDis}px,
|
|
8475
|
+
calc(100% - ${rightDis}px) ${topDis}px,
|
|
8476
|
+
calc(100% - ${rightDis}px) calc(100% - ${bottomDis}px),
|
|
8477
|
+
${leftDis}px calc(100% - ${bottomDis}px),
|
|
8478
|
+
${leftDis}px 100%,
|
|
8479
|
+
100% 100%,
|
|
8480
|
+
100% 0%
|
|
8481
|
+
)`;
|
|
8482
|
+
});
|
|
8483
|
+
return {
|
|
8484
|
+
showMask,
|
|
8485
|
+
modalPath
|
|
8486
|
+
};
|
|
8487
|
+
}
|
|
8488
|
+
|
|
8489
|
+
function _isSlot$c(s) {
|
|
8490
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
8491
|
+
}
|
|
8492
|
+
const Props = {
|
|
8493
|
+
// 用户权限菜单
|
|
8494
|
+
userMenu: {
|
|
8495
|
+
type: Array,
|
|
8496
|
+
required: true
|
|
8497
|
+
},
|
|
8498
|
+
// 版权信息
|
|
8499
|
+
copyRight: {
|
|
8500
|
+
type: String
|
|
8501
|
+
},
|
|
8502
|
+
// 用户
|
|
8503
|
+
userInfo: {
|
|
8504
|
+
type: Object,
|
|
8505
|
+
required: true
|
|
8506
|
+
},
|
|
8507
|
+
// 额外的页面
|
|
8508
|
+
extraPages: {
|
|
8509
|
+
type: Array,
|
|
8510
|
+
default: () => []
|
|
8511
|
+
},
|
|
8512
|
+
// 未读消息
|
|
8513
|
+
messageCount: {
|
|
8514
|
+
type: Number,
|
|
8515
|
+
default: 0
|
|
8516
|
+
},
|
|
8517
|
+
// 网页logo
|
|
8518
|
+
logo: {
|
|
8519
|
+
type: String
|
|
8520
|
+
},
|
|
8521
|
+
appList: {
|
|
8522
|
+
type: Array,
|
|
8523
|
+
required: true
|
|
8524
|
+
},
|
|
8525
|
+
// 展示菜单
|
|
8526
|
+
withMenu: {
|
|
8527
|
+
type: Boolean,
|
|
8528
|
+
default: true
|
|
8529
|
+
},
|
|
8530
|
+
// 展示在左侧的菜单(不展示菜单模式)
|
|
8531
|
+
sideMenu: {
|
|
8532
|
+
type: Array
|
|
8508
8533
|
},
|
|
8534
|
+
// 展示导航栏菜单和搜索框
|
|
8535
|
+
showNav: {
|
|
8536
|
+
type: Boolean,
|
|
8537
|
+
default: true
|
|
8538
|
+
},
|
|
8539
|
+
// 是否展示我的消息
|
|
8540
|
+
showNotice: {
|
|
8541
|
+
type: Boolean,
|
|
8542
|
+
default: true
|
|
8543
|
+
}
|
|
8544
|
+
};
|
|
8545
|
+
const Layout = vue.defineComponent({
|
|
8546
|
+
emits: ["globalSearch", "personalCenter", "logout", "extraPage"],
|
|
8547
|
+
props: Props,
|
|
8509
8548
|
setup(props, {
|
|
8510
8549
|
emit
|
|
8511
8550
|
}) {
|
|
@@ -8518,15 +8557,13 @@ const Layout = vue.defineComponent({
|
|
|
8518
8557
|
const siderMenu = vue.ref([]);
|
|
8519
8558
|
const sideMenuShow = vue.computed(() => props.sideMenu || siderMenu.value);
|
|
8520
8559
|
const showSideMenu = vue.computed(() => props.withMenu || !!props.sideMenu);
|
|
8521
|
-
vue.
|
|
8522
|
-
if (
|
|
8523
|
-
const refMenu = getMenuByKey(
|
|
8560
|
+
vue.watchEffect(() => {
|
|
8561
|
+
if (props.userMenu.length > 0 && menuRef) {
|
|
8562
|
+
const refMenu = getMenuByKey(props.userMenu, menuRef, "remark");
|
|
8524
8563
|
if (refMenu) {
|
|
8525
8564
|
siderMenu.value = [refMenu];
|
|
8526
8565
|
}
|
|
8527
8566
|
}
|
|
8528
|
-
}, {
|
|
8529
|
-
immediate: true
|
|
8530
8567
|
});
|
|
8531
8568
|
const showHeader = vue.computed(() => props.withMenu && !menuRef && !isOnlyPage);
|
|
8532
8569
|
const showSide = vue.computed(() => showSideMenu.value && !isOnlyPage);
|
|
@@ -8557,52 +8594,19 @@ const Layout = vue.defineComponent({
|
|
|
8557
8594
|
refreshTabKey: ""
|
|
8558
8595
|
};
|
|
8559
8596
|
});
|
|
8560
|
-
const showMask = vue.ref(false);
|
|
8561
|
-
core.useEventListener("message", e => {
|
|
8562
|
-
const {
|
|
8563
|
-
data: event
|
|
8564
|
-
} = e;
|
|
8565
|
-
const {
|
|
8566
|
-
type,
|
|
8567
|
-
val,
|
|
8568
|
-
delay = 0
|
|
8569
|
-
} = event;
|
|
8570
|
-
if (type === "toggleMask") {
|
|
8571
|
-
setTimeout(() => {
|
|
8572
|
-
showMask.value = val;
|
|
8573
|
-
}, delay);
|
|
8574
|
-
}
|
|
8575
|
-
});
|
|
8576
8597
|
const pageContainerRef = vue.ref();
|
|
8577
|
-
const
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
const
|
|
8589
|
-
return `polygon(
|
|
8590
|
-
0% 0%,
|
|
8591
|
-
0% 100%,
|
|
8592
|
-
${leftDis}px 100%,
|
|
8593
|
-
${leftDis}px ${topDis}px,
|
|
8594
|
-
calc(100% - ${rightDis}px) ${topDis}px,
|
|
8595
|
-
calc(100% - ${rightDis}px) calc(100% - ${bottomDis}px),
|
|
8596
|
-
${leftDis}px calc(100% - ${bottomDis}px),
|
|
8597
|
-
${leftDis}px 100%,
|
|
8598
|
-
100% 100%,
|
|
8599
|
-
100% 0%
|
|
8600
|
-
)`;
|
|
8601
|
-
});
|
|
8602
|
-
return () => vue.createVNode("div", {
|
|
8603
|
-
"class": `${config.prefix}-layout`
|
|
8604
|
-
}, [vue.createVNode(antDesignVue.Layout, null, {
|
|
8605
|
-
default: () => [showHeader.value && vue.createVNode(antDesignVue.LayoutHeader, null, {
|
|
8598
|
+
const {
|
|
8599
|
+
showMask,
|
|
8600
|
+
modalPath
|
|
8601
|
+
} = useFakeModal(pageContainerRef);
|
|
8602
|
+
return () => {
|
|
8603
|
+
const modalMask = vue.createVNode("div", {
|
|
8604
|
+
"class": "layout-mask",
|
|
8605
|
+
"style": {
|
|
8606
|
+
clipPath: modalPath.value
|
|
8607
|
+
}
|
|
8608
|
+
}, null);
|
|
8609
|
+
const header = vue.createVNode(antDesignVue.LayoutHeader, null, {
|
|
8606
8610
|
default: () => [vue.createVNode(Header$1, {
|
|
8607
8611
|
"menu": props.showNav ? props.userMenu : [],
|
|
8608
8612
|
"withSearch": props.showNav,
|
|
@@ -8617,47 +8621,49 @@ const Layout = vue.defineComponent({
|
|
|
8617
8621
|
"onLogout": () => emit("logout"),
|
|
8618
8622
|
"onExtraPage": e => emit("extraPage", e)
|
|
8619
8623
|
}, null)]
|
|
8620
|
-
})
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8624
|
+
});
|
|
8625
|
+
const sider = vue.createVNode(antDesignVue.LayoutSider, {
|
|
8626
|
+
"class": `${config.prefix}-layout-sider`,
|
|
8627
|
+
"width": "10.416vw",
|
|
8628
|
+
"collapsedWidth": "3.125vw",
|
|
8629
|
+
"collapsed": isFolder.value
|
|
8630
|
+
}, {
|
|
8631
|
+
default: () => [vue.createVNode("div", {
|
|
8632
|
+
"class": ["folder", {
|
|
8633
|
+
isFold: isFolder.value
|
|
8634
|
+
}],
|
|
8635
|
+
"onClick": () => toggleFolder()
|
|
8636
|
+
}, [isFolder.value ? vue.createVNode(iconsVue.MenuUnfoldOutlined, null, null) : vue.createVNode(iconsVue.MenuFoldOutlined, null, null)]), vue.createVNode(SideMenu$1, {
|
|
8637
|
+
"menu": sideMenuShow.value,
|
|
8638
|
+
"onMenuSelect": handleMenuSelect,
|
|
8639
|
+
"extraPages": props.extraPages,
|
|
8640
|
+
"expandAll": !!menuRef
|
|
8641
|
+
}, null), vue.createVNode("div", {
|
|
8642
|
+
"class": "copyright"
|
|
8643
|
+
}, [props.copyRight])]
|
|
8644
|
+
});
|
|
8645
|
+
const content = vue.createVNode(PageContent, {
|
|
8646
|
+
"pageContainerRef": pageContainerRef,
|
|
8647
|
+
"currMenu": currMenu.value,
|
|
8648
|
+
"menu": props.userMenu,
|
|
8649
|
+
"extraPages": props.extraPages,
|
|
8650
|
+
"appList": props.appList,
|
|
8651
|
+
"showTabList": (props.withMenu || showSideMenu.value) && !isOnlyPage
|
|
8652
|
+
}, null);
|
|
8653
|
+
return vue.createVNode("div", {
|
|
8654
|
+
"class": `${config.prefix}-layout`
|
|
8655
|
+
}, [vue.createVNode(antDesignVue.Layout, null, {
|
|
8656
|
+
default: () => [showHeader.value && header, vue.createVNode(antDesignVue.Layout, null, {
|
|
8657
|
+
default: () => [showSide.value && sider, vue.createVNode(antDesignVue.LayoutContent, {
|
|
8658
|
+
"class": {
|
|
8659
|
+
"only-page": isOnlyPage
|
|
8660
|
+
}
|
|
8661
|
+
}, _isSlot$c(content) ? content : {
|
|
8662
|
+
default: () => [content]
|
|
8663
|
+
})]
|
|
8653
8664
|
})]
|
|
8654
|
-
})]
|
|
8655
|
-
}
|
|
8656
|
-
"class": "layout-mask",
|
|
8657
|
-
"style": {
|
|
8658
|
-
clipPath: modalPath.value
|
|
8659
|
-
}
|
|
8660
|
-
}, null)]);
|
|
8665
|
+
}), showMask.value && modalMask]);
|
|
8666
|
+
};
|
|
8661
8667
|
}
|
|
8662
8668
|
});
|
|
8663
8669
|
var index$9 = installComponent(Layout, "layout");
|
|
@@ -9383,39 +9389,41 @@ const ChildHeader = vue.defineComponent({
|
|
|
9383
9389
|
|
|
9384
9390
|
const isIndependentApp = query => !!query.token && !!query.onlyPage;
|
|
9385
9391
|
const loginFun = new Login$1();
|
|
9386
|
-
const
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9392
|
+
const httpUtil = {
|
|
9393
|
+
requestLogo: async () => {
|
|
9394
|
+
const res = await fetch("/api/common/v1/sysconfig/searchImage?imgType=4&editImg=1&clientType=web");
|
|
9395
|
+
const blob = await res.blob();
|
|
9396
|
+
return URL.createObjectURL(blob);
|
|
9397
|
+
},
|
|
9398
|
+
requestUserTree: async () => {
|
|
9399
|
+
const headers = getCommonHeaders();
|
|
9400
|
+
const res = await fetch("/api/common/v1/menu/tree", {
|
|
9401
|
+
headers
|
|
9402
|
+
});
|
|
9403
|
+
const treeData = await res.json();
|
|
9404
|
+
return treeData.data;
|
|
9405
|
+
},
|
|
9406
|
+
requestCopyright: async () => {
|
|
9407
|
+
const res = await fetch("/api/common/v1/sysconfig/getSysConfig?clientType=web");
|
|
9408
|
+
const data = await res.json();
|
|
9409
|
+
return data.data.homepageCopyright;
|
|
9410
|
+
},
|
|
9411
|
+
postLogout: async () => {
|
|
9412
|
+
const headers = getCommonHeaders();
|
|
9413
|
+
await fetch("/api/common/v1/log/insert", {
|
|
9414
|
+
method: "POST",
|
|
9415
|
+
headers: {
|
|
9416
|
+
...headers,
|
|
9417
|
+
"Content-Type": "application/json;charset=UTF-8"
|
|
9418
|
+
},
|
|
9419
|
+
body: JSON.stringify({
|
|
9420
|
+
softSysId: "1",
|
|
9421
|
+
operateId: "111",
|
|
9422
|
+
recordId: "11",
|
|
9423
|
+
content: "\u767B\u51FA"
|
|
9424
|
+
})
|
|
9425
|
+
});
|
|
9426
|
+
}
|
|
9419
9427
|
};
|
|
9420
9428
|
const DefaultLayout = vue.defineComponent({
|
|
9421
9429
|
async beforeRouteEnter(to) {
|
|
@@ -9460,12 +9468,12 @@ const DefaultLayout = vue.defineComponent({
|
|
|
9460
9468
|
const userInfo = core.useSessionStorage("userinfo", {});
|
|
9461
9469
|
const logo = vue.ref();
|
|
9462
9470
|
const getLogo = async () => {
|
|
9463
|
-
const str = await requestLogo();
|
|
9471
|
+
const str = await httpUtil.requestLogo();
|
|
9464
9472
|
logo.value = str;
|
|
9465
9473
|
};
|
|
9466
9474
|
const copyright = vue.ref("");
|
|
9467
9475
|
const getCopyright = async () => {
|
|
9468
|
-
const str = await requestCopyright();
|
|
9476
|
+
const str = await httpUtil.requestCopyright();
|
|
9469
9477
|
copyright.value = str;
|
|
9470
9478
|
};
|
|
9471
9479
|
const isIndependent = isIndependentApp(route.query);
|
|
@@ -9490,7 +9498,7 @@ const DefaultLayout = vue.defineComponent({
|
|
|
9490
9498
|
});
|
|
9491
9499
|
const permissionMenu = vue.ref([]);
|
|
9492
9500
|
const getPermissionMenu = async () => {
|
|
9493
|
-
const tree = await requestUserTree();
|
|
9501
|
+
const tree = await httpUtil.requestUserTree();
|
|
9494
9502
|
const appRefName = route.query.menuRef ?? undefined.VITE_APP_NAME;
|
|
9495
9503
|
let userMenu = getMenuByKey(tree, appRefName, "remark");
|
|
9496
9504
|
if (!userMenu) {
|
|
@@ -9501,9 +9509,8 @@ const DefaultLayout = vue.defineComponent({
|
|
|
9501
9509
|
const menuList = vue.computed(() => isDev ? devMenuList.value : permissionMenu.value);
|
|
9502
9510
|
const isIframe = vue.ref(false);
|
|
9503
9511
|
const iframeUrl = vue.ref("");
|
|
9504
|
-
vue.watch([route, menuList], (
|
|
9505
|
-
query
|
|
9506
|
-
}]) => {
|
|
9512
|
+
vue.watch([route, menuList], () => {
|
|
9513
|
+
const query = route.query;
|
|
9507
9514
|
if (query.iframeId && menuList.value.length) {
|
|
9508
9515
|
isIframe.value = true;
|
|
9509
9516
|
const menuRecord = getMenuByKey(menuList.value, query.iframeId, "id");
|
|
@@ -9525,7 +9532,7 @@ const DefaultLayout = vue.defineComponent({
|
|
|
9525
9532
|
}
|
|
9526
9533
|
});
|
|
9527
9534
|
const handleLogout = async () => {
|
|
9528
|
-
await postLogout();
|
|
9535
|
+
await httpUtil.postLogout();
|
|
9529
9536
|
sessionStorage.clear();
|
|
9530
9537
|
localStorage.clear();
|
|
9531
9538
|
antDesignVue.message.info("\u7528\u6237\u9000\u51FA\u767B\u5F55");
|
|
@@ -9551,48 +9558,51 @@ const DefaultLayout = vue.defineComponent({
|
|
|
9551
9558
|
"class": "independent-container"
|
|
9552
9559
|
}, [vue.createVNode(vue.resolveComponent("router-view"), null, null)]);
|
|
9553
9560
|
}
|
|
9561
|
+
const header = vue.createVNode(antDesignVue.LayoutHeader, {
|
|
9562
|
+
"class": "header-container"
|
|
9563
|
+
}, {
|
|
9564
|
+
default: () => [isDev ? vue.createVNode(ChildHeaderDev, {
|
|
9565
|
+
"userInfo": userInfo.value
|
|
9566
|
+
}, null) : vue.createVNode(ChildHeader, {
|
|
9567
|
+
"userInfo": userInfo.value,
|
|
9568
|
+
"logo": logo.value,
|
|
9569
|
+
"onLogout": handleLogout
|
|
9570
|
+
}, null)]
|
|
9571
|
+
});
|
|
9572
|
+
const sider = vue.createVNode(antDesignVue.LayoutSider, {
|
|
9573
|
+
"class": `${config.prefix}-layout-sider`,
|
|
9574
|
+
"width": "10.416vw",
|
|
9575
|
+
"collapsedWidth": "3.125vw",
|
|
9576
|
+
"collapsed": isFold.value
|
|
9577
|
+
}, {
|
|
9578
|
+
default: () => [vue.createVNode("div", {
|
|
9579
|
+
"class": ["folder", {
|
|
9580
|
+
isFold: isFold.value
|
|
9581
|
+
}],
|
|
9582
|
+
"onClick": () => toggleFold()
|
|
9583
|
+
}, [isFold.value ? vue.createVNode(iconsVue.MenuUnfoldOutlined, null, null) : vue.createVNode(iconsVue.MenuFoldOutlined, null, null)]), vue.createVNode(SideMenu, {
|
|
9584
|
+
"menuList": menuList.value
|
|
9585
|
+
}, null), vue.createVNode("div", {
|
|
9586
|
+
"class": "copyright"
|
|
9587
|
+
}, [copyright.value])]
|
|
9588
|
+
});
|
|
9589
|
+
const content = vue.createVNode(antDesignVue.LayoutContent, {
|
|
9590
|
+
"class": "layout-content"
|
|
9591
|
+
}, {
|
|
9592
|
+
default: () => [vue.createVNode("div", {
|
|
9593
|
+
"class": "content-inner"
|
|
9594
|
+
}, [vue.withDirectives(vue.createVNode(vue.resolveComponent("router-view"), null, null), [[vue.vShow, !isIframe.value]]), vue.withDirectives(vue.createVNode("iframe", {
|
|
9595
|
+
"src": iframeUrl.value,
|
|
9596
|
+
"height": "100%",
|
|
9597
|
+
"width": "100%",
|
|
9598
|
+
"frameborder": "0"
|
|
9599
|
+
}, null), [[vue.vShow, isIframe.value]])])]
|
|
9600
|
+
});
|
|
9554
9601
|
return vue.createVNode(antDesignVue.Layout, {
|
|
9555
9602
|
"class": `${config.prefix}-child-layout`
|
|
9556
9603
|
}, {
|
|
9557
|
-
default: () => [props.withHeader && vue.createVNode(antDesignVue.
|
|
9558
|
-
|
|
9559
|
-
}, {
|
|
9560
|
-
default: () => [isDev ? vue.createVNode(ChildHeaderDev, {
|
|
9561
|
-
"userInfo": userInfo.value
|
|
9562
|
-
}, null) : vue.createVNode(ChildHeader, {
|
|
9563
|
-
"userInfo": userInfo.value,
|
|
9564
|
-
"logo": logo.value,
|
|
9565
|
-
"onLogout": handleLogout
|
|
9566
|
-
}, null)]
|
|
9567
|
-
}), vue.createVNode(antDesignVue.Layout, null, {
|
|
9568
|
-
default: () => [vue.createVNode(antDesignVue.LayoutSider, {
|
|
9569
|
-
"class": `${config.prefix}-layout-sider`,
|
|
9570
|
-
"width": "10.416vw",
|
|
9571
|
-
"collapsedWidth": "3.125vw",
|
|
9572
|
-
"collapsed": isFold.value
|
|
9573
|
-
}, {
|
|
9574
|
-
default: () => [vue.createVNode("div", {
|
|
9575
|
-
"class": ["folder", {
|
|
9576
|
-
isFold: isFold.value
|
|
9577
|
-
}],
|
|
9578
|
-
"onClick": () => toggleFold()
|
|
9579
|
-
}, [isFold.value ? vue.createVNode(iconsVue.MenuUnfoldOutlined, null, null) : vue.createVNode(iconsVue.MenuFoldOutlined, null, null)]), vue.createVNode(SideMenu, {
|
|
9580
|
-
"menuList": menuList.value
|
|
9581
|
-
}, null), vue.createVNode("div", {
|
|
9582
|
-
"class": "copyright"
|
|
9583
|
-
}, [copyright.value])]
|
|
9584
|
-
}), vue.createVNode(antDesignVue.LayoutContent, {
|
|
9585
|
-
"class": "layout-content"
|
|
9586
|
-
}, {
|
|
9587
|
-
default: () => [vue.createVNode("div", {
|
|
9588
|
-
"class": "content-inner"
|
|
9589
|
-
}, [vue.withDirectives(vue.createVNode(vue.resolveComponent("router-view"), null, null), [[vue.vShow, !isIframe.value]]), vue.withDirectives(vue.createVNode("iframe", {
|
|
9590
|
-
"src": iframeUrl.value,
|
|
9591
|
-
"height": "100%",
|
|
9592
|
-
"width": "100%",
|
|
9593
|
-
"frameborder": "0"
|
|
9594
|
-
}, null), [[vue.vShow, isIframe.value]])])]
|
|
9595
|
-
})]
|
|
9604
|
+
default: () => [props.withHeader && header, vue.createVNode(antDesignVue.Layout, null, {
|
|
9605
|
+
default: () => [sider, content]
|
|
9596
9606
|
})]
|
|
9597
9607
|
});
|
|
9598
9608
|
};
|
|
@@ -11537,7 +11547,6 @@ const CloudVideo = vue.defineComponent({
|
|
|
11537
11547
|
initVideo();
|
|
11538
11548
|
});
|
|
11539
11549
|
vue.onBeforeUnmount(() => {
|
|
11540
|
-
console.log("\u9500\u6BC1");
|
|
11541
11550
|
player?.stop();
|
|
11542
11551
|
});
|
|
11543
11552
|
return () => vue.createVNode("div", {
|
|
@@ -11627,11 +11636,6 @@ class WebRtcMt {
|
|
|
11627
11636
|
switch (type) {
|
|
11628
11637
|
case "err":
|
|
11629
11638
|
throw new Error(text);
|
|
11630
|
-
case "warn":
|
|
11631
|
-
console.warn(text);
|
|
11632
|
-
break;
|
|
11633
|
-
default:
|
|
11634
|
-
console.info(text);
|
|
11635
11639
|
}
|
|
11636
11640
|
}
|
|
11637
11641
|
// 停止播放0
|
|
@@ -12482,7 +12486,6 @@ const PeopleSelect = vue.defineComponent({
|
|
|
12482
12486
|
"style": "display: inline-block;",
|
|
12483
12487
|
"onClick": () => {
|
|
12484
12488
|
modalOpen.value = true;
|
|
12485
|
-
console.log("\u70B9\u51FB\u4E861111");
|
|
12486
12489
|
}
|
|
12487
12490
|
}, [typeof slots.default === "function" ? slots.default() : vue.createVNode(vue.resolveComponent("a-button"), {
|
|
12488
12491
|
"type": "primary"
|
|
@@ -14102,7 +14105,6 @@ const SszComment = vue.defineComponent({
|
|
|
14102
14105
|
token,
|
|
14103
14106
|
corpUser
|
|
14104
14107
|
} = await getZxUser(props.zxIp);
|
|
14105
|
-
console.log("corpUser", corpUser);
|
|
14106
14108
|
currentUserId.value = corpUser.id;
|
|
14107
14109
|
mobile.setAxiosOption({
|
|
14108
14110
|
baseURL: props.baseUrl,
|
|
@@ -14120,7 +14122,6 @@ const SszComment = vue.defineComponent({
|
|
|
14120
14122
|
}
|
|
14121
14123
|
});
|
|
14122
14124
|
} catch (e) {
|
|
14123
|
-
console.log(e);
|
|
14124
14125
|
mobile.setAxiosOption({
|
|
14125
14126
|
baseURL: props.baseUrl,
|
|
14126
14127
|
headers: {
|
|
@@ -14777,7 +14778,6 @@ const QaContext = vue.defineComponent({
|
|
|
14777
14778
|
}) {
|
|
14778
14779
|
const containerRef = vue.ref();
|
|
14779
14780
|
const onAnswerRender = text => {
|
|
14780
|
-
console.log("%c%s", "color: #bd08b7;", text);
|
|
14781
14781
|
containerRef.value.scrollTo({
|
|
14782
14782
|
top: containerRef.value.scrollHeight,
|
|
14783
14783
|
behavior: "smooth"
|