Answer the question
In order to leave comments, you need to log in
How to push another component into a component?
Hello, I just started learning Vue and I want to understand how to insert something into a component ...
something like this I see it:
<template>
<my-input placeholder="Логин">
<!-- вставляем сюда что нибудь, например иконку -->
</my-input>
</template>
<script setup>
import MyInput from "./components/Input.vue";
</script>
<template>
<div class="input">
<!-- и иконка должна вставится вот сюда -->
<input type="text" :placeholder="placeholder">
</div>
</template>
<script setup>
import { defineProps } from 'vue'
defineProps({
placeholder: String
})
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question