选中历史版本后重新加载导航
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# base api
|
# base api
|
||||||
VUE_APP_BASE_API = 'http://local.zyplayer.com:8083/zyplayer-doc-manage'
|
# VUE_APP_BASE_API = 'http://local.zyplayer.com:8083/zyplayer-doc-manage'
|
||||||
# VUE_APP_BASE_API = 'http://doc.zyplayer.com/zyplayer-doc-manage'
|
VUE_APP_BASE_API = 'http://doc.zyplayer.com/zyplayer-doc-manage'
|
||||||
|
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
||||||
|
|||||||
13943
zyplayer-doc-ui/wiki-ui/package-lock.json
generated
13943
zyplayer-doc-ui/wiki-ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -190,19 +190,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import QRCode from 'qrcodejs2'
|
import QRCode from 'qrcodejs2'
|
||||||
import unitUtil from '../../common/lib/UnitUtil.js'
|
import unitUtil from '../../common/lib/UnitUtil.js'
|
||||||
import htmlUtil from '../../common/lib/HtmlUtil.js'
|
import htmlUtil from '../../common/lib/HtmlUtil.js'
|
||||||
import pageApi from '../../common/api/page'
|
import pageApi from '../../common/api/page'
|
||||||
import userApi from '../../common/api/user'
|
import userApi from '../../common/api/user'
|
||||||
import Navigation from './components/Navigation.vue'
|
import Navigation from './components/Navigation.vue'
|
||||||
import {mavonEditor, markdownIt} from 'mavon-editor'
|
import {markdownIt, mavonEditor} from 'mavon-editor'
|
||||||
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
|
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
|
||||||
import 'mavon-editor/dist/markdown/github-markdown.min.css'
|
import 'mavon-editor/dist/markdown/github-markdown.min.css'
|
||||||
import 'mavon-editor/dist/css/index.css'
|
import 'mavon-editor/dist/css/index.css'
|
||||||
import vue from "../../main";
|
import vue from "../../main";
|
||||||
|
|
||||||
var page = {
|
var page = {
|
||||||
colorArr: ["#67C23A", "#409EFF", "#E6A23C", "#F56C6C", "#909399", "#303133"],
|
colorArr: ["#67C23A", "#409EFF", "#E6A23C", "#F56C6C", "#909399", "#303133"],
|
||||||
userHeadColor: {},
|
userHeadColor: {},
|
||||||
};
|
};
|
||||||
@@ -414,7 +414,6 @@
|
|||||||
},
|
},
|
||||||
computeNavigationWidth() {
|
computeNavigationWidth() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
console.log(this.$refs.navigation)
|
|
||||||
if (this.$refs.navigation) {
|
if (this.$refs.navigation) {
|
||||||
this.$refs.navigation.computeNavigationWidth();
|
this.$refs.navigation.computeNavigationWidth();
|
||||||
}
|
}
|
||||||
@@ -454,7 +453,10 @@
|
|||||||
history.loading = 2;
|
history.loading = 2;
|
||||||
this.pageHistoryDetail = history.content;
|
this.pageHistoryDetail = history.content;
|
||||||
this.pageShowDetail = history.content;
|
this.pageShowDetail = history.content;
|
||||||
setTimeout(() => this.previewPageImage(), 500);
|
setTimeout(() => {
|
||||||
|
this.previewPageImage();
|
||||||
|
this.createNavigationHeading();
|
||||||
|
}, 500);
|
||||||
} else {
|
} else {
|
||||||
history.loading = 1;
|
history.loading = 1;
|
||||||
pageApi.pageHistoryDetail({id: history.id}).then(json => {
|
pageApi.pageHistoryDetail({id: history.id}).then(json => {
|
||||||
@@ -465,7 +467,10 @@
|
|||||||
}
|
}
|
||||||
this.pageHistoryDetail = history.content;
|
this.pageHistoryDetail = history.content;
|
||||||
this.pageShowDetail = history.content;
|
this.pageShowDetail = history.content;
|
||||||
setTimeout(() => this.previewPageImage(), 500);
|
setTimeout(() => {
|
||||||
|
this.previewPageImage();
|
||||||
|
this.createNavigationHeading();
|
||||||
|
}, 500);
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
history.loading = 3;
|
history.loading = 3;
|
||||||
});
|
});
|
||||||
@@ -504,8 +509,7 @@
|
|||||||
}
|
}
|
||||||
this.pageShowDetail = this.pageContent.content;
|
this.pageShowDetail = this.pageContent.content;
|
||||||
// 修改标题
|
// 修改标题
|
||||||
let wikiTile = wikiPage.name || 'WIKI-内容展示';
|
document.title = wikiPage.name || 'WIKI-内容展示';
|
||||||
document.title = wikiTile;
|
|
||||||
// 修改最后点击的项,保证刷新后点击编辑能展示编辑的项
|
// 修改最后点击的项,保证刷新后点击编辑能展示编辑的项
|
||||||
// if (!this.lastClickNode.id) {
|
// if (!this.lastClickNode.id) {
|
||||||
// this.lastClickNode = {id: wikiPage.id, nodePath: wikiPage.name};
|
// this.lastClickNode = {id: wikiPage.id, nodePath: wikiPage.name};
|
||||||
@@ -516,9 +520,17 @@
|
|||||||
this.$emit('changeExpandedKeys', pageId);
|
this.$emit('changeExpandedKeys', pageId);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.previewPageImage();
|
this.previewPageImage();
|
||||||
|
this.createNavigationHeading();
|
||||||
|
}, 500);
|
||||||
|
});
|
||||||
|
this.loadCommentList(pageId);
|
||||||
|
this.getPageHistory(pageId, 1);
|
||||||
|
},
|
||||||
|
createNavigationHeading() {
|
||||||
let navigationList = htmlUtil.createNavigationHeading();
|
let navigationList = htmlUtil.createNavigationHeading();
|
||||||
// 标题加到导航里面去
|
// 标题加到导航里面去
|
||||||
if (navigationList.length > 0) {
|
if (navigationList.length > 0) {
|
||||||
|
let wikiTile = this.wikiPage.name || 'WIKI-内容展示';
|
||||||
navigationList.unshift({
|
navigationList.unshift({
|
||||||
level: 1,
|
level: 1,
|
||||||
node: this.$refs.wikiTitle,
|
node: this.$refs.wikiTitle,
|
||||||
@@ -526,10 +538,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.navigationList = navigationList;
|
this.navigationList = navigationList;
|
||||||
}, 500);
|
|
||||||
});
|
|
||||||
this.loadCommentList(pageId);
|
|
||||||
this.getPageHistory(pageId, 1);
|
|
||||||
},
|
},
|
||||||
closeImagePreview() {
|
closeImagePreview() {
|
||||||
this.showImagePreview = false;
|
this.showImagePreview = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user