feat: 抽屉效果再app不兼容问题处理

This commit is contained in:
2026-05-11 16:04:41 +08:00
parent 9cd3916ab2
commit 0dfd4fda1e
5 changed files with 41 additions and 17 deletions

View File

@@ -1,6 +1,8 @@
<template>
<view class="border-box h-44 flex flex-items-center pl-12 pr-12">
<uni-icons type="bars" size="24" color="#333" @click="showDrawer" />
<view class="nav-icon-button" @tap.stop="showDrawer">
<uni-icons type="bars" size="24" color="#ffffff" />
</view>
<!-- 隐藏 -->
<view class="flex-full h-full flex flex-items-center flex-justify-center">
@@ -54,7 +56,9 @@ const spriteStyle = computed(() => {
};
});
const showDrawer = () => uni.$emit("SHOW_DRAWER");
const emit = defineEmits(["showDrawer"]);
const showDrawer = () => emit("showDrawer");
defineExpose({ show });
</script>