Progress: fix disable prop

This commit is contained in:
陈嘉涵 2017-08-24 15:27:56 +08:00
parent 14085f5fac
commit c7b96bd8e0

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="van-uploader"> <div class="van-uploader">
<slot></slot> <slot></slot>
<input type="file" @change="onValueChange" :disabled="disable" class="van-uploader__input" ref="input" /> <input type="file" @change="onValueChange" :disabled="disabled" class="van-uploader__input" ref="input" />
</div> </div>
</template> </template>
@ -10,7 +10,7 @@ export default {
name: 'van-uploader', name: 'van-uploader',
props: { props: {
disable: { disabled: {
type: Boolean, type: Boolean,
default: false default: false
}, },
@ -25,7 +25,7 @@ export default {
methods: { methods: {
onValueChange(event) { onValueChange(event) {
if (this.disable) { if (this.disabled) {
return; return;
} }