mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
test
This commit is contained in:
@@ -5,7 +5,12 @@
|
|||||||
<zan-button block>上传文件</zan-button>
|
<zan-button block>上传文件</zan-button>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
<input type="file" @change="onValueChange" class="zan-uploader__input" ref="input" />
|
<template v-if="disabled">
|
||||||
|
<input type="file" @change="onValueChange" disabled="disabled" class="zan-uploader__input" ref="input" />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<input type="file" @change="onValueChange" class="zan-uploader__input" ref="input" />
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -40,9 +45,7 @@
|
|||||||
reader.onload = (e) => {
|
reader.onload = (e) => {
|
||||||
this.afterRead && this.afterRead(
|
this.afterRead && this.afterRead(
|
||||||
{
|
{
|
||||||
name: file.name,
|
file: file,
|
||||||
type: file.type,
|
|
||||||
size: file.size,
|
|
||||||
content: e.target.result
|
content: e.target.result
|
||||||
});
|
});
|
||||||
this.$refs.input.value = '';
|
this.$refs.input.value = '';
|
||||||
|
Reference in New Issue
Block a user