功能变化: 首页默认

pull/91/MERGE
猿小天 2023-03-28 22:16:08 +08:00
parent 9ff0d19c0d
commit 56d152e1c3
4 changed files with 73 additions and 33 deletions

View File

@ -1,6 +1,8 @@
<template> <template>
<el-card shadow="hover" header="关于项目" class="item-background"> <el-card shadow="hover" header="关于项目" class="card-view" :style="{backgroundColor:randomColor()}">
<p>高性能 / 精致 / 优雅基于Vue2 + Element-UI 的中后台前端解决方案如果喜欢就点个星星支持一下</p> <p>后端:Django-rest-framework</p>
<p>前端:Vue2 + Element-UI + d2-crud-plus</p>
<p>快速系统开发平台,如果喜欢就点个星星支持一下</p>
<p> <p>
<a href='https://liqianglog.gitee.io/django-vue-admin' target="_blank"> <a href='https://liqianglog.gitee.io/django-vue-admin' target="_blank">
<img src='https://liqianglog.gitee.io/django-vue-admin/badge/star.svg?theme=dark' alt='star' style="vertical-align: middle"> <img src='https://liqianglog.gitee.io/django-vue-admin/badge/star.svg?theme=dark' alt='star' style="vertical-align: middle">
@ -14,19 +16,36 @@ export default {
title: '关于项目', title: '关于项目',
icon: 'el-icon-setting', icon: 'el-icon-setting',
description: '点个星星支持一下', description: '点个星星支持一下',
height: 20, height: 10,
width: 8, width: 8,
minH: 20, minH: 10,
minW: 4, minW: 4,
isResizable: true, isResizable: true,
data () { data () {
return {} return {}
},
methods:{
//
randomColor () {
const color = [
'#50A8F4FF',
'#FD6165FF',
'#E679D8FF',
'#F9AB5BFF'
]
const ran = Math.floor(Math.random() * 4)
return color[ran]
}
} }
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.item-background p { .card-view{
color: #999; color: #FFFFFF;
p {
font-size: 0.7em;
color: #FFFFFF;
}
} }
</style> </style>

View File

@ -14,8 +14,8 @@ export default {
title: '时钟', title: '时钟',
icon: 'el-icon-alarm-clock', icon: 'el-icon-alarm-clock',
description: '演示部件效果', description: '演示部件效果',
height: 17, height: 10,
minH: 17, minH: 10,
width: 8, width: 8,
minW: 4, minW: 4,
isResizable: true, isResizable: true,
@ -47,11 +47,11 @@ export default {
} }
.time h2 { .time h2 {
font-size: 40px; font-size: 24px;
} }
.time p { .time p {
font-size: 14px; font-size: 18px;
margin-top: 10px; margin-top: 10px;
opacity: 0.7; opacity: 0.7;
} }

View File

@ -1,44 +1,70 @@
<template> <template>
<el-card shadow="hover" header="版本信息"> <el-card shadow="hover" class="card-view" :style="{backgroundColor:randomColor()}" header="版本信息">
<div style="height: 70px;text-align: center;"> <div style="text-align: center;color: #FFFFFF">
<h2 style="margin-top: 5px;">Dvadmin</h2> <h2 style="margin-top: 5px;">{{ title }}</h2>
<p style="margin-top: 5px;">最新版本 {{ ver }}</p> <p style="margin-top: 5px;">最新版本 {{ ver }}</p>
</div> </div>
<div style="margin-top: 5px;">
<el-button type="primary" plain round @click="golog"></el-button>
<el-button type="primary" plain round @click="gogit">gitee</el-button>
</div>
</el-card> </el-card>
</template> </template>
<script> <script>
import { mapState } from 'vuex'
export default { export default {
title: '版本信息', title: '版本信息',
icon: 'el-icon-monitor', icon: 'el-icon-monitor',
description: '当前项目版本信息', description: '当前项目版本信息',
height: 22, height: 10,
minH: 10,
width: 8, width: 8,
minH: 22,
minW: 4, minW: 4,
isResizable: true, isResizable: true,
data () { data () {
return { return {
ver: 'loading...' ver: 'loading...',
title: ''
} }
}, },
mounted () { mounted () {
this.getVer() this.getVer()
}, },
computed: {
...mapState('d2admin', {
siteName: state => state.settings.data['login.site_name'] //
})
},
methods: { methods: {
async getVer () { async getVer () {
this.ver = 'v2.1.0' this.ver = `v${process.env.VUE_APP_VERSION}` || 'v2.1.1'
this.title = this.siteName || process.env.VUE_APP_TITLE
}, },
golog () { golog () {
window.open('https://gitee.com/liqianglog/django-vue-admin/releases') window.open('https://gitee.com/liqianglog/django-vue-admin/releases')
}, },
gogit () { gogit () {
window.open('https://gitee.com/liqianglog/django-vue-admin') window.open('https://gitee.com/liqianglog/django-vue-admin')
},
//
randomColor () {
const color = [
'#50A8F4FF',
'#FD6165FF',
'#E679D8FF',
'#F9AB5BFF'
]
const ran = Math.floor(Math.random() * 4)
return color[ran]
} }
} }
} }
</script> </script>
<style scoped lang="scss">
.card-view{
color: #FFFFFF;
//background: rgb(80,168,244);
//box-shadow: 1px 6px 8px 2px rgba(80,168,244,0.2);
.card-content{
//text-align: center;
}
}
</style>

View File

@ -97,17 +97,12 @@ export default {
customizing: false, customizing: false,
allComps: allComps, allComps: allComps,
selectLayout: [], selectLayout: [],
defaultGrid: { defaultLayout: [
// [24] [18,6] [8,8,8] [6,12,6] { x: 0, y: 0, w: 50, h: 50, i: '0', element: 'welcome' },
layout: [12, 6, 6], { x: 0, y: 52, w: 8, h: 16, i: '1', element: 'about' },
// com:views/home/components { x: 8, y: 52, w: 8, h: 16, i: '2', element: 'time' },
copmsList: [ { x: 16, y: 52, w: 8, h: 20, i: '3', element: 'ver' }
['welcome'], ],
['about', 'ver'],
['time', 'progress']
]
},
defaultLayout: [],
layout: [ layout: [
// { x: 0, y: 0, w: 2, h: 2, i: '0', element: 'welcome' }, // { x: 0, y: 0, w: 2, h: 2, i: '0', element: 'welcome' },
// { x: 2, y: 0, w: 2, h: 4, i: '1', element: 'about' }, // { x: 2, y: 0, w: 2, h: 4, i: '1', element: 'about' },