[PROMOÇÃO] Assine com + 30% de desconto ANUAL MENSAL (últimas horas)
Renato Machado
Criador Renato Machado 16/02/2023

olá professor Carlos estou tendo problemas ao visualizar imagens somente aparece nome, não sei como alterar pra produção *prod.js

link para visualizar em meu dominio

http://acessohost.com.br/cursoVue3/

Utilizando CDN

index

<img v-bind:src="product.image" />

{{ name }} {{ lastName}}

app.js

const app = {

      

    data(){

        return{

            name:'Carlos',

            lastName: 'Ferreria',

            product: {

                title: 'Produto 1',

                dexription: 'Produto 1',

                image: './assets/image/image1.jpg'

            }

        };

    }

};

 

Vue.createApp(app).mount("#app");

 

erro: no console

You are running a development build of Vue.

Make sure to use the production build (*.prod.js) when deploying for production.

Manager Carlos Ferreira 16/02/2023

Olá, Renato!
Como vai?

Está usando Vue.js 3?
Pode fazer assim: https://github.com/especializati/vue-3-projeto-ead/blob/main/src/views/home/components/CardCouse.vue#L5

Carlos Ferreira
Criador Renato Machado 16/02/2023

Sim vue 3, não deu certo https://github.com/especializati/vue-3-projeto-ead/blob/main/src/views/home/components/CardCouse.vue#L5

no console aprece esse erro:

You are running a development build of Vue.

Make sure to use the production build (*.prod.js) when deploying for production.

vue.global.js:1661 [Vue warn]: Property "product" was accessed during render but is not defined on instance. 

  at <App>

warn @ vue.global.js:1661

get @ vue.global.js:4776

get @ vue.global.js:4853

render @ VM105:18

renderComponentRoot @ vue.global.js:2527

componentUpdateFn @ vue.global.js:7174

run @ vue.global.js:635

instance.update @ vue.global.js:7288

setupRenderEffect @ vue.global.js:7302

mountComponent @ vue.global.js:7084

processComponent @ vue.global.js:7042

patch @ vue.global.js:6646

render @ vue.global.js:7802

mount @ vue.global.js:6036

app.mount @ vue.global.js:10995

(anonymous) @ app.js:11

vue.global.js:1661 [Vue warn]: Unhandled error during execution of render function 

  at <App>

warn @ vue.global.js:1661

logError @ vue.global.js:1849

handleError @ vue.global.js:1841

renderComponentRoot @ vue.global.js:2556

componentUpdateFn @ vue.global.js:7174

run @ vue.global.js:635

instance.update @ vue.global.js:7288

setupRenderEffect @ vue.global.js:7302

mountComponent @ vue.global.js:7084

processComponent @ vue.global.js:7042

patch @ vue.global.js:6646

render @ vue.global.js:7802

mount @ vue.global.js:6036

app.mount @ vue.global.js:10995

(anonymous) @ app.js:11

vue.global.js:1855 Uncaught TypeError: Cannot read properties of undefined (reading 'image')

    at Proxy.render (eval at compileToFunction (vue.global.js:16003:23), <anonymous>:18:24)

    at renderComponentRoot (vue.global.js:2527:46)

    at ReactiveEffect.componentUpdateFn [as fn] (vue.global.js:7174:59)

    at ReactiveEffect.run (vue.global.js:635:27)

    at instance.update (vue.global.js:7288:58)

    at setupRenderEffect (vue.global.js:7302:11)

    at mountComponent (vue.global.js:7084:11)

    at processComponent (vue.global.js:7042:19)

    at patch (vue.global.js:6646:23)

    at render (vue.global.js:7802:15)

Renato Machado
Criador Renato Machado 16/02/2023

Resolvido Professor Carlos, obrigado pela atenção 🤜

Renato Machado
Sabe a Solução? Ajude a resolver!

Precisa estar logado para conseguir responder a este ticket!

Clique Aqui Para Entrar!