On the problem of elementUI switch

The

list uses the switch component in elementUI

clipboard.png

status is a field returned by the background, which is fine.

the on state is 1 and the off state is 0, but the switch does not correspond here and cannot be displayed here.

the code is as follows:

<el-table-column prop="status" label="status"></el-table-column> //
<el-table-column label="STATUS"> //
    <template slot-scope="scope">
        <el-switch 
            v-model="scope.row.status"
            active-value=1
            inactive-value=0
            @change=change_switch(scope.row.id,scope.row.status)>
        </el-switch>
    </template>
</el-table-column>     

callback is as follows:

change_switch:function(id,status){  
    console.log(status); 
    axios.get("/advertiser/updateStatus",{
        headers: {
            Authorization : getCookie("token"),
        },
        params:{
            id:id,
            status:status
        }
    })
    .then(res=>{
        console.log(res)
    })
},


the on state is 1, and the off state is 0, but the switch does not correspond here and cannot be displayed here.
active-value=0
inactive-value=1

are you sure. Write it backwards.

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-1b319d4-2bdb5.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-1b319d4-2bdb5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?