Closed gago8910 closed 2 years ago
Have you imported vue?
import * as Vue from 'vue'
Have you imported vue?
import * as Vue from 'vue'
yes, i already imported vue. This is my code:
<template>
<div id="drawflow"></div>
</template>
<script lang="ts">
import { defineComponent, onMounted } from 'vue'
import Drawflow from 'drawflow'
import 'drawflow/dist/drawflow.min.css'
import * as Vue from 'vue'
export default defineComponent({
name: 'BotFlowsIndex',
setup () {
onMounted(() => {
const id = document.getElementById('drawflow') as HTMLElement
const editor = new Drawflow(id, Vue)
editor.start()
})
}
})
</script>
View example of vue3 https://github.com/jerosoler/Drawflow/issues/100
@jerosoler thanks for answer. I have used vue component but got the error same here. Have you updated how to fix this on vue3?
I have a look at the source code library @type/drawflow at constructor function, params number (1) does not match with js version (3)
Sorry for not answering, I would miss it.
@type/drawflow is external ( not maintainer ) View other example with vue3 with new version 0.0.50 https://github.com/jerosoler/Drawflow/issues/274#issuecomment-946454633
I using drawflow version 0.0.46[
](url)