How to pass in a picture address as a property when using a component

this component has an icon, so you want to pass in the image address of a relative path when using it.
has been tested and found to be feasible in the static folder under the root directory. But pictures are usually placed in the same directory as vue files, so is there a better solution?

Feb.28,2021


<template>
    <div>
       <MyComponent :icon=compomentIcon></MyComponent>    
    </div>
</template>

<script>
    import MyComponent from 'path'
    import componentImg  from 'imgpath'
    export default {
        data(){
            return {
                compomentIcon: componentImg
            }
        },
        components: {
            MyComponent
        }
       
    }
</script>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30301-340a3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30301-340a3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?