标签:技术 ret bsp efault this load pre lis style
import React, { Component } from "react";
import { View, Text } from "@tarojs/components";
export default class Index extends Component {
constructor(props) {
super(props);
this.state = {
list: [1, 2, 3, 4, 5, 6],
};
}
render() {
return (
<View>
<View>
{this.state.list.map((a, i) => {
return (
<View
key={i}
style={{ backgroundColor: `rgba(0,0,0,0.${a})` }}
>{a}</View>
);
})}
</View>
</View>
);
}
}
效果:

标签:技术 ret bsp efault this load pre lis style
原文地址:https://www.cnblogs.com/luguankun/p/13934736.html