# Web Components **Repository Path**: calldream/web-components ## Basic Information - **Project Name**: Web Components - **Description**: 使用Web Components 做的一个小例子 - **Primary Language**: JavaScript - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-06 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Web Components #### 介绍 在这是使用Web Components 做的一个小例子。 Web Components 是浏览器原生的组件,可以让用户实现类似Vue,React,Angular等的组件化开发的功能。 目前的兼容性比较差。 因为现在无论是Vue 还是 React,都在努力搭建全平台的实现,比如React-native,使用Vue开发的uni-app等。 这个api 的出现,个人觉得他们未来不一定会跟进,而是重新写一个更简单的类库完成双向数据绑定等常用功能的实现。因为他们的战场已经不是简单的web端了。 当然,如果未来Android、iOS、小程序等也跟进这个功能的话,那就另说了。 #### 软件架构 此demo核心是 /js/index.js文件,用户通过操作挂在dom上边的componentData属性,来实现对updata定义的属性进行更新,勉强算一个单向数据绑定的插件吧。 #### 安装教程 没有依赖项,直接打开即可 #### 使用说明 可以参考index.html 和 /comp 中的使用,来阅读 index.js