mirror of
https://gitee.com/vben/vben-app.git
synced 2026-10-06 14:13:09 +08:00
2 lines
1.2 KiB
JavaScript
2 lines
1.2 KiB
JavaScript
var r=(e,n,t)=>new Promise((c,f)=>{var g=a=>{try{i(t.next(a))}catch(s){f(s)}},h=a=>{try{i(t.throw(a))}catch(s){f(s)}},i=a=>a.done?c(a.value):Promise.resolve(a.value).then(g,h);i((t=t.apply(e,n)).next())});import{t as l,ab as m,E as o}from"./bootstrap-Dvp__AlY.js";import{h as p}from"./ruoyi-CzpLVGiR.js";const u=e=>r(null,null,function*(){const n=yield l.get(`${e.url}/list`,{params:e.form});e.list=p(n)}),x=(e,n)=>r(null,null,function*(){m.confirm("确认要删除吗?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>r(null,null,function*(){yield l.delete(`${e.url}/${n}`),yield u(e)})).catch(()=>o.info("已取消删除"))});function B(e){return r(this,null,function*(){const n=e.ids.join(",");if(n.length<=0){o.warning("请选择后再进行删除");return}m.confirm("确认删除已选中的数据项?","警告",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>r(null,null,function*(){yield l.delete(`${e.url}/${n}`),yield u(e)})).catch(()=>o.info("已取消删除"))})}function T(e,n,t){t||(t="id"),n.ids=e.map(c=>c[t]),n.single=e.length!==1,n.multiple=e.length===0}export{x as a,T as b,B as c,u as t};
|