master
yutent 2023-03-14 15:56:13 +08:00
parent c5dc6ccd48
commit 22c45f82a7
2 changed files with 34 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
index.html
test.js
.vscode
.httpserver
node_modules/
dist/
*.sublime-project

View File

@ -11,3 +11,36 @@
- ...
+ @bd/core 针对`web components`的核心封装库, 以数据驱动, 可以更方便的开发wc组件
### 测试预览
可以根目录放置一个http服务的配置文件`.httpserver`, 如下
```json
{
"enabled": true,
"port": 8090
}
```
然后, 创建个html文件, 如下, 即可右键打开预览了.
```html
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<style></style>
</head>
<body>
<wc-hello></wc-hello>
<script type="module" src="/test.js"></script>
</body>
</html>
```