Loading...
比如后端返回用户的在线状态 通常都是0或者1 虽然我们都知道0不在线在线 但是怎么在el-table上显示出来呢直接0或者1会给人看着很懵 所以我们需要根据0或者1转成 在线 离线如下 给table的字段属性中加一个:formatter="function"任意方法名然后再script里面定义这个方法 <el-table-column prop="...
如下 已知在script里面想要调用store的数据需要加上 this.$store所以在html中调用的时候我也带上了、<el-tabs type="card" editable v-model="htis.$store.state.tabIndex"> <!-- 初始化默认标签页 --> ...