refactor(projects): 动态路由权限完善

This commit is contained in:
Soybean
2022-04-29 02:00:51 +08:00
parent 401f0c748d
commit 55ddc9cab0
36 changed files with 406 additions and 717 deletions

View File

@ -50,7 +50,7 @@ const activeComponent = computed(() => (isChromeMode.value ? ChromeTab : ButtonT
const tabRef = ref<HTMLElement>();
async function getActiveTabClientX() {
await nextTick();
if (tabRef.value) {
if (tabRef.value && tabRef.value.children.length && tabRef.value.children[tab.activeTabIndex]) {
const activeTabElement = tabRef.value.children[tab.activeTabIndex];
const { x, width } = activeTabElement.getBoundingClientRect();
const clientX = x + width / 2;