1 Star 0 Fork 0

毫末科技/hm-taro-downloads-card

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.jsx 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
taoning 提交于 2020-03-13 16:52 . init
'use strict';
import Taro, { Component } from '@tarojs/taro';
import { View, Text, Image } from '@tarojs/components';
import styles from './style.js';
import downloadImage from './images/img_24402_0_0.png'
class HmDownloadsCard extends Component {
constructor(props) {
super(props);
let defaultState = {
count: '299.674',
downloads: '下载量',
downloadImage
};
this.state = Object.assign(defaultState, JSON.parse(JSON.stringify(props)));
}
render() {
return (
<View style={styles.hmDownloadsCard}>
<View style={styles.container}>
{true && (
<View style={styles.downloadDetail}>
<View style={styles.downloadDetailContainer}>
<Text style={styles.count}>{this.state.count}</Text>
<Text style={styles.downloads}>{this.state.downloads}</Text>
</View>
</View>
)}
<Image style={styles.downloadImage} src={this.state.downloadImage} />
</View>
</View>
);
}
}
export default HmDownloadsCard;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/haomo/hm-taro-downloads-card.git
git@gitee.com:haomo/hm-taro-downloads-card.git
haomo
hm-taro-downloads-card
hm-taro-downloads-card
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385