(window.webpackJsonp=window.webpackJsonp||[]).push([[57],{165:function(t,e,s){},320:function(t,e,s){"use strict";var i=s(165);s.n(i).a},335:function(t,e,s){"use strict";s.r(e);s(316),s(164),s(318),s(99);var i={data:function(){return{letter:["A","B","C","D","E","F","G"],digital:{A:0,B:7,C:14,D:21,E:28,F:35,G:42},enter:"",ships:{0:Math.floor(48*Math.random()),1:Math.floor(48*Math.random()),2:Math.floor(48*Math.random())}}},methods:{btn:function(t,e){var s,i,n=new RegExp(/^[a-g][0-6]/i);if(2==t.length)return this.enter=t,void this.setAttribute(e);n.test(this.enter)?(i=this.enter[0].toUpperCase(),s=Number.parseInt(this.digital[i])+Number.parseInt(this.enter[1]),this.setAttribute(s)):alert("请输入正确的坐标;\n如: A6!")},setAttribute:function(t){var e=this.$refs.td[t].getAttribute("class").split(" ");e.length>1?alert("该区域已经".concat(e[0],",请切换其他空白区域!")):this.ships[0]===t||this.ships[1]===t||this.ships[2]===t?this.$refs.td[t].setAttribute("class","ship td"):this.$refs.td[t].setAttribute("class","miss td")},reload:function(){for(var t in this.enter="",this.ships)this.ships[t]=Math.floor(48*Math.random());for(var e in this.$refs.td)this.$refs.td[e].setAttribute("class","td")}}},n=(s(320),s(0)),r=Object(n.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"continuar"},[s("div",{staticClass:"table"},t._l(t.letter,(function(e,i){return s("div",{key:i,staticClass:"tr"},t._l([0,1,2,3,4,5,6],(function(i){return s("div",{key:i,ref:"td",refInFor:!0,staticClass:"td",on:{click:function(s){return t.btn(e+i,t.digital[e]+i)}}})})),0)})),0),t._v(" "),s("div",{staticClass:"enter"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.enter,expression:"enter"}],attrs:{type:"text",placeholder:"A0",maxlength:"2",id:"coordinate",value:""},domProps:{value:t.enter},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.btn(e)},input:function(e){e.target.composing||(t.enter=e.target.value)}}}),t._v(" "),s("div",{staticClass:"btn",on:{click:t.btn}},[t._v("输入")]),t._v(" "),s("div",{staticClass:"btn reload",on:{click:t.reload}},[t._v("重置")])])])}),[],!1,null,"52af7078",null);e.default=r.exports}}]);