🎈 perf(优化我的页面icon):
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
.svg {
|
||||
display: flex;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { View } from '@tarojs/components'
|
||||
import classNames from 'classnames'
|
||||
import styles from './index.module.scss'
|
||||
|
||||
interface Pram {
|
||||
name: string
|
||||
style?: object
|
||||
}
|
||||
function SvgIcon(params: Pram) {
|
||||
const { name = '', style } = params
|
||||
return (
|
||||
<View className={classNames(styles.svg, `${name}`)} style={style}>
|
||||
<View className="path1" style={style}></View>
|
||||
<View className="path2" style={style}></View>
|
||||
<View className="path3" style={style}></View>
|
||||
<View className="path4" style={style}></View>
|
||||
<View className="path5" style={style}></View>
|
||||
<View className="path6" style={style}></View>
|
||||
<View className="path7" style={style}></View>
|
||||
<View className="path8" style={style}></View>
|
||||
<View className="path9" style={style}></View>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
export default SvgIcon
|
||||
Reference in New Issue
Block a user