From 79c204153c08bd5a934e21cccff18577b87aa0ba Mon Sep 17 00:00:00 2001 From: Alexandre BERTRAND Date: Tue, 27 Aug 2024 17:29:17 +0200 Subject: [PATCH] move to props --- package.json | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ef4ff40..ca3bd24 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@hublot-io/define-model", "type": "module", - "version": "1.0.2", + "version": "1.0.3", "description": "defineModel implementation for vue 2.7 according to 3.4 usage", "main": "src/index.ts", "repository": "git@github.com:hublot-io/defineModel.git", diff --git a/src/index.ts b/src/index.ts index faab434..9dfa87e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,7 +27,7 @@ export function defineModel(modelValue : string = 'input') : Ref{ const __internalValue = ref() if(modelValue === 'input'){ - __internalValue.value = __instance.$attrs.value as T + __internalValue.value = __instance.$props.value as T setTimeout(() => { watch(__instance.$props, () => {