Skip to content

Commit

Permalink
feat(babel-plugin-canyon): update
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Oct 24, 2024
1 parent eb91118 commit 592701f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/babel-plugin-canyon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-canyon",
"version": "1.8.80",
"version": "1.8.81",
"description": "A Babel plugin cooperates with istanbul to report the coverage",
"author": "Allen Zhang <[email protected]>",
"license": "MIT",
Expand Down
28 changes: 28 additions & 0 deletions plugins/babel-plugin-canyon/templates/inject-in-page-popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,34 @@
margin-bottom: 10px;
display:flex;
gap: 5px
}
.canyon-form-value-reportid{
color: #333;
}
/* 设置未选中样式 */
.canyon-form-value-auto {
position: relative;
width: 15px;
height: 15px;
line-height: 15px;
border: 1px solid #949494;
/* 取消默认样式 */
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
/* 设置选中样式 */
.canyon-form-value-auto:checked {
background-color: deepskyblue;
}
.canyon-form-value-auto:checked::after {
content: "✓";
position: absolute;
top: 0;
width: 15px;
height: 15px;
color: #fff;
text-align: center;
}`
document.head.appendChild(style)

Expand Down
30 changes: 29 additions & 1 deletion plugins/inject-popup/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,34 @@
display:flex;
gap: 5px
}
.canyon-form-value-reportid{
color: #333;
}
/* 设置未选中样式 */
.canyon-form-value-auto {
position: relative;
width: 15px;
height: 15px;
line-height: 15px;
border: 1px solid #949494;
/* 取消默认样式 */
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
/* 设置选中样式 */
.canyon-form-value-auto:checked {
background-color: deepskyblue;
}
.canyon-form-value-auto:checked::after {
content: "✓";
position: absolute;
top: 0;
width: 15px;
height: 15px;
color: #fff;
text-align: center;
}
</style>
<title>Document</title>
</head>
Expand Down Expand Up @@ -215,7 +243,7 @@

const uploadPromise = ()=>{
return fetch(canyon.dsn, {
method: 'POST',
method: 'post',
body: JSON.stringify({
...canyon,
reportID: document.querySelector('.canyon-form-value-reportid').value,
Expand Down

0 comments on commit 592701f

Please sign in to comment.