如上

- 发布:2024-05-16 17:42
- 更新:2024-05-16 23:16
- 阅读:149
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: Monterey12.5.1
第三方开发者工具版本号: 4.0.8
基础库版本号: 2.0.2-3080720230630001
项目创建方式: CLI
CLI版本号: 5.0.8
操作步骤:
预期结果:
v-for的标签中不出现外层的class
v-for的标签中不出现外层的class
实际结果:
存在外层class
存在外层class
bug描述:
组件text
<template>
<view>
<button v-for="item in 10">123</button>
</view>
</template>
<script>
export default {
name:"test",
options: {
virtualHost: true
},
data() {
return {
};
},
mounted(){
console.log(1)
}
}
</script>
<style>
</style>
页面
<template>
<view>
<test class='test'></test>
123
</view>
</template>
<script>
import test from '@/components/test.vue'
export default{
components:{
test
},
mounted(){
console.log(2)
}
}
</script>
3***@qq.com (作者)
只能算是规避的方法,但这确实是个bug
2024-05-17 10:52