vuvivian's blog

越努力,越幸运.

  1. 1. 结构
  2. 2. 区域区分

结构

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
```
<t t-name="ControlPanel">
<div class="o_control_panel">
<!-- 上层 -->
<div>
<!-- 第一层左面包屑 -->
<ol class="breadcrumb" role="navigation"/>
<!-- 第一层右搜索 -->
<div class="o_cp_searchview" role="search">
<t t-if="widget.withSearchBar" t-call="SearchView"/>
</div>
</div>
<!-- 下层 -->
<div>
<!-- 第二层左按钮 -->
<div class="o_cp_left">
<div class="o_cp_buttons" role="toolbar" aria-label="Control panel toolbar"/>
<aside class="o_cp_sidebar"/>
</div>
<!-- 第二层右筛选/切换视图 -->
<div class="o_cp_right">
<div class="btn-group o_search_options position-static" role="search"/>
<nav class="o_cp_pager" role="search" aria-label="Pager"/>
<nav class="btn-group o_cp_switch_buttons" role="toolbar" aria-label="View switcher"/>
</div>
</div>
</div>
</t>
```

区域区分

1
2
3
4
5
6
7
8
this.nodes = {
$buttons: this.$('.o_cp_buttons'),
$pager: this.$('.o_cp_pager'),
$sidebar: this.$('.o_cp_sidebar'),
$switch_buttons: this.$('.o_cp_switch_buttons'),
$searchview: this.$('.o_cp_searchview')
$searchview_buttons : this.$('.o_search_options')
};
本文最后更新于 天前,文中所描述的信息可能已发生改变