codecook-carnumber.js 2.6 KB

1234567891011
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/codecook-carnumber/codecook-carnumber"],{7300:function(t,n,e){},8446:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return r})),e.d(n,"a",(function(){}));var i=function(){var t=this.$createElement;this._self._c},r=[]},"89e8":function(t,n,e){"use strict";e.r(n);var i=e("8ed7"),r=e.n(i);for(var u in i)["default"].indexOf(u)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(u);n["default"]=r.a},"8ed7":function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i={name:"CarNumber",components:{KeyBoard:function(){e.e("components/codecook-keyboard/codecook-keyboard").then(function(){return resolve(e("be97"))}.bind(null,e)).catch(e.oe)}},props:{value:{type:String,default:""},length:{type:Number,default:8}},data:function(){return{focus:!1,current:0,fill:new Array(this.length).fill("")}},computed:{kType:function(){return 0===this.current?"provinces":"areas"}},watch:{fill:function(t){console.log(t),this.$emit("input",t.join("")),this.$emit("change",t)}},methods:{setCarNumValue:function(t){var n=t.split("");7==t.split("").length&&n.push(""),this.fill=n},focusHandler:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focus=!0,this.current=t,console.log(this.current)},keyDeleteHandler:function(){this.$set(this.fill,this.current,""),this.current<=0||(this.current-=1)},keyInputHandler:function(t){this.$set(this.fill,this.current,t),this.current>=this.length-1||(this.current+=1)},keyHideHandler:function(){this.focus=!1}},beforeMount:function(){var t=this;this.value&&(this.value.split("").forEach((function(n,e){e>=t.length||t.$set(t.fill,e,n)})),this.current=Math.min(this.value.length,this.length-1))},mounted:function(){}};n.default=i},9425:function(t,n,e){"use strict";e.r(n);var i=e("8446"),r=e("89e8");for(var u in r)["default"].indexOf(u)<0&&function(t){e.d(n,t,(function(){return r[t]}))}(u);e("df99");var o=e("f0c5"),c=Object(o["a"])(r["default"],i["b"],i["c"],!1,null,"0a188ba0",null,!1,i["a"],void 0);n["default"]=c.exports},df99:function(t,n,e){"use strict";var i=e("7300"),r=e.n(i);r.a}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/codecook-carnumber/codecook-carnumber-create-component',
  4. {
  5. 'components/codecook-carnumber/codecook-carnumber-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("9425"))
  7. })
  8. },
  9. [['components/codecook-carnumber/codecook-carnumber-create-component']]
  10. ]);