2021-01-06 22:30:04 +08:00
|
|
|
<template>
|
2021-05-14 23:45:12 +08:00
|
|
|
<div class="share-mobile-layout">
|
|
|
|
|
<van-popup v-model="popupShow" closeable position="left" class="popup-module" :style="{ height: '100%', width: '80%' }">
|
|
|
|
|
<div class="header">
|
|
|
|
|
<van-nav-bar :title="nowSpaceShow.name"></van-nav-bar>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="main">
|
|
|
|
|
<page-tree :page-list="wikiPageList" @pageChange="pageSelectChange"></page-tree>
|
|
|
|
|
<div class="build-info">本文档使用<a target="_blank" href="https://gitee.com/zyplayer/zyplayer-doc">zyplayer-doc</a>构建</div>
|
|
|
|
|
</div>
|
2021-05-13 22:59:04 +08:00
|
|
|
</van-popup>
|
2021-05-13 22:02:10 +08:00
|
|
|
<router-view @popupShow="popupShowChange"></router-view>
|
2021-01-06 22:30:04 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-05-13 22:02:10 +08:00
|
|
|
import Vue from 'vue';
|
2021-01-06 22:30:04 +08:00
|
|
|
import pageApi from '../../common/api/page'
|
2021-05-14 23:45:12 +08:00
|
|
|
import PageTree from './PageTree'
|
2021-05-13 22:59:04 +08:00
|
|
|
import Vant from 'vant';
|
2022-04-12 19:28:33 +08:00
|
|
|
import 'vant/lib/icon/index.css';
|
|
|
|
|
import 'vant/lib/popup/index.css';
|
|
|
|
|
import 'vant/lib/cell/index.css';
|
|
|
|
|
import 'vant/lib/nav-bar/index.css';
|
|
|
|
|
import 'vant/lib/collapse-item/index.css';
|
2021-05-13 22:59:04 +08:00
|
|
|
Vue.use(Vant);
|
2021-01-06 22:30:04 +08:00
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
defaultProps: {
|
|
|
|
|
children: 'children',
|
|
|
|
|
label: 'name'
|
|
|
|
|
},
|
|
|
|
|
// 空间搜索相关
|
|
|
|
|
spaceUuid: '',
|
|
|
|
|
nowPageId: '',
|
|
|
|
|
nowSpaceShow: {},
|
|
|
|
|
// 搜索的输入内容
|
|
|
|
|
searchKeywords: "",
|
|
|
|
|
// 页面展示相关
|
|
|
|
|
wikiPageList:[],
|
|
|
|
|
wikiPageExpandedKeys: [],
|
2021-05-14 23:45:12 +08:00
|
|
|
popupShow: false,
|
2021-05-13 22:59:04 +08:00
|
|
|
pageSelect: [],
|
2021-01-06 22:30:04 +08:00
|
|
|
}
|
|
|
|
|
},
|
2021-05-13 22:02:10 +08:00
|
|
|
components: {
|
2021-05-14 23:45:12 +08:00
|
|
|
PageTree: PageTree
|
2021-05-13 22:02:10 +08:00
|
|
|
},
|
2021-01-06 22:30:04 +08:00
|
|
|
mounted: function () {
|
|
|
|
|
this.spaceUuid = this.$route.query.space || '';
|
|
|
|
|
this.getSpaceInfo();
|
|
|
|
|
this.doGetPageList(null);
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
filterPageNode(value, data) {
|
|
|
|
|
if (!value) return true;
|
|
|
|
|
return data.name.indexOf(value) !== -1;
|
|
|
|
|
},
|
2021-05-13 22:59:04 +08:00
|
|
|
pageSelectChange(value) {
|
|
|
|
|
console.log("页面修改:" + value);
|
2021-05-14 23:45:12 +08:00
|
|
|
this.popupShow = false;
|
|
|
|
|
this.$router.replace({path: '/page/share/mobile/view', query: {pageId: value, space: this.spaceUuid}});
|
2021-05-13 22:59:04 +08:00
|
|
|
},
|
2021-05-13 22:02:10 +08:00
|
|
|
popupShowChange(value) {
|
|
|
|
|
this.popupShow = value;
|
2021-05-13 22:59:04 +08:00
|
|
|
console.log(this.pageSelect)
|
2021-05-13 22:02:10 +08:00
|
|
|
},
|
2021-01-06 22:30:04 +08:00
|
|
|
doGetPageList() {
|
|
|
|
|
pageApi.openPageList({space: this.spaceUuid}).then(json => {
|
|
|
|
|
this.wikiPageList = json.data || [];
|
|
|
|
|
this.nowPageId = '';
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getSpaceInfo() {
|
|
|
|
|
pageApi.openSpaceInfo({space: this.spaceUuid}).then(json => {
|
|
|
|
|
this.nowSpaceShow = json.data;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
html,body,#app {margin: 0; padding: 0; height: 100%;}
|
2021-05-14 23:45:12 +08:00
|
|
|
|
|
|
|
|
.share-mobile-layout{height: 100%;}
|
|
|
|
|
.popup-module .header{width:100%;height:46px;}
|
|
|
|
|
.popup-module .main{position:absolute;top:46px;bottom: 0;right:0;left:0;overflow:auto;}
|
|
|
|
|
.popup-module .footer{width:100%;height:26px;position:fixed;bottom:0}
|
|
|
|
|
|
2021-01-06 22:30:04 +08:00
|
|
|
pre{margin: 0;white-space: pre-wrap;font-size: 14px; font-family: auto;}
|
|
|
|
|
.el-menu {box-sizing: border-box;border-right: 0;margin-right: 3px;}
|
|
|
|
|
.el-header {background-color: #409EFF; color: #333; line-height: 40px; text-align: right;height: 40px !important;}
|
|
|
|
|
.doc-body-box{
|
|
|
|
|
overflow-x: hidden;overflow-y: auto;width: 100%;
|
|
|
|
|
padding: 10px;border-left: 1px solid #f1f1f1; box-sizing: border-box;
|
|
|
|
|
}
|
|
|
|
|
.el-tree{margin-right: 3px;}
|
|
|
|
|
.logo{
|
|
|
|
|
/*background: #409EFF; cursor: pointer;*/
|
|
|
|
|
border-bottom: 1px solid #f1f1f1;
|
|
|
|
|
overflow: hidden;white-space: nowrap;text-overflow: ellipsis; padding: 5px 10px;
|
|
|
|
|
width: 260px; height:40px;line-height:40px;font-size: 25px;color: #666;text-align: center;
|
|
|
|
|
}
|
|
|
|
|
.icon-collapse{float: left;font-size: 25px;color: #aaa;cursor: pointer;position: fixed;}
|
|
|
|
|
.icon-collapse:hover{color: #ccc;}
|
|
|
|
|
/*评论*/
|
|
|
|
|
.comment-box .head{
|
|
|
|
|
float: left;background-color: #ccc;border-radius: 50%;margin-right: 10px;
|
|
|
|
|
width: 45px; height: 45px; line-height: 45px;text-align: center;color: #fff;
|
|
|
|
|
}
|
|
|
|
|
.build-info{
|
2021-05-14 23:45:12 +08:00
|
|
|
text-align: center; padding: 5px 0;color: #aaa;font-size: 12px; margin: 10px 0;
|
2021-01-06 22:30:04 +08:00
|
|
|
}
|
|
|
|
|
.build-info a{color: #4183c4;cursor: pointer;text-decoration:none;}
|
|
|
|
|
</style>
|
|
|
|
|
|