search

Home  >  Q&A  >  body text

javascript - vue asynchronous data printing problem

After rendering the data obtained asynchronously from a component, if you click the browser's print function, all asynchronous data will not be displayed on the printout.

 print() {
          //this.showTable = true
         // let self = this
          setTimeout(function() {
              window.print()
           //   self.autoBack(self)
              console.log(5000)
          }, 1000)
      },
欧阳克欧阳克2750 days ago778

reply all(1)I'll reply

  • 代言

    代言2017-06-26 10:57:10

    Put the things that need to be printed into an iframe separately, and then print this iframe. The style can be adjusted easily.

    reply
    0
  • Cancelreply