(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-651327ad"],{b7a5:function(t,e,i){},d435:function(t,e,i){"use strict";var a=i("b7a5"),n=i.n(a);n.a},deb4:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"tag-container"},[i("div",[i("div",{staticClass:"selectedRadio"},[t._v(t._s(t.title)+":")]),t._v(" "),"数量"===t.title?t._l(t.tagList,(function(e,a){return i("el-input-number",{key:a,attrs:{min:0,max:1e4,value:e,size:"mini"},on:{change:function(e){return t.handleChange(e,a)}}})})):[t._l(t.tagList,(function(e,a){return i("el-tag",{key:a,staticClass:"tag-item",attrs:{closable:"","disable-transitions":!1},on:{close:function(i){return t.handleDeleteTag(e)}}},[t._v("\n        "+t._s(e)+"\n      ")])})),t._v(" "),t.addTagInput.visable?i("el-input",{ref:"addTagInput",staticClass:"input-new-tag",staticStyle:{width:"100px"},attrs:{size:"small"},on:{blur:t.handleAddTag},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleAddTag(e)}},model:{value:t.addTagInput.val,callback:function(e){t.$set(t.addTagInput,"val",e)},expression:"addTagInput.val"}}):i("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:t.showAddTagInput}},[t._v("+ 添加")])]],2)])},n=[],s=(i("c5f6"),i("d084")),d={props:{tagList:{type:Array,default:function(){return[]}},title:{type:String,default:"标签"},edit:{type:String,default:""},typeid:{type:[String,Number],default:""}},data:function(){return{addTagInput:{visable:!1,val:""}}},watch:{tagList:function(){this.tagList.length<1&&this.$emit("selectTag",!1,this.title)}},methods:{handleAddTag:function(){var t=this,e=this.addTagInput.val;e&&(this.edit?this.$request(Object(s["b"])({attr_id:this.typeid,size:e}),(function(i){var a=i.id;t.tagList.push(e),t.$emit("addSize",a)})):(this.tagList.push(e),this.$emit("addSize"))),this.addTagInput.visable=!1,this.addTagInput.val=""},showAddTagInput:function(){var t=this;this.addTagInput.visable=!0,this.$nextTick((function(e){t.$refs.addTagInput.$refs.input.focus()}))},handleDeleteTag:function(t){var e=this;this.edit?this.$confirm("此操作将永久删除该尺寸, 是否继续?","提示").then((function(){e.$request(Object(s["d"])({attr_id:e.typeid,size:t}),(function(i){e.$emit("deleteSku",e.tagList.indexOf(t)),e.tagList.splice(e.tagList.indexOf(t),1)}))})).catch((function(){return e.$message.info("已取消删除")})):(this.$emit("deleteSku",this.tagList.indexOf(t)),this.tagList.splice(this.tagList.indexOf(t),1))},deleteTag:function(){this.$emit("deleteTag",this.title)},handleChange:function(t,e){this.$emit("numChange",t,e)}}},u=d,l=(i("d435"),i("2877")),c=Object(l["a"])(u,a,n,!1,null,"1b612878",null);e["default"]=c.exports}}]);