types(Sidebar): use tsx (#8121)

This commit is contained in:
neverland
2021-02-10 11:14:50 +08:00
committed by GitHub
parent 3d0e6d661e
commit 692631968d
8 changed files with 43 additions and 33 deletions
+2 -2
View File
@@ -29,14 +29,14 @@ export default createComponent({
const isFirst = computed(() => {
if (parent) {
const prev = parent.children[index!.value - 1];
const prev = parent.children[index.value - 1];
return !(prev && 'isButton' in prev);
}
});
const isLast = computed(() => {
if (parent) {
const next = parent.children[index!.value + 1];
const next = parent.children[index.value + 1];
return !(next && 'isButton' in next);
}
});