DBILITY

vue 3 image src binding 본문

front-end & ui/vuejs

vue 3 image src binding

DBILITY 2021. 8. 6. 18:55
반응형

require가 필요하다.

<img :src="require('@/assets/'+estate.productImage)">
또는
<img :src="require('./assets/'+estate.productImage)">

결과는

<img src="/img/room0.d13c856d.jpg" alt="" class="room-img">
반응형

'front-end & ui > vuejs' 카테고리의 다른 글

vuejs BASE_URL relative path build  (0) 2021.10.26
vue 실습 01  (0) 2021.08.06
vue 3 vue-router,plugin 설치 및 project 적용  (0) 2021.08.04
vue 3 version project create  (0) 2021.07.30
vue 3 instance lifecycle  (0) 2020.11.28
Comments