Problems with vue data rendering

when vue renders page data, if the data in the data data is empty, how to set the default value when setting data data to null without using v-if

<img :src="item.url" alt="">

here, if url in item is empty, then the image path will be empty and the page will not display pictures. How to specify a default path when url is empty

Mar.25,2021

item.url? ('item.url': require (' your default picture path')


the ternary expression upstairs can or can be used: src= "item.url | | require ('default path of your picture')"


item.url? 'item.url':' your default picture path'


define global url in data
data () {

return{
    url:''
}

}
Page:

onerror= "

Menu