[탭 및 권한 시스템 개선] TabBar에서 이미 활성화된 탭 클릭 시 동작 방지 로직 추가, 권한 리소스 코드로 검색 기능 추가, 권한 테스트 페이지에서 불필요한 로딩 메시지 제거, 탭 관리 스토어에서 중복 탭 체크 및 활성 탭 전환 로직 개선
This commit is contained in:
@@ -25,7 +25,14 @@ import { useTabsStore } from "@/stores/tab";
|
||||
|
||||
const tabsStore = useTabsStore();
|
||||
|
||||
const handleTabClick = (tabKey: number) => tabsStore.setActiveTab(tabKey);
|
||||
const handleTabClick = (tabKey: number) => {
|
||||
// 이미 활성화된 탭이면 아무것도 하지 않음
|
||||
if (tabsStore.activeTab === tabKey) {
|
||||
return;
|
||||
}
|
||||
|
||||
tabsStore.setActiveTab(tabKey);
|
||||
};
|
||||
const handleTabClose = (tabKey: number) => tabsStore.removeTab(tabKey);
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user