VUE中    不起作用/如何在vue中添加空格

解决办法:

1.在对应的标签CSS中添加white-space: pre-line;
2.再将 等替换成unicode编码,对应如下:

HTML Entity (named)

对应unicode编码

作用

 

\u00a0

1个字符宽度

 

\u2002

1个字符宽度

 

\u2003

2个字符宽度

 

\u2009

小于1个字符宽度

例如:

<template slot-scope="scope">
<td >{{ statusFormat(scope.row) +'\u2003'}}
</td>
<td v-if="scope.row.status === '2'" >
<el-button slot="reference" size="mini" type="err" @click="showHandleView(scope.row)" >{{ "禁用" }}</el-button>
</td>
<td v-else ><el-button slot="reference" size="mini" type="success" @click="showHandleView(scope.row)" >{{ "启用" }}</el-button>
</td>
</template>