mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
test
This commit is contained in:
parent
aa1de51a80
commit
7510930f41
@ -5,7 +5,12 @@
|
|||||||
<zan-button block>上传文件</zan-button>
|
<zan-button block>上传文件</zan-button>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
|
<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" />
|
<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 = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user