मेरा व्यू घटक में कुछ छवियां हैं। मैं बाद में आलसी लोडिंग करना चाहता हूं, इसलिए मुझे छवियों के स्रोत को एक छोटी छवि में सेट करना होगा, पहले।Vue.js टेम्पलेट में स्टेटिक छवि src
<template>
<div v-for="item in portfolioItems">
<a href="#{{ item.id }}">
<img
data-original="{{ item.img }}"
v-bind:src="/static/img/clear.gif"
class="lazy" alt="">
</a>
</div>
</template>
मुझे त्रुटियों की एक गुच्छा देता है, जैसे:
[Vue warn]: Invalid expression. Generated function body: /scope.static/scope.img/scope.clear.gif vue.common.js:1014[Vue
[Vue warn]: Error when evaluating expression "/static/img/clear.gif": TypeError: Cannot read property 'call' of undefined (found in component:)
webpack.config.js: module.exports = { // ... निर्माण: { assetsPublicPath: '/ ', assetsSubDirectory:' स्थिर ' } }