Problems encountered by beginners in rendering tables with vue

clipboard.png

these data are all sent from the background

STATUS 0 indicates auditing
STATUS 1 indicates normal
STATUS 2 indicates locked status

but now I don"t know how to change it to Chinese, how to do it?

<tr v-for="(item,index) in infoData">
    <td>{{index+1}}</td>
    <td>{{item.name}}</td>
    <td>{{item.email}}</td>
    <td>{{item.roleName}}</td>
    <th>{{item.status}}</th>
</tr>

Mar.09,2021

ide/filters.html" rel=" nofollow noreferrer "> filter-Vue.js

use a filter


write a map

<tr v-for="(item,index) in infoData">
    <th>{{statusMap[item.status]}}</th>
</tr>

data(){
    return {
        statusMap:{
            0:"",
            1:"",
            2:""
        }
    }
}

<th>{{item.status|statusFormat}}</th>
filters: {
    statusFormat: function(value) {
      return value === 0 ? '' : value === 1 ? '' : ''
    }
  }

use filters: ide/filters.html" rel=" nofollow noreferrer "> https://cn.vuejs.org/v2/guide.


Global filter, is available for all components

{{ scope.row.paragraph | time}}

Vue.filter('time',function (params) {
     params = params ? params.slice(0,[10]):params
    return params
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b22875-2ae78.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b22875-2ae78.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?