Answer the question
In order to leave comments, you need to log in
Vue passing data to a component?
Hello everyone, I have a component:
<template>
<label :for="_id" class="label-file">
<input
:id="_id"
:name="_name"
:required="_required"
:disabled="_disabled"
type="file"
class="label-file__form-control">
<div class="label-file__init">
<SvgUploadGradient />
<div class="label-file__meta">
<div class="label-file__title">{{ title }}</div>
<div class="label-file__description">{{ description }}</div>
</div>
</div>
</label>
</template>
<script>
import SvgUploadGradient from '@/components/Svg/Upload/Gradient.vue'
export default {
components: {
SvgUploadGradient
},
props: {
title: {
default: 'Прикрепить файл',
type: String
},
description: {
default: 'Максимальный размер не должен превышать 10 мб.',
type: String
},
_id: {
default: '',
type: String
},
_name: {
default: '',
type: String
},
_required: {
default: true,
type: Boolean
},
_disabled: {
default: false,
type: Boolean
}
}
}
</script>
<FormFileInput
id="p12"
name="p12"
required="true"
title="Прикрепить файл"
description="Максимальный размер до 10 мб. Допустимый формат .p12."
/>
Answer the question
In order to leave comments, you need to log in
export default {
inheritAttrs: false
}
<template>
<input
v-bind="$attrs"
type="file"
class="label-file__form-control">
</template>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question