mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
docs(components): [tree] fix import error type (#10633)
close https://github.com/element-plus/element-plus/issues/10619
This commit is contained in:
parent
3c81c1fc6f
commit
8f9f8e4248
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user