diff --git a/coverage/base.css b/coverage/base.css new file mode 100644 index 0000000000000000000000000000000000000000..f418035b469aff23689a74c912849662f442aed4 --- /dev/null +++ b/coverage/base.css @@ -0,0 +1,224 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* yellow */ +.cbranch-no { background: yellow !important; color: #111; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +.highlighted, +.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ + background: #C21F39 !important; +} +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +.medium .chart { border:1px solid #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } + +.coverage-summary td.empty { + opacity: .5; + padding-top: 4px; + padding-bottom: 4px; + line-height: 1; + color: #888; +} + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/coverage/block-navigation.js b/coverage/block-navigation.js new file mode 100644 index 0000000000000000000000000000000000000000..c7ff5a5cac80f4e9509e7afceb84004b3a44e6c8 --- /dev/null +++ b/coverage/block-navigation.js @@ -0,0 +1,79 @@ +/* eslint-disable */ +var jumpToCode = (function init() { + // Classes of code we would like to highlight in the file view + var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; + + // Elements to highlight in the file listing view + var fileListingElements = ['td.pct.low']; + + // We don't want to select elements that are direct descendants of another match + var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` + + // Selecter that finds elements on the page to which we can jump + var selector = + fileListingElements.join(', ') + + ', ' + + notSelector + + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` + + // The NodeList of matching elements + var missingCoverageElements = document.querySelectorAll(selector); + + var currentIndex; + + function toggleClass(index) { + missingCoverageElements + .item(currentIndex) + .classList.remove('highlighted'); + missingCoverageElements.item(index).classList.add('highlighted'); + } + + function makeCurrent(index) { + toggleClass(index); + currentIndex = index; + missingCoverageElements.item(index).scrollIntoView({ + behavior: 'smooth', + block: 'center', + inline: 'center' + }); + } + + function goToPrevious() { + var nextIndex = 0; + if (typeof currentIndex !== 'number' || currentIndex === 0) { + nextIndex = missingCoverageElements.length - 1; + } else if (missingCoverageElements.length > 1) { + nextIndex = currentIndex - 1; + } + + makeCurrent(nextIndex); + } + + function goToNext() { + var nextIndex = 0; + + if ( + typeof currentIndex === 'number' && + currentIndex < missingCoverageElements.length - 1 + ) { + nextIndex = currentIndex + 1; + } + + makeCurrent(nextIndex); + } + + return function jump(event) { + switch (event.which) { + case 78: // n + case 74: // j + goToNext(); + break; + case 66: // b + case 75: // k + case 80: // p + goToPrevious(); + break; + } + }; +})(); +window.addEventListener('keydown', jumpToCode); diff --git a/coverage/clover.xml b/coverage/clover.xml new file mode 100644 index 0000000000000000000000000000000000000000..feabaf4a4566f29c4e6b3381ce89234bf15936d0 --- /dev/null +++ b/coverage/clover.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json new file mode 100644 index 0000000000000000000000000000000000000000..26762a1a999acfc817a91db34fa45b6d45eee7ed --- /dev/null +++ b/coverage/coverage-final.json @@ -0,0 +1,8 @@ +{"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\index.js": {"path":"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\index.js","statementMap":{"0":{"start":{"line":5,"column":19},"end":{"line":8,"column":1}},"1":{"start":{"line":10,"column":17},"end":{"line":10,"column":19}},"2":{"start":{"line":14,"column":18},"end":{"line":14,"column":60}},"3":{"start":{"line":16,"column":4},"end":{"line":16,"column":82}},"4":{"start":{"line":28,"column":0},"end":{"line":28,"column":8}},"5":{"start":{"line":30,"column":0},"end":{"line":32,"column":1}},"6":{"start":{"line":31,"column":4},"end":{"line":31,"column":12}},"7":{"start":{"line":35,"column":16},"end":{"line":40,"column":1}},"8":{"start":{"line":36,"column":4},"end":{"line":38,"column":5}},"9":{"start":{"line":37,"column":8},"end":{"line":37,"column":14}},"10":{"start":{"line":39,"column":4},"end":{"line":39,"column":73}},"11":{"start":{"line":39,"column":32},"end":{"line":39,"column":72}},"12":{"start":{"line":43,"column":0},"end":{"line":45,"column":1}},"13":{"start":{"line":44,"column":4},"end":{"line":44,"column":23}}},"fnMap":{"0":{"name":"setRem","decl":{"start":{"line":12,"column":9},"end":{"line":12,"column":15}},"loc":{"start":{"line":12,"column":18},"end":{"line":26,"column":1}},"line":12},"1":{"name":"(anonymous_1)","decl":{"start":{"line":30,"column":18},"end":{"line":30,"column":19}},"loc":{"start":{"line":30,"column":29},"end":{"line":32,"column":1}},"line":30},"2":{"name":"(anonymous_2)","decl":{"start":{"line":35,"column":16},"end":{"line":35,"column":17}},"loc":{"start":{"line":35,"column":25},"end":{"line":40,"column":1}},"line":35},"3":{"name":"(anonymous_3)","decl":{"start":{"line":39,"column":19},"end":{"line":39,"column":20}},"loc":{"start":{"line":39,"column":32},"end":{"line":39,"column":72}},"line":39}},"branchMap":{"0":{"loc":{"start":{"line":36,"column":4},"end":{"line":38,"column":5}},"type":"if","locations":[{"start":{"line":36,"column":4},"end":{"line":38,"column":5}},{"start":{"line":36,"column":4},"end":{"line":38,"column":5}}],"line":36},"1":{"loc":{"start":{"line":43,"column":0},"end":{"line":45,"column":1}},"type":"if","locations":[{"start":{"line":43,"column":0},"end":{"line":45,"column":1}},{"start":{"line":43,"column":0},"end":{"line":45,"column":1}}],"line":43},"2":{"loc":{"start":{"line":43,"column":4},"end":{"line":43,"column":47}},"type":"binary-expr","locations":[{"start":{"line":43,"column":4},"end":{"line":43,"column":33}},{"start":{"line":43,"column":37},"end":{"line":43,"column":47}}],"line":43}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0},"f":{"0":0,"1":0,"2":0,"3":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0]},"hash":"8dc7ee840848cab70c3893b95c8a1313ad49306f"} +,"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\mixins\\index.js": {"path":"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\mixins\\index.js","statementMap":{},"fnMap":{},"branchMap":{},"s":{},"f":{},"b":{},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"a477d833222b67fa418bb02312cd8640b7dcae05"} +,"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\mixins\\style-apply.mixin.js": {"path":"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\mixins\\style-apply.mixin.js","statementMap":{"0":{"start":{"line":2,"column":26},"end":{"line":2,"column":37}},"1":{"start":{"line":3,"column":26},"end":{"line":3,"column":85}},"2":{"start":{"line":4,"column":2},"end":{"line":9,"column":5}},"3":{"start":{"line":10,"column":2},"end":{"line":15,"column":4}},"4":{"start":{"line":19,"column":2},"end":{"line":19,"column":72}},"5":{"start":{"line":23,"column":2},"end":{"line":23,"column":35}},"6":{"start":{"line":27,"column":16},"end":{"line":27,"column":18}},"7":{"start":{"line":28,"column":2},"end":{"line":47,"column":5}},"8":{"start":{"line":29,"column":18},"end":{"line":29,"column":21}},"9":{"start":{"line":30,"column":20},"end":{"line":30,"column":32}},"10":{"start":{"line":31,"column":4},"end":{"line":31,"column":47}},"11":{"start":{"line":32,"column":4},"end":{"line":34,"column":5}},"12":{"start":{"line":33,"column":6},"end":{"line":33,"column":49}},"13":{"start":{"line":35,"column":4},"end":{"line":45,"column":5}},"14":{"start":{"line":36,"column":6},"end":{"line":42,"column":7}},"15":{"start":{"line":37,"column":8},"end":{"line":37,"column":26}},"16":{"start":{"line":38,"column":8},"end":{"line":38,"column":47}},"17":{"start":{"line":39,"column":13},"end":{"line":42,"column":7}},"18":{"start":{"line":40,"column":8},"end":{"line":40,"column":26}},"19":{"start":{"line":41,"column":8},"end":{"line":41,"column":45}},"20":{"start":{"line":43,"column":11},"end":{"line":45,"column":5}},"21":{"start":{"line":44,"column":6},"end":{"line":44,"column":18}},"22":{"start":{"line":46,"column":4},"end":{"line":46,"column":31}},"23":{"start":{"line":48,"column":2},"end":{"line":48,"column":25}},"24":{"start":{"line":50,"column":2},"end":{"line":50,"column":15}},"25":{"start":{"line":53,"column":2},"end":{"line":53,"column":58}}},"fnMap":{"0":{"name":"getBackgroundStyle","decl":{"start":{"line":1,"column":9},"end":{"line":1,"column":27}},"loc":{"start":{"line":1,"column":42},"end":{"line":16,"column":1}},"line":1},"1":{"name":"calcResponsivePx","decl":{"start":{"line":18,"column":9},"end":{"line":18,"column":25}},"loc":{"start":{"line":18,"column":34},"end":{"line":20,"column":1}},"line":18},"2":{"name":"calcResponsivePxNumber","decl":{"start":{"line":22,"column":9},"end":{"line":22,"column":31}},"loc":{"start":{"line":22,"column":40},"end":{"line":24,"column":1}},"line":22},"3":{"name":"getPositionStyle","decl":{"start":{"line":26,"column":9},"end":{"line":26,"column":25}},"loc":{"start":{"line":26,"column":35},"end":{"line":51,"column":1}},"line":26},"4":{"name":"(anonymous_4)","decl":{"start":{"line":28,"column":31},"end":{"line":28,"column":32}},"loc":{"start":{"line":28,"column":40},"end":{"line":47,"column":3}},"line":28},"5":{"name":"getFontSize","decl":{"start":{"line":52,"column":9},"end":{"line":52,"column":20}},"loc":{"start":{"line":52,"column":27},"end":{"line":54,"column":1}},"line":52}},"branchMap":{"0":{"loc":{"start":{"line":2,"column":26},"end":{"line":2,"column":37}},"type":"binary-expr","locations":[{"start":{"line":2,"column":26},"end":{"line":2,"column":31}},{"start":{"line":2,"column":35},"end":{"line":2,"column":37}}],"line":2},"1":{"loc":{"start":{"line":3,"column":26},"end":{"line":3,"column":85}},"type":"cond-expr","locations":[{"start":{"line":3,"column":34},"end":{"line":3,"column":80}},{"start":{"line":3,"column":83},"end":{"line":3,"column":85}}],"line":3},"2":{"loc":{"start":{"line":19,"column":9},"end":{"line":19,"column":71}},"type":"cond-expr","locations":[{"start":{"line":19,"column":25},"end":{"line":19,"column":31}},{"start":{"line":19,"column":34},"end":{"line":19,"column":71}}],"line":19},"3":{"loc":{"start":{"line":32,"column":4},"end":{"line":34,"column":5}},"type":"if","locations":[{"start":{"line":32,"column":4},"end":{"line":34,"column":5}},{"start":{"line":32,"column":4},"end":{"line":34,"column":5}}],"line":32},"4":{"loc":{"start":{"line":32,"column":8},"end":{"line":32,"column":126}},"type":"binary-expr","locations":[{"start":{"line":32,"column":8},"end":{"line":32,"column":90}},{"start":{"line":32,"column":94},"end":{"line":32,"column":126}}],"line":32},"5":{"loc":{"start":{"line":35,"column":4},"end":{"line":45,"column":5}},"type":"if","locations":[{"start":{"line":35,"column":4},"end":{"line":45,"column":5}},{"start":{"line":35,"column":4},"end":{"line":45,"column":5}}],"line":35},"6":{"loc":{"start":{"line":36,"column":6},"end":{"line":42,"column":7}},"type":"if","locations":[{"start":{"line":36,"column":6},"end":{"line":42,"column":7}},{"start":{"line":36,"column":6},"end":{"line":42,"column":7}}],"line":36},"7":{"loc":{"start":{"line":39,"column":13},"end":{"line":42,"column":7}},"type":"if","locations":[{"start":{"line":39,"column":13},"end":{"line":42,"column":7}},{"start":{"line":39,"column":13},"end":{"line":42,"column":7}}],"line":39},"8":{"loc":{"start":{"line":43,"column":11},"end":{"line":45,"column":5}},"type":"if","locations":[{"start":{"line":43,"column":11},"end":{"line":45,"column":5}},{"start":{"line":43,"column":11},"end":{"line":45,"column":5}}],"line":43},"9":{"loc":{"start":{"line":53,"column":9},"end":{"line":53,"column":57}},"type":"cond-expr","locations":[{"start":{"line":53,"column":23},"end":{"line":53,"column":32}},{"start":{"line":53,"column":35},"end":{"line":53,"column":57}}],"line":53}},"s":{"0":0,"1":0,"2":0,"3":0,"4":16,"5":16,"6":12,"7":12,"8":12,"9":12,"10":12,"11":12,"12":12,"13":12,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":12,"21":0,"22":12,"23":12,"24":12,"25":4},"f":{"0":0,"1":16,"2":16,"3":12,"4":12,"5":4},"b":{"0":[0,0],"1":[0,0],"2":[0,16],"3":[12,0],"4":[12,12],"5":[0,12],"6":[0,0],"7":[0,0],"8":[0,12],"9":[0,4]},"_coverageSchema":"43e27e138ebf9cfc5966b082cf9a028302ed4184","hash":"810244d1c1b61eb7801d7f4ca3857958cdc5d699"} +,"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\yqm-button\\index.js": {"path":"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\yqm-button\\index.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":1}},"1":{"start":{"line":4,"column":4},"end":{"line":4,"column":44}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":20},"end":{"line":3,"column":21}},"loc":{"start":{"line":3,"column":29},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":0,"1":0},"f":{"0":0},"b":{},"hash":"a63998de9c088826713035a9305fbd24ab53372c"} +,"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\yqm-button\\src\\yqm-button.vue": {"path":"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\yqm-button\\src\\yqm-button.vue","statementMap":{"0":{"start":{"line":51,"column":0},"end":{"line":51,"column":null}},"1":{"start":{"line":121,"column":0},"end":{"line":121,"column":null}},"2":{"start":{"line":126,"column":0},"end":{"line":128,"column":null}},"3":{"start":{"line":127,"column":0},"end":{"line":127,"column":null}},"4":{"start":{"line":129,"column":0},"end":{"line":129,"column":null}},"5":{"start":{"line":130,"column":0},"end":{"line":132,"column":null}},"6":{"start":{"line":131,"column":0},"end":{"line":131,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":120,"column":0},"end":{"line":120,"column":null}},"loc":{"start":{"line":120,"column":0},"end":{"line":122,"column":null}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":125,"column":0},"end":{"line":125,"column":null}},"loc":{"start":{"line":125,"column":0},"end":{"line":133,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":121,"column":0},"end":{"line":121,"column":null}},"type":"cond-expr","locations":[{"start":{"line":121,"column":0},"end":{"line":121,"column":null}},{"start":{"line":121,"column":0},"end":{"line":121,"column":null}}]},"1":{"loc":{"start":{"line":126,"column":0},"end":{"line":128,"column":null}},"type":"if","locations":[{"start":{"line":126,"column":0},"end":{"line":128,"column":null}},{"start":{"line":126,"column":0},"end":{"line":128,"column":null}}]},"2":{"loc":{"start":{"line":130,"column":0},"end":{"line":132,"column":null}},"type":"if","locations":[{"start":{"line":130,"column":0},"end":{"line":132,"column":null}},{"start":{"line":130,"column":0},"end":{"line":132,"column":null}}]}},"s":{"0":1,"1":4,"2":2,"3":1,"4":1,"5":1,"6":0},"f":{"0":4,"1":2},"b":{"0":[0,4],"1":[1,1],"2":[0,1]}} +,"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\yqm-modal\\index.js": {"path":"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\yqm-modal\\index.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":1}},"1":{"start":{"line":4,"column":4},"end":{"line":4,"column":42}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":19},"end":{"line":3,"column":20}},"loc":{"start":{"line":3,"column":28},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":0,"1":0},"f":{"0":0},"b":{},"hash":"273e0ea08a817364df2080e77af475fa6564470f"} +,"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\yqm-modal\\src\\yqm-modal.vue": {"path":"D:\\phpstudy_pro\\WWW\\myweb\\yqm\\yqm-components\\packages\\yqm-modal\\src\\yqm-modal.vue","statementMap":{"0":{"start":{"line":32,"column":0},"end":{"line":32,"column":null}},"1":{"start":{"line":79,"column":0},"end":{"line":86,"column":null}},"2":{"start":{"line":80,"column":0},"end":{"line":80,"column":null}},"3":{"start":{"line":82,"column":0},"end":{"line":82,"column":null}},"4":{"start":{"line":84,"column":0},"end":{"line":84,"column":null}},"5":{"start":{"line":85,"column":0},"end":{"line":85,"column":null}},"6":{"start":{"line":89,"column":0},"end":{"line":91,"column":null}},"7":{"start":{"line":90,"column":0},"end":{"line":90,"column":null}},"8":{"start":{"line":94,"column":0},"end":{"line":94,"column":null}},"9":{"start":{"line":98,"column":0},"end":{"line":98,"column":null}},"10":{"start":{"line":107,"column":0},"end":{"line":107,"column":null}},"11":{"start":{"line":108,"column":0},"end":{"line":108,"column":null}},"12":{"start":{"line":109,"column":0},"end":{"line":109,"column":null}},"13":{"start":{"line":110,"column":0},"end":{"line":110,"column":null}},"14":{"start":{"line":113,"column":0},"end":{"line":113,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":77,"column":0},"end":{"line":77,"column":null}},"loc":{"start":{"line":77,"column":0},"end":{"line":95,"column":null}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":97,"column":0},"end":{"line":97,"column":null}},"loc":{"start":{"line":97,"column":0},"end":{"line":102,"column":null}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":105,"column":0},"end":{"line":105,"column":null}},"loc":{"start":{"line":105,"column":0},"end":{"line":114,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":79,"column":0},"end":{"line":86,"column":null}},"type":"if","locations":[{"start":{"line":79,"column":0},"end":{"line":86,"column":null}},{"start":{"line":79,"column":0},"end":{"line":86,"column":null}}]},"1":{"loc":{"start":{"line":80,"column":0},"end":{"line":80,"column":null}},"type":"binary-expr","locations":[{"start":{"line":80,"column":0},"end":{"line":80,"column":null}},{"start":{"line":80,"column":0},"end":{"line":80,"column":null}}]},"2":{"loc":{"start":{"line":89,"column":0},"end":{"line":91,"column":null}},"type":"if","locations":[{"start":{"line":89,"column":0},"end":{"line":91,"column":null}},{"start":{"line":89,"column":0},"end":{"line":91,"column":null}}]}},"s":{"0":1,"1":2,"2":2,"3":2,"4":2,"5":2,"6":2,"7":2,"8":2,"9":2,"10":0,"11":0,"12":0,"13":0,"14":0},"f":{"0":2,"1":2,"2":0},"b":{"0":[2,0],"1":[2,2],"2":[2,0]}} +} diff --git a/coverage/index.html b/coverage/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3e19ccc58f767d75c96f1d84accf43f54ca3026a --- /dev/null +++ b/coverage/index.html @@ -0,0 +1,185 @@ + + + + + + Code coverage report for All files + + + + + + + + +
+
+

All files

+
+ +
+ 46.97% + Statements + 31/66 +
+ + +
+ 39.47% + Branches + 15/38 +
+ + +
+ 52.94% + Functions + 9/17 +
+ + +
+ 47.69% + Lines + 31/65 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
packages +
+
0%0/140%0/60%0/40%0/13
packages/mixins +
+
57.69%15/2635%7/2083.33%5/657.69%15/26
packages/yqm-button +
+
0%0/2100%0/00%0/10%0/2
packages/yqm-button/src +
+
85.71%6/766.67%4/6100%2/285.71%6/7
packages/yqm-modal +
+
0%0/2100%0/00%0/10%0/2
packages/yqm-modal/src +
+
66.67%10/1566.67%4/666.67%2/366.67%10/15
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css new file mode 100644 index 0000000000000000000000000000000000000000..f418035b469aff23689a74c912849662f442aed4 --- /dev/null +++ b/coverage/lcov-report/base.css @@ -0,0 +1,224 @@ +body, html { + margin:0; padding: 0; + height: 100%; +} +body { + font-family: Helvetica Neue, Helvetica, Arial; + font-size: 14px; + color:#333; +} +.small { font-size: 12px; } +*, *:after, *:before { + -webkit-box-sizing:border-box; + -moz-box-sizing:border-box; + box-sizing:border-box; + } +h1 { font-size: 20px; margin: 0;} +h2 { font-size: 14px; } +pre { + font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; + margin: 0; + padding: 0; + -moz-tab-size: 2; + -o-tab-size: 2; + tab-size: 2; +} +a { color:#0074D9; text-decoration:none; } +a:hover { text-decoration:underline; } +.strong { font-weight: bold; } +.space-top1 { padding: 10px 0 0 0; } +.pad2y { padding: 20px 0; } +.pad1y { padding: 10px 0; } +.pad2x { padding: 0 20px; } +.pad2 { padding: 20px; } +.pad1 { padding: 10px; } +.space-left2 { padding-left:55px; } +.space-right2 { padding-right:20px; } +.center { text-align:center; } +.clearfix { display:block; } +.clearfix:after { + content:''; + display:block; + height:0; + clear:both; + visibility:hidden; + } +.fl { float: left; } +@media only screen and (max-width:640px) { + .col3 { width:100%; max-width:100%; } + .hide-mobile { display:none!important; } +} + +.quiet { + color: #7f7f7f; + color: rgba(0,0,0,0.5); +} +.quiet a { opacity: 0.7; } + +.fraction { + font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; + font-size: 10px; + color: #555; + background: #E8E8E8; + padding: 4px 5px; + border-radius: 3px; + vertical-align: middle; +} + +div.path a:link, div.path a:visited { color: #333; } +table.coverage { + border-collapse: collapse; + margin: 10px 0 0 0; + padding: 0; +} + +table.coverage td { + margin: 0; + padding: 0; + vertical-align: top; +} +table.coverage td.line-count { + text-align: right; + padding: 0 5px 0 20px; +} +table.coverage td.line-coverage { + text-align: right; + padding-right: 10px; + min-width:20px; +} + +table.coverage td span.cline-any { + display: inline-block; + padding: 0 5px; + width: 100%; +} +.missing-if-branch { + display: inline-block; + margin-right: 5px; + border-radius: 3px; + position: relative; + padding: 0 4px; + background: #333; + color: yellow; +} + +.skip-if-branch { + display: none; + margin-right: 10px; + position: relative; + padding: 0 4px; + background: #ccc; + color: white; +} +.missing-if-branch .typ, .skip-if-branch .typ { + color: inherit !important; +} +.coverage-summary { + border-collapse: collapse; + width: 100%; +} +.coverage-summary tr { border-bottom: 1px solid #bbb; } +.keyline-all { border: 1px solid #ddd; } +.coverage-summary td, .coverage-summary th { padding: 10px; } +.coverage-summary tbody { border: 1px solid #bbb; } +.coverage-summary td { border-right: 1px solid #bbb; } +.coverage-summary td:last-child { border-right: none; } +.coverage-summary th { + text-align: left; + font-weight: normal; + white-space: nowrap; +} +.coverage-summary th.file { border-right: none !important; } +.coverage-summary th.pct { } +.coverage-summary th.pic, +.coverage-summary th.abs, +.coverage-summary td.pct, +.coverage-summary td.abs { text-align: right; } +.coverage-summary td.file { white-space: nowrap; } +.coverage-summary td.pic { min-width: 120px !important; } +.coverage-summary tfoot td { } + +.coverage-summary .sorter { + height: 10px; + width: 7px; + display: inline-block; + margin-left: 0.5em; + background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; +} +.coverage-summary .sorted .sorter { + background-position: 0 -20px; +} +.coverage-summary .sorted-desc .sorter { + background-position: 0 -10px; +} +.status-line { height: 10px; } +/* yellow */ +.cbranch-no { background: yellow !important; color: #111; } +/* dark red */ +.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } +.low .chart { border:1px solid #C21F39 } +.highlighted, +.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ + background: #C21F39 !important; +} +/* medium red */ +.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } +/* light red */ +.low, .cline-no { background:#FCE1E5 } +/* light green */ +.high, .cline-yes { background:rgb(230,245,208) } +/* medium green */ +.cstat-yes { background:rgb(161,215,106) } +/* dark green */ +.status-line.high, .high .cover-fill { background:rgb(77,146,33) } +.high .chart { border:1px solid rgb(77,146,33) } +/* dark yellow (gold) */ +.status-line.medium, .medium .cover-fill { background: #f9cd0b; } +.medium .chart { border:1px solid #f9cd0b; } +/* light yellow */ +.medium { background: #fff4c2; } + +.cstat-skip { background: #ddd; color: #111; } +.fstat-skip { background: #ddd; color: #111 !important; } +.cbranch-skip { background: #ddd !important; color: #111; } + +span.cline-neutral { background: #eaeaea; } + +.coverage-summary td.empty { + opacity: .5; + padding-top: 4px; + padding-bottom: 4px; + line-height: 1; + color: #888; +} + +.cover-fill, .cover-empty { + display:inline-block; + height: 12px; +} +.chart { + line-height: 0; +} +.cover-empty { + background: white; +} +.cover-full { + border-right: none !important; +} +pre.prettyprint { + border: none !important; + padding: 0 !important; + margin: 0 !important; +} +.com { color: #999 !important; } +.ignore-none { color: #999; font-weight: normal; } + +.wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -48px; +} +.footer, .push { + height: 48px; +} diff --git a/coverage/lcov-report/block-navigation.js b/coverage/lcov-report/block-navigation.js new file mode 100644 index 0000000000000000000000000000000000000000..c7ff5a5cac80f4e9509e7afceb84004b3a44e6c8 --- /dev/null +++ b/coverage/lcov-report/block-navigation.js @@ -0,0 +1,79 @@ +/* eslint-disable */ +var jumpToCode = (function init() { + // Classes of code we would like to highlight in the file view + var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; + + // Elements to highlight in the file listing view + var fileListingElements = ['td.pct.low']; + + // We don't want to select elements that are direct descendants of another match + var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` + + // Selecter that finds elements on the page to which we can jump + var selector = + fileListingElements.join(', ') + + ', ' + + notSelector + + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` + + // The NodeList of matching elements + var missingCoverageElements = document.querySelectorAll(selector); + + var currentIndex; + + function toggleClass(index) { + missingCoverageElements + .item(currentIndex) + .classList.remove('highlighted'); + missingCoverageElements.item(index).classList.add('highlighted'); + } + + function makeCurrent(index) { + toggleClass(index); + currentIndex = index; + missingCoverageElements.item(index).scrollIntoView({ + behavior: 'smooth', + block: 'center', + inline: 'center' + }); + } + + function goToPrevious() { + var nextIndex = 0; + if (typeof currentIndex !== 'number' || currentIndex === 0) { + nextIndex = missingCoverageElements.length - 1; + } else if (missingCoverageElements.length > 1) { + nextIndex = currentIndex - 1; + } + + makeCurrent(nextIndex); + } + + function goToNext() { + var nextIndex = 0; + + if ( + typeof currentIndex === 'number' && + currentIndex < missingCoverageElements.length - 1 + ) { + nextIndex = currentIndex + 1; + } + + makeCurrent(nextIndex); + } + + return function jump(event) { + switch (event.which) { + case 78: // n + case 74: // j + goToNext(); + break; + case 66: // b + case 75: // k + case 80: // p + goToPrevious(); + break; + } + }; +})(); +window.addEventListener('keydown', jumpToCode); diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3e19ccc58f767d75c96f1d84accf43f54ca3026a --- /dev/null +++ b/coverage/lcov-report/index.html @@ -0,0 +1,185 @@ + + + + + + Code coverage report for All files + + + + + + + + +
+
+

All files

+
+ +
+ 46.97% + Statements + 31/66 +
+ + +
+ 39.47% + Branches + 15/38 +
+ + +
+ 52.94% + Functions + 9/17 +
+ + +
+ 47.69% + Lines + 31/65 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
packages +
+
0%0/140%0/60%0/40%0/13
packages/mixins +
+
57.69%15/2635%7/2083.33%5/657.69%15/26
packages/yqm-button +
+
0%0/2100%0/00%0/10%0/2
packages/yqm-button/src +
+
85.71%6/766.67%4/6100%2/285.71%6/7
packages/yqm-modal +
+
0%0/2100%0/00%0/10%0/2
packages/yqm-modal/src +
+
66.67%10/1566.67%4/666.67%2/366.67%10/15
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/index.html b/coverage/lcov-report/packages/index.html new file mode 100644 index 0000000000000000000000000000000000000000..af845a75e8bde66d39f28d7810f894d6ed77558a --- /dev/null +++ b/coverage/lcov-report/packages/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages + + + + + + + + +
+
+

All files packages

+
+ +
+ 0% + Statements + 0/14 +
+ + +
+ 0% + Branches + 0/6 +
+ + +
+ 0% + Functions + 0/4 +
+ + +
+ 0% + Lines + 0/13 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
0%0/140%0/60%0/40%0/13
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/index.js.html b/coverage/lcov-report/packages/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..122ec808ccca9f5fd90d40783335686de3d629a8 --- /dev/null +++ b/coverage/lcov-report/packages/index.js.html @@ -0,0 +1,229 @@ + + + + + + Code coverage report for packages/index.js + + + + + + + + +
+
+

All files / packages index.js

+
+ +
+ 0% + Statements + 0/14 +
+ + +
+ 0% + Branches + 0/6 +
+ + +
+ 0% + Functions + 0/4 +
+ + +
+ 0% + Lines + 0/13 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
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  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import yqmButton from './yqm-button'
+import yqmModal from './yqm-modal'
+import './style/common.css'
+ 
+const components = [
+    yqmButton,
+    yqmModal
+]
+ 
+const baseSize = 75
+    // 设置 rem 函数
+function setRem() {
+    // 当前页面宽度相对于 750 宽的缩放比例,可根据自己需要修改。
+    const scale = document.documentElement.clientWidth / 750
+        // 设置页面根节点字体大小
+    document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px'
+ 
+    //或者设置屏幕宽度高于720时固定fontSize
+    // var oHtml = document.documentElement
+    // var aWidth = oHtml.getBoundingClientRect().width
+    // if (aWidth < 720) {
+    //   oHtml.style.fontSize = aWidth / 15 + "px"
+    // } else {
+    //   oHtml.style.fontSize = 720 / 15 + "px"
+    // }
+}
+// 初始化
+setRem()
+    // 改变窗口大小时重新设置 rem
+window.onresize = function() {
+    setRem()
+}
+ 
+// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
+const install = (Vue) => {
+    if (install.installed) {
+        return
+    }
+    components.map(component => Vue.component(component.name, component))
+}
+ 
+// 判断是否是直接引入文件
+if (typeof window !== 'undefined' && window.Vue) {
+    install(window.Vue)
+}
+ 
+export default {
+    // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
+    install,
+    ...components
+}
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/mixins/index.html b/coverage/lcov-report/packages/mixins/index.html new file mode 100644 index 0000000000000000000000000000000000000000..022c2e361db0ac4f9a6c510db700c9be48e0b9b4 --- /dev/null +++ b/coverage/lcov-report/packages/mixins/index.html @@ -0,0 +1,125 @@ + + + + + + Code coverage report for packages/mixins + + + + + + + + +
+
+

All files packages/mixins

+
+ +
+ 57.69% + Statements + 15/26 +
+ + +
+ 35% + Branches + 7/20 +
+ + +
+ 83.33% + Functions + 5/6 +
+ + +
+ 57.69% + Lines + 15/26 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
0%0/00%0/00%0/00%0/0
style-apply.mixin.js +
+
57.69%15/2635%7/2083.33%5/657.69%15/26
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/mixins/index.js.html b/coverage/lcov-report/packages/mixins/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..8f5ca38113f7bbaf8a812066b39e9d7c8f1b0900 --- /dev/null +++ b/coverage/lcov-report/packages/mixins/index.js.html @@ -0,0 +1,94 @@ + + + + + + Code coverage report for packages/mixins/index.js + + + + + + + + +
+
+

All files / packages/mixins index.js

+
+ +
+ 0% + Statements + 0/0 +
+ + +
+ 0% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/0 +
+ + +
+ 0% + Lines + 0/0 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6  +  +  +  +  + 
import styleApplyMixin from './style-apply.mixin';
+ 
+export {
+  styleApplyMixin,
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/mixins/style-apply.mixin.js.html b/coverage/lcov-report/packages/mixins/style-apply.mixin.js.html new file mode 100644 index 0000000000000000000000000000000000000000..9d275eb9b9cb69da33a5cc5faa691a8edbae20e4 --- /dev/null +++ b/coverage/lcov-report/packages/mixins/style-apply.mixin.js.html @@ -0,0 +1,271 @@ + + + + + + Code coverage report for packages/mixins/style-apply.mixin.js + + + + + + + + +
+
+

All files / packages/mixins style-apply.mixin.js

+
+ +
+ 57.69% + Statements + 15/26 +
+ + +
+ 35% + Branches + 7/20 +
+ + +
+ 83.33% + Functions + 5/6 +
+ + +
+ 57.69% + Lines + 15/26 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
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  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +16x +  +  +  +16x +  +  +  +12x +12x +12x +12x +12x +12x +12x +  +12x +  +  +  +  +  +  +  +12x +  +  +12x +  +12x +  +12x +  +  +4x +  +  +  +  +  +  +  +  +  +  +  + 
function getBackgroundStyle(color, image) {
+  const backgroundColor = color || '';
+  const backgroundImage = image ? `url(${image}) no-repeat top center/100% auto` : '';
+  console.log({ backgroundColor, backgroundImage }, {
+    background: [
+      backgroundColor,
+      backgroundImage,
+    ].join(' '),
+  });
+  return {
+    background: [
+      backgroundColor,
+      backgroundImage,
+    ].join(' '),
+  };
+}
+ 
+function calcResponsivePx(number) {
+  return number === '' ? 'auto' : `${calcResponsivePxNumber(number)}px`;
+}
+ 
+function calcResponsivePxNumber(number) {
+  return innerWidth * number / 750;
+}
+ 
+function getPositionStyle(options) {
+  const style = {};
+  Object.keys(options).forEach((key) => {
+    let realKey = key;
+    let realValue = options[key];
+    console.log('realValue: ', key, realValue);
+    Eif (/left|top|width|height|lineHeight|marginTop|marginBottom|marginBetween/i.test(key) && /^-?\d+\.?\d*?$/.test(realValue)) {
+      realValue = calcResponsivePx(options[key]);
+    }
+    Iif (key === 'left') {
+      if (realValue.indexOf('-') > -1) {
+        realKey = 'right';
+        realValue = realValue.replace('-', '');
+      } else if (options[key] === '') {
+        realValue = '50%';
+        style.transform = 'translateX(-50%)';
+      }
+    } else Iif (options[key] === '') {
+      return true;
+    }
+    style[realKey] = realValue;
+  });
+  console.log({ style });
+  // style.position = 'fixed';
+  return style;
+}
+function getFontSize(size) {
+  return size === '' ? 'inherit' : calcResponsivePx(size);
+}
+ 
+export default {
+  methods: {
+    calcResponsivePx,
+    getBackgroundStyle,
+    getPositionStyle,
+    getFontSize,
+    calcResponsivePxNumber
+  },
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/yqm-button/index.html b/coverage/lcov-report/packages/yqm-button/index.html new file mode 100644 index 0000000000000000000000000000000000000000..fc6a7e6fed30cd0015cde46619f9ba202ae1e8c5 --- /dev/null +++ b/coverage/lcov-report/packages/yqm-button/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages/yqm-button + + + + + + + + +
+
+

All files packages/yqm-button

+
+ +
+ 0% + Statements + 0/2 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/2 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
0%0/2100%0/00%0/10%0/2
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/yqm-button/index.js.html b/coverage/lcov-report/packages/yqm-button/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..475a0a5338663d3e40632449c949f9b00da618da --- /dev/null +++ b/coverage/lcov-report/packages/yqm-button/index.js.html @@ -0,0 +1,100 @@ + + + + + + Code coverage report for packages/yqm-button/index.js + + + + + + + + +
+
+

All files / packages/yqm-button index.js

+
+ +
+ 0% + Statements + 0/2 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/2 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8  +  +  +  +  +  +  + 
import yqmButton from './src/yqm-button'
+ 
+yqmButton.install = (Vue) => {
+    Vue.component(yqmButton.name, yqmButton)
+}
+ 
+export default yqmButton
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/yqm-button/src/index.html b/coverage/lcov-report/packages/yqm-button/src/index.html new file mode 100644 index 0000000000000000000000000000000000000000..1317201a84635b7d1751e6407b1547f217f46582 --- /dev/null +++ b/coverage/lcov-report/packages/yqm-button/src/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages/yqm-button/src + + + + + + + + +
+
+

All files packages/yqm-button/src

+
+ +
+ 85.71% + Statements + 6/7 +
+ + +
+ 66.67% + Branches + 4/6 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 85.71% + Lines + 6/7 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
yqm-button.vue +
+
85.71%6/766.67%4/6100%2/285.71%6/7
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/yqm-button/src/yqm-button.vue.html b/coverage/lcov-report/packages/yqm-button/src/yqm-button.vue.html new file mode 100644 index 0000000000000000000000000000000000000000..f2b5f1e760d269157d8b7e5c9a8d7f7ab615f64d --- /dev/null +++ b/coverage/lcov-report/packages/yqm-button/src/yqm-button.vue.html @@ -0,0 +1,583 @@ + + + + + + Code coverage report for packages/yqm-button/src/yqm-button.vue + + + + + + + + +
+
+

All files / packages/yqm-button/src yqm-button.vue

+
+ +
+ 85.71% + Statements + 6/7 +
+ + +
+ 66.67% + Branches + 4/6 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 85.71% + Lines + 6/7 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
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 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +2x +1x +  +1x +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
<template>
+  <div
+    :style="[{
+      ...getPositionStyle({
+        height
+      }),
+      display: block ? 'flex' : 'inline-flex',
+      fontSize: getFontSize(fontSize ? fontSize : Math.min(width,height) * 0.45),
+      opacity: disabled ? '0.7' : '1'
+    },
+    plain ? {
+      border: `1px solid ${color}`,
+      color
+    } : {
+      background
+    },
+    circle ? {
+      borderRadius: '50%',
+      ...getPositionStyle({
+        height: width
+      })
+    } : {
+      borderRadius: round ? `${Math.min(width,height) / 2}px` : '5px',
+    },
+    fullScreen ? {
+      width: '100%'
+    } : {
+      ...getPositionStyle({
+        width
+      })
+    }
+    ]"
+       :class="['yqmButton']"
+    @click="handleClick"
+  >
+    <div class="slot-wrapper">
+      <div class="pre">
+        <slot name="pre"></slot>
+      </div>
+      <div class="default">
+        <slot></slot>
+      </div>
+      <div class="append">
+        <slot name="append"></slot>
+      </div>
+    </div>
+  </div>
+</template>
+ 
+<script>
+import { styleApplyMixin } from '../../mixins/index';
+export default {
+  name: "yqmButton",
+  mixins: [styleApplyMixin],
+  /**
+   * width: 按钮的宽,不用加单位,自适应
+   * height: 按钮的高,不用加单位,自适应
+   * color: 按钮的颜色,可以传入linear-gradient渐变色
+   * backgroundImage: 按钮的背景图
+   * plain: 是否镂空
+   * round: 是否圆角
+   * block: 是否为块级元素
+   * fontSize: 按钮文字大小,如不传将自适应按钮宽高
+   * disabled: 按钮是否禁用
+   * circle: 是否圆形,以width为直径
+   * navigateTo: 按钮点击跳转路由配置,可以是路径或者是route对象
+   * fullScreen: 是否为宽屏样式
+   */
+  props: {
+    width: {
+      type: [String,Number],
+      default: 120
+    },
+    height: {
+      type: [String,Number],
+      default: 70
+    },
+    color: {
+      type: String,
+      default: '#fbbd08'
+    },
+    backgroundImage: {
+      type: String,
+      default: ''
+    },
+    plain: {
+      type: Boolean,
+      default: false
+    },
+    round: {
+      type: Boolean,
+      default: false
+    },
+    block: {
+      type: Boolean,
+      default: true
+    },
+    fontSize: {
+      type: [String,Number],
+      default: ''
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    },
+    circle: {
+      type: Boolean,
+      default: false
+    },
+    navigateTo: {
+      type: [String,Object],
+      default: ''
+    },
+    fullScreen: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    background(){
+      return this.backgroundImage ? `url('${this.backgroundImage}') no-repeat center center/contain` : this.color
+    }
+  },
+  methods: {
+    handleClick(){
+      if (this.disabled){
+        return
+      }
+      this.$emit('click')
+I      if (this.navigateTo){
+        this.$router.push(this.navigateTo)
+      }
+    }
+  }
+}
+</script>
+ 
+<style scoped lang="scss">
+  .yqmButton{
+    position: relative;
+    justify-content: center;
+    align-items: center;
+    color: #f8f8f8;
+    user-select: none;
+    -webkit-user-select: none;
+    -webkit-tap-highlight-color: transparent; /* 防止ios点击出现选中效果 */
+    box-sizing: border-box;
+    padding: 0 20px;
+ 
+    .slot-wrapper{
+      height: 100%;
+      position: relative;
+      //border: green 1px solid;
+      display: flex;
+      width: 100%;
+      justify-content: space-around;
+      align-items: center;
+ 
+      div{
+        height: 100%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        //border: red 1px solid;
+      }
+    }
+  }
+</style>
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/yqm-modal/index.html b/coverage/lcov-report/packages/yqm-modal/index.html new file mode 100644 index 0000000000000000000000000000000000000000..c5bda1a11082e643696431b118fabe62f7db2cee --- /dev/null +++ b/coverage/lcov-report/packages/yqm-modal/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages/yqm-modal + + + + + + + + +
+
+

All files packages/yqm-modal

+
+ +
+ 0% + Statements + 0/2 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/2 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
0%0/2100%0/00%0/10%0/2
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/yqm-modal/index.js.html b/coverage/lcov-report/packages/yqm-modal/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..c932b42d1acc5fe588c56a9dc50ed5d92563df85 --- /dev/null +++ b/coverage/lcov-report/packages/yqm-modal/index.js.html @@ -0,0 +1,97 @@ + + + + + + Code coverage report for packages/yqm-modal/index.js + + + + + + + + +
+
+

All files / packages/yqm-modal index.js

+
+ +
+ 0% + Statements + 0/2 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/2 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7  +  +  +  +  +  + 
import yqmModal from './src/yqm-modal'
+ 
+yqmModal.install = (Vue) => {
+    Vue.component(yqmModal.name, yqmModal)
+}
+ 
+export default yqmModal
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/yqm-modal/src/index.html b/coverage/lcov-report/packages/yqm-modal/src/index.html new file mode 100644 index 0000000000000000000000000000000000000000..6ec0fef3c16df556037528e5e38af6cece008092 --- /dev/null +++ b/coverage/lcov-report/packages/yqm-modal/src/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages/yqm-modal/src + + + + + + + + +
+
+

All files packages/yqm-modal/src

+
+ +
+ 66.67% + Statements + 10/15 +
+ + +
+ 66.67% + Branches + 4/6 +
+ + +
+ 66.67% + Functions + 2/3 +
+ + +
+ 66.67% + Lines + 10/15 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
yqm-modal.vue +
+
66.67%10/1566.67%4/666.67%2/366.67%10/15
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/packages/yqm-modal/src/yqm-modal.vue.html b/coverage/lcov-report/packages/yqm-modal/src/yqm-modal.vue.html new file mode 100644 index 0000000000000000000000000000000000000000..8e16a0b42c08112eea58a9b1265c918dd00b5489 --- /dev/null +++ b/coverage/lcov-report/packages/yqm-modal/src/yqm-modal.vue.html @@ -0,0 +1,523 @@ + + + + + + Code coverage report for packages/yqm-modal/src/yqm-modal.vue + + + + + + + + +
+
+

All files / packages/yqm-modal/src yqm-modal.vue

+
+ +
+ 66.67% + Statements + 10/15 +
+ + +
+ 66.67% + Branches + 4/6 +
+ + +
+ 66.67% + Functions + 2/3 +
+ + +
+ 66.67% + Lines + 10/15 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
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 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +2x +2x +  +2x +  +2x +2x +  +  +  +2x +2x +  +  +  +2x +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
<template>
+  <div class="yqmModal" v-show="isShow">
+    <div
+      v-if="mask"
+      class="modal-mask"
+      @touchend="clickClose"
+      :style="[{ background: `${maskbgc}` }]"
+    ></div>
+ 
+    <div
+      class="modal-content"
+      :style="[
+        {
+          ...getPositionStyle({
+            width,
+          }),
+          ...getPositionStyle({
+            height,
+          }),
+        },
+      ]"
+    >
+      <div class="content">
+        <slot name="content"></slot>
+      </div>
+    </div>
+  </div>
+</template>
+ 
+ 
+<script>
+import { styleApplyMixin } from "../../mixins/index";
+ 
+export default {
+  name: "yqmModal",
+  mixins: [styleApplyMixin],
+ 
+  /**
+   * width: 模态框的宽,不用加单位,自适应
+   * height: 模态框的高,不用加单位,自适应
+   * mask: 是否有遮罩层
+   * maskbgc: 遮罩层背景颜色
+   * clickThrough: 是否允许点击穿透
+   * slide: 打开模态框后是否可以滚动
+   *
+   * modalShow:模态框show事件
+   * modalHide:模态框hide事件
+   */
+ 
+  props: {
+    width: {
+      type: [String, Number],
+      default: 250,
+    },
+    height: {
+      type: [String, Number],
+      default: 200,
+    },
+    mask: {
+      type: [Boolean],
+      default: true,
+    },
+    maskbgc: {
+      type: String,
+      default: "rgba(0,0,0,.5)",
+    },
+    clickThrough: {
+      type: Boolean,
+      default: false,
+    },
+    slide: {
+      type: Boolean,
+      default: false,
+    },
+  },
+ 
+  mounted() {
+    // 是否禁用滚动条 记录当前位置 利用top固定
+E    if (!this.slide) {
+      let scrollTop =
+        document.body.scrollTop || document.documentElement.scrollTop;
+      this.scrollTop = scrollTop;
+ 
+      document.body.style.position = "fixed";
+      document.body.style.top = `-${this.scrollTop}px`;
+    }
+ 
+    // 是否点击穿透
+E    if (!this.clickThrough) {
+      console.log("1");
+    }
+ 
+    // 提供modalShow方法
+    this.$emit("modalShow");
+  },
+ 
+  data() {
+    return {
+      isShow: true,
+      scrollTop: 0,
+    };
+  },
+ 
+  methods: {
+    clickClose() {
+      // 关闭模态框 回滚到原先位置
+      this.isShow = !this.isShow;
+      document.body.style.position = "static";
+      document.body.style.top = "0px";
+      window.scrollTo(0, this.scrollTop);
+ 
+      // 提供modalHide方法
+      this.$emit("modalHide");
+    },
+  },
+};
+</script>
+ 
+ 
+<style scoped lang="scss">
+.yqmModal {
+  position: relative;
+ 
+  .modal-content {
+    position: fixed;
+    left: 50%;
+    top: 50%;
+    transform: translate(-50%, -50%);
+    border-radius: 0.125rem;
+    background-color: #fff;
+    box-shadow: 0.0625rem 0.0625rem 0.0625rem #666666;
+    z-index: 1000;
+ 
+    .content {
+      height: 100%;
+    }
+  }
+  .modal-mask {
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    z-index: 999;
+  }
+}
+</style>
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css new file mode 100644 index 0000000000000000000000000000000000000000..b317a7cda31a440fbd47540297ee3c68d51f343e --- /dev/null +++ b/coverage/lcov-report/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js new file mode 100644 index 0000000000000000000000000000000000000000..b3225238f26e3ab49a5e41e9cb287a73c82740b7 --- /dev/null +++ b/coverage/lcov-report/prettify.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/lcov-report/sort-arrow-sprite.png b/coverage/lcov-report/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 Binary files /dev/null and b/coverage/lcov-report/sort-arrow-sprite.png differ diff --git a/coverage/lcov-report/sorter.js b/coverage/lcov-report/sorter.js new file mode 100644 index 0000000000000000000000000000000000000000..16de10c4349e427164041e85133d97f68f8d3a29 --- /dev/null +++ b/coverage/lcov-report/sorter.js @@ -0,0 +1,170 @@ +/* eslint-disable */ +var addSorting = (function() { + 'use strict'; + var cols, + currentSort = { + index: 0, + desc: false + }; + + // returns the summary table element + function getTable() { + return document.querySelector('.coverage-summary'); + } + // returns the thead element of the summary table + function getTableHeader() { + return getTable().querySelector('thead tr'); + } + // returns the tbody element of the summary table + function getTableBody() { + return getTable().querySelector('tbody'); + } + // returns the th element for nth column + function getNthColumn(n) { + return getTableHeader().querySelectorAll('th')[n]; + } + + // loads all columns + function loadColumns() { + var colNodes = getTableHeader().querySelectorAll('th'), + colNode, + cols = [], + col, + i; + + for (i = 0; i < colNodes.length; i += 1) { + colNode = colNodes[i]; + col = { + key: colNode.getAttribute('data-col'), + sortable: !colNode.getAttribute('data-nosort'), + type: colNode.getAttribute('data-type') || 'string' + }; + cols.push(col); + if (col.sortable) { + col.defaultDescSort = col.type === 'number'; + colNode.innerHTML = + colNode.innerHTML + ''; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function(a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function(a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc + ? ' sorted-desc' + : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function() { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i = 0; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function() { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 0000000000000000000000000000000000000000..f2d1c80194f3b9b5d81d5c110306f7f60bc0d490 --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,200 @@ +TN: +SF:D:\phpstudy_pro\WWW\myweb\yqm\yqm-components\packages\index.js +FN:12,setRem +FN:30,(anonymous_1) +FN:35,(anonymous_2) +FN:39,(anonymous_3) +FNF:4 +FNH:0 +FNDA:0,setRem +FNDA:0,(anonymous_1) +FNDA:0,(anonymous_2) +FNDA:0,(anonymous_3) +DA:5,0 +DA:10,0 +DA:14,0 +DA:16,0 +DA:28,0 +DA:30,0 +DA:31,0 +DA:35,0 +DA:36,0 +DA:37,0 +DA:39,0 +DA:43,0 +DA:44,0 +LF:13 +LH:0 +BRDA:36,0,0,0 +BRDA:36,0,1,0 +BRDA:43,1,0,0 +BRDA:43,1,1,0 +BRDA:43,2,0,0 +BRDA:43,2,1,0 +BRF:6 +BRH:0 +end_of_record +TN: +SF:D:\phpstudy_pro\WWW\myweb\yqm\yqm-components\packages\mixins\index.js +FNF:0 +FNH:0 +LF:0 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:D:\phpstudy_pro\WWW\myweb\yqm\yqm-components\packages\mixins\style-apply.mixin.js +FN:1,getBackgroundStyle +FN:18,calcResponsivePx +FN:22,calcResponsivePxNumber +FN:26,getPositionStyle +FN:28,(anonymous_4) +FN:52,getFontSize +FNF:6 +FNH:5 +FNDA:0,getBackgroundStyle +FNDA:16,calcResponsivePx +FNDA:16,calcResponsivePxNumber +FNDA:12,getPositionStyle +FNDA:12,(anonymous_4) +FNDA:4,getFontSize +DA:2,0 +DA:3,0 +DA:4,0 +DA:10,0 +DA:19,16 +DA:23,16 +DA:27,12 +DA:28,12 +DA:29,12 +DA:30,12 +DA:31,12 +DA:32,12 +DA:33,12 +DA:35,12 +DA:36,0 +DA:37,0 +DA:38,0 +DA:39,0 +DA:40,0 +DA:41,0 +DA:43,12 +DA:44,0 +DA:46,12 +DA:48,12 +DA:50,12 +DA:53,4 +LF:26 +LH:15 +BRDA:2,0,0,0 +BRDA:2,0,1,0 +BRDA:3,1,0,0 +BRDA:3,1,1,0 +BRDA:19,2,0,0 +BRDA:19,2,1,16 +BRDA:32,3,0,12 +BRDA:32,3,1,0 +BRDA:32,4,0,12 +BRDA:32,4,1,12 +BRDA:35,5,0,0 +BRDA:35,5,1,12 +BRDA:36,6,0,0 +BRDA:36,6,1,0 +BRDA:39,7,0,0 +BRDA:39,7,1,0 +BRDA:43,8,0,0 +BRDA:43,8,1,12 +BRDA:53,9,0,0 +BRDA:53,9,1,4 +BRF:20 +BRH:7 +end_of_record +TN: +SF:D:\phpstudy_pro\WWW\myweb\yqm\yqm-components\packages\yqm-button\index.js +FN:3,(anonymous_0) +FNF:1 +FNH:0 +FNDA:0,(anonymous_0) +DA:3,0 +DA:4,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:D:\phpstudy_pro\WWW\myweb\yqm\yqm-components\packages\yqm-button\src\yqm-button.vue +FN:120,(anonymous_1) +FN:125,(anonymous_2) +FNF:2 +FNH:2 +FNDA:4,(anonymous_1) +FNDA:2,(anonymous_2) +DA:51,1 +DA:121,4 +DA:126,2 +DA:127,1 +DA:129,1 +DA:130,1 +DA:131,0 +LF:7 +LH:6 +BRDA:121,0,0,0 +BRDA:121,0,1,4 +BRDA:126,1,0,1 +BRDA:126,1,1,1 +BRDA:130,2,0,0 +BRDA:130,2,1,1 +BRF:6 +BRH:4 +end_of_record +TN: +SF:D:\phpstudy_pro\WWW\myweb\yqm\yqm-components\packages\yqm-modal\index.js +FN:3,(anonymous_0) +FNF:1 +FNH:0 +FNDA:0,(anonymous_0) +DA:3,0 +DA:4,0 +LF:2 +LH:0 +BRF:0 +BRH:0 +end_of_record +TN: +SF:D:\phpstudy_pro\WWW\myweb\yqm\yqm-components\packages\yqm-modal\src\yqm-modal.vue +FN:77,(anonymous_1) +FN:97,(anonymous_2) +FN:105,(anonymous_3) +FNF:3 +FNH:2 +FNDA:2,(anonymous_1) +FNDA:2,(anonymous_2) +FNDA:0,(anonymous_3) +DA:32,1 +DA:79,2 +DA:80,2 +DA:82,2 +DA:84,2 +DA:85,2 +DA:89,2 +DA:90,2 +DA:94,2 +DA:98,2 +DA:107,0 +DA:108,0 +DA:109,0 +DA:110,0 +DA:113,0 +LF:15 +LH:10 +BRDA:79,0,0,2 +BRDA:79,0,1,0 +BRDA:80,1,0,2 +BRDA:80,1,1,2 +BRDA:89,2,0,2 +BRDA:89,2,1,0 +BRF:6 +BRH:4 +end_of_record diff --git a/coverage/packages/index.html b/coverage/packages/index.html new file mode 100644 index 0000000000000000000000000000000000000000..af845a75e8bde66d39f28d7810f894d6ed77558a --- /dev/null +++ b/coverage/packages/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages + + + + + + + + +
+
+

All files packages

+
+ +
+ 0% + Statements + 0/14 +
+ + +
+ 0% + Branches + 0/6 +
+ + +
+ 0% + Functions + 0/4 +
+ + +
+ 0% + Lines + 0/13 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
0%0/140%0/60%0/40%0/13
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/index.js.html b/coverage/packages/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..122ec808ccca9f5fd90d40783335686de3d629a8 --- /dev/null +++ b/coverage/packages/index.js.html @@ -0,0 +1,229 @@ + + + + + + Code coverage report for packages/index.js + + + + + + + + +
+
+

All files / packages index.js

+
+ +
+ 0% + Statements + 0/14 +
+ + +
+ 0% + Branches + 0/6 +
+ + +
+ 0% + Functions + 0/4 +
+ + +
+ 0% + Lines + 0/13 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
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  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
import yqmButton from './yqm-button'
+import yqmModal from './yqm-modal'
+import './style/common.css'
+ 
+const components = [
+    yqmButton,
+    yqmModal
+]
+ 
+const baseSize = 75
+    // 设置 rem 函数
+function setRem() {
+    // 当前页面宽度相对于 750 宽的缩放比例,可根据自己需要修改。
+    const scale = document.documentElement.clientWidth / 750
+        // 设置页面根节点字体大小
+    document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px'
+ 
+    //或者设置屏幕宽度高于720时固定fontSize
+    // var oHtml = document.documentElement
+    // var aWidth = oHtml.getBoundingClientRect().width
+    // if (aWidth < 720) {
+    //   oHtml.style.fontSize = aWidth / 15 + "px"
+    // } else {
+    //   oHtml.style.fontSize = 720 / 15 + "px"
+    // }
+}
+// 初始化
+setRem()
+    // 改变窗口大小时重新设置 rem
+window.onresize = function() {
+    setRem()
+}
+ 
+// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
+const install = (Vue) => {
+    if (install.installed) {
+        return
+    }
+    components.map(component => Vue.component(component.name, component))
+}
+ 
+// 判断是否是直接引入文件
+if (typeof window !== 'undefined' && window.Vue) {
+    install(window.Vue)
+}
+ 
+export default {
+    // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
+    install,
+    ...components
+}
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/mixins/index.html b/coverage/packages/mixins/index.html new file mode 100644 index 0000000000000000000000000000000000000000..022c2e361db0ac4f9a6c510db700c9be48e0b9b4 --- /dev/null +++ b/coverage/packages/mixins/index.html @@ -0,0 +1,125 @@ + + + + + + Code coverage report for packages/mixins + + + + + + + + +
+
+

All files packages/mixins

+
+ +
+ 57.69% + Statements + 15/26 +
+ + +
+ 35% + Branches + 7/20 +
+ + +
+ 83.33% + Functions + 5/6 +
+ + +
+ 57.69% + Lines + 15/26 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
0%0/00%0/00%0/00%0/0
style-apply.mixin.js +
+
57.69%15/2635%7/2083.33%5/657.69%15/26
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/mixins/index.js.html b/coverage/packages/mixins/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..8f5ca38113f7bbaf8a812066b39e9d7c8f1b0900 --- /dev/null +++ b/coverage/packages/mixins/index.js.html @@ -0,0 +1,94 @@ + + + + + + Code coverage report for packages/mixins/index.js + + + + + + + + +
+
+

All files / packages/mixins index.js

+
+ +
+ 0% + Statements + 0/0 +
+ + +
+ 0% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/0 +
+ + +
+ 0% + Lines + 0/0 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6  +  +  +  +  + 
import styleApplyMixin from './style-apply.mixin';
+ 
+export {
+  styleApplyMixin,
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/mixins/style-apply.mixin.js.html b/coverage/packages/mixins/style-apply.mixin.js.html new file mode 100644 index 0000000000000000000000000000000000000000..9d275eb9b9cb69da33a5cc5faa691a8edbae20e4 --- /dev/null +++ b/coverage/packages/mixins/style-apply.mixin.js.html @@ -0,0 +1,271 @@ + + + + + + Code coverage report for packages/mixins/style-apply.mixin.js + + + + + + + + +
+
+

All files / packages/mixins style-apply.mixin.js

+
+ +
+ 57.69% + Statements + 15/26 +
+ + +
+ 35% + Branches + 7/20 +
+ + +
+ 83.33% + Functions + 5/6 +
+ + +
+ 57.69% + Lines + 15/26 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
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  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +16x +  +  +  +16x +  +  +  +12x +12x +12x +12x +12x +12x +12x +  +12x +  +  +  +  +  +  +  +12x +  +  +12x +  +12x +  +12x +  +  +4x +  +  +  +  +  +  +  +  +  +  +  + 
function getBackgroundStyle(color, image) {
+  const backgroundColor = color || '';
+  const backgroundImage = image ? `url(${image}) no-repeat top center/100% auto` : '';
+  console.log({ backgroundColor, backgroundImage }, {
+    background: [
+      backgroundColor,
+      backgroundImage,
+    ].join(' '),
+  });
+  return {
+    background: [
+      backgroundColor,
+      backgroundImage,
+    ].join(' '),
+  };
+}
+ 
+function calcResponsivePx(number) {
+  return number === '' ? 'auto' : `${calcResponsivePxNumber(number)}px`;
+}
+ 
+function calcResponsivePxNumber(number) {
+  return innerWidth * number / 750;
+}
+ 
+function getPositionStyle(options) {
+  const style = {};
+  Object.keys(options).forEach((key) => {
+    let realKey = key;
+    let realValue = options[key];
+    console.log('realValue: ', key, realValue);
+    Eif (/left|top|width|height|lineHeight|marginTop|marginBottom|marginBetween/i.test(key) && /^-?\d+\.?\d*?$/.test(realValue)) {
+      realValue = calcResponsivePx(options[key]);
+    }
+    Iif (key === 'left') {
+      if (realValue.indexOf('-') > -1) {
+        realKey = 'right';
+        realValue = realValue.replace('-', '');
+      } else if (options[key] === '') {
+        realValue = '50%';
+        style.transform = 'translateX(-50%)';
+      }
+    } else Iif (options[key] === '') {
+      return true;
+    }
+    style[realKey] = realValue;
+  });
+  console.log({ style });
+  // style.position = 'fixed';
+  return style;
+}
+function getFontSize(size) {
+  return size === '' ? 'inherit' : calcResponsivePx(size);
+}
+ 
+export default {
+  methods: {
+    calcResponsivePx,
+    getBackgroundStyle,
+    getPositionStyle,
+    getFontSize,
+    calcResponsivePxNumber
+  },
+};
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/yqm-button/index.html b/coverage/packages/yqm-button/index.html new file mode 100644 index 0000000000000000000000000000000000000000..fc6a7e6fed30cd0015cde46619f9ba202ae1e8c5 --- /dev/null +++ b/coverage/packages/yqm-button/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages/yqm-button + + + + + + + + +
+
+

All files packages/yqm-button

+
+ +
+ 0% + Statements + 0/2 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/2 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
0%0/2100%0/00%0/10%0/2
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/yqm-button/index.js.html b/coverage/packages/yqm-button/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..475a0a5338663d3e40632449c949f9b00da618da --- /dev/null +++ b/coverage/packages/yqm-button/index.js.html @@ -0,0 +1,100 @@ + + + + + + Code coverage report for packages/yqm-button/index.js + + + + + + + + +
+
+

All files / packages/yqm-button index.js

+
+ +
+ 0% + Statements + 0/2 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/2 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7 +8  +  +  +  +  +  +  + 
import yqmButton from './src/yqm-button'
+ 
+yqmButton.install = (Vue) => {
+    Vue.component(yqmButton.name, yqmButton)
+}
+ 
+export default yqmButton
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/yqm-button/src/index.html b/coverage/packages/yqm-button/src/index.html new file mode 100644 index 0000000000000000000000000000000000000000..1317201a84635b7d1751e6407b1547f217f46582 --- /dev/null +++ b/coverage/packages/yqm-button/src/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages/yqm-button/src + + + + + + + + +
+
+

All files packages/yqm-button/src

+
+ +
+ 85.71% + Statements + 6/7 +
+ + +
+ 66.67% + Branches + 4/6 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 85.71% + Lines + 6/7 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
yqm-button.vue +
+
85.71%6/766.67%4/6100%2/285.71%6/7
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/yqm-button/src/yqm-button.vue.html b/coverage/packages/yqm-button/src/yqm-button.vue.html new file mode 100644 index 0000000000000000000000000000000000000000..f2b5f1e760d269157d8b7e5c9a8d7f7ab615f64d --- /dev/null +++ b/coverage/packages/yqm-button/src/yqm-button.vue.html @@ -0,0 +1,583 @@ + + + + + + Code coverage report for packages/yqm-button/src/yqm-button.vue + + + + + + + + +
+
+

All files / packages/yqm-button/src yqm-button.vue

+
+ +
+ 85.71% + Statements + 6/7 +
+ + +
+ 66.67% + Branches + 4/6 +
+ + +
+ 100% + Functions + 2/2 +
+ + +
+ 85.71% + Lines + 6/7 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
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 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +4x +  +  +  +  +2x +1x +  +1x +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
<template>
+  <div
+    :style="[{
+      ...getPositionStyle({
+        height
+      }),
+      display: block ? 'flex' : 'inline-flex',
+      fontSize: getFontSize(fontSize ? fontSize : Math.min(width,height) * 0.45),
+      opacity: disabled ? '0.7' : '1'
+    },
+    plain ? {
+      border: `1px solid ${color}`,
+      color
+    } : {
+      background
+    },
+    circle ? {
+      borderRadius: '50%',
+      ...getPositionStyle({
+        height: width
+      })
+    } : {
+      borderRadius: round ? `${Math.min(width,height) / 2}px` : '5px',
+    },
+    fullScreen ? {
+      width: '100%'
+    } : {
+      ...getPositionStyle({
+        width
+      })
+    }
+    ]"
+       :class="['yqmButton']"
+    @click="handleClick"
+  >
+    <div class="slot-wrapper">
+      <div class="pre">
+        <slot name="pre"></slot>
+      </div>
+      <div class="default">
+        <slot></slot>
+      </div>
+      <div class="append">
+        <slot name="append"></slot>
+      </div>
+    </div>
+  </div>
+</template>
+ 
+<script>
+import { styleApplyMixin } from '../../mixins/index';
+export default {
+  name: "yqmButton",
+  mixins: [styleApplyMixin],
+  /**
+   * width: 按钮的宽,不用加单位,自适应
+   * height: 按钮的高,不用加单位,自适应
+   * color: 按钮的颜色,可以传入linear-gradient渐变色
+   * backgroundImage: 按钮的背景图
+   * plain: 是否镂空
+   * round: 是否圆角
+   * block: 是否为块级元素
+   * fontSize: 按钮文字大小,如不传将自适应按钮宽高
+   * disabled: 按钮是否禁用
+   * circle: 是否圆形,以width为直径
+   * navigateTo: 按钮点击跳转路由配置,可以是路径或者是route对象
+   * fullScreen: 是否为宽屏样式
+   */
+  props: {
+    width: {
+      type: [String,Number],
+      default: 120
+    },
+    height: {
+      type: [String,Number],
+      default: 70
+    },
+    color: {
+      type: String,
+      default: '#fbbd08'
+    },
+    backgroundImage: {
+      type: String,
+      default: ''
+    },
+    plain: {
+      type: Boolean,
+      default: false
+    },
+    round: {
+      type: Boolean,
+      default: false
+    },
+    block: {
+      type: Boolean,
+      default: true
+    },
+    fontSize: {
+      type: [String,Number],
+      default: ''
+    },
+    disabled: {
+      type: Boolean,
+      default: false
+    },
+    circle: {
+      type: Boolean,
+      default: false
+    },
+    navigateTo: {
+      type: [String,Object],
+      default: ''
+    },
+    fullScreen: {
+      type: Boolean,
+      default: false
+    }
+  },
+  computed: {
+    background(){
+      return this.backgroundImage ? `url('${this.backgroundImage}') no-repeat center center/contain` : this.color
+    }
+  },
+  methods: {
+    handleClick(){
+      if (this.disabled){
+        return
+      }
+      this.$emit('click')
+I      if (this.navigateTo){
+        this.$router.push(this.navigateTo)
+      }
+    }
+  }
+}
+</script>
+ 
+<style scoped lang="scss">
+  .yqmButton{
+    position: relative;
+    justify-content: center;
+    align-items: center;
+    color: #f8f8f8;
+    user-select: none;
+    -webkit-user-select: none;
+    -webkit-tap-highlight-color: transparent; /* 防止ios点击出现选中效果 */
+    box-sizing: border-box;
+    padding: 0 20px;
+ 
+    .slot-wrapper{
+      height: 100%;
+      position: relative;
+      //border: green 1px solid;
+      display: flex;
+      width: 100%;
+      justify-content: space-around;
+      align-items: center;
+ 
+      div{
+        height: 100%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        //border: red 1px solid;
+      }
+    }
+  }
+</style>
+ 
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/yqm-modal/index.html b/coverage/packages/yqm-modal/index.html new file mode 100644 index 0000000000000000000000000000000000000000..c5bda1a11082e643696431b118fabe62f7db2cee --- /dev/null +++ b/coverage/packages/yqm-modal/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages/yqm-modal + + + + + + + + +
+
+

All files packages/yqm-modal

+
+ +
+ 0% + Statements + 0/2 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/2 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
index.js +
+
0%0/2100%0/00%0/10%0/2
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/yqm-modal/index.js.html b/coverage/packages/yqm-modal/index.js.html new file mode 100644 index 0000000000000000000000000000000000000000..c932b42d1acc5fe588c56a9dc50ed5d92563df85 --- /dev/null +++ b/coverage/packages/yqm-modal/index.js.html @@ -0,0 +1,97 @@ + + + + + + Code coverage report for packages/yqm-modal/index.js + + + + + + + + +
+
+

All files / packages/yqm-modal index.js

+
+ +
+ 0% + Statements + 0/2 +
+ + +
+ 100% + Branches + 0/0 +
+ + +
+ 0% + Functions + 0/1 +
+ + +
+ 0% + Lines + 0/2 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
1 +2 +3 +4 +5 +6 +7  +  +  +  +  +  + 
import yqmModal from './src/yqm-modal'
+ 
+yqmModal.install = (Vue) => {
+    Vue.component(yqmModal.name, yqmModal)
+}
+ 
+export default yqmModal
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/yqm-modal/src/index.html b/coverage/packages/yqm-modal/src/index.html new file mode 100644 index 0000000000000000000000000000000000000000..6ec0fef3c16df556037528e5e38af6cece008092 --- /dev/null +++ b/coverage/packages/yqm-modal/src/index.html @@ -0,0 +1,110 @@ + + + + + + Code coverage report for packages/yqm-modal/src + + + + + + + + +
+
+

All files packages/yqm-modal/src

+
+ +
+ 66.67% + Statements + 10/15 +
+ + +
+ 66.67% + Branches + 4/6 +
+ + +
+ 66.67% + Functions + 2/3 +
+ + +
+ 66.67% + Lines + 10/15 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FileStatementsBranchesFunctionsLines
yqm-modal.vue +
+
66.67%10/1566.67%4/666.67%2/366.67%10/15
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/packages/yqm-modal/src/yqm-modal.vue.html b/coverage/packages/yqm-modal/src/yqm-modal.vue.html new file mode 100644 index 0000000000000000000000000000000000000000..8e16a0b42c08112eea58a9b1265c918dd00b5489 --- /dev/null +++ b/coverage/packages/yqm-modal/src/yqm-modal.vue.html @@ -0,0 +1,523 @@ + + + + + + Code coverage report for packages/yqm-modal/src/yqm-modal.vue + + + + + + + + +
+
+

All files / packages/yqm-modal/src yqm-modal.vue

+
+ +
+ 66.67% + Statements + 10/15 +
+ + +
+ 66.67% + Branches + 4/6 +
+ + +
+ 66.67% + Functions + 2/3 +
+ + +
+ 66.67% + Lines + 10/15 +
+ + +
+

+ Press n or j to go to the next uncovered block, b, p or k for the previous block. +

+
+
+

+
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 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +2x +2x +  +2x +  +2x +2x +  +  +  +2x +2x +  +  +  +2x +  +  +  +2x +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  + 
<template>
+  <div class="yqmModal" v-show="isShow">
+    <div
+      v-if="mask"
+      class="modal-mask"
+      @touchend="clickClose"
+      :style="[{ background: `${maskbgc}` }]"
+    ></div>
+ 
+    <div
+      class="modal-content"
+      :style="[
+        {
+          ...getPositionStyle({
+            width,
+          }),
+          ...getPositionStyle({
+            height,
+          }),
+        },
+      ]"
+    >
+      <div class="content">
+        <slot name="content"></slot>
+      </div>
+    </div>
+  </div>
+</template>
+ 
+ 
+<script>
+import { styleApplyMixin } from "../../mixins/index";
+ 
+export default {
+  name: "yqmModal",
+  mixins: [styleApplyMixin],
+ 
+  /**
+   * width: 模态框的宽,不用加单位,自适应
+   * height: 模态框的高,不用加单位,自适应
+   * mask: 是否有遮罩层
+   * maskbgc: 遮罩层背景颜色
+   * clickThrough: 是否允许点击穿透
+   * slide: 打开模态框后是否可以滚动
+   *
+   * modalShow:模态框show事件
+   * modalHide:模态框hide事件
+   */
+ 
+  props: {
+    width: {
+      type: [String, Number],
+      default: 250,
+    },
+    height: {
+      type: [String, Number],
+      default: 200,
+    },
+    mask: {
+      type: [Boolean],
+      default: true,
+    },
+    maskbgc: {
+      type: String,
+      default: "rgba(0,0,0,.5)",
+    },
+    clickThrough: {
+      type: Boolean,
+      default: false,
+    },
+    slide: {
+      type: Boolean,
+      default: false,
+    },
+  },
+ 
+  mounted() {
+    // 是否禁用滚动条 记录当前位置 利用top固定
+E    if (!this.slide) {
+      let scrollTop =
+        document.body.scrollTop || document.documentElement.scrollTop;
+      this.scrollTop = scrollTop;
+ 
+      document.body.style.position = "fixed";
+      document.body.style.top = `-${this.scrollTop}px`;
+    }
+ 
+    // 是否点击穿透
+E    if (!this.clickThrough) {
+      console.log("1");
+    }
+ 
+    // 提供modalShow方法
+    this.$emit("modalShow");
+  },
+ 
+  data() {
+    return {
+      isShow: true,
+      scrollTop: 0,
+    };
+  },
+ 
+  methods: {
+    clickClose() {
+      // 关闭模态框 回滚到原先位置
+      this.isShow = !this.isShow;
+      document.body.style.position = "static";
+      document.body.style.top = "0px";
+      window.scrollTo(0, this.scrollTop);
+ 
+      // 提供modalHide方法
+      this.$emit("modalHide");
+    },
+  },
+};
+</script>
+ 
+ 
+<style scoped lang="scss">
+.yqmModal {
+  position: relative;
+ 
+  .modal-content {
+    position: fixed;
+    left: 50%;
+    top: 50%;
+    transform: translate(-50%, -50%);
+    border-radius: 0.125rem;
+    background-color: #fff;
+    box-shadow: 0.0625rem 0.0625rem 0.0625rem #666666;
+    z-index: 1000;
+ 
+    .content {
+      height: 100%;
+    }
+  }
+  .modal-mask {
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    z-index: 999;
+  }
+}
+</style>
+ +
+
+ + + + + + + + + \ No newline at end of file diff --git a/coverage/prettify.css b/coverage/prettify.css new file mode 100644 index 0000000000000000000000000000000000000000..b317a7cda31a440fbd47540297ee3c68d51f343e --- /dev/null +++ b/coverage/prettify.css @@ -0,0 +1 @@ +.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/prettify.js b/coverage/prettify.js new file mode 100644 index 0000000000000000000000000000000000000000..b3225238f26e3ab49a5e41e9cb287a73c82740b7 --- /dev/null +++ b/coverage/prettify.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/sort-arrow-sprite.png b/coverage/sort-arrow-sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..03f704a609c6fd0dbfdac63466a7d7c958b5cbf3 Binary files /dev/null and b/coverage/sort-arrow-sprite.png differ diff --git a/coverage/sorter.js b/coverage/sorter.js new file mode 100644 index 0000000000000000000000000000000000000000..16de10c4349e427164041e85133d97f68f8d3a29 --- /dev/null +++ b/coverage/sorter.js @@ -0,0 +1,170 @@ +/* eslint-disable */ +var addSorting = (function() { + 'use strict'; + var cols, + currentSort = { + index: 0, + desc: false + }; + + // returns the summary table element + function getTable() { + return document.querySelector('.coverage-summary'); + } + // returns the thead element of the summary table + function getTableHeader() { + return getTable().querySelector('thead tr'); + } + // returns the tbody element of the summary table + function getTableBody() { + return getTable().querySelector('tbody'); + } + // returns the th element for nth column + function getNthColumn(n) { + return getTableHeader().querySelectorAll('th')[n]; + } + + // loads all columns + function loadColumns() { + var colNodes = getTableHeader().querySelectorAll('th'), + colNode, + cols = [], + col, + i; + + for (i = 0; i < colNodes.length; i += 1) { + colNode = colNodes[i]; + col = { + key: colNode.getAttribute('data-col'), + sortable: !colNode.getAttribute('data-nosort'), + type: colNode.getAttribute('data-type') || 'string' + }; + cols.push(col); + if (col.sortable) { + col.defaultDescSort = col.type === 'number'; + colNode.innerHTML = + colNode.innerHTML + ''; + } + } + return cols; + } + // attaches a data attribute to every tr element with an object + // of data values keyed by column name + function loadRowData(tableRow) { + var tableCols = tableRow.querySelectorAll('td'), + colNode, + col, + data = {}, + i, + val; + for (i = 0; i < tableCols.length; i += 1) { + colNode = tableCols[i]; + col = cols[i]; + val = colNode.getAttribute('data-value'); + if (col.type === 'number') { + val = Number(val); + } + data[col.key] = val; + } + return data; + } + // loads all row data + function loadData() { + var rows = getTableBody().querySelectorAll('tr'), + i; + + for (i = 0; i < rows.length; i += 1) { + rows[i].data = loadRowData(rows[i]); + } + } + // sorts the table using the data for the ith column + function sortByIndex(index, desc) { + var key = cols[index].key, + sorter = function(a, b) { + a = a.data[key]; + b = b.data[key]; + return a < b ? -1 : a > b ? 1 : 0; + }, + finalSorter = sorter, + tableBody = document.querySelector('.coverage-summary tbody'), + rowNodes = tableBody.querySelectorAll('tr'), + rows = [], + i; + + if (desc) { + finalSorter = function(a, b) { + return -1 * sorter(a, b); + }; + } + + for (i = 0; i < rowNodes.length; i += 1) { + rows.push(rowNodes[i]); + tableBody.removeChild(rowNodes[i]); + } + + rows.sort(finalSorter); + + for (i = 0; i < rows.length; i += 1) { + tableBody.appendChild(rows[i]); + } + } + // removes sort indicators for current column being sorted + function removeSortIndicators() { + var col = getNthColumn(currentSort.index), + cls = col.className; + + cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); + col.className = cls; + } + // adds sort indicators for current column being sorted + function addSortIndicators() { + getNthColumn(currentSort.index).className += currentSort.desc + ? ' sorted-desc' + : ' sorted'; + } + // adds event listeners for all sorter widgets + function enableUI() { + var i, + el, + ithSorter = function ithSorter(i) { + var col = cols[i]; + + return function() { + var desc = col.defaultDescSort; + + if (currentSort.index === i) { + desc = !currentSort.desc; + } + sortByIndex(i, desc); + removeSortIndicators(); + currentSort.index = i; + currentSort.desc = desc; + addSortIndicators(); + }; + }; + for (i = 0; i < cols.length; i += 1) { + if (cols[i].sortable) { + // add the click event handler on the th so users + // dont have to click on those tiny arrows + el = getNthColumn(i).querySelector('.sorter').parentElement; + if (el.addEventListener) { + el.addEventListener('click', ithSorter(i)); + } else { + el.attachEvent('onclick', ithSorter(i)); + } + } + } + } + // adds sorting functionality to the UI + return function() { + if (!getTable()) { + return; + } + cols = loadColumns(); + loadData(); + addSortIndicators(); + enableUI(); + }; +})(); + +window.addEventListener('load', addSorting); diff --git a/examples/views/yqm-button-example.vue b/examples/views/yqm-button-example.vue index fcc72ce442e23a178f9560c1eab1912735f8cbd1..5c0876a5559f4aa1ed142612c36dce1e249e6450 100644 --- a/examples/views/yqm-button-example.vue +++ b/examples/views/yqm-button-example.vue @@ -5,6 +5,7 @@ 123 + diff --git a/examples/views/yqm-modal-example.vue b/examples/views/yqm-modal-example.vue new file mode 100644 index 0000000000000000000000000000000000000000..6ed97ff16acc7a844d148edb6fe2d677df944140 --- /dev/null +++ b/examples/views/yqm-modal-example.vue @@ -0,0 +1,63 @@ + + + + + \ No newline at end of file diff --git a/packages/index.js b/packages/index.js index 02e2e607248f71a6058f4b1cddf066e05c3a31b1..04fc218f03e55f780b3f6833bdfc20c3485e1186 100644 --- a/packages/index.js +++ b/packages/index.js @@ -9,12 +9,14 @@ contexts.keys().forEach((value) => { } }) + + const baseSize = 75 -// 设置 rem 函数 + // 设置 rem 函数 function setRem() { // 当前页面宽度相对于 750 宽的缩放比例,可根据自己需要修改。 const scale = document.documentElement.clientWidth / 750 - // 设置页面根节点字体大小 + // 设置页面根节点字体大小 document.documentElement.style.fontSize = baseSize * Math.min(scale, 2) + 'px' //或者设置屏幕宽度高于720时固定fontSize @@ -28,8 +30,8 @@ function setRem() { } // 初始化 setRem() -// 改变窗口大小时重新设置 rem -window.onresize = function () { + // 改变窗口大小时重新设置 rem +window.onresize = function() { setRem() } @@ -50,4 +52,4 @@ export default { // 导出的对象必须具有 install,才能被 Vue.use() 方法安装 install, ...components -} +} \ No newline at end of file diff --git a/packages/tests/yqm-modal/yqm-modal.test.js b/packages/tests/yqm-modal/yqm-modal.test.js new file mode 100644 index 0000000000000000000000000000000000000000..e6fea9fdcce3139379073fb1212ed537e6d62970 --- /dev/null +++ b/packages/tests/yqm-modal/yqm-modal.test.js @@ -0,0 +1,19 @@ +import { shallowMount } from '@vue/test-utils'; +import yqmModal from '../../yqm-modal/src/yqm-modal' + + +describe('component yqm-modal', () => { + it('is a Vue instance', () => { + const wrapper = shallowMount(yqmModal) + + expect(wrapper.exists()).toBeTruthy() + expect(wrapper.vm).toBeTruthy() + }) + + it('UI render correct', () => { + const wrapper = shallowMount(yqmModal) + + expect(wrapper.html()).toContain('yqmModal') + }) + +}) \ No newline at end of file diff --git a/packages/yqm-modal/index.js b/packages/yqm-modal/index.js new file mode 100644 index 0000000000000000000000000000000000000000..4412250432c5c57427769b0ae59e29f26a29734f --- /dev/null +++ b/packages/yqm-modal/index.js @@ -0,0 +1,8 @@ +import yqmModal from './src/yqm-modal' + +yqmModal.install = (Vue) => { + Vue.component(yqmModal.name, yqmModal) +} + + +export default yqmModal \ No newline at end of file diff --git a/packages/yqm-modal/src/yqm-modal.vue b/packages/yqm-modal/src/yqm-modal.vue new file mode 100644 index 0000000000000000000000000000000000000000..fe866aa7572f7d5e704640f0fb5b640ebb5a2706 --- /dev/null +++ b/packages/yqm-modal/src/yqm-modal.vue @@ -0,0 +1,166 @@ + + + + + + \ No newline at end of file