vue3 web平台使用 uni-app uni.chooseImage 上传完图片之后,dom树多了input
vue3 web平台使用 uni-app uni.chooseImage 上传完图片之后,dom树多了input
开发环境 | 版本号 | 项目创建方式 |
---|---|---|
Mac | Apple M1 | HBuilderX |
示例代码:
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<button class="text-area" @click="choose">
click me
</button>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello'
}
},
methods: {
choose() {
uni.chooseImage({
count: 6,
success: function(res) {
console.log(JSON.stringify(res.tempFilePaths));
}
});
}
},
onLoad() {
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>
更多关于vue3 web平台使用 uni-app uni.chooseImage 上传完图片之后,dom树多了input的实战教程也可以访问 https://www.itying.com/category-93-b0.html
4 回复
您好,uni.chooseImage web端是通过 input元素实现上传的,这里对你的开发有造成什么影响或者bug吗?
更多关于vue3 web平台使用 uni-app uni.chooseImage 上传完图片之后,dom树多了input的实战教程也可以访问 https://www.itying.com/category-93-b0.html
没影响,只是看见了反馈一下,感谢反馈
感谢反馈,问题已复现,已加分