docs(components): [tree] fix import error type (#10633)

close https://github.com/element-plus/element-plus/issues/10619
This commit is contained in:
init-qy 2022-11-20 16:22:19 +08:00 committed by GitHub
parent 3c81c1fc6f
commit 8f9f8e4248
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@
<script lang="ts" setup>
import type Node from 'element-plus/es/components/tree/src/model/node'
import type { DragEvents } from 'element-plus/es/components/tree/src/model/useDragNode'
import type { DropType } from 'element-plus/es/components/tree/src/tree.type'
import type { NodeDropType } from 'element-plus/es/components/tree/src/tree.type'
const handleDragStart = (node: Node, ev: DragEvents) => {
console.log('drag start', node)
@ -43,7 +43,7 @@ const handleDragOver = (draggingNode: Node, dropNode: Node, ev: DragEvents) => {
const handleDragEnd = (
draggingNode: Node,
dropNode: Node,
dropType: DropType,
dropType: NodeDropType,
ev: DragEvents
) => {
console.log('tree drag end:', dropNode && dropNode.label, dropType)
@ -51,12 +51,12 @@ const handleDragEnd = (
const handleDrop = (
draggingNode: Node,
dropNode: Node,
dropType: DropType,
dropType: NodeDropType,
ev: DragEvents
) => {
console.log('tree drop:', dropNode.label, dropType)
}
const allowDrop = (draggingNode: Node, dropNode: Node, type: DropType) => {
const allowDrop = (draggingNode: Node, dropNode: Node, type: NodeDropType) => {
if (dropNode.data.label === 'Level two 3-1') {
return type !== 'inner'
} else {