This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<input ref="input" type="text" v-model="localValue" /> | |
<slot :localValue="localValue" :formattedDate="formattedDate"> | |
{{ formattedDate }} | |
</slot> | |
<!-- parent can now use 'render prop through scoped slot' --> | |
<!-- | |
<DatePickerComponent slot-scope="{localValue, formattedDate}" :value="value" @input="handleChildInput" @clear="clearChildInput"> | |
{{ formattedDate }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<input ref="input" v-model="localValue" @change="handleChange"> | |
</template> | |
<script> | |
export default { | |
data: () => ({ | |
localValue: null | |
}), | |
props: ['value'], | |
methods: { |