Skip to content

Commit b89c759

Browse files
fix 800px width style
1 parent 30d2eb7 commit b89c759

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

source/zh-cn/define-entities-as-any-kind-of-classes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ val counts = database.staffs
9696

9797
如果 data class 真的那么完美的话,Ktorm 在最初设计的时候就不会决定使用 `Entity` interface 了。事实上,即使在 2.5 版本发布以后,使用 interface 定义实体类仍然是我们的第一选择。与使用 interface 定义实体类相比,使用 data class 目前还存在如下两个限制:
9898

99-
- **无法使用列绑定功能**由于直接以 `BaseTable` 作为父类,我们无法在定义表对象时使用 `bindTo``references` 等函数指定数据库列与实体类属性的绑定关系,因此每个表对象都必须实现 `doCreateEntity` 函数,在此函数中手动创建实体对象,并一一对各个属性赋值。
100-
- **无法使用实体对象的增删改 API**由于使用 data class 作为实体类,Ktorm 无法对其进行代理,因此无法检测到实体对象的状态变化,这导致 `sequence.add(..)``entity.flushChanges()` 等针对实体对象的增删改 API 将无法使用。但是 SQL DSL 并没有影响,我们仍然可以使用 `database.insert(..) {..}``database.update(..) {..}` 等 DSL 函数进行增删改操作。
99+
- **无法使用列绑定功能**由于直接以 `BaseTable` 作为父类,我们无法在定义表对象时使用 `bindTo``references` 等函数指定数据库列与实体类属性的绑定关系,因此每个表对象都必须实现 `doCreateEntity` 函数,在此函数中手动创建实体对象,并一一对各个属性赋值。
100+
- **无法使用实体对象的增删改 API**由于使用 data class 作为实体类,Ktorm 无法对其进行代理,因此无法检测到实体对象的状态变化,这导致 `sequence.add(..)``entity.flushChanges()` 等针对实体对象的增删改 API 将无法使用。但是 SQL DSL 并没有影响,我们仍然可以使用 `database.insert(..) {..}``database.update(..) {..}` 等 DSL 函数进行增删改操作。
101101

102102
由于以上限制的存在,在你决定使用 data class 作为实体类之前,应该慎重考虑,你获得了使用 data class 的好处,同时也会失去其他的东西。请记住这句话:**使用 interface 定义实体类仍然是我们的第一选择。**
103103

themes/doc/lib/browser/navigation/components.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Sidebar extends React.Component {
2828
}
2929

3030
componentDidUpdate() {
31-
if ($(window).width() > 800) {
31+
if ($(window).width() >= 800) {
3232
setTimeout(function () {
3333
const $sidebar = $('.doc-sidebar');
3434
const $firstItem = $($('.doc-sidebar-list').children('.doc-sidebar-list__item--link').get(0));

themes/doc/source/style/_doc/content.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
overflow: auto;
2323
padding-top: 0;
2424

25-
@media screen and (max-width: $doc-breakpoint) {
25+
@media screen and (max-width: calc($doc-breakpoint - 1px)) {
2626
padding-top: 0.8rem;
2727
}
2828
}
2929

30-
@media screen and (max-width: $doc-breakpoint) {
30+
@media screen and (max-width: calc($doc-breakpoint - 1px)) {
3131
transform: translateX(0);
3232
margin-right: 0;
3333
}

themes/doc/source/style/_doc/lang-switcher.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
display: flex;
55

66
.lang-switcher {
7-
@media screen and (max-width: $doc-breakpoint) {
7+
@media screen and (max-width: calc($doc-breakpoint - 1px)) {
88
display: none
99
}
1010
}

themes/doc/source/style/_doc/layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ body {
3838
}
3939

4040
&.doc-sidebar--is-visible {
41-
@media screen and (max-width: $doc-breakpoint) {
41+
@media screen and (max-width: calc($doc-breakpoint - 1px)) {
4242
.doc-sidebar {
4343
transform: translateX(0);
4444
z-index: 9;

themes/doc/source/style/_doc/navigation.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
height: 100%;
3232
align-items: center;
3333

34-
@media screen and (max-width: $doc-breakpoint) {
34+
@media screen and (max-width: calc($doc-breakpoint - 1px)) {
3535
flex-grow: initial;
3636
}
3737
}
@@ -53,7 +53,7 @@
5353
margin-left: 12px;
5454
vertical-align: text-bottom;
5555

56-
@media screen and (max-width: $doc-breakpoint) {
56+
@media screen and (max-width: calc($doc-breakpoint - 1px)) {
5757
display: none
5858
}
5959
}
@@ -82,7 +82,7 @@
8282
vertical-align: middle;
8383
}
8484

85-
@media screen and (max-width: $doc-breakpoint) {
85+
@media screen and (max-width: calc($doc-breakpoint - 1px)) {
8686
display: none
8787
}
8888
}
@@ -117,7 +117,7 @@
117117
-webkit-overflow-scrolling: touch;
118118
z-index: 2;
119119

120-
@media screen and (max-width: $doc-breakpoint) {
120+
@media screen and (max-width: calc($doc-breakpoint - 1px)) {
121121
transform: translateX(-$doc-sidebar-width);
122122
border-right: 1px solid #e1e1e1;
123123
}

themes/doc/source/style/_doc/vars.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// breakpoints
22
// -----------
33
$doc-breakpoint: 800px !default;
4-
$doc-breakpoint-small: 480px !default;
54

65
// colors
76
// -------------

0 commit comments

Comments
 (0)