如何将CSS样式应用于Oracle JET中的oj-table?

时间:2018-07-29 20:26:23

标签: css oracle-jet

我有这样的甲骨文喷射表

<oj-table  class='oj-table-data-cell-padding' id="table" aria-label="Departments Table"
                                data='[[dataSource]]'
                                display = "grid"
                                on-oj-before-current-row = "[[currentRowListener]]"
                                selectionMode = "{'row': 'single'}"
                                columns-default='{"sortable": "enabled"}'
                                dnd='{"reorder": {"columns": "enabled"}}'
                                style="width:100%;margin-bottom:40px; background-color: #1E90FF;"
                                columns='[{"headerText": "Course Id", 
                                                   "field": "Id",
                                                   "headerClassName": "oj-sm-only-hide",
                                                   "className": "oj-sm-only-hide",
                                                   "resizable": "enabled"},
                                                   {"headerText": "Course Name", 
                                                   "field": "CourseName",
                                                   "resizable": "enabled"},
                                                  {"headerText": "Description", 
                                                   "field": "CourseDescription",
                                                   "resizable": "enabled"},
                                                  {"headerText": "other Details", 
                                                   "field": "OtherDetail",
                                                   "headerClassName": "oj-sm-only-hide",
                                                   "className": "oj-sm-only-hide",
                                                   "resizable": "enabled"}

                                                    ]'

    </oj-table> 

问题是当我应用css时,某些标记有效,而有些则无效 例如背景颜色不起作用

那么如何在oracle jet中添加CSS样式?

2 个答案:

答案 0 :(得分:1)

您的代码正确。 runSimple . taskSimple = id不起作用的原因是因为OJET开发人员希望我们只能更改基本的内容,例如组件的高度和宽度。

如果您想进行更多更改,例如组件的美观性,则必须使用其Theme Builder

作为一种解决方法,您还可以检查元素并找到它们在内部用于组件的类并修改其值。例如,

taskSimple . runSimple

答案 1 :(得分:0)

如何将工具提示添加到oj-table标头

  columns='[{"headerText": "Course Id", 
 "field": "Id",
 "headerClassName": "oj-sm-only-hide",
"className": "oj-sm-only-hide",
"resizable": "enabled"},
{"headerText": "Course Name", 
"field": "CourseName",
"resizable": "enabled"},
{"headerText": "Description", 
"field": "CourseDescription",
"resizable": "enabled"},
"headerText": "other Details", 
"field": "OtherDetail",
"headerClassName": "oj-sm-only-hide",
"className": "oj-sm-only-hide",
"resizable": "enabled"}

                                                    ]