1.0.3 • Published 7 months ago

drawpanel v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

version

对drawio的集成(vue3)

安装

npm install drawPanel

使用

main.js

import PrawPanel from 'drawpanel'
const app = createApp(App)

app.use(PrawPanel)

app.mount('#app')

显示组件

<template>
  <div class="draw-dialog">
    <drawPanel v-if="isShow" :dataSrc="dataSrc" @closeHandle="closeHandle"></drawPanel>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'

const dataSrc = ref('')

const emits = defineEmits(['closeHandle'])

const isShow = ref(false)

const closeHandle = (data) => {
  emits('closeHandle', data)
  canel()
}

const openDialog = (data) => {
  dataSrc.value = data
  isShow.value = true
}

const canel = () => {
  isShow.value = false
}

defineExpose({ openDialog, canel })
</script>
1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago