Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-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
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0224206a
authored
Sep 23, 2021
by
吴娟华
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
'1.2.1'
1 parent
49298b04
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
src/App.vue
src/components/DesktopTopSider/DesktopTopSider.vue
src/main.js
src/micro/app-store.js
src/App.vue
View file @
0224206
...
@@ -17,7 +17,7 @@ import Dashboard from '@/views/Dashboard';
...
@@ -17,7 +17,7 @@ import Dashboard from '@/views/Dashboard';
import
Login
from
'@/views/Login'
;
import
Login
from
'@/views/Login'
;
import
Loading
from
'components/Loading/Loading'
;
import
Loading
from
'components/Loading/Loading'
;
import
microAppStart
from
"./micro/auth"
import
microAppStart
from
"./micro/auth"
import
actions
from
"@/micro/app-store"
;
import
{
onCreated
,
onMounted
,
computed
,
reactive
,
toRefs
}
from
'vue'
;
import
{
onCreated
,
onMounted
,
computed
,
reactive
,
toRefs
}
from
'vue'
;
import
{
useStore
}
from
'vuex'
;
import
{
useStore
}
from
'vuex'
;
...
@@ -51,7 +51,8 @@ export default {
...
@@ -51,7 +51,8 @@ export default {
hasToken
,
hasToken
,
showLoading
showLoading
}
}
}
},
//$globalActions:actions
}
}
</
script
>
</
script
>
...
...
src/components/DesktopTopSider/DesktopTopSider.vue
View file @
0224206
...
@@ -65,6 +65,7 @@ export default {
...
@@ -65,6 +65,7 @@ export default {
const
clickCollapsed
=
()
=>
{
const
clickCollapsed
=
()
=>
{
state
.
collapsed
=
!
state
.
collapsed
;
state
.
collapsed
=
!
state
.
collapsed
;
store
.
dispatch
(
'app/setCollapsed'
,
state
.
collapsed
);
store
.
dispatch
(
'app/setCollapsed'
,
state
.
collapsed
);
actions
.
setGlobalState
({
isCollapsed
:
state
.
collapsed
})
};
};
// const minus = () => {
// const minus = () => {
...
...
src/main.js
View file @
0224206
import
{
createApp
}
from
'vue'
import
Vue
,
{
createApp
}
from
'vue'
import
App
from
'./App.vue'
import
App
from
'./App.vue'
import
router
from
'./router'
import
router
from
'./router'
import
store
from
'./store'
import
store
from
'./store'
...
@@ -7,10 +7,11 @@ import elementUI from '@/utils/globalUI/element'
...
@@ -7,10 +7,11 @@ import elementUI from '@/utils/globalUI/element'
import
'element-plus/lib/theme-chalk/index.css'
;
import
'element-plus/lib/theme-chalk/index.css'
;
// import './assets/css/resets.css'
// import './assets/css/resets.css'
const
app
=
createApp
(
App
);
const
app
=
createApp
(
App
);
app
.
use
(
store
)
app
.
use
(
store
)
.
use
(
router
)
.
use
(
router
)
.
use
(
elementUI
)
.
use
(
elementUI
)
.
mount
(
'#app'
);
\ No newline at end of file
\ No newline at end of file
.
mount
(
'#app'
);
\ No newline at end of file
\ No newline at end of file
src/micro/app-store.js
View file @
0224206
import
{
initGlobalState
,
MicroAppStateActions
}
from
"qiankun"
;
import
{
initGlobalState
,
MicroAppStateActions
}
from
"qiankun"
;
import
store
from
"@/store"
;
import
store
from
"@/store"
;
import
Vue
from
'vue'
import
{
useMessage
}
from
'@/utils/globalUI/elementMsg'
;
import
{
useMessage
}
from
'@/utils/globalUI/elementMsg'
;
const
{
createMessage
}
=
useMessage
();
const
{
createMessage
}
=
useMessage
();
...
@@ -9,7 +9,8 @@ const error = createMessage.error;
...
@@ -9,7 +9,8 @@ const error = createMessage.error;
const
initialState
=
{
const
initialState
=
{
token
:
localStorage
.
getItem
(
'token'
)
||
''
,
token
:
localStorage
.
getItem
(
'token'
)
||
''
,
showLoading
:
false
,
showLoading
:
false
,
errorMsg
:
''
errorMsg
:
''
,
isCollapsed
:
false
,
};
};
// 初始化 state
// 初始化 state
...
@@ -34,4 +35,6 @@ actions.onGlobalStateChange((state, prev) => {
...
@@ -34,4 +35,6 @@ actions.onGlobalStateChange((state, prev) => {
// store.dispatch('app/showLoading', showLoading);
// store.dispatch('app/showLoading', showLoading);
});
});
export
default
actions
;
export
default
actions
;
\ 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