@geominfo/geometry-web-component-register

1.0.11 • Public • Published

React项目如何使用

  • 在public文件夹中引入register.js zone.min.js register.css /assets
  • 将assets/list下的svg拷贝到public文件夹下
  • 在index.html中添加script引入
  <link rel="stylesheet" href="%PUBLIC_URL%/register.css" />
  <script src="%PUBLIC_URL%/zone.min.js"></script>
  <script src="%PUBLIC_URL%/register.js"></script>

项目中使用

  const registerRef = useRef(null);

  const close = () => {
    // TODO 添加close事件响应  
  };

  useEffect(() => {
      registerRef.current.addEventListener('close',close);
      return () => registerRef.current.removeEventListener('close',close);
  }, []);

  <geometry-register ref={registerRef} url={'url'} name={'name'} imgPath={'path'}></geometry-register>

Readme

Keywords

Package Sidebar

Install

npm i @geominfo/geometry-web-component-register

Weekly Downloads

0

Version

1.0.11

License

MIT

Unpacked Size

1.49 MB

Total Files

35

Last publish

Collaborators

  • netwyh
  • thebeard