diff --git a/plugins/babel-plugin-canyon/package.json b/plugins/babel-plugin-canyon/package.json index 9dc51088..3e82c5fc 100644 --- a/plugins/babel-plugin-canyon/package.json +++ b/plugins/babel-plugin-canyon/package.json @@ -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 ", "license": "MIT", diff --git a/plugins/babel-plugin-canyon/templates/inject-in-page-popup.js b/plugins/babel-plugin-canyon/templates/inject-in-page-popup.js index a4b2b17d..35efd83f 100644 --- a/plugins/babel-plugin-canyon/templates/inject-in-page-popup.js +++ b/plugins/babel-plugin-canyon/templates/inject-in-page-popup.js @@ -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) diff --git a/plugins/inject-popup/test.html b/plugins/inject-popup/test.html index 23d3cafe..1e985e99 100644 --- a/plugins/inject-popup/test.html +++ b/plugins/inject-popup/test.html @@ -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; + } Document @@ -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,