[Fix] el not defined in scrollspydirective

bind -> inserted
This commit is contained in:
Tony Yang 2021-02-03 01:33:32 +08:00
parent dca32cab03
commit 2f379e8372
Signed by: t510599
GPG Key ID: D88388851C28715D

View File

@ -4,7 +4,7 @@ let selectors!: string[];
let observer!: IntersectionObserver;
const ScrollSpyDirective: DirectiveOptions = {
bind (el: Element, binding: VNodeDirective , vnode: VNode) {
inserted (el: Element, binding: VNodeDirective, vnode: VNode) {
selectors = binding.value.selectors;
// highlight first element