代码拉取完成,页面将自动刷新
同步操作将从 smallwei/avue-doc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
:::tip 2.0.5+ ::::
<!-- 导出pdf时导入需要的包 (一定要放到head标签里,不使用pdf功能则不用引入)-->
<script src="https://cdn.staticfile.org/jspdf/1.5.3/jspdf.min.js"></script>
:::demo
<el-button @click="handleUpload">导出PDF</el-button>
<el-button @click="handleSend"
type="primary">获取文件流</el-button>
<el-button @click="handleBase64"
type="danger">获取bas64</el-button>
<avue-license ref="license"
:option="data">
<h1 style="color:red">自定义内容</h1>
</avue-license>
<script>
export default {
data () {
return {
form: {
id: '',
date: '',
name: '',
qq: ''
}
}
},
computed: {
data () {
return {
img: "/images/sqstemp.jpg",
list: [{
left: 310,
top: 625,
text: `“ ${this.form.name} ”`,
color: '#000',
size: 29,
bold: true,
style: '黑体'
}, {
left: 690,
top: 1077,
text: this.form.id,
color: '#000',
size: 26,
bold: true,
style: '黑体'
}, {
left: 690,
top: 1125,
text: this.form.date,
color: '#000',
bold: true,
size: 26,
style: '黑体'
}, {
left: 440,
top: 120,
width:100,
img:'/images/logo-bg.jpg'
}]
}
}
},
methods: {
handleSend () {
this.$message.success('请查看控制台');
this.$refs.license.getFile(this.form.name).then(file=>{
console.log(file);
})
},
handleBase64(){
this.$message.success('请查看控制台');
this.$refs.license.getBase64().then(file=>{
console.log(file);
});
},
handleUpload () {
this.$refs.license.getPdf(this.form.name);
}
}
}
</script>
:::
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。