Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-system
/
micro-portal
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3d05de31
authored
Mar 11, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
'add
1 parent
cf0f2547
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
27 deletions
src/components/DesktopTopSider/DesktopTopSider.vue
src/components/DesktopTopSider/Sub/FullScreen.vue
src/components/Footer/HomeFooter.vue
src/store/getters.js
src/store/modules/app.js
src/components/DesktopTopSider/DesktopTopSider.vue
View file @
3d05de3
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<!-- 设置按钮 -->
<!-- 设置按钮 -->
<!--
<setting-button></setting-button>
-->
<!--
<setting-button></setting-button>
-->
<!-- 全屏按钮 -->
<!-- 全屏按钮 -->
<
!--
<full-screen></full-screen>
--
>
<
full-screen></full-screen
>
<!-- 用户按钮 -->
<!-- 用户按钮 -->
<user-button></user-button>
<user-button></user-button>
</div>
</div>
...
...
src/components/DesktopTopSider/Sub/FullScreen.vue
View file @
3d05de3
...
@@ -10,6 +10,7 @@ import {
...
@@ -10,6 +10,7 @@ import {
FullscreenExitOutlined
FullscreenExitOutlined
}
from
'@ant-design/icons-vue'
;
}
from
'@ant-design/icons-vue'
;
import
{
reactive
,
toRefs
,
onMounted
}
from
'vue'
;
import
{
reactive
,
toRefs
,
onMounted
}
from
'vue'
;
import
{
useStore
}
from
'vuex'
;
export
default
{
export
default
{
name
:
'SettingButton'
,
name
:
'SettingButton'
,
...
@@ -23,41 +24,46 @@ export default {
...
@@ -23,41 +24,46 @@ export default {
FullscreenOutlined
FullscreenOutlined
},
},
setup
()
{
setup
()
{
const
store
=
useStore
();
const
state
=
reactive
({
const
state
=
reactive
({
fullscreen
:
true
,
fullscreen
:
true
,
fullarea
:
''
fullarea
:
''
});
});
const
checkFull
=
()
=>
{
var
isFull
=
window
.
fullScreen
||
document
.
webkitIsFullScreen
||
document
.
msFullscreenEnabled
;
//to fix : false || undefined == undefined
if
(
isFull
===
undefined
)
{
isFull
=
false
;}
return
isFull
;
}
onMounted
(()
=>
{
onMounted
(()
=>
{
state
.
fullarea
=
document
.
getElementById
(
'sub-system-frame'
);
state
.
fullarea
=
document
.
getElementById
(
'sub-system-frame'
);
//监听退出全屏事件
window
.
onresize
=
function
()
{
const
fullStatus
=
checkFull
();
store
.
dispatch
(
'app/setFullscreen'
,
fullStatus
);
}
})
})
// 登出操作
// 登出操作
const
fullScreen
=
(
isFull
)
=>
{
const
fullScreen
=
(
isFull
)
=>
{
let
{
fullarea
}
=
state
;
let
{
fullarea
:
element
}
=
state
;
if
(
isFull
)
{
// 进入全屏
// 判断各种浏览器,找到正确的方法
if
(
fullarea
.
requestFullscreen
)
{
var
requestMethod
=
element
.
requestFullScreen
||
//W3C
fullarea
.
requestFullscreen
();
element
.
webkitRequestFullScreen
||
//FireFox
}
else
if
(
fullarea
.
webkitRequestFullScreen
)
{
element
.
mozRequestFullScreen
||
//Chrome等
fullarea
.
webkitRequestFullScreen
();
element
.
msRequestFullScreen
;
//IE11
}
else
if
(
fullarea
.
mozRequestFullScreen
)
{
if
(
requestMethod
)
{
fullarea
.
mozRequestFullScreen
();
requestMethod
.
call
(
element
);
}
else
if
(
fullarea
.
msRequestFullscreen
)
{
}
else
if
(
typeof
window
.
ActiveXObject
!==
"undefined"
)
{
//for Internet Explorer
// IE11
var
wscript
=
new
ActiveXObject
(
"WScript.Shell"
);
fullarea
.
msRequestFullscreen
();
if
(
wscript
!==
null
)
{
}
wscript
.
SendKeys
(
"{F11}"
);
}
else
{
// 退出全屏
if
(
document
.
exitFullscreen
)
{
document
.
exitFullscreen
();
}
else
if
(
document
.
webkitCancelFullScreen
)
{
document
.
webkitCancelFullScreen
();
}
else
if
(
document
.
mozCancelFullScreen
)
{
document
.
mozCancelFullScreen
();
}
else
if
(
document
.
msExitFullscreen
)
{
document
.
msExitFullscreen
();
}
}
}
}
}
}
return
{
return
{
...
toRefs
(
state
),
...
toRefs
(
state
),
fullScreen
fullScreen
...
@@ -73,5 +79,4 @@ export default {
...
@@ -73,5 +79,4 @@ export default {
font-size
:
20px
;
font-size
:
20px
;
color
:
@
defaultThemeColor
;
color
:
@
defaultThemeColor
;
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/components/Footer/HomeFooter.vue
View file @
3d05de3
<
template
>
<
template
>
<a-layout-footer
class=
"home-footer"
>
<a-layout-footer
class=
"home-footer"
>
Copyright ©2012-20
15
粤ICP备12034057号 深圳广联赛讯有限公司 版权所有
Copyright ©2012-20
21
粤ICP备12034057号 深圳广联赛讯有限公司 版权所有
</a-layout-footer>
</a-layout-footer>
</
template
>
</
template
>
...
...
src/store/getters.js
View file @
3d05de3
...
@@ -5,9 +5,10 @@ const getters = {
...
@@ -5,9 +5,10 @@ const getters = {
userInfo
:
state
=>
state
.
app
.
userInfo
,
userInfo
:
state
=>
state
.
app
.
userInfo
,
baseURL
:
state
=>
state
.
app
.
baseURL
,
baseURL
:
state
=>
state
.
app
.
baseURL
,
showLoading
:
state
=>
state
.
app
.
showLoading
,
showLoading
:
state
=>
state
.
app
.
showLoading
,
commonData
:
state
=>
state
.
app
.
commonData
,
fullscreen
:
state
=>
state
.
app
.
fullscreen
,
menu
:
state
=>
state
.
menu
.
menu
,
menu
:
state
=>
state
.
menu
.
menu
,
curBreadCrumb
:
state
=>
state
.
menu
.
curBreadCrumb
,
curBreadCrumb
:
state
=>
state
.
menu
.
curBreadCrumb
,
commonData
:
state
=>
state
.
app
.
commonData
,
updateMenu
:
state
=>
state
.
menu
.
updateMenu
updateMenu
:
state
=>
state
.
menu
.
updateMenu
}
}
...
...
src/store/modules/app.js
View file @
3d05de3
...
@@ -8,7 +8,8 @@ let state = {
...
@@ -8,7 +8,8 @@ let state = {
showLoading
:
false
,
showLoading
:
false
,
commonData
:
{
commonData
:
{
showEmpty
:
false
showEmpty
:
false
}
},
fullscreen
:
false
};
};
try
{
try
{
...
@@ -53,6 +54,9 @@ export default {
...
@@ -53,6 +54,9 @@ export default {
},
},
SHOW_LOADING
(
state
,
data
)
{
SHOW_LOADING
(
state
,
data
)
{
state
.
showLoading
=
data
;
state
.
showLoading
=
data
;
},
SET_FULLSCREEN
(
state
,
data
)
{
state
.
fullscreen
=
data
;
}
}
},
},
actions
:
{
actions
:
{
...
@@ -80,5 +84,8 @@ export default {
...
@@ -80,5 +84,8 @@ export default {
setCollapsed
({
commit
},
data
)
{
setCollapsed
({
commit
},
data
)
{
commit
(
'SET_COLLAPSED'
,
data
)
commit
(
'SET_COLLAPSED'
,
data
)
},
},
setFullscreen
({
commit
},
data
)
{
commit
(
'SET_FULLSCREEN'
,
data
)
},
}
}
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment