Skip to content

Commit

Permalink
add SvFile component
Browse files Browse the repository at this point in the history
  • Loading branch information
k3ssen committed Apr 25, 2021
1 parent af9419e commit 7030245
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Resources/assets/components/Form/SvFile.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<v-file-input v-model="form.vars.data" v-bind="Object.assign(attributes, $attrs)">
<!-- Pass on all slots -->
<slot v-if="namedSlots" v-for="slot in Object.keys(namedSlots)" :name="slot" :slot="slot"/>
<template v-for="slot in Object.keys(scopedSlots)" :slot="slot" slot-scope="scope">
<slot :name="slot" v-bind="scope"/>
</template>
</v-file-input>
</template>

<script lang="ts">
import {Component, Mixins} from 'vue-property-decorator';
import FormWidgetMixin from '@k3ssen/symfony-vuetified/components/Form/FormWidgetMixin';
@Component
export default class SvFile extends Mixins(FormWidgetMixin) {
}
</script>
1 change: 1 addition & 0 deletions Resources/assets/globalComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Vue.component('SvRange', () => import('./components/Form/SvRange'));
Vue.component('SvSwitch', () => import('./components/Form/SvSwitch'));
Vue.component('SvTextarea', () => import('./components/Form/SvTextarea'));
Vue.component('SvText', () => import('./components/Form/SvText'));
Vue.component('SvFile', () => import('./components/Form/SvFile'));

// Other components
Vue.component('SvApp', () => import('./components/SvApp'));
Expand Down

0 comments on commit 7030245

Please sign in to comment.