chore(docs): remove empty example
This commit is contained in:
@@ -1,33 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { Panel, VueFlow, useVueFlow } from '@vue-flow/core'
|
|
||||||
import { Background, BackgroundVariant } from '@vue-flow/background'
|
|
||||||
import { MiniMap } from '@vue-flow/minimap'
|
|
||||||
|
|
||||||
const { nodes, addNodes, addEdges, onConnect, dimensions } = useVueFlow()
|
|
||||||
|
|
||||||
onConnect((params) => addEdges(params))
|
|
||||||
|
|
||||||
function addRandomNode() {
|
|
||||||
const nodeId = (nodes.value.length + 1).toString()
|
|
||||||
|
|
||||||
const newNode = {
|
|
||||||
id: nodeId,
|
|
||||||
label: `Node: ${nodeId}`,
|
|
||||||
position: { x: Math.random() * dimensions.value.width, y: Math.random() * dimensions.value.height },
|
|
||||||
}
|
|
||||||
|
|
||||||
addNodes([newNode])
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<VueFlow>
|
|
||||||
<MiniMap />
|
|
||||||
|
|
||||||
<Background :variant="BackgroundVariant.Lines" />
|
|
||||||
|
|
||||||
<Panel position="top-right">
|
|
||||||
<button type="button" @click="addRandomNode">add node</button>
|
|
||||||
</Panel>
|
|
||||||
</VueFlow>
|
|
||||||
</template>
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { default as EmptyApp } from './App.vue?raw'
|
|
||||||
@@ -9,7 +9,6 @@ import { UpdateNodeApp, UpdateNodeCSS } from './update-node'
|
|||||||
import { ValidationApp, ValidationCSS, ValidationCustomInput, ValidationCustomNode } from './validation'
|
import { ValidationApp, ValidationCSS, ValidationCustomInput, ValidationCustomNode } from './validation'
|
||||||
import { SaveRestoreApp, SaveRestoreCSS, SaveRestoreControls } from './save-restore'
|
import { SaveRestoreApp, SaveRestoreCSS, SaveRestoreControls } from './save-restore'
|
||||||
import { DndApp, DndBackground, DndCSS, DndScript, DndSidebar } from './dnd'
|
import { DndApp, DndBackground, DndCSS, DndScript, DndSidebar } from './dnd'
|
||||||
import { EmptyApp } from './empty'
|
|
||||||
import { HiddenApp } from './hidden'
|
import { HiddenApp } from './hidden'
|
||||||
import { InteractionApp, InteractionCSS, InteractionControls } from './interaction'
|
import { InteractionApp, InteractionCSS, InteractionControls } from './interaction'
|
||||||
import { MultiApp, MultiCSS, MultiFlow } from './multi'
|
import { MultiApp, MultiCSS, MultiFlow } from './multi'
|
||||||
@@ -79,9 +78,6 @@ export const exampleImports = {
|
|||||||
'style.css': DndCSS,
|
'style.css': DndCSS,
|
||||||
'useDnD.js': DndScript,
|
'useDnD.js': DndScript,
|
||||||
},
|
},
|
||||||
empty: {
|
|
||||||
'App.vue': EmptyApp,
|
|
||||||
},
|
|
||||||
hidden: {
|
hidden: {
|
||||||
'App.vue': HiddenApp,
|
'App.vue': HiddenApp,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -200,7 +200,6 @@ export default defineConfigWithTheme<DefaultTheme.Config>({
|
|||||||
{ text: 'Basic', link: '/examples/' },
|
{ text: 'Basic', link: '/examples/' },
|
||||||
{ text: 'Save & Restore', link: '/examples/save' },
|
{ text: 'Save & Restore', link: '/examples/save' },
|
||||||
{ text: 'Drag & Drop', link: '/examples/dnd' },
|
{ text: 'Drag & Drop', link: '/examples/dnd' },
|
||||||
{ text: 'Empty Flow', link: '/examples/empty' },
|
|
||||||
{ text: 'Hide/Show', link: '/examples/hidden' },
|
{ text: 'Hide/Show', link: '/examples/hidden' },
|
||||||
{ text: 'Horizontal Flow', link: '/examples/horizontal' },
|
{ text: 'Horizontal Flow', link: '/examples/horizontal' },
|
||||||
{ text: 'Interactions', link: '/examples/interaction' },
|
{ text: 'Interactions', link: '/examples/interaction' },
|
||||||
|
|||||||
Reference in New Issue
Block a user