Skip to content

Commit

Permalink
fix(ui): Fixed menu layout anomaly (#906)
Browse files Browse the repository at this point in the history
  • Loading branch information
qianmoQ authored Jan 22, 2025
2 parents 7f7d0c8 + 88f4373 commit 424192e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion core/datacap-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"lodash": "^4.17.21",
"md-editor-v3": "^4.12.1",
"uuid": "^9.0.1",
"view-shadcn-ui": "^2025.1.1",
"view-shadcn-ui": "^2025.1.2",
"vue": "^3.4.21",
"vue-clipboard3": "^2.0.0",
"vue-i18n": "^9.10.1",
Expand Down
10 changes: 5 additions & 5 deletions core/datacap-ui/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</template>

<ShadcnMenuItem v-for="children in item.children"
class="w-full"
:name="children.id"
:active="$route.path === children.url"
:to="children.url">
Expand All @@ -38,6 +39,7 @@
</ShadcnMenuItem>
</ShadcnMenuSub>
<ShadcnMenuItem v-else
class="w-full"
:name="item.id"
:active="$route.path === item.url"
:to="item.url">
Expand All @@ -50,16 +52,16 @@
</ShadcnMenu>
</ShadcnLayoutHeader>

<ShadcnSpace>
<ShadcnSpace size="large">
<!-- Language Switcher -->
<div class="mr-3 mt-2.5 items-center">
<div class="mt-2.5 items-center">
<ShadcnTooltip :content="$t('common.feedback')">
<ShadcnLink link="https://github.com/devlive-community/datacap" external target="_blank">
<ShadcnIcon icon="CircleHelp" :size="20"/>
</ShadcnLink>
</ShadcnTooltip>
</div>
<div class="ml-3 mr-5 mt-1">
<div class="mt-1">
<LanguageSwitcher @changeLanguage="onChangeLanguage($event)"/>
</div>
<!-- User Info -->
Expand All @@ -74,7 +76,11 @@
<div v-else>
<ShadcnDropdown position="right">
<template #trigger>
<ShadcnAvatar :src="userInfo.avatar" :alt="userInfo.username"/>
<ShadcnAvatar class="mt-1"
style="width: 2rem;"
:src="userInfo.avatar"
:alt="userInfo.username">
</ShadcnAvatar>
</template>

<ShadcnDropdownItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ShadcnLayoutSider class="mr-4">
<LayoutSidebar/>
</ShadcnLayoutSider>
<ShadcnLayoutMain class="ml-2">
<ShadcnLayoutMain class="ml-20">
<ShadcnLayoutContent>
<RouterView/>
</ShadcnLayoutContent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<template>
<ShadcnMenu>
<ShadcnMenuItem v-for="item in items"
class="w-full"
:name="item.title"
:to="item.href"
:active="$route.path === `${item.href}`">
Expand Down
2 changes: 1 addition & 1 deletion core/datacap-ui/src/views/pages/admin/query/QueryHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
trigger: ['.', '@'],
headers: { 'Authorization': auth?.type + ' ' + auth?.token },
transform: (response: any) => {
return response.data.columns.map((item: any) => ({
return response[0].data.columns.map((item: any) => ({
label: item.object_name,
insertText: item.object_name,
detail: item.object_name,
Expand Down

0 comments on commit 424192e

Please sign in to comment.