Input get a raw value
alloself opened this issue · comments
Describe the bug
if there is a component that displays children vue-router and passes this data through provide , then modelValue is displayed as raw
Steps to reproduce
need to create a route that contains children routes and pass data from parent to child via provide , and in the child a v-model with an input
parent component:
<template>
<div>
<router-view />
</div>
</template>
<script setup>
import { ref, provide } from 'vue';
const data = ref({
phone: '',
code: '',
});
provide('data', data);
</script>
childrent component:
<template>
<input
ref="phoneInput"
v-model="authData.phone"
name="phone"
/>
</template>
<script setup>
const authData = inject('data');
</script>
steps to reproduce - we get to the page with the input and enter the value, then go to any other children page and return back using software navigation
I don't see maska usage in your code. Please provide minimal working example in some online sandbox or repo.
I don't see maska usage in your code. Please provide minimal working example in some online sandbox or repo.
yes,u right,sorry , I attach links to codesandbox and video in jam: