This commit is contained in:
server
2025-09-15 17:57:57 +08:00
parent fbc87a40c6
commit 39595080f0
@@ -32,10 +32,15 @@ module.exports = {
methods: {
init() {
try {
debugger
const parser = new DOMParser();
const doc = parser.parseFromString(this.content, 'text/html');
const link = doc.querySelector('a');
const href = link.getAttribute('href');
if(!href) {
this.pdf = false
return
}
this.$nextTick(() => {
this.pdfObj = new Pdfh5('#pdf-container', {
pdfurl: href,