【问题标题】:How to know when html is totally load Vue 2如何知道 html 何时完全加载 Vue 2
【发布时间】:2023-01-05 19:18:17
【问题描述】:

我将一些 axios 数据加载到 html 表中,在表的下部,我有一个分页,但是由于 html 没有完全加载,分页按钮在几秒钟后不起作用(到这几秒钟,html 是冻结),我怎么知道 html 是否已完全加载?

【问题讨论】:

  • 请提供您的代码。

标签: javascript html vuejs2 axios


【解决方案1】:

你可以使用 Vue 生命周期钩子 updated()。 代码应该是这样的

loadData() {
  lockPagination();
  apiRequest();
}

updated() {
 unlockPagination();
}

【讨论】:

    猜你喜欢
    • 2013-09-27
    • 2010-11-18
    • 2019-10-28
    • 1970-01-01
    • 2011-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多