chunk-5829dc2c.62b19ef3.js 18.9 KB
Newer Older
6
UPDATE  
628705312ad51175a75ac513 已提交
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5829dc2c"],{"00c4":function(t,e,a){var r=a("47fe");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=a("5925").default;i("f796dc14",r,!0,{sourceMap:!1,shadowMode:!1})},"05d3":function(t,e,a){"use strict";a("ac34")},1903:function(t,e,a){var r=a("a1a8");e=r(!1),e.push([t.i,"*[data-v-132c71c0]{padding:0;margin:0;outline:none}body[data-v-132c71c0],html[data-v-132c71c0]{min-height:100vh;background:rgba(203,242,144,.2)}li[data-v-132c71c0],ol[data-v-132c71c0],ul[data-v-132c71c0]{list-style:none}body[data-v-132c71c0]{padding:100px 0;box-sizing:border-box;overflow:hidden}.col-2[data-v-132c71c0]{width:16.66666667%}.col-3[data-v-132c71c0]{width:25%}.col-9[data-v-132c71c0]{width:75%}.col-10[data-v-132c71c0]{width:83.33333333%}.col-12[data-v-132c71c0]{width:100%}.index[data-v-132c71c0]{display:flex;justify-content:space-between}.index .keyboard-container[data-v-132c71c0]{position:relative;width:-moz-fit-content;width:fit-content;margin:0 auto}.index .keyboard-container .fingers[data-v-132c71c0]{position:absolute;top:28px;left:-4px;width:663px}",""]),t.exports=e},"1e4b":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"index"},[e("div",{staticClass:"col-12"},[e("settings-info"),e("speed"),e("text-component"),e("div",{staticClass:"keyboard-container"},[e("keyboard"),t.showFingers?e("fingers",{staticClass:"fingers"}):t._e()],1)],1)])},i=[],s=function(){var t=this,e=t._self._c;return e("div",{staticClass:"settings-container"},[e("div",{staticClass:"setting-item"},[e("label",{attrs:{for:"practiceLetters"}},[t._v("预设练习键")]),t._l(t.allLetters,(function(a,r){return e("span",{key:r,class:["letter",{practiceLetter:t.isPracticeLetter(a),keyLetter:t.isKeyLetter(a)}],on:{click:function(e){return t.setKeyLetter(a,r)}}},[t._v(t._s(a))])})),e("el-slider",{attrs:{min:t.min,max:t.allLetters.length,"show-tooltip":!1},on:{input:t.changePracticeLetters},model:{value:t.practiceLetterRange,callback:function(e){t.practiceLetterRange=e},expression:"practiceLetterRange"}})],2),e("div",{staticClass:"setting-item"},[e("label",{attrs:{for:"practiceLetters"}},[t._v("文本长度")]),e("el-slider",{staticStyle:{"margin-top":"-30px"},attrs:{min:0,max:20,"show-tooltip":!1,value:t.letterLength},on:{input:function(e){return t.changeLetterLength(e)}}})],1),e("div",{staticClass:"setting-item"},[e("label",{attrs:{for:"showFingers"}},[t._v("显示指位")]),e("el-switch",{attrs:{value:t.showFingers,"active-color":"#13ce66"},on:{change:t.changeFingersShow}})],1),e("div",{staticClass:"setting-item"},[e("label",{attrs:{for:"keyboardColor"}},[t._v("键盘主题色")]),e("el-color-picker",{attrs:{value:t.keyboardColor,"show-alpha":"",size:"mini"},on:{change:t.changeKeyboardColor}})],1)])},n=[],o=a("7736"),c={data(){return{practiceLetterRange:this.minRange,min:0}},computed:{...Object(o["c"])(["allLetters","showFingers","keyboardColor","practiceLetters","keyLetter","letterLength","minRange"])},methods:{...Object(o["b"])(["changeFingersShow","changeKeyboardColor","setLetterLength"]),isKeyLetter(t){return!!t&&t===this.keyLetter},isPracticeLetter(t){return!!t&&this.practiceLetters.includes(t)},changeLetterLength(t){const e=this.minRange;this.setLetterLength(Math.max(e,t))},changePracticeLetters(t){if(t<this.minRange)return void(this.practiceLetterRange=this.minRange);this.$store.commit("settingPracticeLetters",t);const e=this.practiceLetters.indexOf(this.keyLetter);if(-1===e){const t=this.practiceLetters.slice(-1);this.setKeyLetter(t,this.practiceLetters.length-1)}},setKeyLetter(t,e){e>=this.practiceLetters.length||this.$store.commit("setKeyLetter",t)}}},d=c,l=(a("762e"),a("e607")),p=Object(l["a"])(d,s,n,!1,null,"06000904",null),m=p.exports,u=function(){var t=this,e=t._self._c;return e("div",{staticClass:"text"},t._l(t.text,(function(a,r){return e("span",{key:r,class:{active:r===t.currentIndex}},[t._v(t._s(t._f("formatLetter")(a)))])})),0)},h=[];class b{constructor(t="ENITRL",e="E",a=3,r=6){this.practiceLetters=t,this.keyLetter=e,this.minLength=a,this.maxLenth=r}length(){return Math.floor(Math.random()*(this.maxLenth-this.minLength)+this.minLength+1)}create(){const t=this.length(),e=Math.floor(Math.random()*t);let a="";for(let r=0;r<t;r++)a+=e===r?this.keyLetter:this.getOneRandomLetter();return a}getOneRandomLetter(){const t=this.practiceLetters,e=t.length;return t[Math.floor(Math.random()*e)]}}var v=b,y={data(){return{length:2,currentIndex:0,text:"",errorNum:0,startTime:""}},computed:{...Object(o["c"])(["currentLetter","practiceLetters","keyLetter","letterLength"])},watch:{currentLetter(t){if(null===t)return;const e=this.text[this.currentIndex];t===e.toLowerCase()?this.next():this.errorNum++},practiceLetters(){this.createTextList()},keyLetter(){this.createTextList()},letterLength(){this.createTextList()}},created(){this.createTextList()},methods:{...Object(o["b"])(["saveError","saveSpeed","saveScore"]),createTextList(){const t=new v(this.practiceLetters,this.keyLetter),e=new Array(this.letterLength).fill(0),a=e.map(()=>t.create());this.text=a.join(" ").toLowerCase(),this.startTime=new Date,this.errorNum=0},getSpeed(){const t=this.startTime;this.startTime=new Date;const e=Math.floor(this.text.length/(this.startTime-t)*6e4);return e},getScore(t,e){return 5*t-10*e},next(){if(this.currentIndex++,this.currentIndex===this.text.length){this.currentIndex=0;const t=this.getSpeed(),e=this.getScore(t,this.errorNum);this.saveSpeed(t),this.saveError(this.errorNum),this.saveScore(e),this.createTextList()}}},filters:{formatLetter(t){return t?" "===t?"":t:""}}},g=y,f=(a("d31a"),Object(l["a"])(g,u,h,!1,null,"b14a156a",null)),L=f.exports,N=function(){var t=this,e=t._self._c;return e("div",{staticClass:"keyboard"},t._l(t.list,(function(a,r){return e("key",t._b({key:r},"key",a,!1))})),1)},w=[],x=function(){var t=this,e=t._self._c;return e("div",{class:["key",{active:t.iscurrentLetter(t.$store.state.currentLetter)}],style:{"min-width":t.keyWidth+"px",flex:"Fill"===t.type?1:"none",background:t.keyboardColor}},[t.subName?e("div",{staticClass:"multiple"},[e("span",{domProps:{innerHTML:t._s(t.subName)}}),e("span",{domProps:{innerHTML:t._s(t.primaryName)}})]):e("span",{domProps:{innerHTML:t._s(t.primaryName)}})])},k=[],_={props:{type:{type:String,default:""},primaryName:{type:String,default:""},subName:{type:String,defualt:""}},computed:{...Object(o["c"])(["keyboardColor"]),keyWidth(){let t=44;const e=this.type;if(!e)return t;switch(e){case"Letter":t=44;break;case"Tab":t=72;break;case"Caps Lock":t=82;break;case"Shift":t=110;break;case"Function":t=80;break;default:break}return t}},methods:{iscurrentLetter(t){return null!==t&&t.toLowerCase()===this.primaryName.toLowerCase()}}},M=_,C=(a("25f5"),Object(l["a"])(M,x,k,!1,null,"0291cd98",null)),S=C.exports;const T=[{id:1,type:"Letter",primaryName:"`",subName:"~"},{id:1,type:"Letter",primaryName:"1",subName:"!"},{id:1,type:"Letter",primaryName:"2",subName:"@"},{id:1,type:"Letter",primaryName:"3",subName:"#"},{id:1,type:"Letter",primaryName:"4",subName:"$"},{id:1,type:"Letter",primaryName:"5",subName:"%"},{id:1,type:"Letter",primaryName:"6",subName:"^"},{id:1,type:"Letter",primaryName:"7",subName:"&"},{id:1,type:"Letter",primaryName:"8",subName:"*"},{id:1,type:"Letter",primaryName:"9",subName:"("},{id:1,type:"Letter",primaryName:"0",subName:")"},{id:1,type:"Letter",primaryName:"-",subName:"_"},{id:1,type:"Letter",primaryName:"=",subName:"+"},{id:1,type:"Fill",primaryName:"Backspace",subName:""},{id:1,type:"Tab",primaryName:"Tab",subName:""},{id:1,type:"Letter",primaryName:"Q",subName:""},{id:2,type:"Letter",primaryName:"W",subName:""},{id:3,type:"Letter",primaryName:"E",subName:""},{id:4,type:"Letter",primaryName:"R",subName:""},{id:4,type:"Letter",primaryName:"T",subName:""},{id:4,type:"Letter",primaryName:"Y",subName:""},{id:4,type:"Letter",primaryName:"U",subName:""},{id:4,type:"Letter",primaryName:"I",subName:""},{id:4,type:"Letter",primaryName:"O",subName:""},{id:4,type:"Letter",primaryName:"P",subName:""},{id:4,type:"Letter",primaryName:"[",subName:"{"},{id:4,type:"Letter",primaryName:"]",subName:"}"},{id:4,type:"Fill",primaryName:"\\",subName:"|"},{id:4,type:"Caps Lock",primaryName:"CapsLock",subName:""},{id:4,type:"Letter",primaryName:"A",subName:""},{id:4,type:"Letter",primaryName:"S",subName:""},{id:4,type:"Letter",primaryName:"D",subName:""},{id:4,type:"Letter",primaryName:"F",subName:""},{id:4,type:"Letter",primaryName:"G",subName:""},{id:4,type:"Letter",primaryName:"H",subName:""},{id:4,type:"Letter",primaryName:"J",subName:""},{id:4,type:"Letter",primaryName:"K",subName:""},{id:4,type:"Letter",primaryName:"L",subName:""},{id:4,type:"Letter",primaryName:";",subName:":"},{id:4,type:"Letter",primaryName:"'",subName:'"'},{id:4,type:"Fill",primaryName:"Enter",subName:""},{id:4,type:"Shift",primaryName:"Shift",subName:""},{id:4,type:"Letter",primaryName:"Z",subName:""},{id:4,type:"Letter",primaryName:"X",subName:""},{id:4,type:"Letter",primaryName:"C",subName:""},{id:4,type:"Letter",primaryName:"V",subName:""},{id:4,type:"Letter",primaryName:"B",subName:""},{id:4,type:"Letter",primaryName:"N",subName:""},{id:4,type:"Letter",primaryName:"M",subName:""},{id:4,type:"Letter",primaryName:",",subName:"<"},{id:4,type:"Letter",primaryName:".",subName:">"},{id:4,type:"Letter",primaryName:"/",subName:"?"},{id:4,type:"Fill",primaryName:"Shift",subName:""},{id:4,type:"Function",primaryName:"Ctrl",subName:""},{id:4,type:"Letter",primaryName:"Alt",subName:""},{id:4,type:"Fill",primaryName:" ",subName:""},{id:4,type:"Letter",primaryName:"Alt",subName:""},{id:4,type:"Function",primaryName:"Ctrl",subName:""}];var j=T,O={components:{key:S},data(){return{list:j}},mounted(){this.keyboardInit()},methods:{keyboardInit(){document.addEventListener("keydown",t=>{t.preventDefault(),this.$store.commit("onkeydown",t.key)}),document.addEventListener("keyup",()=>{this.$store.commit("onkeyup")})}}},F=O,R=(a("c3e1"),Object(l["a"])(F,N,w,!1,null,"0cc18acb",null)),G=R.exports,I=function(){var t=this;t._self._c;return t._m(0)},z=[function(){var t=this,e=t._self._c;return e("div",[e("img",{attrs:{src:a("9cb7"),alt:""}})])}],K=(a("83c3"),{}),P=Object(l["a"])(K,I,z,!1,null,"a58698ac",null),E=P.exports,$=function(){var t=this,e=t._self._c;return e("div",{staticClass:"speed-container"},[e("div",{staticClass:"item"},[e("label",{attrs:{for:"speed"}},[t._v("速度")]),e("span",[t._v(t._s(t.speed))]),t._v("   "),t.speedGrowth?e("span",{class:["arrow",{down:t.speedGrowth<0}]},[t._v(t._s(t._f("percentage")(t.speedGrowth)))]):t._e()]),e("div",{staticClass:"item"},[e("label",{attrs:{for:"error"}},[t._v("错误")]),e("span",[t._v(t._s(t.error))]),t._v("   "),t.errorGrowth?e("span",{class:["arrow error",{down:t.errorGrowth>0}]},[t._v(t._s(t.errorGrowth))]):t._e()]),e("div",{staticClass:"item"},[e("label",{attrs:{for:"score"}},[t._v("得分")]),e("span",[t._v(t._s(t.score))]),t._v("   "),t.scoreGrowth?e("span",{class:["arrow",{down:t.scoreGrowth<0}]},[t._v(t._s(t._f("percentage")(t.scoreGrowth)))]):t._e()])])},H=[],A={data(){return{}},computed:{...Object(o["c"])(["speed","speedGrowth","error","errorGrowth","score","scoreGrowth"])},filters:{percentage(t){return t?parseInt(100*t)+"%":""}}},D=A,U=(a("3315"),Object(l["a"])(D,$,H,!1,null,"58635852",null)),J=U.exports,W={name:"Home",components:{keyboard:G,textComponent:L,fingers:E,speed:J,settingsInfo:m},computed:{...Object(o["c"])(["showFingers"])}},B=W,Q=(a("05d3"),Object(l["a"])(B,r,i,!1,null,"132c71c0",null));e["default"]=Q.exports},"25f5":function(t,e,a){"use strict";a("c33f")},2964:function(t,e,a){var r=a("a1a8"),i=a("e505"),s=a("4ea0"),n=a("2e6e");e=r(!1);var o=i(s),c=i(n);e.push([t.i,'*[data-v-58635852]{padding:0;margin:0;outline:none}body[data-v-58635852],html[data-v-58635852]{min-height:100vh;background:rgba(203,242,144,.2)}li[data-v-58635852],ol[data-v-58635852],ul[data-v-58635852]{list-style:none}body[data-v-58635852]{padding:100px 0;box-sizing:border-box;overflow:hidden}.col-2[data-v-58635852]{width:16.66666667%}.col-3[data-v-58635852]{width:25%}.col-9[data-v-58635852]{width:75%}.col-10[data-v-58635852]{width:83.33333333%}.col-12[data-v-58635852]{width:100%}.speed-container[data-v-58635852]{width:756px;margin:0 auto;text-align:left;display:flex;justify-content:space-between}.speed-container .item label[data-v-58635852]{margin-right:4em}.speed-container .item .arrow[data-v-58635852]{display:inline-block;padding-right:20px;position:relative;margin-left:20px}.speed-container .item .arrow[data-v-58635852]:after{position:absolute;top:-4px;right:-2px;width:20px;height:28px;content:"";background:url('+o+") 50%/cover no-repeat}.speed-container .item .arrow.down[data-v-58635852]:after{background:url("+c+") 50%/cover no-repeat;transform:rotate(180deg)}.speed-container .item .arrow.error[data-v-58635852]:after{transform:rotate(180deg)}.speed-container .item .arrow.error.down[data-v-58635852]:after{transform:rotate(0deg)}",""]),t.exports=e},"2e6e":function(t,e,a){t.exports=a.p+"img/arrow-down.44703324.svg"},3315:function(t,e,a){"use strict";a("3c7d")},"3c7d":function(t,e,a){var r=a("2964");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=a("5925").default;i("02744ea3",r,!0,{sourceMap:!1,shadowMode:!1})},"47fe":function(t,e,a){var r=a("a1a8");e=r(!1),e.push([t.i,"*[data-v-a58698ac]{padding:0;margin:0;outline:none}body[data-v-a58698ac],html[data-v-a58698ac]{min-height:100vh;background:rgba(203,242,144,.2)}li[data-v-a58698ac],ol[data-v-a58698ac],ul[data-v-a58698ac]{list-style:none}body[data-v-a58698ac]{padding:100px 0;box-sizing:border-box;overflow:hidden}.col-2[data-v-a58698ac]{width:16.66666667%}.col-3[data-v-a58698ac]{width:25%}.col-9[data-v-a58698ac]{width:75%}.col-10[data-v-a58698ac]{width:83.33333333%}.col-12[data-v-a58698ac],img[data-v-a58698ac]{width:100%}",""]),t.exports=e},"4ea0":function(t,e,a){t.exports=a.p+"img/arrow-up.1c22213e.svg"},"6b9b":function(t,e,a){var r=a("a1a8");e=r(!1),e.push([t.i,"*[data-v-0291cd98]{padding:0;margin:0;outline:none}body[data-v-0291cd98],html[data-v-0291cd98]{min-height:100vh;background:rgba(203,242,144,.2)}li[data-v-0291cd98],ol[data-v-0291cd98],ul[data-v-0291cd98]{list-style:none}body[data-v-0291cd98]{padding:100px 0;box-sizing:border-box;overflow:hidden}.col-2[data-v-0291cd98]{width:16.66666667%}.col-3[data-v-0291cd98]{width:25%}.col-9[data-v-0291cd98]{width:75%}.col-10[data-v-0291cd98]{width:83.33333333%}.col-12[data-v-0291cd98]{width:100%}.key[data-v-0291cd98]{height:44px;line-height:44px;border-radius:4px;margin:2px}.key .multiple[data-v-0291cd98]{display:flex;flex-direction:column;justify-content:space-around;height:100%}.key .multiple span[data-v-0291cd98]{line-height:1em}.key.active[data-v-0291cd98]{opacity:.4}",""]),t.exports=e},"762e":function(t,e,a){"use strict";a("bb7d")},"83c3":function(t,e,a){"use strict";a("00c4")},"8b57":function(t,e,a){var r=a("a9db");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=a("5925").default;i("f1718118",r,!0,{sourceMap:!1,shadowMode:!1})},"9b9f":function(t,e,a){var r=a("f9f3");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=a("5925").default;i("44f04ad6",r,!0,{sourceMap:!1,shadowMode:!1})},"9cb7":function(t,e,a){t.exports=a.p+"img/fingers.049b644c.svg"},a9db:function(t,e,a){var r=a("a1a8");e=r(!1),e.push([t.i,"*[data-v-0cc18acb]{padding:0;margin:0;outline:none}body[data-v-0cc18acb],html[data-v-0cc18acb]{min-height:100vh;background:rgba(203,242,144,.2)}li[data-v-0cc18acb],ol[data-v-0cc18acb],ul[data-v-0cc18acb]{list-style:none}body[data-v-0cc18acb]{padding:100px 0;box-sizing:border-box;overflow:hidden}.col-2[data-v-0cc18acb]{width:16.66666667%}.col-3[data-v-0cc18acb]{width:25%}.col-9[data-v-0cc18acb]{width:75%}.col-10[data-v-0cc18acb]{width:83.33333333%}.col-12[data-v-0cc18acb]{width:100%}.keyboard[data-v-0cc18acb]{width:722px;margin:40px auto;padding:12px;background:#dfd9d9;border-radius:10px;display:flex;flex-wrap:wrap}",""]),t.exports=e},ac34:function(t,e,a){var r=a("1903");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=a("5925").default;i("d7147d60",r,!0,{sourceMap:!1,shadowMode:!1})},bb7d:function(t,e,a){var r=a("dd52");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=a("5925").default;i("37fe3119",r,!0,{sourceMap:!1,shadowMode:!1})},c206:function(t,e,a){t.exports=a.p+"fonts/UbuntuMono-RI.ee339fa5.ttf"},c33f:function(t,e,a){var r=a("6b9b");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var i=a("5925").default;i("dd674a4e",r,!0,{sourceMap:!1,shadowMode:!1})},c3e1:function(t,e,a){"use strict";a("8b57")},d31a:function(t,e,a){"use strict";a("9b9f")},dd52:function(t,e,a){var r=a("a1a8");e=r(!1),e.push([t.i,"*[data-v-06000904]{padding:0;margin:0;outline:none}body[data-v-06000904],html[data-v-06000904]{min-height:100vh;background:rgba(203,242,144,.2)}li[data-v-06000904],ol[data-v-06000904],ul[data-v-06000904]{list-style:none}body[data-v-06000904]{padding:100px 0;box-sizing:border-box;overflow:hidden}.col-2[data-v-06000904]{width:16.66666667%}.col-3[data-v-06000904]{width:25%}.col-9[data-v-06000904]{width:75%}.col-10[data-v-06000904]{width:83.33333333%}.col-12[data-v-06000904]{width:100%}.settings-container[data-v-06000904]{width:-moz-fit-content;width:fit-content;margin:0 auto;text-align:left}.settings-container label[data-v-06000904]{display:inline-block;min-width:80px}.settings-container .letter[data-v-06000904]{display:inline-block;width:1em;height:1em;line-height:1em;border:1px solid #888;color:#888;margin-left:.5em;text-align:center;cursor:pointer}.settings-container .letter.practiceLetter[data-v-06000904]{border-color:#67c23a;color:#67c23a}.settings-container .letter.keyLetter[data-v-06000904]{border-color:#f56c6c;color:#f56c6c}.settings-container .el-slider[data-v-06000904]{margin-left:84px}.settings-container .el-switch[data-v-06000904]{vertical-align:text-top;margin-left:.5em}.settings-container .el-color-picker[data-v-06000904]{vertical-align:bottom;margin-left:.5em}",""]),t.exports=e},f9f3:function(t,e,a){var r=a("a1a8"),i=a("e505"),s=a("c206");e=r(!1);var n=i(s);e.push([t.i,"*[data-v-b14a156a]{padding:0;margin:0;outline:none}body[data-v-b14a156a],html[data-v-b14a156a]{min-height:100vh;background:rgba(203,242,144,.2)}li[data-v-b14a156a],ol[data-v-b14a156a],ul[data-v-b14a156a]{list-style:none}body[data-v-b14a156a]{padding:100px 0;box-sizing:border-box;overflow:hidden}.col-2[data-v-b14a156a]{width:16.66666667%}.col-3[data-v-b14a156a]{width:25%}.col-9[data-v-b14a156a]{width:75%}.col-10[data-v-b14a156a]{width:83.33333333%}.col-12[data-v-b14a156a]{width:100%}@keyframes cursor-b14a156a{0%{background:none;color:#000}50%{background:#000;color:#fff}to{background:none;color:#000}}@font-face{font-family:Ubuntu Mono;src:url("+n+")}.text[data-v-b14a156a]{width:700px;margin:40px auto;text-align:left}.text span[data-v-b14a156a]{font-family:Ubuntu Mono,Lucida Console,monospace;display:inline-block;text-align:center;font-size:24px;font-weight:500;min-width:.5em}.text span.active[data-v-b14a156a]{animation:cursor-b14a156a .6s ease infinite}",""]),t.exports=e}}]);