text: webpackJsonp([7],{"1AM0":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("Xxa5"),r=a.n(n),s=a("exGp"),c=a.n(s),u=a("Dd8w"),o=a.n(u),i=a("5reh"),p={name:"XgSetTag",beforeMount:function(){this.getTagMap()},data:function(){return{tagMap:""}},methods:{getTagMap:function(){this.tagMap=o()({},this.$store.state.tagMap)},changeTag:function(t){var e=this;return c()(r.a.mark(function a(){var n;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=void 0,a.prev=1,a.next=4,e.$messagebox.prompt("请输入标签名");case 4:n=(n=a.sent).value,a.next=11;break;case 8:return a.prev=8,a.t0=a.catch(1),a.abrupt("return");case 11:n&&n.length<=5?e.tagMap[t]=n:e.$messagebox.alert("标签名应在1~5个字符之间");case 12:case"end":return a.stop()}},a,e,[[1,8]])}))()},uploadTagMap:function(){var t=this;return c()(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.$store.dispatch(i.n,t.tagMap);case 3:e.next=9;break;case 5:return e.prev=5,e.t0=e.catch(0),t.$messagebox.alert("保存失败"),e.abrupt("return");case 9:t.$messagebox.alert("保存成功").then(function(e){t.$router.back()});case 10:case"end":return e.stop()}},e,t,[[0,5]])}))()}},components:{XgButton:a("lkey").a}},g={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"xg-tag"},[a("h2",[t._v("自定义标签 ")]),t._v(" "),a("p",[t._v("点击标签进行修改")]),t._v(" "),t._l(t.tagMap,function(e,n){return a("div",{key:n,staticClass:"xg-tag-item",class:n},[a("el-tag",{attrs:{type:n},nativeOn:{click:function(e){t.changeTag(n)}}},[a("i",{staticClass:"icon icon-tag"}),t._v("\n      "+t._s(e)+"\n    ")]),t._v("\n    标签名："+t._s(e)+"\n  ")],1)}),t._v(" "),a("xg-button",{staticClass:"btn",attrs:{type:"primary",size:"large"},on:{click:t.uploadTagMap}},[t._v("\n    保存\n  ")])],2)},staticRenderFns:[]};var v=a("VU/8")(p,g,!1,function(t){a("63vu")},"data-v-1c4d6808",null);e.default=v.exports},"63vu":function(t,e){}});