-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
90 lines (83 loc) · 2.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="./dist/static/variables.css">
<title>Modal</title>
<script src="./dist/button.js"></script>
</head>
<body>
<wheat-button id="open" type="line">
打开弹框
</wheat-button>
<!-- <script>
const btn = document.querySelector('wheat-button');
// 给 Shadow DOM 增加 style 标签
let styleEle = document.createElement("style");
styleEle.textContent = `
.wheat-button {
background-color: yellow;
font-size: 16px;
font-weight: bold;
}
`;
btn.shadowRoot?.appendChild(styleEle);
</script> -->
<!-- <wheat-button onclick="showModal()" id="open" type="line">
打开弹框
</wheat-button>
<wheat-modal title="弹窗" visible="false">
<div slot="content">
自定义弹框内容
</div>
<div slot="content">
自定义弹框内容2
</div>
</wheat-modal>
<wheat-input></wheat-input> -->
<!-- <wheat-radio id="testradio" value="1" name="name1"></wheat-radio>
<wheat-radio value="2" name="name1"></wheat-radio> -->
<!-- <input type="radio" name='test' disabled>
<input type="radio" name='test' checked>
<input type="radio" name='test' value="radioval">
<input type="radio" id="myradio" name='test' disabled checked value="radioval"> -->
<script src="wheat.ui.min.js"></script><script src="button.js"></script><script src="card.js"></script><script src="input.js"></script><script src="modal.js"></script><script src="radio.js"></script><script src="table.js"></script></body>
<!-- <script>
var radioval = '';
const dom = document.getElementById('testradio')
dom.setAttribute('value',456)
console.log(dom.data)
const MyModalDom = document.querySelector('wheat-modal')
MyModalDom.addEventListener('onCancel', (value) => {
const {
detail: { visiable }
} = value
console.log('触发取消方法')
MyModalDom.setAttribute('visiable', visiable)
})
MyModalDom.addEventListener('onConfirm', (value) => {
console.log('触发确定方法')
MyModalDom.setAttribute('visiable', false)
})
const showModal = (value) => {
MyModalDom.setAttribute('visiable', true)
}
document.querySelector('wheat-button').click = (value) => {
console.log(value)
MyModalDom.setAttribute('visiable', true)
}
</script> -->
<!--
1. web components 基础认识
2. 组件库相关基础知识
- 文档站点
- core code
- 单元测试
- 发布部署
- 版本管控
- 包管理
3. 任务分配
-->
</html>