zhangsiyu
2 years ago
3 changed files with 36 additions and 0 deletions
@ -0,0 +1,32 @@
|
||||
<template> |
||||
<div ref="printDesignerContainer"></div> |
||||
</template> |
||||
|
||||
<script> |
||||
import { ref, onMounted } from 'vue'; |
||||
import KrPrintDesigner from 'kr-print-designer'; |
||||
|
||||
export default { |
||||
name: 'KrPrintDesignerWrapper', |
||||
setup() { |
||||
const printDesignerContainer = ref(null); |
||||
|
||||
onMounted(() => { |
||||
const printDesigner = new KrPrintDesigner({ |
||||
container: printDesignerContainer.value, |
||||
// 其他配置项 |
||||
}); |
||||
|
||||
printDesigner.init(); |
||||
}); |
||||
|
||||
return { |
||||
printDesignerContainer, |
||||
}; |
||||
}, |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss"> |
||||
/* 样式可以根据需要进行添加或修改 */ |
||||
</style> |
Loading…
Reference in new issue