Skip to content

背景

¥Background

Vue Flow 附带两种背景图案变体:点和线。

¥Vue Flow comes with two background pattern variants: dots and lines.

安装

¥Installation

bash
yarn add @vue-flow/background

# or
npm install @vue-flow/background

用法

¥Usage

要使用背景,只需将 Background 组件作为子组件传递给 VueFlow 组件即可。

¥To use the background simply pass the Background component as a child to the VueFlow component.

vue
<script setup>
import { VueFlow } from '@vue-flow/core'
import { Background } from '@vue-flow/background'
</script>

<template>
  

<VueFlow>
    <Background />
  </VueFlow>


</template>

属性

¥Props

名称定义类型可选默认
variant图案变体BackgroundVarianttruedots
gap图案间隙numbertrue10
size图案大小numbertrue0.4
patternColor图案颜色stringtrue#81818a
bgColor背景颜色(覆盖图案)stringtrue#fff
height背景高度numbertrue100
width背景宽度numbertrue100
xX 偏移numbertrue0
yY 偏移numbertrue0

VueFlow v1.44 中文网 - 粤ICP备13048890号