|
|
@@ -1,90 +1,57 @@
|
|
|
<template>
|
|
|
<el-container>
|
|
|
<el-main>
|
|
|
- <el-col
|
|
|
- v-for="(more, index) in moreList"
|
|
|
- :key="index"
|
|
|
- :md="6"
|
|
|
- :sm="12"
|
|
|
- :xs="12"
|
|
|
- style="padding: 5px;"
|
|
|
- >
|
|
|
- <el-card class="box-card">
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <el-row>
|
|
|
- <el-col :md="4">
|
|
|
- <router-link target="_blank" :to="more.link">
|
|
|
- <el-avatar>
|
|
|
- <el-image :src="more.coverUrl" />
|
|
|
- </el-avatar>
|
|
|
- </router-link>
|
|
|
- </el-col>
|
|
|
- <el-col :md="16">
|
|
|
- <el-row style="padding: 5px;">
|
|
|
- <span v-html="more.title" />
|
|
|
- </el-row>
|
|
|
- <el-row style="padding: 5px;">
|
|
|
- <span v-html="more.desc" />
|
|
|
- </el-row>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
+ <nav-bar />
|
|
|
+ <router-view />
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import NavBar from 'components/layout/NavBar'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'Index',
|
|
|
+ components: {
|
|
|
+ NavBar
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
- moreList: []
|
|
|
+ isCollapse: false,
|
|
|
+ navList: [
|
|
|
+ { path: '/my', name: '我的帐号', icon: 'el-icon-upload' }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
+ /* watch: {
|
|
|
// 地址栏 url 发生变化时重新加载本页面
|
|
|
$route() {
|
|
|
this.$router.go()
|
|
|
}
|
|
|
- },
|
|
|
+ },*/
|
|
|
created() {
|
|
|
document.title = 'tnbapp'
|
|
|
- this.getData()
|
|
|
},
|
|
|
methods: {
|
|
|
- getData() {
|
|
|
- this.moreList.push(
|
|
|
- {
|
|
|
- title: 'vod',
|
|
|
- desc: 'VOD',
|
|
|
- link: '/',
|
|
|
- coverUrl: ''
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'blog',
|
|
|
- desc: 'Blog',
|
|
|
- link: '/blog',
|
|
|
- coverUrl: ''
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'disk',
|
|
|
- desc: 'Disk',
|
|
|
- link: '/disk',
|
|
|
- coverUrl: ''
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'devops',
|
|
|
- desc: 'DevOps',
|
|
|
- link: '/bg',
|
|
|
- coverUrl: ''
|
|
|
- }
|
|
|
- )
|
|
|
+ handleOpen(key, keyPath) {
|
|
|
+ console.log(key, keyPath)
|
|
|
+ },
|
|
|
+ handleClose(key, keyPath) {
|
|
|
+ console.log(key, keyPath)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style>
|
|
|
+.el-menu-vertical-demo:not(.el-menu--collapse) {
|
|
|
+ width: 200px;
|
|
|
+ min-height: 800px;
|
|
|
+}
|
|
|
+
|
|
|
+#aside-style {
|
|
|
+ min-width: 120px;
|
|
|
+ max-width: 240px;
|
|
|
+ width: 30%;
|
|
|
+}
|
|
|
</style>
|