使用vue-preview插件实现缩略图时报错:$preview
2018-09-07 本文已影响0人
尹莫一
使用vue-preview插件实现缩略图时报错:$preview is not defined 如下图所示:

问题分析
1、请查看是否在全局引入该插件或者已经安装该插件。
2、请在github中查看该插件的用法,请注意插件的用法是否更新改变。
问题解决思路
通过上述的分析,在全局已经引入和安装该插件的前提下,查看github中该插件得知(地址:https://github.com/LS1231/vue-preview),该插件已经更新,使用方法已经发生转变,所以要按照 该插件更新的使用方法来进行修改。
问题解决办法
1、按照github上的例子进行更改。(https://github.com/LS1231/vue-preview)
2、具体步骤如下图所示:




然后点击图片,查看效果就完美了
