Skip to content

迷你地图节点 ​

🌐 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节点IDstring否-
parentNode父节点IDstring是-
selected节点是否被选中boolean是false
dragging节点是否被拖动boolean是false
position节点XY位置XYPosition否-
dimensions节点尺寸Dimensions否-
borderRadiusMiniMap节点CSS边框圆角number是-
colorMiniMap节点CSS颜色string是-
shapeRenderingMiniMap节点CSS形状渲染ShapeRendering是-
strokeColorMiniMap节点CSS描边颜色string是-
strokeWidthMiniMap节点CSS描边宽度string是-

插槽 ​

🌐 Slots

名称定义
默认MiniMap 节点矩形下的槽

VueFlow 中文网 - 粤ICP备13048890号