1 |
- import{A as l}from"./index.5fdd5242.js";import{d as r,r as h,Z as s,c as n}from"./index.3b0304e1.js";var p=r({name:"o-action-sheet",props:{show:{type:Boolean,default:!1},actions:{type:Array,required:!0,default:()=>[]},cancelText:{type:String,default:"\u53D6\u6D88"},teleport:{type:[String,Element],default:""}},emits:["update:show","select"],setup(t,{emit:a}){const o=h({oPopover:t.show}),c=e=>{a("select",e),a("update:show",!1)};return s(()=>o.oPopover,()=>{a("update:show",o.oPopover)}),s(()=>t.show,()=>{o.oPopover=t.show}),()=>n(l,{show:o.oPopover,"onUpdate:show":e=>o.oPopover=e,teleport:t.teleport},{default:()=>[n("div",{class:["van-sheet_content van-hairline--bottom"]},[t.actions.map(e=>n("div",{class:["van-sheet-item",e.selected&&"van-sheet-item-active"],onClick:()=>c(e)},[e.name]))]),n("button",{type:"button",class:"van-action-sheet__cancel van-action-sheet_bottom__cancel",onClick:()=>a("update:show",!1)},[t.cancelText])]})}});export{p as O};
|