chore(docs): replace the deprecated enum PanelPosition (#979)

This commit is contained in:
Alex Liu
2023-07-10 18:22:50 +02:00
committed by GitHub
parent 70528f8a99
commit 5669c8b101
11 changed files with 22 additions and 22 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
<script setup>
import { Panel, PanelPosition, VueFlow, isNode, useVueFlow } from '@vue-flow/core'
import { Panel, VueFlow, isNode, useVueFlow } from '@vue-flow/core'
import { Background } from '@vue-flow/background'
import { Controls } from '@vue-flow/controls'
import { MiniMap } from '@vue-flow/minimap'
@@ -78,7 +78,7 @@ function toggleClass() {
<Controls />
<Panel :position="PanelPosition.TopRight" class="controls">
<Panel position="top-right" class="controls">
<button style="background-color: #113285; color: white" title="Reset Transform" @click="resetTransform">
<svg width="16" height="16" viewBox="0 0 32 32">
<path fill="#FFFFFB" d="M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10Z" />
+2 -2
View File
@@ -1,5 +1,5 @@
<script setup>
import { Panel, PanelPosition, VueFlow, useVueFlow } from '@vue-flow/core'
import { Panel, VueFlow, useVueFlow } from '@vue-flow/core'
import { Background, BackgroundVariant } from '@vue-flow/background'
import { MiniMap } from '@vue-flow/minimap'
@@ -26,7 +26,7 @@ function addRandomNode() {
<Background :variant="BackgroundVariant.Lines" />
<Panel :position="PanelPosition.TopRight">
<Panel position="top-right">
<button type="button" @click="addRandomNode">add node</button>
</Panel>
</VueFlow>
+2 -2
View File
@@ -1,6 +1,6 @@
<script setup>
import { Background } from '@vue-flow/background'
import { Panel, PanelPosition, VueFlow, useVueFlow } from '@vue-flow/core'
import { Panel, VueFlow, useVueFlow } from '@vue-flow/core'
import { ref, watch } from 'vue'
const isHidden = ref(false)
@@ -29,7 +29,7 @@ watch(isHidden, () => {
<VueFlow fit-view-on-init>
<Background />
<Panel :position="PanelPosition.TopRight">
<Panel position="top-right">
<div>
<label for="ishidden">
hidden
+2 -2
View File
@@ -1,6 +1,6 @@
<script setup>
import { Background } from '@vue-flow/background'
import { Panel, PanelPosition, VueFlow, isNode } from '@vue-flow/core'
import { Panel, VueFlow, isNode } from '@vue-flow/core'
import { ref } from 'vue'
const elements = ref([
@@ -32,7 +32,7 @@ function updatePos() {
<VueFlow v-model="elements" fit-view-on-init>
<Background />
<Panel :position="PanelPosition.TopRight">
<Panel position="top-right">
<button style="margin-right: 5px" @click="updatePos">update positions</button>
<button @click="toggleClass">toggle class</button>
</Panel>
@@ -1,5 +1,5 @@
<script setup>
import { Panel, PanelPosition, useVueFlow } from '@vue-flow/core'
import { Panel, useVueFlow } from '@vue-flow/core'
const flowKey = 'example-flow'
@@ -34,7 +34,7 @@ function onAdd() {
</script>
<template>
<Panel :position="PanelPosition.TopRight" class="save-restore-controls">
<Panel position="top-right" class="save-restore-controls">
<button style="background-color: #33a6b8" @click="onSave">save</button>
<button style="background-color: #113285" @click="onRestore">restore</button>
<button style="background-color: #6f3381" @click="onAdd">add node</button>
+2 -2
View File
@@ -1,5 +1,5 @@
<script setup>
import { Panel, PanelPosition, VueFlow, isNode, useVueFlow } from '@vue-flow/core'
import { Panel, VueFlow, isNode, useVueFlow } from '@vue-flow/core'
import { Background } from '@vue-flow/background'
import { MiniMap } from '@vue-flow/minimap'
import { nextTick, ref } from 'vue'
@@ -43,7 +43,7 @@ function updatePos() {
<Background />
<Panel :position="PanelPosition.TopRight">
<Panel position="top-right">
<button style="margin-right: 5px" @click="updatePos">update positions</button>
<button @click="toggleClass">toggle class</button>
</Panel>