<template>
<scroll-view :scroll-top="0" direction="vertical" scroll-with-animation="true" :show-scrollbar="true"
class="contain">
<view class="ux-bg-white">
<view class="ux-list-items" v-for="(item,index) in 6" :key="index">{{item}}</view>
</view>
</scroll-view>
</template>
<script>
export default {
data() {
return {
}
},
created() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
上面代码for循环时报错:
14:28:18.707 [plugin:uni:app-uts] 编译失败
14:28:18.707 error: Conflicting declarations: value-parameter _1: Number?, value-parameter _1: VNode?
14:28:18.707 at components/form-list/index.uvue:5:39
14:28:18.707 3 | class="contain">
14:28:18.707 4 | <view class="ux-bg-white">
14:28:18.707 5 | <view class="ux-list-items" v-for="(item,index) in 6" :key="index">{{item}}</view>
14:28:18.707 | ^
14:28:18.707 6 | </view>
14:28:18.707 7 | </scroll-view>
0 个回复