vue2.0js + css 应用了解

es6 新的语法$ {NAME},并把它放在反引号里

2018-07-24  本文已影响5人  zlf_j

Template Literals(模板对象) in ES6

在其它语言中,使用模板和插入值是在字符串里面输出变量的一种方式。

实例:
       if (this.isArt) {
         if (this.studiosListArt.length === 0) {
           this.apiGet(`tache/get_studio?tache_id=14&project_id=${this.search.project_id}`).then((res) => {
             this.handelResponse(res, (data) => {
               this.studiosListArt = data
             })
           })
         }
         this.artOfStudio = this.artOfStudio
       } else {
         this.artOfStudio = []
       }

参考:https://www.cnblogs.com/binmengxue/p/7928602.html

上一篇 下一篇

猜你喜欢

热点阅读