(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-80a93a30"],{"75d7":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"tag-container"},[n("div",[n("div",{staticClass:"selectedRadio"},[t._v(t._s(t.title)+":")]),"数量"===t.title?t._l(t.tagList,(function(e,i){return n("el-input-number",{key:i,attrs:{min:0,max:1e4,value:e,size:"mini"},on:{change:function(e){return t.handleChange(e,i)}}})})):[t._l(t.tagList,(function(e,i){return n("el-tag",{key:i,staticClass:"tag-item",attrs:{closable:"","disable-transitions":!1},on:{close:function(n){return t.handleDeleteTag(e)}}},[t._v(" "+t._s(e)+" ")])})),t.addTagInput.visable?n("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"}}):n("el-button",{staticClass:"button-new-tag",attrs:{size:"small"},on:{click:t.showAddTagInput}},[t._v("+ 添加")])]],2)])},a=[],s=(n("a9e3"),n("a434"),n("c40e")),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["addSize"])({attr_id:this.typeid,size:e}),(function(n){var i=n.id;t.tagList.push(e),t.$emit("addSize",i)})):(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["delSize"])({attr_id:e.typeid,size:t}),(function(n){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,o=(n("dd27"),n("2877")),r=Object(o["a"])(u,i,a,!1,null,"7f0510c2",null);e["default"]=r.exports},"843c":function(t,e,n){},c40e:function(t,e,n){"use strict";n.d(e,"f",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"a",(function(){return d})),n.d(e,"h",(function(){return u})),n.d(e,"c",(function(){return o})),n.d(e,"e",(function(){return r}));var i=n("b775"),a=function(t){return Object(i["a"])({url:"/goods/list",method:"get",params:t})},s=function(t){return Object(i["a"])({url:"/goods/shelves",method:"post",data:t})},d=function(t){return Object(i["a"])({url:"/goods/add_goods",method:"post",data:t})},u=function(t){return Object(i["a"])({url:"/goods/upload_img",method:"post",data:t})},o=function(t){return Object(i["a"])({url:"/goods/destroy",method:"post",data:t})},r=function(t){return Object(i["a"])({url:"/goods/edit_goods",method:"post",data:t})}},dd27:function(t,e,n){"use strict";n("843c")}}]);