| 123456789 |
- /**
- * 由 Fantastic-admin 提供技术支持
- * Powered by Fantastic-admin
- * Gitee https://gitee.com/hooray/fantastic-admin
- * Github https://github.com/hooray/fantastic-admin
- */
-
- import{g as A,c as E,u as M}from"./appCatApi-59977133.js";import{aU as U}from"./index-5cddd228.js";import{j as h,r as f,J as z,o as B,a3 as r,ad as I,k as g,l as _,E as o,y as l,C,z as R,u as a}from"./runtime-core.esm-bundler-5fc1c360.js";import{b}from"./route-block-83d24a4e.js";import"./menu-2c9c5182.js";import"./settings-be8974ad.js";import"./pinia-7162f4ce.js";import"./_MapCache-1b613190.js";import"./vue-router-8a13d09b.js";import"./index-c228ae8f.js";import"./iframe-10768394.js";import"./runtime-dom.esm-bundler-e65f1c43.js";const q=h({__name:"AppCat",emits:["success"],setup(N,{expose:D,emit:n}){const p=f(),V=f({appCatTitle:[{required:!0,message:"请输入标题",trigger:"blur"}],appCatDesc:[{required:!1,message:"请输入描述",trigger:"blur"}]}),e=z({title:"",dialogVisible:!1,loading:!1,formData:{appCatId:0,appCatTitle:"",appCatDesc:""},actionType:1});B(()=>{});const y=async i=>{e.loading=!0;const{data:t}=await A(i);e.loading=!1,e.formData=t};function v(){p.value&&p.value.validate(async i=>{i&&(e.actionType===1?(await E(e.formData),e.dialogVisible=!1,n("success")):(await M(e.formData),e.dialogVisible=!1,n("success")),U.success({message:"保存成功",center:!0}))})}function T(){e.dialogVisible=!1}function d(){e.formData={appCatId:0,appCatTitle:"",appCatDesc:""}}return D({showAddModel(){d(),e.title="新增",e.actionType=1,e.dialogVisible=!0},showEditModel(i){d(),e.title="编辑",e.actionType=2,e.dialogVisible=!0,y(i)}}),(i,t)=>{const m=r("el-input"),u=r("el-form-item"),w=r("el-form"),c=r("el-button"),k=r("el-dialog"),x=I("loading");return g(),_("div",null,[o(k,{modelValue:a(e).dialogVisible,"onUpdate:modelValue":t[2]||(t[2]=s=>a(e).dialogVisible=s),title:a(e).title,width:"600px","close-on-click-modal":!1,"append-to-body":"","destroy-on-close":""},{footer:l(()=>[o(c,{size:"large",onClick:T},{default:l(()=>[C(" 取消 ")]),_:1}),o(c,{type:"primary",size:"large",onClick:v},{default:l(()=>[C(" 保存 ")]),_:1})]),default:l(()=>[R((g(),_("div",null,[o(w,{ref_key:"formRef",ref:p,model:a(e).formData,rules:a(V),"label-width":"120px","label-suffix":":"},{default:l(()=>[o(u,{label:"分类名称",prop:"appCatTitle"},{default:l(()=>[o(m,{modelValue:a(e).formData.appCatTitle,"onUpdate:modelValue":t[0]||(t[0]=s=>a(e).formData.appCatTitle=s),placeholder:"请输入标题"},null,8,["modelValue"])]),_:1}),o(u,{label:"简要说明",prop:"appCatDesc"},{default:l(()=>[o(m,{modelValue:a(e).formData.appCatDesc,"onUpdate:modelValue":t[1]||(t[1]=s=>a(e).formData.appCatDesc=s),type:"textarea",rows:"10",placeholder:"请输入简要说明"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])),[[x,a(e).loading]])]),_:1},8,["modelValue","title"])])}}});typeof b=="function"&&b(q);export{q as default};
|