Elementui style modification in vue project

clipboard.png
in the vue project, to change the background color by clicking on the tag tag, the first idea is that the js click event directly changes the dom style. When you run, you find that the color has changed, and the method changes to the original color again after running. You don"t quite understand it, but ask for advice

.
Aug.21,2021

it is recommended to dynamically add class, to the parent of el-tag-info (your DOM node) and set the style you want in advance
for example, add a select-data when the parent is data-box,

.select-data{
    .el-tag-info{
        background-color:rgba(144, 147, 153, 0.1) !important
    }
}

vue binding: class= {select-data: flag}
when js modifies the style, flag = true

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