npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xunyidi-cloud-document

v2.6.18

Published

此组件使用的是 [rollup.js](https://rollupjs.com/) 模块打包器打包为一个独立的组件,

Downloads

107

Readme

xunyidi-cloud-document

此组件使用的是 rollup.js 模块打包器打包为一个独立的组件,

此组件是查看文档的react组件,为解决多个项目都需要用到用一个功能模块问题,独立出的一个模块,可以在不同的项目中使用, 如需引用此组件需引入下方依赖资源,此外还需要在你的 项目根目录里添加文档预览文件

以客户端举例

{
  "antd": "^4.23.2",
  "axios": "^0.27.2",
  "jquery": "^3.6.1",
  "react": "^18.2.0",
  "react-color": "^2.19.3",
  "react-router-dom": "5.2.0"
}

react版本必须在17.0.2或17.0.2以上 当前我使用的是react18.2.0

引入

 npm i xunyidi-cloud-document

使用

    import {RoutePage} from "xunyidi-cloud-document";
    import "xunyidi-cloud-document/lib/bundle.css"

    const address=`${http}://${hostIp}:${port}`
    
    const headers={
        headers:{
            'Content-Type': 'application/json',
            "Authorization":token
        }
    }
    
    <Content className={"cloud-document-container"}>
        <RoutePage
            requestUrl={address}
            headers={headers}
            parentPath={"/app"}
        />
    </Content>

说明:

requestUrl

当前组件是请求公司内部接口
requestUrl为:组件内部网络请求地址: 例如:http://192.168.0.41:30082

parentPath

当前组件是路由形式切换页面,所以使用组件需传入你当前环境的跳转路径,比如你需要在名为 "/app" 路径页面环境下使用组件, 则parentPath必须为 "/app" ,否则组件将无法正常显示,组件内部是如下使用parentPath

    //传入parentPath的值为:"/app"
    //组件内部path为:"/app/***"
    <Route path={`/app/***`} component={Component} />
    <Route path={`/app/***`} component={Component} />
    //...

headers:

为组件内容网络请求请求头:

    const headers={
        headers:{
            'Content-Type': 'application/json',
            "Authorization":window.util.getState("userMsg").token
        }
    }

##内容

暂无资源