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>属性
🌐 Props
| 名称 | 定义 | 类型 | 可选 | 默认值 |
|---|---|---|---|---|
| id | 节点ID | string | 否 | - |
| parentNode | 父节点ID | string | 是 | - |
| selected | 节点是否被选中 | boolean | 是 | false |
| dragging | 节点是否被拖动 | boolean | 是 | false |
| position | 节点XY位置 | XYPosition | 否 | - |
| dimensions | 节点尺寸 | Dimensions | 否 | - |
| borderRadius | MiniMap节点CSS边框圆角 | number | 是 | - |
| color | MiniMap节点CSS颜色 | string | 是 | - |
| shapeRendering | MiniMap节点CSS形状渲染 | ShapeRendering | 是 | - |
| strokeColor | MiniMap节点CSS描边颜色 | string | 是 | - |
| strokeWidth | MiniMap节点CSS描边宽度 | string | 是 | - |
插槽
🌐 Slots
| 名称 | 定义 |
|---|---|
| 默认 | MiniMap 节点矩形下的槽 |