2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
import{r as e,s,p as a,o as l,a as t,O as o,G as i,N as u,b as c,w as n,e as r,y as p,E as v,D as d,x as f,i as h}from"./index-CH9-aFWw.js";import{_ as m}from"./uni-icons.DST64Pwo.js";import{r as g}from"./uni-app.es.DPi2kvld.js";import{_ as x}from"./_plugin-vue_export-helper.BCo6x5W8.js";const _=x({__name:"index",props:{reserveHeight:{type:Number,default:40},defaultExpanded:{type:Boolean,default:!1},buttonText:{type:String,default:"展开"}},setup(x){const _=x,b=e(!1),y=e(b.value?"收起":"查看更多订单信息"),w=e(null),j=e({}),k=()=>{b.value?(y.value="查看更多订单信息",j.value={height:`${_.reserveHeight}px`},b.value=!1):(y.value="收起",j.value={height:w.value+"px"},b.value=!0)};return s((()=>{d().select("#click-show-more").boundingClientRect((e=>{console.log("元素高度:",e.height),w.value=e.height,j.value={height:`${_.reserveHeight}px`}})).exec()})),(e,s)=>{const d=f,x=g(a("uni-icons"),m),_=h;return l(),t("div",{class:"click-show-more bfff"},[o("div",{style:u(j.value),id:"click-show-more",class:"content"},[i(e.$slots,"default",{},void 0,!0)],4),c(_,{onClick:k,class:"bfff p25 df aic jcc"},{default:n((()=>[c(d,{class:"f24 c999"},{default:n((()=>[r(p(y.value),1)])),_:1}),c(x,{class:v([{cStyle:b.value},"icons"]),type:"down",size:16},null,8,["class"])])),_:1})])}}},[["__scopeId","data-v-e4be2fbb"]]);export{_ as C};
|