2 lines
1.5 KiB
JavaScript
2 lines
1.5 KiB
JavaScript
"use strict";const e=require("../../../common/vendor.js"),t=require("../../../utils/store.js");Math||a();const a=()=>"../../../components/SectionCard.js",i={__name:"index",setup(a){const i=t.useAppStore(),n=e.computed((()=>"dark"===i.state.settings.theme?"theme-dark":"")),s=e.computed((()=>i.state.settings.profile.nickname||"用户")),o=e.computed((()=>s.value.slice(0,1))),l=e.ref(i.state.settings.profile.nickname||""),r=["昵称仅用于个人页展示和首字头像,不参与账单计算。","账单、预算和设置默认不会自动上传云端。","如需更换设备,请先在“备份与恢复”页面导出 JSON 备份。"];function u(){const t=l.value.trim();i.setProfile({authorized:!1,nickname:t,avatarUrl:""}),e.index.showToast({title:"昵称已保存",icon:"none"})}function c(){l.value="",i.setProfile({authorized:!1,nickname:"",avatarUrl:""}),e.index.showToast({title:"昵称已清空",icon:"none"})}return e.watch((()=>i.state.settings.profile.nickname),(e=>{l.value=e||""})),(t,a)=>({a:e.t(o.value),b:e.t(s.value),c:l.value,d:e.o((e=>l.value=e.detail.value)),e:e.o(c),f:e.o(u),g:e.p({title:"昵称设置",subtitle:"修改后仅用于个人页展示和首字头像,不参与账单计算"}),h:e.t(o.value),i:e.p({title:"显示与模式",subtitle:"集中展示当前账户页的生效状态"}),j:e.f(r,((t,a,i)=>({a:e.t(a+1),b:e.t(t),c:t}))),k:e.p({title:"使用提示",subtitle:"帮助用户理解昵称显示与数据边界"}),l:e.n(n.value)})}},n=e._export_sfc(i,[["__scopeId","data-v-94494afd"]]);wx.createPage(n);
|