odoo tree标签颜色显示

文件位置

odoo\addons\web\static\src\legacy\js\views\list\list_renderer.js

关键代码

// Allowed decoration on the list's rows: bold, italic and bootstrap semantics classes
var DECORATIONS = [
    'decoration-bf',
    'decoration-it',
    'decoration-danger',
    'decoration-info',
    'decoration-muted',
    'decoration-primary',
    'decoration-success',
    'decoration-warning'
];

代码解释

  1. decoration-bfdecoration-it:

    • decoration-bf: 这个类名可能与 bold (粗体) 相关,表示该行将会用粗体显示。
    • decoration-it: 这个类名可能与 italic (斜体) 相关,表示该行将会用斜体显示。
  2. Bootstrap 语义类:
    其余类名与 Bootstrap 框架中的样式类有关,用来提供特定的颜色和装饰效果:

    • decoration-danger: 通常用于表示危险或错误信息,会显示为红色背景或文本。
    • decoration-info: 用于显示信息型内容,通常为蓝色。
    • decoration-muted: 表示轻度或不太显眼的文本,颜色较为暗淡。
    • decoration-primary: 用于主要操作或信息,通常为蓝色。
    • decoration-success: 表示成功的操作,通常为绿色。
    • decoration-warning: 表示警告信息,通常为黄色。

这些装饰样式可以根据不同的需求动态应用于列表中的每一行,以调整行的视觉风格或强调特定的信息。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

弄堂汪

看了觉得好,就请我喝瓶水吧!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值