1、文件绑定{
{}}中的字符串拼接:直接在{
{}}内拼接:
{
{item.userName+'('+item.userAccount+')'}}
:ref="`user${index}`"
2、vue标签属性绑定中的字符串拼接:写法有两种::title=”`字符串${xx}`” 或 :title=”‘字符串’ + xx” 都可以。其中,{}里面可以写js方法。如:
{
{ item.text }}
3、js中的字符串拼接:
this.personList.forEach(item => { item.label = `${item.userName}(${item.account})`; });
this.$bus.$emit(`${this.activeName}-reload`, this.searchData);
switchStatus(row) { this.$Modal.confirm({ title: '提示', content: `是否确认切换状态为${row.isDelete === 1 ? '否' : '是'}?`, onOk: () => { row.isDelete = row.isDelete === 0 ? 1 : 0; } }); },
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/211819.html原文链接:https://javaforall.net
