@hyjiacan/xmind-viewer

2.0.2 • Public • Published

XMind Viewer

一个用于浏览器的简单的 XMind 预览组件。

依赖

  • jszip
  • @antv/g6 可选

安装

npm install @hyjiacan/xmind-viewer --save
# 或者
yarn add @hyjiacan/xmind-viewer

用法

模块引用

<style>
#app {
  width: 100vw;
  height: 100vh;
}
</style>
<div id="app"></div>
import XMindViewer from '@hyjiacan/xmind-viewer'

const container = document.getElementById('app')

async function doRender() {
  const response = await fetch("/readme.xmind");
  const buffer = await response.arrayBuffer();
  // 直接使用 viewer 渲染界面
  const grapg = await XMindViewer.viewer.render(container)
}

doRender()

完整使用,参考文件 main.js

待办

  • [ ] 备注的展示
  • [ ] 标签的展示
  • [ ] XML版本的样式处理

Package Sidebar

Install

npm i @hyjiacan/xmind-viewer

Weekly Downloads

3

Version

2.0.2

License

MIT

Unpacked Size

16.8 kB

Total Files

6

Last publish

Collaborators

  • hyjiacan