Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Dcat.wait is not a function #1858

Closed
betaxab opened this issue Jul 25, 2022 · 3 comments
Closed

Uncaught TypeError: Dcat.wait is not a function #1858

betaxab opened this issue Jul 25, 2022 · 3 comments
Assignees

Comments

@betaxab
Copy link

betaxab commented Jul 25, 2022

  • Laravel Version: 6.20.44
  • PHP Version: 7.4.30
  • Dcat Admin Version: v2.2.2-beta

Description:

后台管理页面会出现 Uncaught TypeError: Dcat.wait is not a function 错误。

ReferenceError: Switchery is not defined

Error: attribute transform: Expected number, "translate(NaN, 0)".

TypeError: $(...).off(...).select2 is not a function

一个比较难以理解的 bug 就是,资源有时候明显感觉没加载全,出现的比如开关按钮、输入框变成那种特别原始的风格、上传窗口不加载“添加文件”按钮,然后就会导致业务功能出现异常。

但是经过刷新页面以后,这些功能又能正常加载出来。并且页面刷新后,上述报错也不会出现。

实在是不知道如何解决,我没有修改 dcat 部分的源码。

Steps To Reproduce:

清空浏览器资源,然后打开页面。

2022-07-25_11-51-48

2022-07-25_11-51-13

2022-07-25_11-42-09

@laradocs
Copy link
Contributor

从来没遇到过,不太好处理

@laradocs laradocs added bug Something isn't working question Further information is requested and removed question Further information is requested labels Jul 25, 2022
@betaxab
Copy link
Author

betaxab commented Jul 29, 2022

问题我找到了,在执行 composer update 后,vendor/dcat-admin 中的 dcat-apps.js 并没有更新成功。必须把 dcat-admin 文件夹彻底删除了再重新更新才能成功。
@laradocs @jqhph

@laradocs
Copy link
Contributor

这个升级说明里面已经写了
https://learnku.com/docs/dcat-admin/2.x/version-upgrade/8209#89f06e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants