【原创】Vue 带 this 引用的动态字符串拼接

let pre = 'pwd';
this[`${pre}NotRead`] = true; // this.pwdNotRead = true
点赞

发表回复

电子邮件地址不会被公开。必填项已用 * 标注