Files
kefu/deploy/ark-chat-config-20260917/payload/admin-web/apps/web-antd/dist/js/base-setting-CG3mjOo-.js
T
2026-09-21 10:34:06 +08:00

1 line
1.8 KiB
JavaScript

import{n as e}from"./rolldown-runtime-hePW80VL.js";import{D as t,E as n,On as r,b as i,ct as a,g as o,gn as s,k as c,mt as l,qt as u,tr as d,v as f,vn as p}from"./runtime-core.esm-bundler-DkysjgTd.js";import{C as m,w as h}from"./runtime-dom.esm-bundler-CirRHyjC.js";import{n as g}from"./objectWithoutProperties-BjoYlK0I.js";import{t as _}from"./use-vben-form-Ci_vT-oC.js";import{n as v}from"./store-B2VrBUyT.js";import{t as y}from"./button-Cr_3AtOU.js";import{t as b}from"./src-DxaB-oAj.js";var x=[`onKeydown`],S=c({__name:`base-setting`,props:{formSchema:{default:()=>[]}},emits:[`submit`],setup(e,{expose:a,emit:c}){let f=e,p=c,[v,S]=_(s({commonConfig:{componentProps:{class:`w-full`}},layout:`horizontal`,schema:o(()=>f.formSchema),showDefaultActions:!1}));function C(){return w.apply(this,arguments)}function w(){return w=g(function*(){let{valid:e}=yield S.validate(),t=yield S.getValues();e&&p(`submit`,t)}),w.apply(this,arguments)}return a({getFormApi:()=>S}),(e,a)=>(l(),i(`div`,{onKeydown:m(h(C,[`prevent`]),[`enter`])},[t(r(v)),t(r(y),{type:`submit`,class:`mt-4`,onClick:C},{default:u(()=>[n(d(r(b)(`profile.updateBasicProfile`)),1)]),_:1})],40,x))}}),C=c({__name:`base-setting`,setup(e){let t=p(),n=[{label:`管理员`,value:`super`},{label:`用户`,value:`user`},{label:`测试`,value:`test`}],i=o(()=>[{fieldName:`realName`,component:`Input`,label:`姓名`},{fieldName:`username`,component:`Input`,label:`用户名`},{fieldName:`roles`,component:`Select`,componentProps:{mode:`tags`,options:n},label:`角色`},{fieldName:`introduction`,component:`Textarea`,label:`个人简介`}]);return a(g(function*(){let e=yield v();t.value.getFormApi().setValues(e)})),(e,n)=>(l(),f(r(S),{ref_key:`profileBaseSettingRef`,ref:t,"form-schema":i.value},null,8,[`form-schema`]))}}),w=e({default:()=>T}),T=C;export{w as n,T as t};