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 71c8d267
authored
May 18, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix menu
1 parent
b9bd1234
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
21 deletions
package-lock.json
package.json
src/components/DesktopLeftSider/Sub/Menu.vue
src/components/DesktopTopSider/DesktopTopSider.vue
src/main.js
src/utils/globalAnt/ant.js
package-lock.json
View file @
71c8d26
This diff is collapsed.
Click to expand it.
package.json
View file @
71c8d26
...
...
@@ -7,7 +7,7 @@
"build"
:
"vue-cli-service build"
},
"dependencies"
:
{
"ant-design-vue"
:
"^2.
0.0-beta.10
"
,
"ant-design-vue"
:
"^2.
1.6
"
,
"axios"
:
"^0.20.0"
,
"core-js"
:
"^3.6.5"
,
"less"
:
"^3.12.2"
,
...
...
src/components/DesktopLeftSider/Sub/Menu.vue
View file @
71c8d26
...
...
@@ -21,7 +21,7 @@
<ul
class=
"ant-menu-sub ant-menu ant-menu-inline"
v-if=
"item.showSubList"
>
<
template
v-for=
"cItem in item.children"
<
div
v-for=
"cItem in item.children"
:key=
"cItem.origin.menuNo"
>
<!-- 三级菜单 -->
<li
v-if=
"cItem.children && cItem.children.length > 0"
...
...
@@ -55,7 +55,7 @@
@
click
.
stop=
"cItemClick(cItem.origin.frontRoute || '', cItem, item)"
>
{{cItem.origin.menuName}}
</li>
</
template
>
</
div
>
</ul>
</li>
</ul>
...
...
@@ -110,7 +110,7 @@ export default {
}
const
filterPath
=
(
path
)
=>
{
return
path
&&
(
path
.
includes
(
'system'
)
||
path
.
includes
(
'monitor'
))
?
path
:
'/noData'
;
return
path
&&
(
path
.
includes
(
'system'
)
||
path
.
includes
(
'monitor'
)
||
path
.
includes
(
'oEshield'
)
)
?
path
:
'/noData'
;
}
// 存储面包屑
...
...
src/components/DesktopTopSider/DesktopTopSider.vue
View file @
71c8d26
...
...
@@ -9,6 +9,10 @@
/>
<menu-fold-outlined
v-else
class=
"trigger"
@
click=
"clickCollapsed"
/>
<!--
<a-button
type=
"primary"
class=
"trigger"
>
<menu-unfold-outlined
v-if=
"collapsed"
/>
<menu-fold-outlined
v-else
/>
</a-button>
-->
</div>
<!--
<h3>
主应用Vue数据:
{{
commonData
}}
</h3>
<button
@
click=
"minus"
>
点击逐减Vue
</button>
...
...
@@ -55,7 +59,7 @@ export default {
const
state
=
reactive
({
collapsed
:
false
,
commonData
:
store
.
getters
.
commonData
.
parent
,
reactNum
:
0
//
reactNum: 0
});
const
commonData
=
computed
(()
=>
store
.
getters
.
commonData
.
parent
);
...
...
@@ -65,25 +69,25 @@ export default {
store
.
dispatch
(
'app/setCollapsed'
,
state
.
collapsed
);
};
const
minus
=
()
=>
{
state
.
commonData
-=
1
;
console
.
log
(
store
)
store
.
dispatch
(
'app/setCommonData'
,
{
parent
:
state
.
commonData
});
}
//
const minus = () => {
//
state.commonData -= 1;
//
console.log(store)
//
store.dispatch('app/setCommonData', { parent: state.commonData });
//
}
const
add
=
()
=>
{
// 通知微应用数据发生变化
state
.
reactNum
+=
1
;
actions
.
setGlobalState
({
reactNum
:
state
.
reactNum
});
console
.
log
(
actions
);
}
//
const add = () => {
//
// 通知微应用数据发生变化
//
state.reactNum += 1;
//
actions.setGlobalState({ reactNum: state.reactNum });
//
console.log(actions);
//
}
return
{
...
toRefs
(
state
),
clickCollapsed
,
commonData
,
minus
,
add
commonData
//
minus,
//
add
}
}
}
...
...
src/main.js
View file @
71c8d26
import
'@babel/polyfill'
import
{
createApp
}
from
'vue'
import
App
from
'./App.vue'
import
router
from
'./router'
...
...
@@ -15,4 +17,4 @@ const app = createApp(App);
app
.
use
(
store
)
.
use
(
router
)
.
use
(
ant
)
.
mount
(
'#app'
);
.
mount
(
'#app'
);
\ No newline at end of file
src/utils/globalAnt/ant.js
View file @
71c8d26
...
...
@@ -12,7 +12,8 @@ import {
Dropdown
,
Spin
,
Breadcrumb
,
Empty
Empty
,
Icon
}
from
"ant-design-vue"
;
const
ant
=
{
...
...
@@ -36,6 +37,7 @@ const ant = {
Vue
.
component
(
Spin
.
name
,
Spin
);
Vue
.
component
(
Breadcrumb
.
name
,
Breadcrumb
);
Vue
.
component
(
Empty
.
name
,
Empty
);
Vue
.
component
(
Icon
.
name
,
Empty
);
},
};
...
...
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