(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-543cc358"],{"018d":function(t,e,n){"use strict";var i=n("1c43"),a=n.n(i);a.a},"1c43":function(t,e,n){},"4a7e":function(t,e,n){"use strict";n.d(e,"j",(function(){return a})),n.d(e,"m",(function(){return d})),n.d(e,"a",(function(){return o})),n.d(e,"l",(function(){return u})),n.d(e,"g",(function(){return s})),n.d(e,"i",(function(){return r})),n.d(e,"e",(function(){return c})),n.d(e,"d",(function(){return l})),n.d(e,"f",(function(){return g})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return h})),n.d(e,"h",(function(){return p})),n.d(e,"k",(function(){return m}));var i=n("b775");function a(t){return Object(i["a"])({url:"/studioGood/get_goods_attr",method:"get",data:t})}function d(t){return Object(i["a"])({url:"/goods/uploadgoodsimage",method:"post",data:t})}function o(t){return Object(i["a"])({url:"/studioGood/add_good",method:"post",data:t})}function u(t){return Object(i["a"])({url:"/studioGood/update_good",method:"post",data:t})}function s(t){return Object(i["a"])({url:"/studioGood/good_list",method:"get",params:t})}function r(t){return Object(i["a"])({url:"/studioGood/good_attr",method:"get",params:t})}function c(t){return Object(i["a"])({url:"/studioGood/add_good_attr",method:"get",params:t})}function l(t){return Object(i["a"])({url:"/studioGood/destorygoods",method:"post",data:t})}function g(t){return Object(i["a"])({url:"/studioGood/good_detail",method:"get",params:t})}function f(t){return Object(i["a"])({url:"/studioGood/add_size",method:"get",params:t})}function h(t){return Object(i["a"])({url:"/studioGood/destory_size",method:"get",params:t})}function p(t){return Object(i["a"])({url:"/studioGood/get_good_attr",method:"get",data:t})}function m(t){return Object(i["a"])({url:"/studioGood/good_sort",method:"post",data:t})}},"8f07":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._v(" "),"数量"===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("\n        "+t._s(e)+"\n      ")])})),t._v(" "),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=[],d=(n("c5f6"),n("4a7e")),o={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(d["b"])({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(d["c"])({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=o,s=(n("018d"),n("2877")),r=Object(s["a"])(u,i,a,!1,null,"54a2f6a0",null);e["default"]=r.exports}}]);