taro---image引入图片

import Taro, { Component } from '@tarojs/taro'

import { View, Image } from '@tarojs/components'

1、网络图片

<Image style='width:300px;height:100px;background: #fff;' src='https://storage.360buyimg.com/mtd/home/111543234387022.jpg'/>

 

2、本地资源图片

<Image className="unit-info-tax-tip" src={require('../../../../images/icon_03.png')} />

 

3、定义变量

import tipPng from '../../../../images/icon_03.png'
引入变量即可
<Image className="unit-info-tax-tip"   src={tipPng} />

 

 

相关文章:

  • 2021-06-19
  • 2021-11-06
  • 2021-08-16
  • 2021-11-16
  • 2021-10-30
  • 2022-01-08
  • 2021-05-19
  • 2021-10-25
猜你喜欢
  • 2022-12-23
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-01
相关资源
相似解决方案