Taro quoted local picture

Written directly image tag

<Image src={'../images/imgName.png'} className={'lampIcon'}></Image>

This is not acceptable

Correct posture: js there must first import:

import namedPng from '../../images/vip_select.png'

Then use;

<Image src={namedPng} className={'lampIcon'}></Image>

 

Guess you like

Origin www.cnblogs.com/tufei7/p/12159882.html