Files
tk-mini-program/unpackage/dist/build/mp-weixin/TUIKit/components/TUIGroup/manage-group/manage-name.js
pengxiaolong 8c70c2c850 优化页面
2025-06-09 23:02:05 +08:00

2 lines
1.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";const e=require("../../../../common/vendor.js");require("../../../adapter-vue.js");const t=require("../../../../common/assets.js"),u=require("../../common/Toast/index.js"),r=require("../../../utils/env.js"),n=require("../../common/Toast/type.js");Math||a();const a=()=>"../../common/Icon.js",o=e.defineComponent({__name:"manage-name",props:{data:{type:Object,default:()=>({})},isAuthor:{type:Boolean,default:!1}},emits:["update"],setup(a,{emit:o}){const s=a,f=e.ref({}),i=e.ref(""),l=e.ref(!1),m=e.ref(null);e.watchEffect((()=>{f.value=s.data}));const p=o,c=()=>{i.value?(i.value!==f.value.name&&(p("update",{key:"name",value:i.value}),f.value.name=i.value,i.value="",u.Toast({message:e.Wt.t("TUIGroup.群名称修改成功"),type:n.TOAST_TYPE.SUCCESS})),v()):u.Toast({message:e.Wt.t("TUIGroup.群名称不能为空"),type:n.TOAST_TYPE.ERROR})},v=()=>{s.isAuthor&&(l.value=!l.value),l.value&&(i.value=f.value.name)};return e.watch((()=>l.value),(t=>{t&&e.nextTick$1((()=>{var e;null==(e=m.value)||e.focus()}))})),(u,n)=>e.e({a:e.t(e.unref(e.Wt).t("TUIGroup.群名称")),b:e.unref(l)},e.unref(l)?e.e({c:!e.unref(r.isPC)},e.unref(r.isPC)?{}:{d:e.t(e.unref(e.Wt).t("TUIGroup.修改群聊名称")),e:e.t(e.unref(e.Wt).t("TUIGroup.修改群聊名称后,将在群内通知其他成员")),f:e.t(e.unref(e.Wt).t("关闭")),g:e.o$1(v)},{h:e.unref(l)},e.unref(l)?{i:e.o$1(c),j:e.unref(i),k:e.o$1((t=>e.isRef(i)?i.value=t.detail.value:null))}:{},{l:!e.unref(r.isPC)},e.unref(r.isPC)?{}:{m:e.t(e.unref(e.Wt).t("TUIGroup.仅限中文、字母、数字和下划线2-20个字"))},{n:!e.unref(r.isPC)},e.unref(r.isPC)?{}:{o:e.t(e.unref(e.Wt).t("确认")),p:e.o$1(c)},{q:e.unref(r.isMobile)?1:""}):{},{r:!e.unref(l)||!e.unref(r.isPC)},e.unref(l)&&e.unref(r.isPC)?{}:e.e({s:e.t(e.unref(f).name),t:a.isAuthor},a.isAuthor?{v:e.p({file:e.unref(t.editIcon),width:"14px",height:"14px"})}:{},{w:e.o$1(v)}))}}),s=e._export_sfc(o,[["__scopeId","data-v-5f0c4190"]]);wx.createComponent(s);