opencomponents web 集成

前边有简单运行了私服以下是web 集成说明

私服环境准备

参考https://www.cnblogs.com/rongfengliang/p/15417982.html

demo 组件

参考https://opencomponents.github.io/ 创建简单的

web 集成

  • index.html
<html>
  <body>
    <oc-component href="http://localhost:3000/my-first-component">
      Optionally, some failover text here
    </oc-component>
    <script src="http://localhost:3000/oc-client/client.js"></script>
  </body>
</html>
  • 效果

live-server 运行

 

 

说明

opencomponents的使用还是比较简单的,后期会有内部细节说明

参考资料

https://github.com/opencomponents/oc/wiki/Getting-started

posted on 2021-10-17 20:33  荣锋亮  阅读(81)  评论(0编辑  收藏  举报

导航