Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cesium-frame
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jlc
cesium-frame
Commits
9fbbfaeb
Commit
9fbbfaeb
authored
Jul 16, 2024
by
jlc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:优化了代码结构
parent
9d8dbdca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
40 deletions
+20
-40
AsideMenuBar.vue
src/components/AsideMenuBar.vue
+16
-37
index.js
src/router/index.js
+1
-0
indexView.vue
src/views/indexView.vue
+3
-3
No files found.
src/components/AsideMenuBar.vue
View file @
9fbbfaeb
...
...
@@ -11,17 +11,9 @@
<el-icon><MapLocation
/></el-icon>
<span>
点的案例
</span>
</
template
>
<el-menu-item
@
click=
"indexBtn('pointOne')
"
>
<el-menu-item
v-for=
"item in elementPointData"
:key=
"item.id"
index=
"pointOne
"
>
<el-icon><View
/></el-icon>
<span>
one
</span>
</el-menu-item>
<el-menu-item
@
click=
"indexBtn('firstTwo')"
>
<el-icon><View
/></el-icon>
<span>
two
</span>
</el-menu-item>
<el-menu-item
@
click=
"indexBtn('firstThree')"
>
<el-icon><View
/></el-icon>
<span>
three
</span>
<span>
{{item.title}}
</span>
</el-menu-item>
</el-sub-menu>
...
...
@@ -30,17 +22,9 @@
<el-icon><SemiSelect
/></el-icon>
<span>
线的案例
</span>
</
template
>
<el-menu-item
index=
"/code"
>
<el-icon><View
/></el-icon>
<span>
one
</span>
</el-menu-item>
<el-menu-item
index=
"/code"
>
<el-icon><View
/></el-icon>
<span>
two
</span>
</el-menu-item>
<el-menu-item
index=
"/code"
>
<el-menu-item
v-for=
"item in elementLineData"
:key=
"item.id"
index=
"lineOne"
>
<el-icon><View
/></el-icon>
<span>
three
</span>
<span>
{{item.title}}
</span>
</el-menu-item>
</el-sub-menu>
...
...
@@ -49,17 +33,9 @@
<el-icon><Grid
/></el-icon>
<span>
面的案例
</span>
</
template
>
<el-menu-item
index=
"/cod
e"
>
<el-menu-item
v-for=
"item in elementPlaneData"
:key=
"item.id"
index=
"planeOn
e"
>
<el-icon><View
/></el-icon>
<span>
one
</span>
</el-menu-item>
<el-menu-item
index=
"/code"
>
<el-icon><View
/></el-icon>
<span>
two
</span>
</el-menu-item>
<el-menu-item
index=
"/code"
>
<el-icon><View
/></el-icon>
<span>
three
</span>
<span>
{{item.title}}
</span>
</el-menu-item>
</el-sub-menu>
</el-menu>
...
...
@@ -68,20 +44,23 @@
</template>
<
script
setup
>
import
{
MapLocation
,
SemiSelect
,
Grid
,
View
}
from
"@element-plus/icons-vue"
import
{
useRouter
}
from
'vue-router'
import
{
ref
}
from
'vue'
;
import
{
MapLocation
,
SemiSelect
,
Grid
,
View
}
from
"@element-plus/icons-vue"
;
import
{
elementPointMap
,
elementLineMap
,
elementPlaneMap
}
from
'@/views/ElementMap'
;
const
router
=
useRouter
()
const
elementPointData
=
ref
()
const
elementLineData
=
ref
()
const
elementPlaneData
=
ref
()
elementPointData
.
value
=
elementPointMap
;
elementLineData
.
value
=
elementLineMap
;
elementPlaneData
.
value
=
elementPlaneMap
;
const
props
=
defineProps
({
isCollapse
:
{
type
:
Boolean
,
}
});
function
indexBtn
(
id
)
{
router
.
push
(
`/CodeAndCesium/?id=
${
id
}
`
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/router/index.js
View file @
9fbbfaeb
...
...
@@ -8,6 +8,7 @@ const routes = [
children
:
[
{
path
:
''
,
name
:
'indexview'
,
component
:
()
=>
import
(
'@/views/indexView.vue'
)
// 使用懒加载
},
]
...
...
src/views/indexView.vue
View file @
9fbbfaeb
...
...
@@ -4,7 +4,7 @@
<span
class=
"text-base font-bold"
>
点的案例
</span>
<div
style=
"overflow-y: auto"
class=
"container"
>
<div
v-for=
"item in elementPointData"
:key=
"item.id"
@
click=
"indexBtn(`point$
{item.title}`)" class="item-container">
<
span>
{{
item
.
title
}}
</span
>
<
div>
{{
item
.
title
}}
</div
>
<img
:src=
"item.pngUrl"
width=
"250"
>
</div>
</div>
...
...
@@ -13,7 +13,7 @@
<span
class=
"text-base font-bold"
>
线的案例
</span>
<div
style=
"overflow-y: auto"
class=
"container"
>
<div
v-for=
"item in elementLineData"
:key=
"item.id"
@
click=
"indexBtn(`line$
{item.title}`)" class="item-container">
<
span>
{{
item
.
title
}}
</span
>
<
div>
{{
item
.
title
}}
</div
>
<img
:src=
"item.pngUrl"
width=
"250"
>
</div>
</div>
...
...
@@ -22,7 +22,7 @@
<span
class=
"text-base font-bold"
>
面的案例
</span>
<div
style=
"overflow-y: auto"
class=
"container"
>
<div
v-for=
"item in elementPlaneData"
:key=
"item.id"
@
click=
"indexBtn(`plane$
{item.title}`)" class="item-container">
<
span>
{{
item
.
title
}}
</span
>
<
div>
{{
item
.
title
}}
</div
>
<img
:src=
"item.pngUrl"
width=
"250"
>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment