The undefined attribute cannot be read in vue. Replace (/ (.{ 4}) / gheroine 1')

error: rendering error: "TypeError: cannot read the undefined attribute "replace""

does this method need to be defined? how to define

Sep.01,2021
The specific situation of

depends on your code, but there is also a situation where there is an account field under the account object when you define it, that is, when you initialize the data, you need to define account: {account: "}


page. When rendering, use v-if to determine whether there is an account.account,. Example: < div VMI if = "account.account" > {{account.account.replace (/ (. {4} / g recording 1))}} < / div >

Menu