我做的功能是这样的:如果这条数据某个字段被修改了,那么这个字段要显示红色;现在字段名和数据库对比啊啥的都弄好了,就差着色了;但是一直设置不上;有好的方法吗
showColor: function () {
var vm = this;
jQuery('#setTagColor').minicolors({
control: 'hue',
defaultValue: this.tag.color,
position: 'bottom right',
theme: 'bootstrap',
change: function (value) {
vm.tag.color = value;
if (!value) return;
}
});
}
mounted: function () {
if (this.isEdit) {
this.loadTag({id: this.id});
}
else {
this.showColor();
}
},
methods: {
loadTag: function (params) {
this.$resource(Config.TAG_SERVICE_URL)
.get(params)
.then(function (response) {
this.tag = response.data;
this.showColor();
});
},
……
}
:cell-class-name