mirror of
https://github.com/talktao/Vue3-Vite-Vant-TS-H5.git
synced 2025-05-03 00:12:43 +08:00
2 lines
2.7 KiB
JavaScript
2 lines
2.7 KiB
JavaScript
import{_ as E}from"./index.19d4961f.js";import{q as w,t as D,E as T,r as l,o as _,s as v,w as s,G as i,v as n,M as j,O as I,u as x,z as V,Z as $,x as p,X as z,Y as L}from"./vendor.17bdbd54.js";const R=u=>(z("data-v-8deefbe2"),u=u(),L(),u),A={class:"search d-flex flex-column justify-content-start"},H={action:"javascript:return true"},N={class:"card_Box mrn d-flex flex-column justify-content-start"},U={class:"list_content d-flex justify-content-between align-items-center"},q={class:"left"},G={class:"right d-flex flex-column justify-content-around w-100 h-100 ps-4 fs-4"},M=R(()=>n("div",null,"\u526F\u6807\u9898xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",-1)),O={class:"price"},X=w({setup(u){const C=()=>{const a=V({value:"",isSearch:!0,goodsList:[],titleText:"\u641C\u7D22",scrollTop:0});return D(a)},{value:c,isSearch:f,goodsList:Y,titleText:Z,scrollTop:J}=C(),m=T(0);let t=[{id:1,title:"\u56DB\u4EF6\u5957",price:999},{id:2,title:"\u88AB\u5B50",price:555},{id:3,title:"\u6795\u5934",price:888}];const F=a=>{console.log(a,"params")},h=a=>{F(a),console.log(a,"eeeeeehandleSearch")},b=a=>{switch(a.name){case 0:t=t,console.log(t,"000000000");break;case 1:t=t,console.log(t,"111111111");break;case 2:t=t.sort((e,r)=>e.price-r.price),console.log(t,"222222222");break;case 3:t=t.sort((e,r)=>r.price-e.price),console.log(t,"33333333333");break}};return(a,e)=>{const r=l("CustomHeader"),S=l("van-search"),d=l("van-tab"),k=l("van-tabs"),y=l("van-sticky"),B=l("van-loading"),g=l("van-image");return _(),v("div",A,[s(y,null,{default:i(()=>[s(r,{title:"\u641C\u7D22",leftIcon:"arrow-left",leftText:""}),n("form",H,[s(S,{ref:"search",onFocus:e[1]||(e[1]=o=>f.value=!0),placeholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u6587\u5B57",shape:"round",modelValue:x(c),"onUpdate:modelValue":e[2]||(e[2]=o=>$(c)?c.value=o:null),"show-action":"",onClick:e[3]||(e[3]=o=>f.value=!0),onSearch:e[4]||(e[4]=o=>h(x(c))),autofocus:!1},{action:i(()=>[n("div",{class:"search_Btn",onClick:e[0]||(e[0]=o=>h(x(c)))},"\u641C\u7D22")]),_:1},8,["modelValue"])]),s(k,{active:m.value,"onUpdate:active":e[5]||(e[5]=o=>m.value=o),onClickTab:b},{default:i(()=>[s(d,{title:"\u7EFC\u5408"}),s(d,{title:"\u9500\u91CF"}),s(d,{title:"\u4EF7\u683C\u5347\u5E8F"}),s(d,{title:"\u4EF7\u683C\u964D\u5E8F"})]),_:1},8,["active"])]),_:1}),n("div",N,[(_(!0),v(j,null,I(x(t),o=>(_(),v("div",{key:o.id},[n("div",U,[n("div",q,[s(g,{radius:"14",width:"130",height:"120",fit:"cover",src:"https://img.yzcdn.cn/vant/cat.jpeg"},{loading:i(()=>[s(B,{type:"spinner",size:"20"})]),error:i(()=>[s(g)]),_:1})]),n("div",G,[n("div",null,p(o.title),1),M,n("div",O,"\u4EF7\u683C\uFF1A\uFFE5"+p(o.price),1),n("div",null,p(o.id),1)])])]))),128))])])}}});var Q=E(X,[["__scopeId","data-v-8deefbe2"]]);export{Q as default};
|