diff --git a/packages/runtime-vapor/src/directive.ts b/packages/runtime-vapor/src/directive.ts index f255153fd..3906eb723 100644 --- a/packages/runtime-vapor/src/directive.ts +++ b/packages/runtime-vapor/src/directive.ts @@ -76,9 +76,9 @@ export function withDirectives( let [dir, source, arg, modifiers] = directive if (!dir) continue if (isFunction(dir)) { - // TODO function directive dir = { - created: dir, + mounted: dir, + updated: dir, } satisfies ObjectDirective } diff --git a/playground/src/directive.vue b/playground/src/directive.vue index 1b9202606..81d4a3e53 100644 --- a/playground/src/directive.vue +++ b/playground/src/directive.vue @@ -1,7 +1,7 @@