Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
no muestra el resultado de Axios, por favor

uso vue 3, SshPre para el color de línea

 <div class="fileContent" > <!-- <ssh-pre language="js" copy-button @copied="onCopiedDoSomething" label="Javascript" dark=true><pre>{{this.$store.state.git.decodeData}}</pre></ssh-pre> --> <ssh-pre language="js" copy-button label="Javascript" dark=true > <pre>{{this.$store.state.git.decodeData}}</pre></ssh-pre> </div>

en tienda.js

 // in .vue file ...mapMutations({ setDecodeData : 'git/setDecodeData', }), // in store.js setDecodeData(state, data){ state.decodeData = data },

establecer funciones de datos

 sendContent(e){ this.axios.get(`${e.url}`, { headers : { Authorization : `token ${key}` } }) .then( res => { console.log(res) this.encodedData = res.data.content this.decodeData() }) }, decodeData(){ this.setDecodeData( decodeURIComponent(escape(window.atob(this.encodedData)))) },

entonces div.fileContent en las etiquetas ssh-pre no se procesa en vivo

pero esta etiqueta puede tomar renderizado en vivo

 <pre>{{this.$store.state.git.decodeData}}</pre>

¿¿Cómo puedo arreglarlo?? por favor ayúdame~~

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

En la plantilla, no necesita usar $ esto, elimine eso. Y use mapGetters de vuex si desea tener reactividad con la tienda en su plantilla. Configure getters en su tienda y acceda a eso en su computador, que observará cualquier cambio y actualizará el dom.

En el almacén:

 const getters = { getDecodeData: (state) => state.decodeData }

En el diseño:

 computed: { ...mapGetters([ getDecodeData ]) } <pre>{{getDecodeData}}</pre>

Como referencia, puede leer desde aquí: https://vuex.vuejs.org/guide/getters.html#method-style-access

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!