System.register(["./upload-gray-legacy.7de7f815.js","./index-legacy.a084919e.js"],(function(a,t){"use strict";var e,n,o=document.createElement("style");return o.textContent=".change-avatar[data-v-23c8eed7]{color:#1a1311;font-size:20px;line-height:29px}.change-avatar .avatar-content[data-v-23c8eed7]{position:fixed;top:50%;left:50%;width:440px;height:193px;background:var(--color-white);box-shadow:2px 2px 10px rgba(25,25,25,.2);border-radius:16px;transform:translate(-50%,-50%);z-index:11;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:111}.change-avatar .avatar-mask[data-v-23c8eed7]{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(112,112,112,.8);z-index:11}.avatar-content .el-button[data-v-23c8eed7]{width:94px;height:36px;color:var(--color-white);font-size:14px;background:#0071E3;border-radius:6px}\n",document.head.appendChild(o),{setters:[function(a){e=a.U},function(a){n=a.n}],execute:function(){var t={name:"change-avatar",props:{display:Boolean,callback:Function},components:{Upload:e},data:function(){return{data:{tag:"avatar"}}},methods:{onupload:function(a){var t=this;if("function"==typeof this.callback)this.callback(a);else{var e=this.$t("common.failure");this.$axios.post("/api/users/avatar",{avatar:a}).then((function(a){var n=a.data,o=n.code,i=n.msg;0==o?(t.$message.success(i),t.$store.dispatch("syncUserinfo"),t.hideThis()):t.$message.error(i||e)})).catch((function(){t.$message.error(e)}))}},hideThis:function(){this.$emit("toggleShowChangeAvatar",!1)}}};a("C",n(t,(function(){var a=this,t=a._self._c;return t("div",{staticClass:"change-avatar",style:{display:a.display?"block":"none"}},[t("div",{staticClass:"avatar-content"},[t("b",[a._v(a._s(a.$t("me.space.changeThumb")))]),t("br"),t("Upload",{attrs:{data:a.data},on:{onupload:a.onupload}},[t("el-button",{attrs:{type:"primary",round:""}},[a._v(a._s(a.$t("me.space.selectPic")))])],1)],1),t("div",{staticClass:"avatar-mask",on:{click:a.hideThis}})])}),[],!1,null,"23c8eed7",null,null).exports)}}}));
