Appearance
迷你地图节点
¥MiniMap Node
小地图节点组件可用于扩展默认小地图节点。你可以使用它为节点添加图标,或添加自定义工具提示等。
¥The minimap node component can be used to extend the default minimap nodes. You can use it to add an icon to your node, or to add a custom tooltip etc.
用法
¥Usage
要使用该组件,请将 MiniMapNode
组件作为子组件传递给 MiniMap
组件。
¥To use the component pass the MiniMapNode
as a child to the MiniMap
component.
vue
<template>
<VueFlow>
<MiniMap>
<template #node-input="props">
<MiniMapNode v-bind="props" />
</template>
</MiniMap>
</VueFlow>
</template>
属性
名称 | 定义 | 类型 | 可选 | 默认 |
---|---|---|---|---|
id | 节点 ID | string | false | * |
parentNode | 父节点 ID | string | true | * |
selected | 节点是否被选中 | boolean | true | false |
dragging | 节点是否正在拖动 | boolean | true | false |
position | 节点的 XY 位置 | XYPosition | false | * |
dimensions | 节点尺寸 | 尺寸 | false | * |
borderRadius | 迷你地图节点 CSS 边框半径 | number | true | * |
color | 迷你地图节点 CSS 颜色 | string | true | * |
shapeRendering | 迷你地图节点 CSS 形状渲染 | ShapeRendering | true | * |
strokeColor | 迷你地图节点 CSS 描边颜色 | string | true | * |
strokeWidth | 迷你地图节点 CSS 描边宽度 | string | true | * |
插槽
¥Slots
名称 | 定义 |
---|---|
default | MiniMap 节点矩形下方的插槽 |