vue打印
https://www.jb51.net/article/147040.htm
https://www.cnblogs.com/steamed-twisted-roll/p/10683680.html
<template>
<div>
<div id="printMe" ref="printContent">
<ul class="content">
<li>轻轻的我走了,</li>
<li>轻轻的我走了,</li>
<li>轻轻的我走了,</li>
<li>轻轻的我走了,</li>
<li>轻轻的我走了,</li>
<li>轻轻的我走了,</li>
<li>轻轻的我走了,</li>
<li>轻轻的我走了,</li>
</ul>
</div>
<el-button v-print="printObj" type="primary">直接打印</el-button>
</div>
</template>
<script>
export default {
data() {
return {
img: require('../../assets/imgUrl/15A.png'),
printObj: {
id: 'printMe',
popTitle: '打印',
// extraCss: require('../../assets/imgUrl/15A.png'),
// extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>'
}
}
},
watch: {
},
created() {
},
methods: {
}
}
</script>
本文来自博客园,作者:zjxgdq,转载请注明原文链接:https://www.cnblogs.com/zjxzhj/p/15122537.html