diff --git a/packages/canyon-data/package.json b/packages/canyon-data/package.json index 96a2bc17..052dd96d 100755 --- a/packages/canyon-data/package.json +++ b/packages/canyon-data/package.json @@ -1,6 +1,6 @@ { "name": "canyon-data", - "version": "0.1.1-alpha.9", + "version": "0.1.1-alpha.10", "type": "module", "main": "dist/canyon-data.cjs", "module": "dist/canyon-data.js", @@ -27,4 +27,4 @@ "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-source-maps": "^5.0.6" } -} \ No newline at end of file +} diff --git a/packages/canyon-data/src/summary/index.ts b/packages/canyon-data/src/summary/index.ts index 8f18e9b6..6a170a0e 100755 --- a/packages/canyon-data/src/summary/index.ts +++ b/packages/canyon-data/src/summary/index.ts @@ -60,7 +60,7 @@ export const getSummaryByPath = ( ) => { let summaryObj = JSON.parse(JSON.stringify(emptySummary)); const filterSummary = Object.keys(summary).reduce((pre: any, cur) => { - if (cur.startsWith(path+'/')||path==='') { + if (cur.startsWith(path+'/')||path===''||cur===path) { pre[cur] = summary[cur]; } return pre; @@ -88,7 +88,7 @@ export const genSummaryTreeItem = ( if (path === '') { return true; } - return item.startsWith(path+'/'); + return item.startsWith(path+'/')||item === path; } // 如果是文件 diff --git a/plugins/inject-popup/README.md b/plugins/inject-popup/README.md new file mode 100644 index 00000000..e69de29b diff --git a/plugins/inject-popup/index.js b/plugins/inject-popup/index.js new file mode 100644 index 00000000..53b32ef3 --- /dev/null +++ b/plugins/inject-popup/index.js @@ -0,0 +1,9 @@ +// 入口函数 +// 直接引入使用 +//es5 + +// 功能 +// 1. 点击页面5次弹出弹窗 +// 2. 点击关闭按钮关闭弹窗 +// 3. 弹窗内容是一个表单,展示项目信息,和覆盖率信息 +// 4. 表单提交后,发送请求,将表单数据发送到后端 diff --git a/plugins/inject-popup/package.json b/plugins/inject-popup/package.json new file mode 100644 index 00000000..0f119ccb --- /dev/null +++ b/plugins/inject-popup/package.json @@ -0,0 +1,12 @@ +{ + "name": "inject-popup", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC" +}