Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

静态vue页面如何使用npm的插件

想要使用vue-draggable这个插件,但是现在我的页面是静态的html不是vue的工程文件。我在cdn的地址上下载了这两个js。但是不知道怎么使用,npm上面说的方法是 import draggable from 'vuedraggable',但是这个好像不使用于单html文件。大佬们有解决办法吗


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Vue.component('vuedraggable', window.vuedraggable)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...