Vue introduces jQuery--ztree error reporting jQuery is not defined?

because if you want to do ztree, in the project, you want to use ztree in element-ui at that time, but the format of the data returned from the backend is not the same as that of ztree in element-ui. You can only use jQuery--ztree, to download the package of ztree at that time, and then introduce ztree to report an error jQuery is not defined?

.

clipboard.png
learned that ztree depends on jQuery, so I quoted jQuery

earlier.

Code

let $ = require("jquery")
window.$ = $

import "ztree"
import "ztree/css/metroStyle/metroStyle.css"
Mar.13,2021
Menu