每个模块首页更新

Former-commit-id: d459515f384d47ea5a84671050246eb5fe658304 [formerly d459515f384d47ea5a84671050246eb5fe658304 [formerly d459515f384d47ea5a84671050246eb5fe658304 [formerly d459515f384d47ea5a84671050246eb5fe658304 [formerly 1d08416010fed1f2f67f487d4c93ced2334e5bd9 [formerly a2250bf183540eb016a76fe6891d4930f7aeaec3]]]]]
Former-commit-id: 9a5f6e3a97a23ad6734a87e93284351eff9cfa9a
Former-commit-id: 48e636d6f3a252a6c3c89ecbbdc36b4b969d78e9
Former-commit-id: 0aa75a50770886d77d4f4660e11c9874819c3d01 [formerly 66c909149fc309b1715821d6512cc3288c3e0ac6]
Former-commit-id: de834b5ea328ac1aa664371f6d5c7044b96e8d4d
Former-commit-id: a049a32d41ac698119dafdde87842963097357a8
Former-commit-id: b17192706355ac212cd0224006f76c1ba47d50ea
Former-commit-id: d70f7c1eb4ac0b5941003faabfab4bd1342035c8
Former-commit-id: 3f00dfc99f25c34d7033fabcf98a0f8784b7f4ae
This commit is contained in:
liyang
2018-12-01 09:04:29 +08:00
parent d00fa6e120
commit 63476a9dc0
20 changed files with 192 additions and 62 deletions

View File

@@ -0,0 +1,88 @@
<template>
<div
class="banner"
:class="{
'with-link': link
}"
flex="dir:top main:center cross:top">
<p class="banner--title">{{title}}</p>
<p class="banner--sub-title">{{subTitle}}</p>
<p v-if="link" class="banner--link" @click="handleLinkClick">
<span class="banner--link-button">
<d2-icon name="link"/>
{{link}}
</span>
</p>
</div>
</template>
<script>
export default {
props: {
title: {
type: String,
default: ''
},
subTitle: {
type: String,
default: ''
},
link: {
type: String,
default: ''
}
},
methods: {
handleLinkClick () {
this.$open(this.link)
}
}
}
</script>
<style lang="scss" scoped>
.banner {
.banner--title {
margin: 0px;
padding: 0px;
margin-left: -8px;
font-size: 120px;
line-height: 120px;
font-weight: bold;
color: #FFF;
}
.banner--sub-title {
margin: 0px;
padding: 0px;
font-size: 16px;
color: #FFF;
}
.banner--link {
margin: 0px;
padding: 0px;
margin-top: 10px;
.banner--link-button {
font-size: 12px;
color: #FFF;
padding: 4px 6px;
border-radius: 2px;
background-color: rgba(#000, .5);
transition: all .3s;
&:hover {
background-color: rgba(#000, 1);
}
}
}
&.with-link {
height: 220px;
}
@extend %unable-select;
height: 180px;
padding-left: 20px;
border: 1px solid #0054b5;
border-radius: 2px;
background-color: #0077ff;
background-size: 60px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23cef0ff' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
</style>

View File

@@ -0,0 +1,24 @@
<template>
<div>
<d2-module-index-banner v-bind="banner"/>
</div>
</template>
<script>
import d2ModuleIndexBanner from './components/banner'
export default {
components: {
d2ModuleIndexBanner
},
props: {
banner: {
type: Object,
default: () => ({
title: '',
subTitle: '',
link: ''
})
}
}
}
</script>

View File

@@ -16,5 +16,6 @@ Vue.component('d2-icon-select', () => import('./d2-icon-select/index.vue'))
Vue.component('d2-icon-svg', () => import('./d2-icon-svg/index.vue'))
Vue.component('d2-markdown', () => import('./d2-markdown'))
Vue.component('d2-mde', () => import('./d2-mde'))
Vue.component('d2-module-index', () => import('./d2-module-index'))
Vue.component('d2-quill', () => import('./d2-quill'))
Vue.component('d2-ueditor', () => import('./d2-ueditor'))

View File

@@ -3,6 +3,7 @@ export default {
title: '内嵌网页',
icon: 'globe',
children: (pre => [
{ path: `${pre}index`, title: 'Frame 首页', icon: 'home' },
{ path: `${pre}d2-doc`, title: 'D2Admin 中文文档', iconSvg: 'd2-admin' },
{ path: `${pre}html`, title: '静态 HTML', icon: 'code' }
])('/demo/frame/')

View File

@@ -1 +0,0 @@
ba00e3c1f32cf9369968e9ce1a5d9e6164f3c07c

View File

@@ -1,10 +1,6 @@
<template>
<d2-container :filename="filename">
<d2-page-cover
title="示例"
sub-title="供借鉴和参考的页面">
<img src="./image/icon.png">
</d2-page-cover>
<d2-container :filename="filename" type="card">
<d2-module-index :banner="banner"/>
</d2-container>
</template>
@@ -12,7 +8,11 @@
export default {
data () {
return {
filename: __filename
filename: __filename,
banner: {
title: 'DEMOS',
subTitle: '提供借鉴和参考的页面'
}
}
}
}

View File

@@ -1 +0,0 @@
5ad0be3e886c5ecb07a563adbd7ffa5963697b66

View File

@@ -1,10 +1,6 @@
<template>
<d2-container :filename="filename">
<d2-page-cover
title="图表"
sub-title="集成图表组件">
<img src="./image/icon.png">
</d2-page-cover>
<d2-container :filename="filename" type="card">
<d2-module-index :banner="banner"/>
</d2-container>
</template>
@@ -12,7 +8,11 @@
export default {
data () {
return {
filename: __filename
filename: __filename,
banner: {
title: 'CHARTS',
subTitle: '图表示例'
}
}
}
}

View File

@@ -1 +0,0 @@
31ff16c63c96f981d32bd0f3a8771424ed7ffa84

View File

@@ -1,10 +1,6 @@
<template>
<d2-container :filename="filename">
<d2-page-cover
title="内置组件"
sub-title="D2Admin 为你提供了一些上手即用的组件">
<img src="./image/icon.png">
</d2-page-cover>
<d2-container :filename="filename" type="card">
<d2-module-index :banner="banner"/>
</d2-container>
</template>
@@ -12,7 +8,11 @@
export default {
data () {
return {
filename: __filename
filename: __filename,
banner: {
title: 'COMPONENTS',
subTitle: 'D2Admin 为你提供了一些上手即用的组件'
}
}
}
}

View File

@@ -1,10 +1,6 @@
<template>
<d2-container :filename="filename">
<d2-page-cover
title="D2 CRUD"
sub-title="表格封装">
<img src="./image/icon.png">
</d2-page-cover>
<d2-container :filename="filename" type="card">
<d2-module-index :banner="banner"/>
</d2-container>
</template>
@@ -12,7 +8,12 @@
export default {
data () {
return {
filename: __filename
filename: __filename,
banner: {
title: 'D2 CRUD',
subTitle: 'D2 Crud 是一个基于 Vue.js 和 Element UI 的表格组件,封装了常用的表格操作。',
link: 'https://github.com/d2-projects/d2-crud'
}
}
}
}

View File

@@ -1 +0,0 @@
96116cf6cd5a5755048348977ceaffcc3ab7b0c9

View File

@@ -1,10 +1,6 @@
<template>
<d2-container :filename="filename">
<d2-page-cover
title="基础组件库"
sub-title="D2Admin 集成由饿了么出品的 ElementUI">
<img src="./image/icon.png">
</d2-page-cover>
<d2-container :filename="filename" type="card">
<d2-module-index :banner="banner"/>
</d2-container>
</template>
@@ -12,7 +8,12 @@
export default {
data () {
return {
filename: __filename
filename: __filename,
banner: {
title: 'ElementUI',
subTitle: 'D2Admin 集成由饿了么出品的 ElementUI',
link: 'http://element.eleme.io'
}
}
}
}

View File

@@ -0,0 +1,19 @@
<template>
<d2-container :filename="filename" type="card">
<d2-module-index :banner="banner"/>
</d2-container>
</template>
<script>
export default {
data () {
return {
filename: __filename,
banner: {
title: 'FRAME',
subTitle: '在 D2Admin 中嵌入其它页面'
}
}
}
}
</script>

View File

@@ -1 +0,0 @@
e995956a468c8bb1151a6ea5cb321dbc0ea0f0b9

View File

@@ -1,10 +1,6 @@
<template>
<d2-container :filename="filename">
<d2-page-cover
title="试验台"
sub-title="在这里可以测试一些 D2Admin 的系统功能">
<img src="./image/icon.png">
</d2-page-cover>
<d2-container :filename="filename" type="card">
<d2-module-index :banner="banner"/>
</d2-container>
</template>
@@ -12,7 +8,11 @@
export default {
data () {
return {
filename: __filename
filename: __filename,
banner: {
title: 'PLAYGROUND',
subTitle: '在这里可以测试一些 D2Admin 的系统功能'
}
}
}
}

View File

@@ -1 +0,0 @@
3487ff9b41bdc4e556fe1dec04176c98c388272c

View File

@@ -1,10 +1,6 @@
<template>
<d2-container :filename="filename">
<d2-page-cover
title="插件演示"
sub-title="D2Admin 集成了许多实用插件">
<img src="./image/icon.png">
</d2-page-cover>
<d2-container :filename="filename" type="card">
<d2-module-index :banner="banner"/>
</d2-container>
</template>
@@ -12,7 +8,11 @@
export default {
data () {
return {
filename: __filename
filename: __filename,
banner: {
title: 'PLUGIN',
subTitle: 'D2Admin 集成了许多实用插件'
}
}
}
}

View File

@@ -9,6 +9,7 @@ export default {
redirect: { name: 'demo-frame-index' },
component: layoutHeaderAside,
children: (pre => [
{ path: 'index', name: `${pre}index`, component: () => import('@/pages/demo/frame/index'), meta: { ...meta, title: 'Frame 首页' } },
{ path: 'html', name: `${pre}html`, component: () => import('@/pages/demo/frame/html'), meta: { ...meta, title: '静态 HTML' } },
{ path: 'd2-doc', name: `${pre}d2-doc`, component: () => import('@/pages/demo/frame/d2-doc'), meta: { ...meta, title: 'D2Admin 中文文档' } }
])('demo-frame-')

View File

@@ -21,13 +21,13 @@ function pathInit ({
const uuid = util.cookies.get('uuid') || 'ghost-uuid'
const currentPath = `${dbName}.${user ? `user.${uuid}` : 'public'}${path ? `.${path}` : ''}`
const value = db.get(currentPath).value()
console.group('pathInit')
console.log('dbName', dbName)
console.log('path', path)
console.log('user', user)
console.log('defaultValue', defaultValue)
console.log('value', value)
console.groupEnd()
// console.group('pathInit')
// console.log('dbName', dbName)
// console.log('path', path)
// console.log('user', user)
// console.log('defaultValue', defaultValue)
// console.log('value', value)
// console.groupEnd()
if (!(value !== undefined && validator(value))) {
db
.set(currentPath, defaultValue)