mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
chore: children use reactive
This commit is contained in:
@@ -24,16 +24,14 @@ export default createComponent({
|
||||
|
||||
const isFirst = computed(() => {
|
||||
if (parent) {
|
||||
const children = parent.children.value;
|
||||
const prev = children[index.value - 1];
|
||||
const prev = parent.children[index.value - 1];
|
||||
return !(prev && prev.isButton);
|
||||
}
|
||||
});
|
||||
|
||||
const isLast = computed(() => {
|
||||
if (parent) {
|
||||
const children = parent.children.value;
|
||||
const next = children[index.value + 1];
|
||||
const next = parent.children[index.value + 1];
|
||||
return !(next && next.isButton);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user