Vue中使用${}实现变量和字符串的拼接 1.先定义好变量 data() { return { a:'你好' }; }, 2.在字符串中使用${}拼接变量 注意不是单引号,而是两个 ` 号(esc下面的按键) mounted(){ alert(`${this.a}世界`) }