1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-02-10 22:05:22 +08:00

Merge pull request #58 from mmdapl/fix/xmind-build

fix: 修复xmind文件使用viewer依赖构建异常,配置自定义组件只客户端渲染
This commit is contained in:
mmdapl
2023-10-13 00:17:09 +08:00
committed by GitHub
5 changed files with 9 additions and 15 deletions

View File

@@ -1,12 +0,0 @@
<template>
<h1>HelloWorld</h1>
dq24qwer
</template>
<script>
export default {}
</script>
<style>
</style>

View File

@@ -2,6 +2,8 @@
参考链接
- https://www.npmjs.com/package/xmind-embed-viewer
- https://xmindltd.github.io/xmind-embed-viewer/
注意
- 使用ClientOnly内置组件只在客户端加载避免依赖构建出错
-->
<template>
<div class="x-mind-container">
@@ -25,9 +27,11 @@
</template>
<script>
import {XMindEmbedViewer} from "xmind-embed-viewer"
import mapData from "../public/mark-map/index.json"
import {XMindEmbedViewer} from "xmind-embed-viewer";
console.log(111, XMindEmbedViewer)
export default {

View File

@@ -2,7 +2,6 @@ import {searchProPlugin} from "vuepress-plugin-search-pro";
import {path} from "@vuepress/utils";
import {registerComponentsPlugin} from "@vuepress/plugin-register-components";
console.log(path.resolve(__dirname, './components/HelloWorld.vue'))
/**
* 插件配置
*/

View File

@@ -8,6 +8,8 @@
- <a href="../../mark-map/cn-map.html" target="_blank">计算机网络</a>
<ClientOnly>
<XMindManager></XMindManager>
</ClientOnly>

View File

@@ -37,8 +37,9 @@ exports.execShell = async commands => {
const execResult = await exec(command)
console.log(`\n<<<command(${count})--ending === `)
// 指令异常,不执行后续指令
// 指令异常,不执行后续指令非0退出
if (execResult.code !== 0) {
exit(1)
break;
}
}