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>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -40,9 +45,7 @@
|
||||
reader.onload = (e) => {
|
||||
this.afterRead && this.afterRead(
|
||||
{
|
||||
name: file.name,
|
||||
type: file.type,
|
||||
size: file.size,
|
||||
file: file,
|
||||
content: e.target.result
|
||||
});
|
||||
this.$refs.input.value = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user