showActionSheet

<template>
    <button @click="show">显示</button>
</template>

<script setup>
    const arr = ['A','B','C']
    const show = () => {
        // 下面弹出来的选项
        uni.showActionSheet({
            title: '请选择',
            // 选项数组
            itemList:arr,
            // res可以获取选择的的index
            success: (res) => {
                console.log('选择的回调函数',res)
            }
        })
    }
</script>

 

posted on 2025-03-01 14:32  ChoZ  阅读(15)  评论(0)    收藏  举报

导航