waikit
waikit
NNuxt
Created by waikit on 3/24/2024 in #❓・help
<img src> is working but when i bind it :src it's not working
done it, finally it works! Thanks! so much better now
14 replies
NNuxt
Created by waikit on 3/24/2024 in #❓・help
<img src> is working but when i bind it :src it's not working
right now only one image i have to import to pass it as props to component. but i got few more images and yes, i'm using other images too. All of them will pass to the same component.
14 replies
NNuxt
Created by waikit on 3/24/2024 in #❓・help
<img src> is working but when i bind it :src it's not working
hi guys! now it works by first import the img like an object, then bind this object and pass to the <Image> component. This is weird, I can't bind the img as a string directly and pass to the component. It will be a trouble if i have a lot of images:
<script setup>
import imgsample from '../assets/images/simple-parisien/sample.jpg'

<template>
<Image
:imageStyle="'aspect-[4/3] p-4 object-cover'"
:imageSrc="imgsample"
>
</Image>
<script setup>
import imgsample from '../assets/images/simple-parisien/sample.jpg'

<template>
<Image
:imageStyle="'aspect-[4/3] p-4 object-cover'"
:imageSrc="imgsample"
>
</Image>
14 replies
NNuxt
Created by waikit on 3/24/2024 in #❓・help
<img src> is working but when i bind it :src it's not working
14 replies
NNuxt
Created by waikit on 3/24/2024 in #❓・help
<img src> is working but when i bind it :src it's not working
npm install @nuxtjs/composition-api this has problem, i received error: npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: nuxt-app@undefined npm ERR! Found: [email protected] npm ERR! node_modules/nuxt npm ERR! nuxt@"^3.11.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer nuxt@"^2.15" from @nuxtjs/[email protected] npm ERR! node_modules/@nuxtjs/composition-api npm ERR! @nuxtjs/composition-api@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\Wai Kit\AppData\Local\npm-cache_logs\2024-03-25T14_41_31_716Z-eresolve-report.txt
14 replies
NNuxt
Created by waikit on 3/24/2024 in #❓・help
<img src> is working but when i bind it :src it's not working
after added the import i got an error: [plugin:vite:import-analysis] Failed to resolve import "@nuxtjs/composition-api" from "components/Image.vue". Does the file exist?
14 replies