power-kxlee / vue-print-nb Goto Github PK
View Code? Open in Web Editor NEWVue plug-in, print! Good!
Vue plug-in, print! Good!
API能否加入beforeCallback打印前回调事件
能支持设置打印预览A5吗
您好,在页面上含有checkbox和radio的时候,打印预览全部被选中了,
iframe里面的html代码 为checked="false" ,貌似打印的时候不认,认为这都是选中
您有什么解决方案么
打印qrcode组件生成的二维码,是空白,如果修改呢?
我在子组件里面用v-print="'#printMe'" 也设置了id 但是没有用,只有v-print的时候整个页面可以打印
I am using the qrcode.vue in my project but your vue-print-nb cannot print their qr-code. Can you help on that?
當網頁打開f12開發者選項,會無法顯示img圖片
Error in nextTick: "SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules"
打印出现垂直滚动条
As of Chrome 64 (https://stackoverflow.com/a/49160899) CORS rules are now enforced which prevent accessing properties like .cssRules
and .rules
on remote CSS files. Line 68 of /src/printarea.js
attempts to access these properties with no handling of the new security limitations. Perhaps you'll want to only use style sheet elements where the domain matches, some type of configuration to allow users to skip certain style sheets, or just another method of including the styles.
Hi, i've tried to use your plugin, but when I add an id to v-print
, i got this error :
[Vue warn]: Error in nextTick: "TypeError: i.options[s] is undefined"
TypeError: "i.options[s] is undefined"
value tag-textarea.umd.min.js:1
<b-button variant="primary" v-print="'#profile'">Print</b-button>
<div id="profile" class="profile">
...
</div>
any idea?
打印支持彩印吗
I have added to my project a button to print as a separate component and imported vue-print-nb in main.js.
The components to be printed include graphics generated with vue-chartjs.
The graphics print fine when I print the whole page. However when printing only a part of the page using v-print="'#ID'", only empty frames for the graphics are shown in print preview.
When I pass the id in a printObj, nothing is printed and the console shows an error that [object: Object] is not a valid selector.
Error in nextTick: "SyntaxError: Failed to execute 'querySelector' on 'Document': '[object Object]' is not a valid selector."
why???
IE浏览器不能使用
Print option open but image don't show.
how I can print image??
这个插件对于谷歌浏览器的版本有要求,请问最低支持到什么版本?
目前发现如果谷歌浏览器的版本是65,那么打印预览是无法生产的,当然打印也是空白。
而75以上,就是可以的。
想确认一下,这个大概什么版本以下是无法使用此插件的?
同时,也想咨询下如何可以兼容所有版本?
在打印时,有的人浏览器默认好像是不选中那个“背景图片”的选项。这样所有设置北京颜色的样式都会失效。但是,实际使用中,是需要打印背景的。但是不是每个人都会设置。如果能用代码控制是最好的。所以,是不是有什么设置?或者什么样式,可以让这个操作由程序控制完成。
endCallback()
1:这个api在vue页面中如何调用呢。既我在打印成功后监听成功回调
2:调用打印,页面打印区域调内容就全空白啦
页面的echarts预览是空白
v-print使用对象的时候报错了
需要打印图片但是无法打印
最新vue-print-nb(版本1.0.3)的依赖包中,没增加判断语句,解决cannot read property 'length' of 'null'报错问题。
自定义页眉页脚怎么做呢
我需要点击按钮后 先生成相关表格然后主动调用打印方法打印该界面
该插件在IE下无法使用,请问正解决?我看了控制台并没有报错。
hello,
how can I print from a direct link?
instead of using the v-print attribute, as I call a function?
thanks
现在打印预览的时候,如果使用box-sizing: content-box的情况,问题会少很多。如果使用了box-sizing: border-box;布局基本都会崩掉。这个可以设置么?
本地开发的时候报错:
(运行环境: Linux Manjaro; 浏览器 Firefox 66.0.3 (64-bit)
[Vue warn]: Error in nextTick: "SecurityError: The operation is insecure."
found in
---> at src/components/AdminOrder.vue
at src/components/AdminCenter.vue
at src/App.vue
vue.esm.js:628
VueJS
warn
logError
globalHandleError
handleError
nextTick
flushCallbacks
DOMException: "The operation is insecure." vue.esm.js:1897
VueJS 5
logError
globalHandleError
handleError
nextTick
flushCallbacks
<iframe style="border: 0px none; position: absolute; width: 0px; height: 0px; right: 0px; top: 0px;" id="printArea_1" src="1558286749235"> #document </iframe>
原本以为是相对路径和绝对路径的问题。经过反复的测试。确定问题是跨域的问题。
也就是如果使用了CDN,而恰巧是别的域名,这个打印功能就不能使用了。
这个插件有BUG,需要修改那个循环读style的地方,做各判断,如果读不到正确的信息,或者发现跨域,就可以忽略,跳到下一个。毕竟link标签在前边也已经处理了,所以,这个针对style的地方。之做好判断即可。
hello,this demo print preview is blank,
葫芦娃,葫芦娃
一根藤上七朵花
小小树藤是我家 啦啦啦啦
叮当当咚咚当当 浇不大
叮当当咚咚当当 是我家
啦啦啦啦
...
<div id="printTest"><p style="color: red">明月照于山间</p><p>清风来于江上</p></div> <button v-print="printObj">打印</button>
data() {
return {
printObj: {
id: 'printTest',
popTitle: 'good print',
extraCss: 'https://www.google.com,https://www.google.com',
extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>'
}
}
}
报错: [Vue warn]: Error in nextTick: "SyntaxError: Failed to execute 'querySelector' on 'Document': '[object Object]' is not a valid selector."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.