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.js
CHANGED
|
@@ -2,9 +2,9 @@ import qiankun from 'vite-plugin-qiankun';
|
|
|
2
2
|
import renderWithQiankun, { qiankunWindow } from 'vite-plugin-qiankun/dist/helper';
|
|
3
3
|
import { defineComponent, createVNode, createApp, ref, watch, reactive, computed, onBeforeUnmount, inject, watchEffect, onActivated, onDeactivated, resolveComponent, isVNode, nextTick, Fragment, withDirectives, vShow, toRaw, provide, createTextVNode, onMounted, KeepAlive, shallowRef, onBeforeMount, mergeProps, onBeforeUpdate, Teleport } from 'vue';
|
|
4
4
|
import axios$2 from 'axios';
|
|
5
|
-
import { message, Menu, MenuItem, Input as Input$1, Badge, Avatar as Avatar$1, MenuDivider, Modal, SubMenu, Dropdown, Tooltip, Select, Layout as Layout$1,
|
|
5
|
+
import { message, Menu, MenuItem, Input as Input$1, Badge, Avatar as Avatar$1, MenuDivider, Modal, SubMenu, Dropdown, Tooltip, Select, LayoutHeader, LayoutSider, Layout as Layout$1, LayoutContent, Form, Row, Col, FormItem, SelectOption, Switch, InputNumber } from 'ant-design-vue';
|
|
6
6
|
import _, { isPlainObject as isPlainObject$1, omit, cloneDeep, differenceBy, isObject as isObject$2, concat } from 'lodash';
|
|
7
|
-
import { useIntervalFn, useEventBus, resolveRef, useEventListener, useMounted, useThrottleFn, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useSessionStorage,
|
|
7
|
+
import { useIntervalFn, useEventBus, resolveRef, useEventListener, useMounted, useThrottleFn, useLocalStorage, useFullscreen, useMouseInElement, useVModel, useMagicKeys, whenever, watchArray, useSessionStorage, useElementBounding, useToggle, useMemory, useWindowSize, useClipboard, useBreakpoints, breakpointsAntDesign } from '@vueuse/core';
|
|
8
8
|
import dayjs from 'dayjs';
|
|
9
9
|
import { useRouter, useRoute } from 'vue-router';
|
|
10
10
|
import { createFromIconfontCN, SearchOutlined, DownOutlined, PoweroffOutlined, MenuUnfoldOutlined, MenuFoldOutlined, SkinFilled, FullscreenOutlined, CaretUpOutlined, CaretRightOutlined, CaretDownOutlined, FileExcelTwoTone, InboxOutlined, MessageOutlined } from '@ant-design/icons-vue';
|
|
@@ -13,7 +13,7 @@ import { XPopup, CommentBlock, setAxiosOption } from '@sszj-temp/mobile';
|
|
|
13
13
|
import { marked } from 'marked';
|
|
14
14
|
import '@sszj-temp/mobile/style.css';
|
|
15
15
|
|
|
16
|
-
var version = "0.1.
|
|
16
|
+
var version = "0.1.75";
|
|
17
17
|
|
|
18
18
|
const setTheme = theme => {
|
|
19
19
|
if (theme === "dark") {
|
|
@@ -910,8 +910,6 @@ const Events$1 = {
|
|
|
910
910
|
WEBRTC_ON_DATA_CHANNEL_MSG: "WEBRTC_ON_DATA_CHANNEL_MSG",
|
|
911
911
|
CAPTURE_STREAM_FAILED: "CAPTURE_STREAM_FAILED"
|
|
912
912
|
};
|
|
913
|
-
const VERSION$1 = "1.0.1";
|
|
914
|
-
const BUILD_DATE = "Sat Mar 30 2024 13:57:14 GMT+0800 (\u4E2D\u56FD\u6807\u51C6\u65F6\u95F4)";
|
|
915
913
|
function isFirefox() {
|
|
916
914
|
return window.navigator.userAgent.match("Firefox") !== null;
|
|
917
915
|
}
|
|
@@ -941,7 +939,6 @@ class Resolution {
|
|
|
941
939
|
}
|
|
942
940
|
}
|
|
943
941
|
let logDisabled_ = true;
|
|
944
|
-
let deprecationWarnings_ = true;
|
|
945
942
|
function extractVersion(uastring, expr, pos) {
|
|
946
943
|
const match = uastring.match(expr);
|
|
947
944
|
return match && match.length >= pos && parseInt(match[pos], 10);
|
|
@@ -1019,7 +1016,6 @@ function disableWarnings(bool) {
|
|
|
1019
1016
|
if (typeof bool !== "boolean") {
|
|
1020
1017
|
return new Error("Argument type: " + typeof bool + ". Please use a boolean.");
|
|
1021
1018
|
}
|
|
1022
|
-
deprecationWarnings_ = !bool;
|
|
1023
1019
|
return "adapter.js deprecation warnings " + (bool ? "disabled" : "enabled");
|
|
1024
1020
|
}
|
|
1025
1021
|
function log$1() {
|
|
@@ -1027,17 +1023,8 @@ function log$1() {
|
|
|
1027
1023
|
if (logDisabled_) {
|
|
1028
1024
|
return;
|
|
1029
1025
|
}
|
|
1030
|
-
if (typeof console !== "undefined" && typeof console.log === "function") {
|
|
1031
|
-
console.log.apply(console, arguments);
|
|
1032
|
-
}
|
|
1033
1026
|
}
|
|
1034
1027
|
}
|
|
1035
|
-
function deprecated(oldMethod, newMethod) {
|
|
1036
|
-
if (!deprecationWarnings_) {
|
|
1037
|
-
return;
|
|
1038
|
-
}
|
|
1039
|
-
console.warn(oldMethod + " is deprecated, please use " + newMethod + " instead.");
|
|
1040
|
-
}
|
|
1041
1028
|
function detectBrowser(window2) {
|
|
1042
1029
|
const result = {
|
|
1043
1030
|
browser: null,
|
|
@@ -1296,7 +1283,6 @@ function shimGetDisplayMedia$2(window2, getSourceId) {
|
|
|
1296
1283
|
return;
|
|
1297
1284
|
}
|
|
1298
1285
|
if (typeof getSourceId !== "function") {
|
|
1299
|
-
console.error("shimGetDisplayMedia: getSourceId argument is not a function");
|
|
1300
1286
|
return;
|
|
1301
1287
|
}
|
|
1302
1288
|
window2.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
|
|
@@ -1882,9 +1868,7 @@ function filterIceServers$1(iceServers, edgeVersion) {
|
|
|
1882
1868
|
return iceServers.filter(server => {
|
|
1883
1869
|
if (server && (server.urls || server.url)) {
|
|
1884
1870
|
let urls = server.urls || server.url;
|
|
1885
|
-
if (server.url && !server.urls)
|
|
1886
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
1887
|
-
}
|
|
1871
|
+
if (server.url && !server.urls) ;
|
|
1888
1872
|
const isString2 = typeof urls === "string";
|
|
1889
1873
|
if (isString2) {
|
|
1890
1874
|
urls = [urls];
|
|
@@ -2556,9 +2540,7 @@ function filterIceServers(iceServers, edgeVersion) {
|
|
|
2556
2540
|
return iceServers.filter(function (server) {
|
|
2557
2541
|
if (server && (server.urls || server.url)) {
|
|
2558
2542
|
var urls = server.urls || server.url;
|
|
2559
|
-
if (server.url && !server.urls)
|
|
2560
|
-
console.warn("RTCIceServer.url is deprecated! Use urls instead.");
|
|
2561
|
-
}
|
|
2543
|
+
if (server.url && !server.urls) ;
|
|
2562
2544
|
var isString2 = typeof urls === "string";
|
|
2563
2545
|
if (isString2) {
|
|
2564
2546
|
urls = [urls];
|
|
@@ -3417,7 +3399,6 @@ var rtcpeerconnection = function (window2, edgeVersion) {
|
|
|
3417
3399
|
}
|
|
3418
3400
|
pc.transceivers.forEach(function (transceiver) {
|
|
3419
3401
|
if (transceiver.iceTransport && transceiver.iceTransport.state === "new" && transceiver.iceTransport.getRemoteCandidates().length > 0) {
|
|
3420
|
-
console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification");
|
|
3421
3402
|
transceiver.iceTransport.addRemoteCandidate({});
|
|
3422
3403
|
}
|
|
3423
3404
|
});
|
|
@@ -4000,7 +3981,6 @@ function shimGetUserMedia$1(window2, browserDetails) {
|
|
|
4000
3981
|
const navigator2 = window2 && window2.navigator;
|
|
4001
3982
|
const MediaStreamTrack = window2 && window2.MediaStreamTrack;
|
|
4002
3983
|
navigator2.getUserMedia = function (constraints, onSuccess, onError) {
|
|
4003
|
-
deprecated("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia");
|
|
4004
3984
|
navigator2.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
|
|
4005
3985
|
};
|
|
4006
3986
|
if (!(browserDetails.version > 55 && "autoGainControl" in navigator2.mediaDevices.getSupportedConstraints())) {
|
|
@@ -4181,7 +4161,6 @@ function shimRemoveStream(window2) {
|
|
|
4181
4161
|
return;
|
|
4182
4162
|
}
|
|
4183
4163
|
window2.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
|
|
4184
|
-
deprecated("removeStream", "removeTrack");
|
|
4185
4164
|
this.getSenders().forEach(sender => {
|
|
4186
4165
|
if (sender.track && stream.getTracks().includes(sender.track)) {
|
|
4187
4166
|
this.removeTrack(sender);
|
|
@@ -4513,7 +4492,6 @@ function shimRTCIceServerUrls(window2) {
|
|
|
4513
4492
|
for (let i = 0; i < pcConfig.iceServers.length; i++) {
|
|
4514
4493
|
let server = pcConfig.iceServers[i];
|
|
4515
4494
|
if (!server.hasOwnProperty("urls") && server.hasOwnProperty("url")) {
|
|
4516
|
-
deprecated("RTCIceServer.url", "RTCIceServer.urls");
|
|
4517
4495
|
server = JSON.parse(JSON.stringify(server));
|
|
4518
4496
|
server.urls = server.url;
|
|
4519
4497
|
delete server.url;
|
|
@@ -4893,7 +4871,6 @@ function adapterFactory({
|
|
|
4893
4871
|
shimEdge: true,
|
|
4894
4872
|
shimSafari: true
|
|
4895
4873
|
}) {
|
|
4896
|
-
const logging2 = log$1;
|
|
4897
4874
|
const browserDetails = detectBrowser(window2);
|
|
4898
4875
|
const adapter = {
|
|
4899
4876
|
browserDetails,
|
|
@@ -4905,14 +4882,11 @@ function adapterFactory({
|
|
|
4905
4882
|
switch (browserDetails.browser) {
|
|
4906
4883
|
case "chrome":
|
|
4907
4884
|
if (!chromeShim || !shimPeerConnection$2 || !options.shimChrome) {
|
|
4908
|
-
logging2("Chrome shim is not included in this adapter release.");
|
|
4909
4885
|
return adapter;
|
|
4910
4886
|
}
|
|
4911
4887
|
if (browserDetails.version === null) {
|
|
4912
|
-
logging2("Chrome shim can not determine version, not shimming.");
|
|
4913
4888
|
return adapter;
|
|
4914
4889
|
}
|
|
4915
|
-
logging2("adapter.js shimming chrome.");
|
|
4916
4890
|
adapter.browserShim = chromeShim;
|
|
4917
4891
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4918
4892
|
shimGetUserMedia$3(window2, browserDetails);
|
|
@@ -4932,10 +4906,8 @@ function adapterFactory({
|
|
|
4932
4906
|
break;
|
|
4933
4907
|
case "firefox":
|
|
4934
4908
|
if (!firefoxShim || !shimPeerConnection || !options.shimFirefox) {
|
|
4935
|
-
logging2("Firefox shim is not included in this adapter release.");
|
|
4936
4909
|
return adapter;
|
|
4937
4910
|
}
|
|
4938
|
-
logging2("adapter.js shimming firefox.");
|
|
4939
4911
|
adapter.browserShim = firefoxShim;
|
|
4940
4912
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4941
4913
|
shimGetUserMedia$1(window2, browserDetails);
|
|
@@ -4956,10 +4928,8 @@ function adapterFactory({
|
|
|
4956
4928
|
break;
|
|
4957
4929
|
case "edge":
|
|
4958
4930
|
if (!edgeShim || !shimPeerConnection$1 || !options.shimEdge) {
|
|
4959
|
-
logging2("MS edge shim is not included in this adapter release.");
|
|
4960
4931
|
return adapter;
|
|
4961
4932
|
}
|
|
4962
|
-
logging2("adapter.js shimming edge.");
|
|
4963
4933
|
adapter.browserShim = edgeShim;
|
|
4964
4934
|
shimGetUserMedia$2(window2);
|
|
4965
4935
|
shimGetDisplayMedia$1(window2);
|
|
@@ -4970,10 +4940,8 @@ function adapterFactory({
|
|
|
4970
4940
|
break;
|
|
4971
4941
|
case "safari":
|
|
4972
4942
|
if (!safariShim || !options.shimSafari) {
|
|
4973
|
-
logging2("Safari shim is not included in this adapter release.");
|
|
4974
4943
|
return adapter;
|
|
4975
4944
|
}
|
|
4976
|
-
logging2("adapter.js shimming safari.");
|
|
4977
4945
|
adapter.browserShim = safariShim;
|
|
4978
4946
|
shimAddIceCandidateNullOrEmpty(window2, browserDetails);
|
|
4979
4947
|
shimRTCIceServerUrls(window2);
|
|
@@ -4989,9 +4957,6 @@ function adapterFactory({
|
|
|
4989
4957
|
shimSendThrowTypeError(window2);
|
|
4990
4958
|
removeExtmapAllowMixed(window2, browserDetails);
|
|
4991
4959
|
break;
|
|
4992
|
-
default:
|
|
4993
|
-
logging2("Unsupported browser!");
|
|
4994
|
-
break;
|
|
4995
4960
|
}
|
|
4996
4961
|
return adapter;
|
|
4997
4962
|
}
|
|
@@ -6070,7 +6035,6 @@ validators$1.transitional = function transitional2(validator2, version, message)
|
|
|
6070
6035
|
}
|
|
6071
6036
|
if (version && !deprecatedWarnings[opt]) {
|
|
6072
6037
|
deprecatedWarnings[opt] = true;
|
|
6073
|
-
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
6074
6038
|
}
|
|
6075
6039
|
return validator2 ? validator2(value, opt, opts) : true;
|
|
6076
6040
|
};
|
|
@@ -6602,8 +6566,6 @@ class RTCEndpoint extends Event$1 {
|
|
|
6602
6566
|
return this._localStream;
|
|
6603
6567
|
}
|
|
6604
6568
|
}
|
|
6605
|
-
console.log("build date:", BUILD_DATE);
|
|
6606
|
-
console.log("version:", VERSION$1);
|
|
6607
6569
|
const Events = Events$1;
|
|
6608
6570
|
const Endpoint = RTCEndpoint;
|
|
6609
6571
|
|
|
@@ -6711,7 +6673,6 @@ class WebRtcMt$1 {
|
|
|
6711
6673
|
if (res.code === 0) {
|
|
6712
6674
|
this.startPlay(plays);
|
|
6713
6675
|
} else {
|
|
6714
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u8FD4\u56DE\u5931\u8D25");
|
|
6715
6676
|
setTimeout(() => {
|
|
6716
6677
|
this.rePlay();
|
|
6717
6678
|
}, 3 * 60 * 1e3);
|
|
@@ -6719,7 +6680,6 @@ class WebRtcMt$1 {
|
|
|
6719
6680
|
resolve(res);
|
|
6720
6681
|
});
|
|
6721
6682
|
}).catch(err => {
|
|
6722
|
-
console.log("\u62C9\u6D41\u63A5\u53E3\u5931\u8D25");
|
|
6723
6683
|
setTimeout(() => {
|
|
6724
6684
|
this.rePlay();
|
|
6725
6685
|
}, 3 * 60 * 1e3);
|
|
@@ -6730,11 +6690,6 @@ class WebRtcMt$1 {
|
|
|
6730
6690
|
switch (type) {
|
|
6731
6691
|
case "err":
|
|
6732
6692
|
throw new Error(text);
|
|
6733
|
-
case "warn":
|
|
6734
|
-
console.log(text);
|
|
6735
|
-
break;
|
|
6736
|
-
default:
|
|
6737
|
-
console.log(text);
|
|
6738
6693
|
}
|
|
6739
6694
|
}
|
|
6740
6695
|
// 停止播放0
|
|
@@ -6778,7 +6733,6 @@ class WebRtcMt$1 {
|
|
|
6778
6733
|
this.rePlay(videoElm);
|
|
6779
6734
|
});
|
|
6780
6735
|
player.on(Events.WEBRTC_ON_CONNECTION_STATE_CHANGE, state => {
|
|
6781
|
-
console.log("webrtc:" + state);
|
|
6782
6736
|
if (state === "disconnected" || state === "failed") {
|
|
6783
6737
|
this.rePlay(videoElm);
|
|
6784
6738
|
}
|
|
@@ -6786,10 +6740,8 @@ class WebRtcMt$1 {
|
|
|
6786
6740
|
}
|
|
6787
6741
|
// 重播
|
|
6788
6742
|
rePlay(videoElm) {
|
|
6789
|
-
console.log("\u5E95\u90E8\u505C\u6B62\u64AD\u653E");
|
|
6790
6743
|
this.stopPlay();
|
|
6791
6744
|
setTimeout(() => {
|
|
6792
|
-
console.log("\u5E95\u90E8\u91CD\u64AD");
|
|
6793
6745
|
this.init(this.opt);
|
|
6794
6746
|
}, 5 * 1e3);
|
|
6795
6747
|
}
|
|
@@ -7360,7 +7312,7 @@ function useActiveMenu(menuList, extraPages, isNav = false, watchOnce = false, i
|
|
|
7360
7312
|
return menu;
|
|
7361
7313
|
}
|
|
7362
7314
|
|
|
7363
|
-
function _isSlot$
|
|
7315
|
+
function _isSlot$e(s) {
|
|
7364
7316
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
7365
7317
|
}
|
|
7366
7318
|
const Header$1 = defineComponent({
|
|
@@ -7455,7 +7407,7 @@ const Header$1 = defineComponent({
|
|
|
7455
7407
|
"selectedKeys": acitveMenuKey.value,
|
|
7456
7408
|
"onUpdate:selectedKeys": $event => acitveMenuKey.value = $event,
|
|
7457
7409
|
"onSelect": handleMenuSelected
|
|
7458
|
-
}, _isSlot$
|
|
7410
|
+
}, _isSlot$e(_slot = props.menu.map(item => createVNode(MenuItem, {
|
|
7459
7411
|
"key": item.id,
|
|
7460
7412
|
"title": item.name
|
|
7461
7413
|
}, {
|
|
@@ -7523,7 +7475,7 @@ const Header$1 = defineComponent({
|
|
|
7523
7475
|
}
|
|
7524
7476
|
});
|
|
7525
7477
|
|
|
7526
|
-
function _isSlot$
|
|
7478
|
+
function _isSlot$d(s) {
|
|
7527
7479
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
7528
7480
|
}
|
|
7529
7481
|
const renderMenuItem = item => {
|
|
@@ -7605,7 +7557,7 @@ const SideMenu$1 = defineComponent({
|
|
|
7605
7557
|
"onUpdate:openKeys": $event => expandKeys.value = $event,
|
|
7606
7558
|
"selectedKeys": activeMenu.value,
|
|
7607
7559
|
"onSelect": handleMenuSelect
|
|
7608
|
-
}, _isSlot$
|
|
7560
|
+
}, _isSlot$d(_slot = props.menu.map(item => renderMenuItem(item))) ? _slot : {
|
|
7609
7561
|
default: () => [_slot]
|
|
7610
7562
|
});
|
|
7611
7563
|
};
|
|
@@ -7690,6 +7642,75 @@ function onAddExtraTabs(handler) {
|
|
|
7690
7642
|
});
|
|
7691
7643
|
}
|
|
7692
7644
|
|
|
7645
|
+
function useChildTheme(containerRef, isFullscreen, loadAppList) {
|
|
7646
|
+
const theme = useLocalStorage("theme", "default");
|
|
7647
|
+
const globalTheme = useQiankunStateValue("theme");
|
|
7648
|
+
globalTheme.value = theme.value;
|
|
7649
|
+
watch([theme, globalTheme, isFullscreen, loadAppList, containerRef], async () => {
|
|
7650
|
+
if (containerRef.value) {
|
|
7651
|
+
await nextTick();
|
|
7652
|
+
const childContainerList = containerRef.value.querySelectorAll("[id^='__qiankun_microapp_wrapper_for_']");
|
|
7653
|
+
const themeText = globalTheme.value === "dark" ? "dark" : "light";
|
|
7654
|
+
for (const child of Array.from(childContainerList)) {
|
|
7655
|
+
child.setAttribute("data-theme", themeText);
|
|
7656
|
+
child.setAttribute("data-doc-theme", themeText);
|
|
7657
|
+
if (isFullscreen.value) {
|
|
7658
|
+
child.setAttribute("fullscreen", "");
|
|
7659
|
+
} else {
|
|
7660
|
+
child.removeAttribute("fullscreen");
|
|
7661
|
+
}
|
|
7662
|
+
}
|
|
7663
|
+
}
|
|
7664
|
+
}, {
|
|
7665
|
+
immediate: true,
|
|
7666
|
+
deep: true
|
|
7667
|
+
});
|
|
7668
|
+
}
|
|
7669
|
+
|
|
7670
|
+
function useFullscreenLogic(containerRef, iframeList, activeKey) {
|
|
7671
|
+
const isFullscreenIframe = ref(false);
|
|
7672
|
+
const {
|
|
7673
|
+
isFullscreen,
|
|
7674
|
+
enter
|
|
7675
|
+
} = useFullscreen(containerRef);
|
|
7676
|
+
const {
|
|
7677
|
+
elementY
|
|
7678
|
+
} = useMouseInElement(containerRef);
|
|
7679
|
+
const isTabsShow = ref(false);
|
|
7680
|
+
watchEffect(() => {
|
|
7681
|
+
if (isFullscreen.value) {
|
|
7682
|
+
isTabsShow.value = false;
|
|
7683
|
+
}
|
|
7684
|
+
});
|
|
7685
|
+
watchEffect(() => {
|
|
7686
|
+
if (elementY.value < 10) {
|
|
7687
|
+
isTabsShow.value = true;
|
|
7688
|
+
}
|
|
7689
|
+
});
|
|
7690
|
+
const isPadding = computed(() => {
|
|
7691
|
+
let iframePadding = false;
|
|
7692
|
+
if (activeKey.value) {
|
|
7693
|
+
const currentIframe = iframeList.value.find(item => item.id === activeKey.value);
|
|
7694
|
+
if (currentIframe) {
|
|
7695
|
+
iframePadding = currentIframe.url.includes("hasPadding");
|
|
7696
|
+
if (!iframePadding) return false;
|
|
7697
|
+
}
|
|
7698
|
+
}
|
|
7699
|
+
if (isFullscreen.value) return false;
|
|
7700
|
+
return !isFullscreenIframe.value;
|
|
7701
|
+
});
|
|
7702
|
+
const handleFullscreen = tab => {
|
|
7703
|
+
isFullscreenIframe.value = tab.mode === 2;
|
|
7704
|
+
enter();
|
|
7705
|
+
};
|
|
7706
|
+
return {
|
|
7707
|
+
isFullscreen,
|
|
7708
|
+
isTabsShow,
|
|
7709
|
+
isPadding,
|
|
7710
|
+
handleFullscreen
|
|
7711
|
+
};
|
|
7712
|
+
}
|
|
7713
|
+
|
|
7693
7714
|
function setParam(searchParams, obj) {
|
|
7694
7715
|
for (const key in obj) {
|
|
7695
7716
|
if (!searchParams.has(key)) {
|
|
@@ -7808,7 +7829,7 @@ const TabList = defineComponent({
|
|
|
7808
7829
|
}
|
|
7809
7830
|
});
|
|
7810
7831
|
onBeforeUnmount(() => tabList.value = []);
|
|
7811
|
-
watchArray(tabList, async (
|
|
7832
|
+
watchArray(tabList, async (_val, _prev, _added, removed) => {
|
|
7812
7833
|
for (const tab of removed) {
|
|
7813
7834
|
if (tab.isExtraTab) {
|
|
7814
7835
|
const idx = qiankunState.value.extraTabs.findIndex(item => item.key === tab.key && item.uniqueKey === tab.uniqueKey);
|
|
@@ -8056,32 +8077,33 @@ const TabList = defineComponent({
|
|
|
8056
8077
|
}
|
|
8057
8078
|
});
|
|
8058
8079
|
|
|
8059
|
-
const
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
required: true
|
|
8071
|
-
},
|
|
8072
|
-
appList: {
|
|
8073
|
-
type: Array,
|
|
8074
|
-
required: true
|
|
8075
|
-
},
|
|
8076
|
-
showTabList: {
|
|
8077
|
-
type: Boolean,
|
|
8078
|
-
default: true
|
|
8079
|
-
},
|
|
8080
|
-
pageContainerRef: {
|
|
8081
|
-
type: Object,
|
|
8082
|
-
required: true
|
|
8083
|
-
}
|
|
8080
|
+
const Props$1 = {
|
|
8081
|
+
currMenu: {
|
|
8082
|
+
type: Object
|
|
8083
|
+
},
|
|
8084
|
+
menu: {
|
|
8085
|
+
type: Array,
|
|
8086
|
+
default: () => []
|
|
8087
|
+
},
|
|
8088
|
+
extraPages: {
|
|
8089
|
+
type: Array,
|
|
8090
|
+
required: true
|
|
8084
8091
|
},
|
|
8092
|
+
appList: {
|
|
8093
|
+
type: Array,
|
|
8094
|
+
required: true
|
|
8095
|
+
},
|
|
8096
|
+
showTabList: {
|
|
8097
|
+
type: Boolean,
|
|
8098
|
+
default: true
|
|
8099
|
+
},
|
|
8100
|
+
pageContainerRef: {
|
|
8101
|
+
type: Object,
|
|
8102
|
+
required: true
|
|
8103
|
+
}
|
|
8104
|
+
};
|
|
8105
|
+
const PageContent = defineComponent({
|
|
8106
|
+
props: Props$1,
|
|
8085
8107
|
setup(props, {
|
|
8086
8108
|
emit
|
|
8087
8109
|
}) {
|
|
@@ -8109,12 +8131,12 @@ const PageContent = defineComponent({
|
|
|
8109
8131
|
extraPageList.value.splice(idx, 1);
|
|
8110
8132
|
}
|
|
8111
8133
|
};
|
|
8112
|
-
const handleMenuChange = val => {
|
|
8134
|
+
const handleMenuChange = (val, isFromMenu = false) => {
|
|
8113
8135
|
if (!val) return;
|
|
8114
8136
|
const routeQuery = {
|
|
8115
8137
|
...route.query
|
|
8116
8138
|
};
|
|
8117
|
-
const queryCombine = Object.assign(val.params
|
|
8139
|
+
const queryCombine = Object.assign({}, val.params, routeQuery);
|
|
8118
8140
|
if (val.isExtra) {
|
|
8119
8141
|
const exist = extraPageList.value.find(item => item.key === val.key && item.uniqueKey === val.uniqueKey);
|
|
8120
8142
|
if (!exist) {
|
|
@@ -8152,15 +8174,15 @@ const PageContent = defineComponent({
|
|
|
8152
8174
|
const tab = _.cloneDeep(val);
|
|
8153
8175
|
switch (mode) {
|
|
8154
8176
|
case 0:
|
|
8155
|
-
if (
|
|
8177
|
+
if (isOpened) {
|
|
8178
|
+
openedTab.params = isFromMenu ? val.params : queryCombine;
|
|
8179
|
+
val.params = isFromMenu ? val.params : queryCombine;
|
|
8180
|
+
} else {
|
|
8156
8181
|
tabList.value.push({
|
|
8157
8182
|
...tab,
|
|
8158
8183
|
key: key ?? id,
|
|
8159
8184
|
type: "menu"
|
|
8160
8185
|
});
|
|
8161
|
-
} else {
|
|
8162
|
-
openedTab.params = queryCombine;
|
|
8163
|
-
val.params = queryCombine;
|
|
8164
8186
|
}
|
|
8165
8187
|
const [path, currSearch = ""] = url.split("?");
|
|
8166
8188
|
const searchObj = new URLSearchParams(currSearch);
|
|
@@ -8244,7 +8266,7 @@ const PageContent = defineComponent({
|
|
|
8244
8266
|
}, {
|
|
8245
8267
|
immediate: true
|
|
8246
8268
|
});
|
|
8247
|
-
watch(() => props.currMenu, handleMenuChange, {
|
|
8269
|
+
watch(() => props.currMenu, val => handleMenuChange(val, true), {
|
|
8248
8270
|
immediate: true
|
|
8249
8271
|
});
|
|
8250
8272
|
useEventListener("message", e => {
|
|
@@ -8273,85 +8295,38 @@ const PageContent = defineComponent({
|
|
|
8273
8295
|
}, {
|
|
8274
8296
|
immediate: true
|
|
8275
8297
|
});
|
|
8276
|
-
watch(() => qiankunState.value.activeTabKey, val =>
|
|
8298
|
+
watch(() => qiankunState.value.activeTabKey, val => {
|
|
8299
|
+
if (activeKey !== val) {
|
|
8300
|
+
requestAnimationFrame(() => {
|
|
8301
|
+
activeKey.value = val;
|
|
8302
|
+
});
|
|
8303
|
+
}
|
|
8304
|
+
});
|
|
8277
8305
|
onAddExtraTabs(added => {
|
|
8278
8306
|
tabList.value.push(...added);
|
|
8279
8307
|
});
|
|
8280
|
-
const isFullscreenIframe = ref(false);
|
|
8281
8308
|
const {
|
|
8282
8309
|
isFullscreen,
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
} = useMouseInElement(containerRef);
|
|
8288
|
-
const isTabsShow = ref(false);
|
|
8289
|
-
watchEffect(() => {
|
|
8290
|
-
if (isFullscreen.value) {
|
|
8291
|
-
isTabsShow.value = false;
|
|
8292
|
-
}
|
|
8293
|
-
});
|
|
8294
|
-
watchEffect(() => {
|
|
8295
|
-
if (elementY.value < 10) {
|
|
8296
|
-
isTabsShow.value = true;
|
|
8297
|
-
}
|
|
8298
|
-
});
|
|
8299
|
-
const isPadding = computed(() => {
|
|
8300
|
-
let iframePadding = false;
|
|
8301
|
-
if (activeKey.value) {
|
|
8302
|
-
const currentIframe = iframeList.value.find(item => item.id === activeKey.value);
|
|
8303
|
-
if (currentIframe) {
|
|
8304
|
-
iframePadding = currentIframe.url.includes("hasPadding");
|
|
8305
|
-
if (!iframePadding) return false;
|
|
8306
|
-
}
|
|
8307
|
-
}
|
|
8308
|
-
if (isFullscreen.value) return false;
|
|
8309
|
-
return !isFullscreenIframe.value;
|
|
8310
|
-
});
|
|
8311
|
-
const handleFullscreen = tab => {
|
|
8312
|
-
isFullscreenIframe.value = tab.mode === 2;
|
|
8313
|
-
enter();
|
|
8314
|
-
};
|
|
8310
|
+
handleFullscreen,
|
|
8311
|
+
isPadding,
|
|
8312
|
+
isTabsShow
|
|
8313
|
+
} = useFullscreenLogic(containerRef, iframeList, activeKey);
|
|
8315
8314
|
const handleRefreshIframe = async ({
|
|
8316
8315
|
id
|
|
8317
8316
|
}) => {
|
|
8318
8317
|
const iframe = iframeList.value.find(item => item.id === id);
|
|
8319
|
-
if (iframe)
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8323
|
-
}
|
|
8318
|
+
if (!iframe) return;
|
|
8319
|
+
iframe.refreshKey = Date.now();
|
|
8320
|
+
const reqCode = await checkIframeUrl(iframe.url);
|
|
8321
|
+
iframe.reqCode = reqCode;
|
|
8324
8322
|
};
|
|
8325
8323
|
const handleRefreshExtraPage = ({
|
|
8326
8324
|
key
|
|
8327
8325
|
}) => {
|
|
8328
8326
|
const page = extraPageList.value.find(item => item.key === key);
|
|
8329
|
-
|
|
8330
|
-
page.refreshKey = Date.now();
|
|
8331
|
-
}
|
|
8327
|
+
page && (page.refreshKey = Date.now());
|
|
8332
8328
|
};
|
|
8333
|
-
|
|
8334
|
-
const globalTheme = useQiankunStateValue("theme");
|
|
8335
|
-
globalTheme.value = theme.value;
|
|
8336
|
-
watch([theme, globalTheme, isFullscreen, loadAppList, containerRef], async () => {
|
|
8337
|
-
if (containerRef.value) {
|
|
8338
|
-
await nextTick();
|
|
8339
|
-
const childContainerList = containerRef.value.querySelectorAll("[id^='__qiankun_microapp_wrapper_for_']");
|
|
8340
|
-
const themeText = globalTheme.value === "dark" ? "dark" : "light";
|
|
8341
|
-
for (const child of Array.from(childContainerList)) {
|
|
8342
|
-
child.setAttribute("data-theme", themeText);
|
|
8343
|
-
child.setAttribute("data-doc-theme", themeText);
|
|
8344
|
-
if (isFullscreen.value) {
|
|
8345
|
-
child.setAttribute("fullscreen", "");
|
|
8346
|
-
} else {
|
|
8347
|
-
child.removeAttribute("fullscreen");
|
|
8348
|
-
}
|
|
8349
|
-
}
|
|
8350
|
-
}
|
|
8351
|
-
}, {
|
|
8352
|
-
immediate: true,
|
|
8353
|
-
deep: true
|
|
8354
|
-
});
|
|
8329
|
+
useChildTheme(containerRef, isFullscreen, loadAppList);
|
|
8355
8330
|
const closeExtraPage = tab => {
|
|
8356
8331
|
tabListRef.value?.closeTab(tab);
|
|
8357
8332
|
};
|
|
@@ -8360,122 +8335,186 @@ const PageContent = defineComponent({
|
|
|
8360
8335
|
app.app.unmount();
|
|
8361
8336
|
}
|
|
8362
8337
|
});
|
|
8363
|
-
return () =>
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
}, null), [[vShow, !isFullscreen.value || isTabsShow.value]]), createVNode("div", {
|
|
8381
|
-
"class": ["page-container", {
|
|
8338
|
+
return () => {
|
|
8339
|
+
const tabs = withDirectives(createVNode(TabList, {
|
|
8340
|
+
"ref": tabListRef,
|
|
8341
|
+
"activeKey": activeKey.value,
|
|
8342
|
+
"onUpdate:activeKey": $event => activeKey.value = $event,
|
|
8343
|
+
"list": tabList.value,
|
|
8344
|
+
"onUpdate:list": $event => tabList.value = $event,
|
|
8345
|
+
"containerRef": containerRef,
|
|
8346
|
+
"onTabSelect": onTabSelect,
|
|
8347
|
+
"onCloseExtraPage": handleExtraPageClose,
|
|
8348
|
+
"onCloseIframePage": handleIframePageClose,
|
|
8349
|
+
"onFullscreen": handleFullscreen,
|
|
8350
|
+
"onRefreshIframe": handleRefreshIframe,
|
|
8351
|
+
"onRefreshExtraPage": handleRefreshExtraPage,
|
|
8352
|
+
"onMouseLeave": () => isTabsShow.value = false
|
|
8353
|
+
}, null), [[vShow, !isFullscreen.value || isTabsShow.value]]);
|
|
8354
|
+
const containerCns = {
|
|
8382
8355
|
padding: isPadding.value,
|
|
8383
8356
|
fullscreen: isFullscreen.value
|
|
8384
|
-
}
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8357
|
+
};
|
|
8358
|
+
const iframeRender = item => {
|
|
8359
|
+
const show = item.id === activeKey.value;
|
|
8360
|
+
if (item.reqCode === 200 || item.reqCode === void 0) {
|
|
8361
|
+
return createVNode("iframe", {
|
|
8362
|
+
"class": "menu-iframe",
|
|
8363
|
+
"key": item.id + item.refreshKey,
|
|
8364
|
+
"id": "iframe" + item.id,
|
|
8365
|
+
"style": {
|
|
8366
|
+
zIndex: show ? "" : "-100"
|
|
8367
|
+
},
|
|
8368
|
+
"src": item.url,
|
|
8369
|
+
"frameborder": "0"
|
|
8370
|
+
}, null);
|
|
8371
|
+
}
|
|
8372
|
+
let src = "/micro-assets/platform_web/developing.png";
|
|
8373
|
+
if (item.reqCode === 404) {
|
|
8374
|
+
src = "/micro-assets/platform_web/page404.png";
|
|
8375
|
+
}
|
|
8376
|
+
return withDirectives(createVNode("div", {
|
|
8377
|
+
"class": "iframe-fallback"
|
|
8378
|
+
}, [createVNode("img", {
|
|
8379
|
+
"src": src,
|
|
8380
|
+
"alt": ""
|
|
8381
|
+
}, null)]), [[vShow, show]]);
|
|
8382
|
+
};
|
|
8383
|
+
const childTypes = [];
|
|
8384
|
+
childTypes.push(createVNode(Fragment, null, [appDomList.value.map(item => withDirectives(createVNode("div", {
|
|
8385
|
+
"key": item.id,
|
|
8386
|
+
"id": item.id
|
|
8387
|
+
}, null), [[vShow, item.name === activeAppName.value]]))]));
|
|
8388
|
+
childTypes.push(createVNode(Fragment, null, [iframeList.value.map(iframeRender)]));
|
|
8389
|
+
childTypes.push(createVNode(Fragment, null, [extraPageList.value.map(item => {
|
|
8390
|
+
const extraPageShoe = getTabUniqueKey(item) === activeKey.value;
|
|
8391
|
+
return withDirectives(createVNode("div", {
|
|
8392
|
+
"key": item.key + item.refreshKey,
|
|
8396
8393
|
"style": {
|
|
8397
|
-
|
|
8398
|
-
}
|
|
8399
|
-
|
|
8400
|
-
"
|
|
8401
|
-
}, null);
|
|
8402
|
-
}
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
}
|
|
8407
|
-
|
|
8408
|
-
"
|
|
8409
|
-
}, [
|
|
8410
|
-
|
|
8411
|
-
"alt": ""
|
|
8412
|
-
}, null)]), [[vShow, show]]);
|
|
8413
|
-
}), extraPageList.value.map(item => withDirectives(createVNode("div", {
|
|
8414
|
-
"key": item.key + item.refreshKey,
|
|
8415
|
-
"style": {
|
|
8416
|
-
"min-height": "100%"
|
|
8417
|
-
}
|
|
8418
|
-
}, [createVNode(item.component, {
|
|
8419
|
-
"onClose": () => closeExtraPage(item)
|
|
8420
|
-
}, null)]), [[vShow, getTabUniqueKey(item) === activeKey.value]]))])]);
|
|
8394
|
+
"min-height": "100%"
|
|
8395
|
+
}
|
|
8396
|
+
}, [createVNode(item.component, {
|
|
8397
|
+
"onClose": () => closeExtraPage(item)
|
|
8398
|
+
}, null)]), [[vShow, extraPageShoe]]);
|
|
8399
|
+
})]));
|
|
8400
|
+
return createVNode("div", {
|
|
8401
|
+
"class": "page-content",
|
|
8402
|
+
"ref": containerRef
|
|
8403
|
+
}, [props.showTabList && tabs, createVNode("div", {
|
|
8404
|
+
"class": ["page-container", containerCns],
|
|
8405
|
+
"ref": props.pageContainerRef
|
|
8406
|
+
}, [childTypes])]);
|
|
8407
|
+
};
|
|
8421
8408
|
}
|
|
8422
8409
|
});
|
|
8423
8410
|
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
required: true
|
|
8440
|
-
},
|
|
8441
|
-
// 额外的页面
|
|
8442
|
-
extraPages: {
|
|
8443
|
-
type: Array,
|
|
8444
|
-
default: () => []
|
|
8445
|
-
},
|
|
8446
|
-
// 未读消息
|
|
8447
|
-
messageCount: {
|
|
8448
|
-
type: Number,
|
|
8449
|
-
default: 0
|
|
8450
|
-
},
|
|
8451
|
-
// 网页logo
|
|
8452
|
-
logo: {
|
|
8453
|
-
type: String
|
|
8454
|
-
},
|
|
8455
|
-
appList: {
|
|
8456
|
-
type: Array,
|
|
8457
|
-
required: true
|
|
8458
|
-
},
|
|
8459
|
-
// 展示菜单
|
|
8460
|
-
withMenu: {
|
|
8461
|
-
type: Boolean,
|
|
8462
|
-
default: true
|
|
8463
|
-
},
|
|
8464
|
-
// 展示在左侧的菜单(不展示菜单模式)
|
|
8465
|
-
sideMenu: {
|
|
8466
|
-
type: Array
|
|
8467
|
-
},
|
|
8468
|
-
// 展示导航栏菜单和搜索框
|
|
8469
|
-
showNav: {
|
|
8470
|
-
type: Boolean,
|
|
8471
|
-
default: true
|
|
8472
|
-
},
|
|
8473
|
-
// 是否展示我的消息
|
|
8474
|
-
showNotice: {
|
|
8475
|
-
type: Boolean,
|
|
8476
|
-
default: true
|
|
8411
|
+
function useFakeModal(pageContainerRef) {
|
|
8412
|
+
const showMask = ref(false);
|
|
8413
|
+
useEventListener("message", e => {
|
|
8414
|
+
const {
|
|
8415
|
+
data: event
|
|
8416
|
+
} = e;
|
|
8417
|
+
const {
|
|
8418
|
+
type,
|
|
8419
|
+
val,
|
|
8420
|
+
delay = 0
|
|
8421
|
+
} = event;
|
|
8422
|
+
if (type === "toggleMask") {
|
|
8423
|
+
setTimeout(() => {
|
|
8424
|
+
showMask.value = val;
|
|
8425
|
+
}, delay);
|
|
8477
8426
|
}
|
|
8427
|
+
});
|
|
8428
|
+
const pageBounding = useElementBounding(pageContainerRef);
|
|
8429
|
+
const modalPath = computed(() => {
|
|
8430
|
+
const {
|
|
8431
|
+
top,
|
|
8432
|
+
bottom,
|
|
8433
|
+
left,
|
|
8434
|
+
right
|
|
8435
|
+
} = pageBounding;
|
|
8436
|
+
const topDis = Math.round(top.value);
|
|
8437
|
+
const rightDis = Math.round(window.innerWidth - right.value);
|
|
8438
|
+
const bottomDis = Math.round(window.innerHeight - bottom.value);
|
|
8439
|
+
const leftDis = Math.round(left.value);
|
|
8440
|
+
return `polygon(
|
|
8441
|
+
0% 0%,
|
|
8442
|
+
0% 100%,
|
|
8443
|
+
${leftDis}px 100%,
|
|
8444
|
+
${leftDis}px ${topDis}px,
|
|
8445
|
+
calc(100% - ${rightDis}px) ${topDis}px,
|
|
8446
|
+
calc(100% - ${rightDis}px) calc(100% - ${bottomDis}px),
|
|
8447
|
+
${leftDis}px calc(100% - ${bottomDis}px),
|
|
8448
|
+
${leftDis}px 100%,
|
|
8449
|
+
100% 100%,
|
|
8450
|
+
100% 0%
|
|
8451
|
+
)`;
|
|
8452
|
+
});
|
|
8453
|
+
return {
|
|
8454
|
+
showMask,
|
|
8455
|
+
modalPath
|
|
8456
|
+
};
|
|
8457
|
+
}
|
|
8458
|
+
|
|
8459
|
+
function _isSlot$c(s) {
|
|
8460
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
8461
|
+
}
|
|
8462
|
+
const Props = {
|
|
8463
|
+
// 用户权限菜单
|
|
8464
|
+
userMenu: {
|
|
8465
|
+
type: Array,
|
|
8466
|
+
required: true
|
|
8467
|
+
},
|
|
8468
|
+
// 版权信息
|
|
8469
|
+
copyRight: {
|
|
8470
|
+
type: String
|
|
8471
|
+
},
|
|
8472
|
+
// 用户
|
|
8473
|
+
userInfo: {
|
|
8474
|
+
type: Object,
|
|
8475
|
+
required: true
|
|
8476
|
+
},
|
|
8477
|
+
// 额外的页面
|
|
8478
|
+
extraPages: {
|
|
8479
|
+
type: Array,
|
|
8480
|
+
default: () => []
|
|
8481
|
+
},
|
|
8482
|
+
// 未读消息
|
|
8483
|
+
messageCount: {
|
|
8484
|
+
type: Number,
|
|
8485
|
+
default: 0
|
|
8486
|
+
},
|
|
8487
|
+
// 网页logo
|
|
8488
|
+
logo: {
|
|
8489
|
+
type: String
|
|
8490
|
+
},
|
|
8491
|
+
appList: {
|
|
8492
|
+
type: Array,
|
|
8493
|
+
required: true
|
|
8494
|
+
},
|
|
8495
|
+
// 展示菜单
|
|
8496
|
+
withMenu: {
|
|
8497
|
+
type: Boolean,
|
|
8498
|
+
default: true
|
|
8499
|
+
},
|
|
8500
|
+
// 展示在左侧的菜单(不展示菜单模式)
|
|
8501
|
+
sideMenu: {
|
|
8502
|
+
type: Array
|
|
8478
8503
|
},
|
|
8504
|
+
// 展示导航栏菜单和搜索框
|
|
8505
|
+
showNav: {
|
|
8506
|
+
type: Boolean,
|
|
8507
|
+
default: true
|
|
8508
|
+
},
|
|
8509
|
+
// 是否展示我的消息
|
|
8510
|
+
showNotice: {
|
|
8511
|
+
type: Boolean,
|
|
8512
|
+
default: true
|
|
8513
|
+
}
|
|
8514
|
+
};
|
|
8515
|
+
const Layout = defineComponent({
|
|
8516
|
+
emits: ["globalSearch", "personalCenter", "logout", "extraPage"],
|
|
8517
|
+
props: Props,
|
|
8479
8518
|
setup(props, {
|
|
8480
8519
|
emit
|
|
8481
8520
|
}) {
|
|
@@ -8488,15 +8527,13 @@ const Layout = defineComponent({
|
|
|
8488
8527
|
const siderMenu = ref([]);
|
|
8489
8528
|
const sideMenuShow = computed(() => props.sideMenu || siderMenu.value);
|
|
8490
8529
|
const showSideMenu = computed(() => props.withMenu || !!props.sideMenu);
|
|
8491
|
-
|
|
8492
|
-
if (
|
|
8493
|
-
const refMenu = getMenuByKey(
|
|
8530
|
+
watchEffect(() => {
|
|
8531
|
+
if (props.userMenu.length > 0 && menuRef) {
|
|
8532
|
+
const refMenu = getMenuByKey(props.userMenu, menuRef, "remark");
|
|
8494
8533
|
if (refMenu) {
|
|
8495
8534
|
siderMenu.value = [refMenu];
|
|
8496
8535
|
}
|
|
8497
8536
|
}
|
|
8498
|
-
}, {
|
|
8499
|
-
immediate: true
|
|
8500
8537
|
});
|
|
8501
8538
|
const showHeader = computed(() => props.withMenu && !menuRef && !isOnlyPage);
|
|
8502
8539
|
const showSide = computed(() => showSideMenu.value && !isOnlyPage);
|
|
@@ -8527,52 +8564,19 @@ const Layout = defineComponent({
|
|
|
8527
8564
|
refreshTabKey: ""
|
|
8528
8565
|
};
|
|
8529
8566
|
});
|
|
8530
|
-
const showMask = ref(false);
|
|
8531
|
-
useEventListener("message", e => {
|
|
8532
|
-
const {
|
|
8533
|
-
data: event
|
|
8534
|
-
} = e;
|
|
8535
|
-
const {
|
|
8536
|
-
type,
|
|
8537
|
-
val,
|
|
8538
|
-
delay = 0
|
|
8539
|
-
} = event;
|
|
8540
|
-
if (type === "toggleMask") {
|
|
8541
|
-
setTimeout(() => {
|
|
8542
|
-
showMask.value = val;
|
|
8543
|
-
}, delay);
|
|
8544
|
-
}
|
|
8545
|
-
});
|
|
8546
8567
|
const pageContainerRef = ref();
|
|
8547
|
-
const
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
const
|
|
8559
|
-
return `polygon(
|
|
8560
|
-
0% 0%,
|
|
8561
|
-
0% 100%,
|
|
8562
|
-
${leftDis}px 100%,
|
|
8563
|
-
${leftDis}px ${topDis}px,
|
|
8564
|
-
calc(100% - ${rightDis}px) ${topDis}px,
|
|
8565
|
-
calc(100% - ${rightDis}px) calc(100% - ${bottomDis}px),
|
|
8566
|
-
${leftDis}px calc(100% - ${bottomDis}px),
|
|
8567
|
-
${leftDis}px 100%,
|
|
8568
|
-
100% 100%,
|
|
8569
|
-
100% 0%
|
|
8570
|
-
)`;
|
|
8571
|
-
});
|
|
8572
|
-
return () => createVNode("div", {
|
|
8573
|
-
"class": `${config.prefix}-layout`
|
|
8574
|
-
}, [createVNode(Layout$1, null, {
|
|
8575
|
-
default: () => [showHeader.value && createVNode(LayoutHeader, null, {
|
|
8568
|
+
const {
|
|
8569
|
+
showMask,
|
|
8570
|
+
modalPath
|
|
8571
|
+
} = useFakeModal(pageContainerRef);
|
|
8572
|
+
return () => {
|
|
8573
|
+
const modalMask = createVNode("div", {
|
|
8574
|
+
"class": "layout-mask",
|
|
8575
|
+
"style": {
|
|
8576
|
+
clipPath: modalPath.value
|
|
8577
|
+
}
|
|
8578
|
+
}, null);
|
|
8579
|
+
const header = createVNode(LayoutHeader, null, {
|
|
8576
8580
|
default: () => [createVNode(Header$1, {
|
|
8577
8581
|
"menu": props.showNav ? props.userMenu : [],
|
|
8578
8582
|
"withSearch": props.showNav,
|
|
@@ -8587,47 +8591,49 @@ const Layout = defineComponent({
|
|
|
8587
8591
|
"onLogout": () => emit("logout"),
|
|
8588
8592
|
"onExtraPage": e => emit("extraPage", e)
|
|
8589
8593
|
}, null)]
|
|
8590
|
-
})
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8594
|
+
});
|
|
8595
|
+
const sider = createVNode(LayoutSider, {
|
|
8596
|
+
"class": `${config.prefix}-layout-sider`,
|
|
8597
|
+
"width": "10.416vw",
|
|
8598
|
+
"collapsedWidth": "3.125vw",
|
|
8599
|
+
"collapsed": isFolder.value
|
|
8600
|
+
}, {
|
|
8601
|
+
default: () => [createVNode("div", {
|
|
8602
|
+
"class": ["folder", {
|
|
8603
|
+
isFold: isFolder.value
|
|
8604
|
+
}],
|
|
8605
|
+
"onClick": () => toggleFolder()
|
|
8606
|
+
}, [isFolder.value ? createVNode(MenuUnfoldOutlined, null, null) : createVNode(MenuFoldOutlined, null, null)]), createVNode(SideMenu$1, {
|
|
8607
|
+
"menu": sideMenuShow.value,
|
|
8608
|
+
"onMenuSelect": handleMenuSelect,
|
|
8609
|
+
"extraPages": props.extraPages,
|
|
8610
|
+
"expandAll": !!menuRef
|
|
8611
|
+
}, null), createVNode("div", {
|
|
8612
|
+
"class": "copyright"
|
|
8613
|
+
}, [props.copyRight])]
|
|
8614
|
+
});
|
|
8615
|
+
const content = createVNode(PageContent, {
|
|
8616
|
+
"pageContainerRef": pageContainerRef,
|
|
8617
|
+
"currMenu": currMenu.value,
|
|
8618
|
+
"menu": props.userMenu,
|
|
8619
|
+
"extraPages": props.extraPages,
|
|
8620
|
+
"appList": props.appList,
|
|
8621
|
+
"showTabList": (props.withMenu || showSideMenu.value) && !isOnlyPage
|
|
8622
|
+
}, null);
|
|
8623
|
+
return createVNode("div", {
|
|
8624
|
+
"class": `${config.prefix}-layout`
|
|
8625
|
+
}, [createVNode(Layout$1, null, {
|
|
8626
|
+
default: () => [showHeader.value && header, createVNode(Layout$1, null, {
|
|
8627
|
+
default: () => [showSide.value && sider, createVNode(LayoutContent, {
|
|
8628
|
+
"class": {
|
|
8629
|
+
"only-page": isOnlyPage
|
|
8630
|
+
}
|
|
8631
|
+
}, _isSlot$c(content) ? content : {
|
|
8632
|
+
default: () => [content]
|
|
8633
|
+
})]
|
|
8623
8634
|
})]
|
|
8624
|
-
})]
|
|
8625
|
-
}
|
|
8626
|
-
"class": "layout-mask",
|
|
8627
|
-
"style": {
|
|
8628
|
-
clipPath: modalPath.value
|
|
8629
|
-
}
|
|
8630
|
-
}, null)]);
|
|
8635
|
+
}), showMask.value && modalMask]);
|
|
8636
|
+
};
|
|
8631
8637
|
}
|
|
8632
8638
|
});
|
|
8633
8639
|
var index$9 = installComponent(Layout, "layout");
|
|
@@ -9353,39 +9359,41 @@ const ChildHeader = defineComponent({
|
|
|
9353
9359
|
|
|
9354
9360
|
const isIndependentApp = query => !!query.token && !!query.onlyPage;
|
|
9355
9361
|
const loginFun = new Login$1();
|
|
9356
|
-
const
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9362
|
+
const httpUtil = {
|
|
9363
|
+
requestLogo: async () => {
|
|
9364
|
+
const res = await fetch("/api/common/v1/sysconfig/searchImage?imgType=4&editImg=1&clientType=web");
|
|
9365
|
+
const blob = await res.blob();
|
|
9366
|
+
return URL.createObjectURL(blob);
|
|
9367
|
+
},
|
|
9368
|
+
requestUserTree: async () => {
|
|
9369
|
+
const headers = getCommonHeaders();
|
|
9370
|
+
const res = await fetch("/api/common/v1/menu/tree", {
|
|
9371
|
+
headers
|
|
9372
|
+
});
|
|
9373
|
+
const treeData = await res.json();
|
|
9374
|
+
return treeData.data;
|
|
9375
|
+
},
|
|
9376
|
+
requestCopyright: async () => {
|
|
9377
|
+
const res = await fetch("/api/common/v1/sysconfig/getSysConfig?clientType=web");
|
|
9378
|
+
const data = await res.json();
|
|
9379
|
+
return data.data.homepageCopyright;
|
|
9380
|
+
},
|
|
9381
|
+
postLogout: async () => {
|
|
9382
|
+
const headers = getCommonHeaders();
|
|
9383
|
+
await fetch("/api/common/v1/log/insert", {
|
|
9384
|
+
method: "POST",
|
|
9385
|
+
headers: {
|
|
9386
|
+
...headers,
|
|
9387
|
+
"Content-Type": "application/json;charset=UTF-8"
|
|
9388
|
+
},
|
|
9389
|
+
body: JSON.stringify({
|
|
9390
|
+
softSysId: "1",
|
|
9391
|
+
operateId: "111",
|
|
9392
|
+
recordId: "11",
|
|
9393
|
+
content: "\u767B\u51FA"
|
|
9394
|
+
})
|
|
9395
|
+
});
|
|
9396
|
+
}
|
|
9389
9397
|
};
|
|
9390
9398
|
const DefaultLayout = defineComponent({
|
|
9391
9399
|
async beforeRouteEnter(to) {
|
|
@@ -9430,12 +9438,12 @@ const DefaultLayout = defineComponent({
|
|
|
9430
9438
|
const userInfo = useSessionStorage("userinfo", {});
|
|
9431
9439
|
const logo = ref();
|
|
9432
9440
|
const getLogo = async () => {
|
|
9433
|
-
const str = await requestLogo();
|
|
9441
|
+
const str = await httpUtil.requestLogo();
|
|
9434
9442
|
logo.value = str;
|
|
9435
9443
|
};
|
|
9436
9444
|
const copyright = ref("");
|
|
9437
9445
|
const getCopyright = async () => {
|
|
9438
|
-
const str = await requestCopyright();
|
|
9446
|
+
const str = await httpUtil.requestCopyright();
|
|
9439
9447
|
copyright.value = str;
|
|
9440
9448
|
};
|
|
9441
9449
|
const isIndependent = isIndependentApp(route.query);
|
|
@@ -9460,7 +9468,7 @@ const DefaultLayout = defineComponent({
|
|
|
9460
9468
|
});
|
|
9461
9469
|
const permissionMenu = ref([]);
|
|
9462
9470
|
const getPermissionMenu = async () => {
|
|
9463
|
-
const tree = await requestUserTree();
|
|
9471
|
+
const tree = await httpUtil.requestUserTree();
|
|
9464
9472
|
const appRefName = route.query.menuRef ?? import.meta.env.VITE_APP_NAME;
|
|
9465
9473
|
let userMenu = getMenuByKey(tree, appRefName, "remark");
|
|
9466
9474
|
if (!userMenu) {
|
|
@@ -9471,9 +9479,8 @@ const DefaultLayout = defineComponent({
|
|
|
9471
9479
|
const menuList = computed(() => isDev ? devMenuList.value : permissionMenu.value);
|
|
9472
9480
|
const isIframe = ref(false);
|
|
9473
9481
|
const iframeUrl = ref("");
|
|
9474
|
-
watch([route, menuList], (
|
|
9475
|
-
query
|
|
9476
|
-
}]) => {
|
|
9482
|
+
watch([route, menuList], () => {
|
|
9483
|
+
const query = route.query;
|
|
9477
9484
|
if (query.iframeId && menuList.value.length) {
|
|
9478
9485
|
isIframe.value = true;
|
|
9479
9486
|
const menuRecord = getMenuByKey(menuList.value, query.iframeId, "id");
|
|
@@ -9495,7 +9502,7 @@ const DefaultLayout = defineComponent({
|
|
|
9495
9502
|
}
|
|
9496
9503
|
});
|
|
9497
9504
|
const handleLogout = async () => {
|
|
9498
|
-
await postLogout();
|
|
9505
|
+
await httpUtil.postLogout();
|
|
9499
9506
|
sessionStorage.clear();
|
|
9500
9507
|
localStorage.clear();
|
|
9501
9508
|
message.info("\u7528\u6237\u9000\u51FA\u767B\u5F55");
|
|
@@ -9521,48 +9528,51 @@ const DefaultLayout = defineComponent({
|
|
|
9521
9528
|
"class": "independent-container"
|
|
9522
9529
|
}, [createVNode(resolveComponent("router-view"), null, null)]);
|
|
9523
9530
|
}
|
|
9531
|
+
const header = createVNode(LayoutHeader, {
|
|
9532
|
+
"class": "header-container"
|
|
9533
|
+
}, {
|
|
9534
|
+
default: () => [isDev ? createVNode(ChildHeaderDev, {
|
|
9535
|
+
"userInfo": userInfo.value
|
|
9536
|
+
}, null) : createVNode(ChildHeader, {
|
|
9537
|
+
"userInfo": userInfo.value,
|
|
9538
|
+
"logo": logo.value,
|
|
9539
|
+
"onLogout": handleLogout
|
|
9540
|
+
}, null)]
|
|
9541
|
+
});
|
|
9542
|
+
const sider = createVNode(LayoutSider, {
|
|
9543
|
+
"class": `${config.prefix}-layout-sider`,
|
|
9544
|
+
"width": "10.416vw",
|
|
9545
|
+
"collapsedWidth": "3.125vw",
|
|
9546
|
+
"collapsed": isFold.value
|
|
9547
|
+
}, {
|
|
9548
|
+
default: () => [createVNode("div", {
|
|
9549
|
+
"class": ["folder", {
|
|
9550
|
+
isFold: isFold.value
|
|
9551
|
+
}],
|
|
9552
|
+
"onClick": () => toggleFold()
|
|
9553
|
+
}, [isFold.value ? createVNode(MenuUnfoldOutlined, null, null) : createVNode(MenuFoldOutlined, null, null)]), createVNode(SideMenu, {
|
|
9554
|
+
"menuList": menuList.value
|
|
9555
|
+
}, null), createVNode("div", {
|
|
9556
|
+
"class": "copyright"
|
|
9557
|
+
}, [copyright.value])]
|
|
9558
|
+
});
|
|
9559
|
+
const content = createVNode(LayoutContent, {
|
|
9560
|
+
"class": "layout-content"
|
|
9561
|
+
}, {
|
|
9562
|
+
default: () => [createVNode("div", {
|
|
9563
|
+
"class": "content-inner"
|
|
9564
|
+
}, [withDirectives(createVNode(resolveComponent("router-view"), null, null), [[vShow, !isIframe.value]]), withDirectives(createVNode("iframe", {
|
|
9565
|
+
"src": iframeUrl.value,
|
|
9566
|
+
"height": "100%",
|
|
9567
|
+
"width": "100%",
|
|
9568
|
+
"frameborder": "0"
|
|
9569
|
+
}, null), [[vShow, isIframe.value]])])]
|
|
9570
|
+
});
|
|
9524
9571
|
return createVNode(Layout$1, {
|
|
9525
9572
|
"class": `${config.prefix}-child-layout`
|
|
9526
9573
|
}, {
|
|
9527
|
-
default: () => [props.withHeader && createVNode(
|
|
9528
|
-
|
|
9529
|
-
}, {
|
|
9530
|
-
default: () => [isDev ? createVNode(ChildHeaderDev, {
|
|
9531
|
-
"userInfo": userInfo.value
|
|
9532
|
-
}, null) : createVNode(ChildHeader, {
|
|
9533
|
-
"userInfo": userInfo.value,
|
|
9534
|
-
"logo": logo.value,
|
|
9535
|
-
"onLogout": handleLogout
|
|
9536
|
-
}, null)]
|
|
9537
|
-
}), createVNode(Layout$1, null, {
|
|
9538
|
-
default: () => [createVNode(LayoutSider, {
|
|
9539
|
-
"class": `${config.prefix}-layout-sider`,
|
|
9540
|
-
"width": "10.416vw",
|
|
9541
|
-
"collapsedWidth": "3.125vw",
|
|
9542
|
-
"collapsed": isFold.value
|
|
9543
|
-
}, {
|
|
9544
|
-
default: () => [createVNode("div", {
|
|
9545
|
-
"class": ["folder", {
|
|
9546
|
-
isFold: isFold.value
|
|
9547
|
-
}],
|
|
9548
|
-
"onClick": () => toggleFold()
|
|
9549
|
-
}, [isFold.value ? createVNode(MenuUnfoldOutlined, null, null) : createVNode(MenuFoldOutlined, null, null)]), createVNode(SideMenu, {
|
|
9550
|
-
"menuList": menuList.value
|
|
9551
|
-
}, null), createVNode("div", {
|
|
9552
|
-
"class": "copyright"
|
|
9553
|
-
}, [copyright.value])]
|
|
9554
|
-
}), createVNode(LayoutContent, {
|
|
9555
|
-
"class": "layout-content"
|
|
9556
|
-
}, {
|
|
9557
|
-
default: () => [createVNode("div", {
|
|
9558
|
-
"class": "content-inner"
|
|
9559
|
-
}, [withDirectives(createVNode(resolveComponent("router-view"), null, null), [[vShow, !isIframe.value]]), withDirectives(createVNode("iframe", {
|
|
9560
|
-
"src": iframeUrl.value,
|
|
9561
|
-
"height": "100%",
|
|
9562
|
-
"width": "100%",
|
|
9563
|
-
"frameborder": "0"
|
|
9564
|
-
}, null), [[vShow, isIframe.value]])])]
|
|
9565
|
-
})]
|
|
9574
|
+
default: () => [props.withHeader && header, createVNode(Layout$1, null, {
|
|
9575
|
+
default: () => [sider, content]
|
|
9566
9576
|
})]
|
|
9567
9577
|
});
|
|
9568
9578
|
};
|
|
@@ -11507,7 +11517,6 @@ const CloudVideo = defineComponent({
|
|
|
11507
11517
|
initVideo();
|
|
11508
11518
|
});
|
|
11509
11519
|
onBeforeUnmount(() => {
|
|
11510
|
-
console.log("\u9500\u6BC1");
|
|
11511
11520
|
player?.stop();
|
|
11512
11521
|
});
|
|
11513
11522
|
return () => createVNode("div", {
|
|
@@ -11597,11 +11606,6 @@ class WebRtcMt {
|
|
|
11597
11606
|
switch (type) {
|
|
11598
11607
|
case "err":
|
|
11599
11608
|
throw new Error(text);
|
|
11600
|
-
case "warn":
|
|
11601
|
-
console.warn(text);
|
|
11602
|
-
break;
|
|
11603
|
-
default:
|
|
11604
|
-
console.info(text);
|
|
11605
11609
|
}
|
|
11606
11610
|
}
|
|
11607
11611
|
// 停止播放0
|
|
@@ -12452,7 +12456,6 @@ const PeopleSelect = defineComponent({
|
|
|
12452
12456
|
"style": "display: inline-block;",
|
|
12453
12457
|
"onClick": () => {
|
|
12454
12458
|
modalOpen.value = true;
|
|
12455
|
-
console.log("\u70B9\u51FB\u4E861111");
|
|
12456
12459
|
}
|
|
12457
12460
|
}, [typeof slots.default === "function" ? slots.default() : createVNode(resolveComponent("a-button"), {
|
|
12458
12461
|
"type": "primary"
|
|
@@ -14072,7 +14075,6 @@ const SszComment = defineComponent({
|
|
|
14072
14075
|
token,
|
|
14073
14076
|
corpUser
|
|
14074
14077
|
} = await getZxUser(props.zxIp);
|
|
14075
|
-
console.log("corpUser", corpUser);
|
|
14076
14078
|
currentUserId.value = corpUser.id;
|
|
14077
14079
|
setAxiosOption({
|
|
14078
14080
|
baseURL: props.baseUrl,
|
|
@@ -14090,7 +14092,6 @@ const SszComment = defineComponent({
|
|
|
14090
14092
|
}
|
|
14091
14093
|
});
|
|
14092
14094
|
} catch (e) {
|
|
14093
|
-
console.log(e);
|
|
14094
14095
|
setAxiosOption({
|
|
14095
14096
|
baseURL: props.baseUrl,
|
|
14096
14097
|
headers: {
|
|
@@ -14747,7 +14748,6 @@ const QaContext = defineComponent({
|
|
|
14747
14748
|
}) {
|
|
14748
14749
|
const containerRef = ref();
|
|
14749
14750
|
const onAnswerRender = text => {
|
|
14750
|
-
console.log("%c%s", "color: #bd08b7;", text);
|
|
14751
14751
|
containerRef.value.scrollTo({
|
|
14752
14752
|
top: containerRef.value.scrollHeight,
|
|
14753
14753
|
behavior: "smooth"
|