fix: 打卡记录改用 ListView
This commit is contained in:
+6
-11
@@ -1,3 +1,5 @@
|
|||||||
|
import { ListView } from "std-widgets.slint";
|
||||||
|
|
||||||
export struct DayRow {
|
export struct DayRow {
|
||||||
date: string,
|
date: string,
|
||||||
mark: string,
|
mark: string,
|
||||||
@@ -176,19 +178,12 @@ export component MainWindow inherits Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if root.error == "" && root.days.length > 0: Flickable {
|
if root.error == "" && root.days.length > 0: ListView {
|
||||||
width: 100%;
|
|
||||||
vertical-stretch: 1;
|
vertical-stretch: 1;
|
||||||
content-height: list.preferred-height;
|
for day in root.days: VerticalLayout {
|
||||||
list := VerticalLayout {
|
|
||||||
width: 100%;
|
|
||||||
alignment: start;
|
alignment: start;
|
||||||
for day in root.days: VerticalLayout {
|
DayBlock { day: day; }
|
||||||
width: 100%;
|
Hairline {}
|
||||||
alignment: start;
|
|
||||||
DayBlock { day: day; }
|
|
||||||
Hairline {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user