vue引入zTree入门

参考1:https://blog.csdn.net/tg928600774/article/details/80911589

参考2:https://blog.csdn.net/ylhsuper/article/details/78753268

在vue中引入zTree,和引入其他组件类似,首先在main.js里将以下3个js引入:

import "./js/jquery-3.3.1.min.js";
import "../plugins/zTree/js/jquery.ztree.core.min.js";
import "../plugins/zTree/js/jquery.ztree.excheck.min.js";

 或在仅需要用到ztree的组件中引入

import $ from 'jquery'
import "../../plugins/jquery-3.3.1"
import "../../plugins/ztree/js/jquery.ztree.core.min"
import "../../plugins/ztree/js/jquery.ztree.excheck.min"
import '../../plugins/ztree/css/zTreeStyle.css'

 Vue引入jQuery 参考:https://segmentfault.com/a/1190000010365705

npm install jquery --save
import $ from 'jquery'

 jquery插件下载:http://www.jq22.com/jquery-info122

下载(ztree)官网:http://www.treejs.cn/v3/demo.php#_201

 

posted @ 2019-05-13 11:19  阴翳公子  阅读(1338)  评论(0编辑  收藏  举报