# Layui Comp Exp
**Repository Path**: xbmt/layui-comp-exp
## Basic Information
- **Project Name**: Layui Comp Exp
- **Description**: 🎗️ 基 于 layui 的 Web components 拓 展 comp ,类 似 于 vue、svelte 的 组 件 。
- **Primary Language**: JavaScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 3
- **Created**: 2024-09-05
- **Last Updated**: 2024-09-05
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Layui Comp Exp
#### 介绍
🎗️ 基 于 layui 的 Web components 拓 展 comp ,类 似 于 vue、svelte 的 组 件 。
[官网](https://layui.dev/)
## 配置
```html
```
## 使用
```html
```
> comp.render渲染是一对一标签绑定,重复无效
## 组件页面模板
```html
...
...
```
comp API
| API | 描述 |
| ---- | ---- |
| let comp = layui.comp | 获得 comp 模块。 |
| comp.render(tag,href,isStyle) | 渲染模块 |
| comp.data | 已经渲染的comp数据 |
comp.render属性
| 属性名 | 描述 | 类型 | 默认值 |
| ---- | ---- | ---- | ---- |
| tag | 标签名,必须以小写字母开头,包含一个连字符 | string | 必填 |
| href | html内容文件链接 | string | 必填 |
| isStyle | 获取页面样式(会获取 link标签 标记属性 common 的内容,否则无默认样式) | bool | true |
模板默认参数
| 参数 | 描述 | 类型 |
| ---- | ---- | ---- |
| data | 标签属性数据,标签属性传参 | object |
| tagName | 当前的标签名 | string |
| doc | 模板里面的document,用于绑定元素 | object |