fix: fix types

pull/38/head
xingyu 2023-10-18 21:11:23 +08:00
parent 14538b0946
commit 85faca3ad8
4 changed files with 12 additions and 7 deletions

View File

@ -255,7 +255,7 @@ export default defineComponent({
})
onMounted(() => {
const level = Number.parseInt(props.defaultExpandLevel)
const level = Number.parseInt(props.defaultExpandLevel as string)
if (level > 0)
state.expandedKeys = filterByLevel(level)
else if (props.defaultExpandAll)

View File

@ -42,9 +42,11 @@ const getIsFixedSettingDrawer = computed(() => {
<LayoutLockPage />
<FloatButton.BackTop v-if="getUseOpenBackTop" :target="getTarget" />
<FloatButton
shape="circle" type="primary" :badge="{ dot: true }" :style="{
right: '64px',
}" @click="openWindow(SITE_URL)"
shape="circle"
type="primary"
:badge="{ dot: true }"
:style="{ right: '64px' }"
@click="openWindow(SITE_URL)"
>
<template #icon>
<QuestionCircleOutlined />

View File

@ -108,8 +108,9 @@ function menuCheck(checkedKeys: CheckKeys, event: CheckedEvent) {
v-model:checkedKeys="model[field]"
:tree-data="treeData"
:field-names="{ title: 'name', key: 'id' }"
toolbar checkable search
toolbar
checkable
search
:show-strictly-button="false"
:selectable="false"
title="菜单分配"

View File

@ -9,6 +9,7 @@ import { handleTree } from '@/utils/tree'
defineOptions({ name: 'SystemDeptTree' })
const emit = defineEmits(['select'])
const treeRef = ref()
const treeData = ref<TreeItem[]>([])
async function fetch() {
@ -26,8 +27,9 @@ onMounted(() => {
</script>
<template>
<div class="m-4 mr-0 overflow-hidden">
<div class="m-4 mr-0 overflow-hidden" v-bind="$attrs">
<BasicTree
ref="treeRef"
title="部门列表"
toolbar
search