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>
浙公网安备 33010602011771号