Search code examples
vue.jselement-ui

VUEJS 2 Putting 2 props in one line


how do you input 2 props in one line in VUEJS? Im using vuejs 2 and element UI.

<el-table-column prop="`(creator_name + creator_username)`" label="Founder"></el-table-column>

The output should be

test(09123567)


Solution

  • in Vue, you can passing the variable as props with colon as prefix

    in your case:

    <el-table-column :prop="`${creator_name} ${creator_username})`" label="Founder"></el-table-column>