Background permission settin

clipboard.png


clipboard.png

 _this.arrTitle = [];
      var listTitle = data.data; 
       arrTitle html
      for (let i in listTitle) {
        _this.arrTitle.push(listTitle[i]);
   }         

1.vue builds the project, selects permissions and creates roles in the background. My code uses table to write the selection box. The problems encountered are: click to view, all of the columns are selected. This is related to the v-model in my td. The data return 1 in the background means that the true,0 code false, is selected. How to control the dynamic rendering of data using vue,? The problem is as mentioned above, please take a look at it!


arrTitle data do some simple processing

this.arrTitle.forEach(item => {
    item.list.R = item.list.R === 1 ? true : fasle
    //item.list.R = item.list.R === '1' ? true : fasle
    item.list.N = item.list.N === 1 ? true : fasle
    ....
})

render

<el-checkbox v-model="item.list.R">{{itemr.list.R}}</el-checkbox>
Menu