fix: tabs style error

This commit is contained in:
chansee97 2024-05-28 21:42:59 +08:00
parent 5f7c77d9c6
commit 2fc1dd4467
4 changed files with 12 additions and 7 deletions

View File

@ -107,7 +107,7 @@ function onClickoutside() {
<n-tabs
type="card"
size="small"
:tabs-padding="15"
:tabs-padding="10"
:value="tabStore.currentTabPath"
@close="handleClose"
>
@ -125,7 +125,7 @@ function onClickoutside() {
v-for="item in tabStore.tabs"
:key="item.path"
closable
:name="item.path as string"
:name="item.path"
@click="handleTab(item)"
@contextmenu="handleContextMenu($event, item)"
>
@ -150,5 +150,3 @@ function onClickoutside() {
/>
</div>
</template>
<style scoped></style>./DropTabs.vue

View File

@ -1,3 +1,8 @@
.n-modal-mask {
backdrop-filter: blur(2px);
}
/* 解决tabs组件不贴合下边缘问题 */
.v-x-scroll {
height: 100%;
}

View File

@ -7,7 +7,7 @@ namespace Api {
/** 用户id */
id: number
/** 用户角色类型 */
role: RoleType
role: Entity.RoleType
/** 访问toekn */
accessToken: string
/** 刷新toekn */

View File

@ -1,4 +1,4 @@
<script setup lang="tsx">
<script setup lang="ts">
import type { DataTableColumns, FormInst } from 'naive-ui'
import { NButton, NPopconfirm, NSpace, NSwitch, NTag } from 'naive-ui'
import TableModal from './components/TableModal.vue'
@ -107,6 +107,7 @@ const columns: DataTableColumns<Entity.User> = [
},
]
const count = ref(0)
const listData = ref<Entity.User[]>([])
function handleUpdateDisabled(value: 0 | 1, id: number) {
const index = listData.value.findIndex(item => item.id === id)
@ -118,6 +119,7 @@ async function getUserList() {
startLoading()
await fetchUserPage().then((res: any) => {
listData.value = res.data.list
count.value = res.data.count
endLoading()
})
}
@ -207,7 +209,7 @@ const treeData = ref([
</NButton>
</div>
<n-data-table :columns="columns" :data="listData" :loading="loading" />
<Pagination :count="100" @change="changePage" />
<Pagination :count="count" @change="changePage" />
<TableModal ref="modalRef" modal-name="用户" />
</NSpace>
</n-card>