uni.showActionSheet({
itemList: ["内勤添加","外勤添加"],
success: async res => {
if(res.tapIndex == 0){ //内勤只能添加一次
let index = this.explainList.findIndex(item=>item.name == '内勤');
if(index != -1) {
uni.showModal({
title:"警告!",
showCancel:false,
content:"内勤一天只能有一次打卡补签"
})
return
}
this.explainList.push(
{
name:"内勤",
id:ESUtils.fn.newGuid(),
addr:"",
start:"09:00",
over:"18:00",
state:"未打卡",
sign:0,
delete:true
}
)
}else if(res.tapIndex == 1){
this.explainList.push(
{
name:"外勤",
id:ESUtils.fn.newGuid(),
addr:"未知地址,补卡外勤",
start:"09:00",
over:"18:00",
state:"外勤未签到",
sign:0,
delete:true
}
);
}
}
});
- 发布:2025-11-24 17:03
- 更新:2025-11-24 17:07
- 阅读:12
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: windows11
HBuilderX类型: 正式
HBuilderX版本号: 4.75
手机系统: HarmonyOS NEXT
手机系统版本号: HarmonyOS 6.0.0
手机厂商: 华为
手机机型: 华为mate X5
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
点击按钮出现
点击按钮出现
预期结果:
正常弹出
正常弹出
实际结果:
弹出2次
弹出2次
bug描述:
使用uni.showActionSheet()API 在鸿蒙中会弹出2次