..
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user