Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hengshanmwc/ab-jq
jq+模板语法
https://github.com/hengshanmwc/ab-jq
Last synced: about 1 month ago
JSON representation
jq+模板语法
- Host: GitHub
- URL: https://github.com/hengshanmwc/ab-jq
- Owner: hengshanMWC
- Created: 2020-07-26T05:21:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-21T05:12:41.000Z (over 2 years ago)
- Last Synced: 2024-11-05T07:23:37.093Z (about 2 months ago)
- Language: TypeScript
- Size: 218 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 项目介绍
闲来无事写一个Emmet版的JQ巩固下dom知识![演示gif](https://user-gold-cdn.xitu.io/2020/7/30/1739d7d53c47854c?w=600&h=338&f=gif&s=112119)
- 基于document.querySelectorAll封装的JQ
- 类Emmet语法创建dom
- ts支持以下操作符
- #:id
- .: class
- +:兄弟
- **>**:子
- []:属性用,划分属性,属性=值,用;划分属性的值
- {}:文本```
npm i -S qelements
```
[文档](https://hengshanmwc.github.io/ab-jq/docs/index/index.html)[dome](https://hengshanmwc.github.io/ab-jq/test/index/index.html)
# 特性
残缺版Emmet,支持以下操作符
```htmltext
```
```
// jq
jQuery('div').append('')对比
// ab-jq
$('div').append('div>p{对比}[style=color: red]')
```