How to insert the src of img tags in vue dynamically?

I print this.$store.state.portrait is valuable, but why doesn"t it show anything?

check that the tag has been loaded, but why not display it?
clipboard.png

<img :src="this.$store.state.portrait?"../assets/people.png":"../assets/people.png"" alt="">
Mar.22,2021

Variables in

bindings are not used in this way. The variables in
v-bind can simply write their names in data.
you can only write this way in the method.

use vuex, remove this, directly $store. Variable can be


Direct

https://codeshelper.com/q/10.

"
Menu