file input event
This commit is contained in:
parent
ec7b8f4cf0
commit
03aee6d36e
@ -81,6 +81,7 @@ export default {
|
||||
this.url = URL.createObjectURL(file)
|
||||
this.name = file.name
|
||||
this.file = file
|
||||
this.$emit('set', { file: this.file, url: this.url })
|
||||
} catch (e) {
|
||||
this.url = null
|
||||
this.name = null
|
||||
|
@ -2,12 +2,17 @@
|
||||
<div>
|
||||
<Button text="Hello World" :icon="['fas', 'undo']" @click.native="submitPhoto" />
|
||||
<Button text="Without Icon" />
|
||||
<InputFile label="Twój obrazek" />
|
||||
<InputFile label="Twój obrazek" @set="(value) => photo = value" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
photo: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitPhoto () {
|
||||
console.log('test')
|
||||
|
Loading…
Reference in New Issue
Block a user