在vue 中使用的 

directive 命令的时候。 在其他浏览器可以使用但 打包之后 在ie11 就报错如下

其实这个因为  directive 命令要在 new  vue 实例之前创建,

如果在  new vue 里面 就会报错  比如这种

方法就是 在 new vue 之前 用 

Vue.directive('test-button', {})

 就就可以了。

posted on 2019-08-02 10:26  lllomh  阅读(153)  评论(0编辑  收藏  举报