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(() => { onMounted(() => {
const level = Number.parseInt(props.defaultExpandLevel) const level = Number.parseInt(props.defaultExpandLevel as string)
if (level > 0) if (level > 0)
state.expandedKeys = filterByLevel(level) state.expandedKeys = filterByLevel(level)
else if (props.defaultExpandAll) else if (props.defaultExpandAll)

View File

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

View File

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

View File

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