Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print: (target) => {} NOT WORKING #16

Closed
bright-coder opened this issue Nov 20, 2024 · 2 comments
Closed

print: (target) => {} NOT WORKING #16

bright-coder opened this issue Nov 20, 2024 · 2 comments
Labels

Comments

@bright-coder
Copy link

const { handlePrint } = useVueToPrint({
content: () => containerRef.value as HTMLElement,
onBeforePrint: () => {
printState.value = 'printing'
},
print: (target: HTMLIFrameElement) => {
if (!target.contentWindow) return Promise.resolve()

const data = target.contentWindow.document.documentElement.outerHTML

const blob = new Blob([data], { type: 'text/html;charset=UTF-8' })
const url = URL.createObjectURL(blob)
return window.mainApi.send('print-delivery-order-reciept', url)

}
})

NOT WORKING ****** target is undefined *******

github-actions bot pushed a commit that referenced this issue Nov 20, 2024
## [1.3.1](v1.3.0...v1.3.1) (2024-11-20)

### Bug Fixes

* 打印事件不需要 toValue 取值 ([fd4c9d5](fd4c9d5)), closes [#16](#16)
siaikin added a commit that referenced this issue Nov 20, 2024
github-actions bot pushed a commit that referenced this issue Nov 20, 2024
## [1.3.1](v1.3.0...v1.3.1) (2024-11-20)

### Bug Fixes

* 打印事件不需要 toValue 取值 ([ce150f6](ce150f6)), closes [#16](#16)
siaikin added a commit that referenced this issue Nov 20, 2024
github-actions bot pushed a commit that referenced this issue Nov 20, 2024
## [1.3.1](v1.3.0...v1.3.1) (2024-11-20)

### Bug Fixes

* 打印事件不需要 toValue 取值 ([6b5ae32](6b5ae32)), closes [#16](#16)
@siaikin
Copy link
Owner

siaikin commented Nov 20, 2024

🎉 This issue has been resolved in version 1.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@siaikin
Copy link
Owner

siaikin commented Nov 20, 2024

@bright-coder hi. Thank you very much for your feedback, please try the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants