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

230
Views
How can I add loading in el-popover with Vuejs?

I am new with Vuejs, I am rendering data coming from API in el-popover wrapped in a HTML table, after clicking button, and since its a large data, and meanwhile is loading, popover is displaying blank. I want to add loading icon, till data is entirely rendered. This is my code:

requestResponse(id) {
      ApiService.get("/myapi"+id)
        .then((data) => {
           this.loading=true;
          this.displayData2(data.data.data);
        })
        .catch((error) => {
          this.loading=true;
          this.apiDateRangeError = JSON.stringify(
            error.response.data["errors"][0]["errorMessage"]
          );
          ElNotification({
            title: "Error",
            message: JSON.stringify(
              error.response.data["errors"][0]["errorMessage"]
            ),
            type: "error",
            duration: 3000,
            position: "top-right",
          });
        
        });
    }
<el-popover
            placement="bottom"
            title="Details"
            :width="600"
            trigger="click"
          >
            <table
              class="table table-striped"
              style="table-layout: fixed; width: 100%"
            >
              <thead>
                <tr>
                  <th scope="col" style="width: 50%">Request Payload</th>
                  <th scope="col" style="width: 50%">Response Payload</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td style="word-wrap: break-word;">
                    <pre
                      v-html="JSON.stringify(this.apiData['requestPayload'], null, 2)"
                    ></pre>
                  </td>
                  <td style="overflow-wrap: break-word; border-left: 1px solid grey;">
                    <pre
                      v-html="JSON.stringify(this.apiData['responsePayload'], null, 2)"
                    ></pre>
                  </td>
                </tr>
              </tbody>
            </table>

            <template #reference>
                <el-button type="btn btn-sm primary" 
                  @click="requestResponse(customer.id)"
                  >Log Details</el-button
                >
                
              </template>
          </el-popover>

about 4 years ago · Juan Pablo Isaza
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!