/* empty css                  *//* empty css                 */import{d as R,I as T,r as m,c as s,a as r,x as u,a5 as g,b as l,u as d,w as h,i as V,F as f,h as _,o,e as W,E as C,aj as N,t as k,a9 as z,ab as P,a0 as v,_ as w}from"./index-hZHbf6Qq.js";import{P as S}from"./index-C__Mp2q5.js";/* empty css                                                              *//* empty css                        */import{P as I}from"./index-DIsilPwG.js";/* empty css               *//* empty css                  *//* empty css                  *//* empty css                             *//* empty css                 */import{T as U}from"./index-BqhCx7JE.js";/* empty css                    *//* empty css                      */const M={class:"page-container"},j={class:"page-header"},q={class:"footprint-list"},A={class:"group-header"},D={class:"group-date"},G={class:"product-grid"},Q=R({__name:"index",setup($){const c=T({pageNum:1,pageSize:20}),x=m(100),a=m([{date:"12月10日",label:"昨天",products:[{id:1,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"协议价",image:"",checked:!0},{id:2,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:"",checked:!1},{id:3,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:"",checked:!1},{id:4,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:"",checked:!1},{id:5,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:"",checked:!1}]},{date:"12月07日",label:"",products:[{id:6,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"协议价",image:"",checked:!0},{id:7,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:"",checked:!0},{id:8,name:"格力KFR-72LW/定频冷暖空调柜机3P",price:"1,299",originalPrice:"1,899",tag:"",image:"",checked:!1}]}]),y=()=>{},E=()=>{const n=[];a.value.forEach(e=>{e.products.forEach(i=>{i.checked&&n.push(i)})}),n.length===0?P.confirm("确定要清空所有浏览足迹吗？","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{a.value=[],v.success("已清空所有足迹")}):P.confirm(`确定要删除选中的${n.length}条足迹吗？`,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{a.value.forEach(e=>{e.products=e.products.filter(i=>!i.checked)}),a.value=a.value.filter(e=>e.products.length>0),v.success("删除成功")})};return(n,e)=>{const i=C,B=V,F=z;return o(),s("div",M,[r("div",j,[l(d(S),{title:"我的足迹"}),l(B,{type:"danger",link:"",onClick:E},{default:h(()=>[l(i,null,{default:h(()=>[l(d(N))]),_:1}),e[2]||(e[2]=W("删除足迹",-1))]),_:1})]),r("div",q,[(o(!0),s(f,null,_(a.value,(t,L)=>(o(),s("div",{key:L,class:"footprint-group"},[r("div",A,[r("span",D,k(t.date)+" "+k(t.label),1)]),r("div",G,[(o(!0),s(f,null,_(t.products,(p,b)=>(o(),u(d(I),{key:b,product:p,modelValue:p.checked,"onUpdate:modelValue":K=>p.checked=K,"show-checkbox":""},null,8,["product","modelValue","onUpdate:modelValue"]))),128))])]))),128))]),a.value.length===0?(o(),u(F,{key:0,description:"暂无浏览足迹"})):g("",!0),a.value.length>0?(o(),u(d(U),{key:1,page:c.pageNum,"onUpdate:page":e[0]||(e[0]=t=>c.pageNum=t),"page-size":c.pageSize,"onUpdate:pageSize":e[1]||(e[1]=t=>c.pageSize=t),total:x.value,onChange:y},null,8,["page","page-size","total"])):g("",!0)])}}}),le=w(Q,[["__scopeId","data-v-51ac8c10"]]);export{le as default};
