提交 c0e1998f 编写于 作者: D DCloud_LXH

feat: SiderBarBottom

上级 925e6f2c
...@@ -112,12 +112,12 @@ export const navbar = [ ...@@ -112,12 +112,12 @@ export const navbar = [
}, },
] ]
}, },
{ /* {
link: "https://github.com/dcloudio/uni-app", link: "https://github.com/dcloudio/uni-app",
target: "_blank", target: "_blank",
text: "GitHub", text: "GitHub",
type: "link" type: "link"
} } */
] ]
}, },
{ {
......
<template>
<div class="contact-box">
<template v-if="currentConfig.contactItems && currentConfig.contactItems.length">
<template v-for="item in currentConfig.contactItems">
<a :key="item.name" :href="item.url" target="_blank" class="contact-item">
<img :src="item.imageUrl" width="20" height="20" />
<div class="contact-smg">
<div>{{ item.name }}</div>
</div>
</a>
</template>
</template>
<div class="contact-item" v-if="currentConfig.codeHosting && currentConfig.codeHosting.length">
<img
src="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/74cda950-4f2d-11eb-a16f-5b3e54966275.png"
width="20"
height="20"
/>
<div class="contact-smg">
<div>
代码仓库:
<template v-for="(item, index) in currentConfig.codeHosting">
<a :key="item.url" :href="item.url" target="_blank">{{ item.name }}</a>
{{ currentConfig.codeHosting.length - index > 1 ? '' : '' }}
</template>
</div>
</div>
</div>
<div class="contact-item" v-if="currentQQGroup.length">
<img
src="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/759713d0-4f2d-11eb-a16f-5b3e54966275.png"
width="20"
height="20"
/>
<div class="contact-smg">
<div>官方QQ交流群</div>
<template v-for="(item, index) in currentQQGroup">
<div v-if="!item.state" :key="item.number">
{{ currentQQGroup.length - index }}{{ item.number }} &nbsp;
<a
target="_blank"
style="text-decoration: underline"
href="https://qm.qq.com/cgi-bin/qm/qr?k=r70TY1MkPklo86bS7CbXRG7PF97RiY6R&jump_from=webapi"
>
点此加入
</a>
</div>
<div v-else :key="item.number">
{{ currentQQGroup.length - index }}{{ item.number }}{{
item.attendance || 2000
}}人已满)
</div>
</template>
</div>
</div>
<div class="contact-item">
<img
src="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/77df7d30-4f2d-11eb-bd01-97bc1429a9ff.png"
width="20"
height="20"
/>
<div class="contact-smg">
<div>关注微信公众号</div>
<img
src="https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/78a8e7b0-4f2d-11eb-8ff1-d5dcf8779628.jpg"
width="90"
height="90"
/>
</div>
</div>
</div>
</template>
<script>
import navInject from '../mixin/navInject';
import siderbarConfig from '../config/siderbar';
export default {
mixins: [navInject],
data: () => ({
siderbarConfig,
}),
computed: {
currentConfig() {
return this.siderbarConfig[this.customNavBarKeys[this.navConfig.userNavIndex]];
},
currentQQGroup() {
return [...(this.currentConfig.qq_group || [])].reverse();
},
},
};
</script>
<style>
.contact-box {
border-top: 1px solid #eee;
margin-top: 20px;
margin-bottom: 20px;
padding: 0 10px;
}
.contact-box a {
color: #42b983;
}
.contact-item {
padding-top: 30px;
padding-left: 0;
display: flex;
flex-direction: row;
}
a.contact-item {
display: flex;
padding: 0;
margin-top: 20px;
padding-left: 0;
text-decoration: none;
}
.contact-item > img {
margin: 3px 10px 0 10px;
}
.contact-smg {
display: flex;
flex-direction: column;
}
.contact-smg div {
font-size: 15px;
color: #000000;
line-height: 24px;
}
</style>
import uniapp from './uni-app';
import uniCloud from './uniCloud';
export default {
"uni-app": uniapp,
uniCloud
}
export default {
contactItems: [
{
name: 'uniCloud Web控制台',
url: 'https://unicloud.dcloud.net.cn',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7962e8e0-4f2d-11eb-a16f-5b3e54966275.jpg'
},
{
name: '论坛',
url: 'https://ask.dcloud.net.cn/explore/',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/73fc4f90-4f2d-11eb-a16f-5b3e54966275.png'
},
{
name: 'uniAD',
url: 'https://uniad.dcloud.net.cn',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/765d9820-4f2d-11eb-bd01-97bc1429a9ff.png'
},
{
name: 'uni统计',
url: 'https://tongji.dcloud.net.cn/',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/77159d80-4f2d-11eb-a16f-5b3e54966275.png'
}
],
codeHosting: [
{
name: '码云',
url: 'https://gitee.com/dcloud/uni-app'
},
{
name: 'GitHub',
url: 'http://github.com/dcloudio/uni-app'
}
],
qq_group: [
{
"number": "531031261",
"state": 1
},
{
"number": "901474938",
"state": 1
},
{
"number": "773794803",
"state": 1
},
{
"number": "942702595",
"state": 1
},
{
"number": "731951419",
"state": 1
},
{
"number": "697264024",
"state": 1
},
{
"number": "942061423",
"state": 1
},
{
"number": "695442854",
"state": 1
},
{
"number": "775128777",
"state": 1
},
{
"number": "959059626",
"state": 1
},
{
"number": "296811328",
"state": 1
},
{
"number": "884860657",
"state": 1
},
{
"number": "699478442",
"state": 1
},
{
"number": "465953250",
"state": 1
},
{
"number": "516984120",
"state": 1
},
{
"number": "719211033",
"state": 1
},
{
"number": "951348804",
"state": 1
},
{
"number": "698592271",
"state": 1
},
{
"number": "165657124",
"state": 1
},
{
"number": "165796402",
"state": 1
},
{
"number": "717019120",
"state": 1
},
{
"number": "687186952",
"state": 1
},
{
"number": "599958679",
"state": 1
},
{
"number": "672494800",
"state": 1
},
{
"number": "165297000",
"state": 1
},
{
"number": "811363410",
"state": 1
},
{
"number": "166188776",
"state": 1
},
{
"number": "202965481",
"state": 1
},
{
"number": "371046920",
"state": 1
},
{
"number": "567471669",
"state": 1
},
{
"number": "166188631",
"state": 1
},
{
"number": "498071674",
"state": 1
},
{
"number": "530305531",
"state": 1
},
{
"number": "713420817",
"state": 1
},
{
"number": "147867597",
"state": 0
}
]
}
\ No newline at end of file
export default {
contactItems: [
{
name: 'uniCloud Web控制台',
url: 'https://unicloud.dcloud.net.cn',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7962e8e0-4f2d-11eb-a16f-5b3e54966275.jpg'
},
{
name: '论坛',
url: 'https://ask.dcloud.net.cn/explore/',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/73fc4f90-4f2d-11eb-a16f-5b3e54966275.png'
},
{
name: 'uniAD',
url: 'https://uniad.dcloud.net.cn',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/765d9820-4f2d-11eb-bd01-97bc1429a9ff.png'
},
{
name: 'uni统计',
url: 'https://tongji.dcloud.net.cn/',
imageUrl: 'https://bjetxgzv.cdn.bspapp.com/VKCEYUGU-uni-app-doc/77159d80-4f2d-11eb-a16f-5b3e54966275.png'
}
],
qq_group: [
{
"number": "1012245137",
"state": 1
},
{
"number": "749911289",
"state": 1,
attendance: 1000
},
{
"number": "599819864",
"state": 0
},
]
}
\ No newline at end of file
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
</template> </template>
<template #bottom> <template #bottom>
<slot name="sidebar-bottom" /> <slot name="sidebar-bottom" />
<SiderBarBottom />
</template> </template>
</Sidebar> </Sidebar>
...@@ -50,6 +51,7 @@ import Navbar from '@theme/components/Navbar.vue' ...@@ -50,6 +51,7 @@ import Navbar from '@theme/components/Navbar.vue'
import Page from '@theme/components/Page.vue' import Page from '@theme/components/Page.vue'
import Sidebar from '@theme/components/Sidebar.vue' import Sidebar from '@theme/components/Sidebar.vue'
import Footer from '@theme/components/Footer.vue'; import Footer from '@theme/components/Footer.vue';
import SiderBarBottom from '../components/SiderBarBottom.vue';
import { resolveSidebarItems, forbidScroll } from '../util' import { resolveSidebarItems, forbidScroll } from '../util'
import navProvider from '../mixin/navProvider'; import navProvider from '../mixin/navProvider';
...@@ -61,7 +63,8 @@ export default { ...@@ -61,7 +63,8 @@ export default {
Page, Page,
Sidebar, Sidebar,
Navbar, Navbar,
Footer Footer,
SiderBarBottom
}, },
data () { data () {
return { return {
......
export default { export default {
inject: ['navConfig', 'customNavBar', 'changeUserNav'], inject: ['navConfig', 'customNavBar', 'changeUserNav', 'customNavBarKeys'],
computed: { computed: {
showSubNavBar() { showSubNavBar() {
......
...@@ -9,7 +9,8 @@ export default { ...@@ -9,7 +9,8 @@ export default {
return { return {
navConfig: this.navConfig, navConfig: this.navConfig,
customNavBar: this.customNavBar, customNavBar: this.customNavBar,
changeUserNav: this.changeUserNav changeUserNav: this.changeUserNav,
customNavBarKeys: this.customNavBarKeys
} }
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册