Directives in Vue2 are supposed to only handle simple mapping of a data property to some DOM manipulation. If you want to have something that encapsulates more complex behavior, especially accepting options, you should just use a component instead.
I would appreciate it if you could give me an early reply.
In vue-scrollspy , we can set animation options like this:
However in vue2-scrollspy , these parameters are constants, we can't tune them by ourselves.
I hope
vue2-scrollspy
would accept such options.In addition, maybe we should use a component rather than a directive to implement "scroll-spy", see https://github.com/vuejs/vue/issues/862:
I would appreciate it if you could give me an early reply.