内容
比如一个对象
const activitys = {
活动一: '打王者荣耀',
活动二: '打和平精英',
活动三: '打把CF',
活动四: '开个网吧模拟游戏',
}
想要在页面上这样展示
活动一: '打王者荣耀'
活动二: '打和平精英'
活动三: '打把CF'
活动四: '开个网吧模拟游戏'
则这样写
{{key}}:
{{val}}
.content-column {
opacity: 0.65;
box-sizing: content-box;
margin-left: 20px;
.content-title {
font-size: 16px;
font-family: SourceHanSansCN-Regular, sans-serif;
font-weight: 400;
color: #fff;
float: left;
opacity: 0.7;
}
.content-words {
text-align: left;
font-size: 16px;
font-family: DIN-Regular, sans-serif;
font-weight: 400;
color: #fff;
opacity: 0.7;
.content-unit {
font-family: SourceHanSansCN-Regular, sans-serif;
margin-left: 5px;
color: #9a9a9a;
}
}
}
方案 2:
{{key}}
{{ClassData[key]}}
最后