@uyun/react-component-markdown
everest start
Last updated 7 years ago by rongts8 .
$ cnpm install @uyun/react-component-markdown 
Private package

在 README 中执行react组件, 并在redeme中显示,执行react组件的代码

安装

unpm i

启动

everest start

使用

文档路由组件

import {DocsRouter} from '@uyun/react-component-markdown'

// 检索项目中 _docs 文件中的入口文件 index.tsx

ReactDOM.render(
  <HashRouter>
    <DocsRouter docs={require.context('./app', true, /\/_docs\/index.tsx$/)} />
  </HashRouter>,
  document.getElementById('layout-content')
)

文档路由配置

import * as React from 'react'
import {MarkDown} from '@uyun/react-component-markdown'

export default {
  key: 'monitor',
  type: 'sub',
  name: '监控展现',
  icon: 'video-camera',
  path: '/monitor',
  children: [
    {
      key: 'online',
      type: 'link',
      name: '在线监测',
      icon: 'fork',
      docsComponent: () => <MarkDown source={'_docs/README.md'} />, // 对应文档 README.md
      path: 'online'
    },
    {
      key: 'vqd',
      type: 'link',
      name: '图像监测',
      icon: 'picture',
      docsComponent: () => <MarkDown source={'_docs/README2.md'} />, // 对应文档 README.md
      path: 'vqd'
    }
  ]
}

执行效果 执行效果

Current Tags

  • 0.0.9                                ...           latest (7 years ago)

18 Versions

  • 0.0.1                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.3                                ...           7 years ago
  • 0.0.4                                ...           7 years ago
  • 0.0.5                                ...           7 years ago
  • 0.0.6                                ...           7 years ago
  • 0.0.7                                ...           7 years ago
  • 0.0.81                                ...           7 years ago
  • 0.0.82                                ...           7 years ago
  • 0.0.84                                ...           7 years ago
  • 0.0.85                                ...           7 years ago
  • 0.0.86                                ...           7 years ago
  • 0.0.87                                ...           7 years ago
  • 0.0.88                                ...           7 years ago
  • 0.0.9                                ...           7 years ago
  • 0.0.8                                ...           7 years ago
  • 0.0.83                                ...           7 years ago
  • 0.0.89                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org