fix [P-235]: Скролл при табе
This commit is contained in:
1 parent
df451636e1
commit
a6aee5cbcc
1 file changed
+15
@@ -313,6 +313,21 @@ export default {
|
|||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const step = ref(0);
|
const step = ref(0);
|
||||||
const isVoteCreated = ref(false);
|
const isVoteCreated = ref(false);
|
||||||
|
|
||||||
|
// Добавляем наблюдение за изменением шага
|
||||||
|
watch(step, () => {
|
||||||
|
// Прокручиваем основной скролл страницы
|
||||||
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
|
|
||||||
|
// Находим все контейнеры с overflow-y: auto и прокручиваем их наверх
|
||||||
|
setTimeout(() => {
|
||||||
|
const scrollContainers = document.querySelectorAll('.v-card-text[style*="overflow-y: auto"]');
|
||||||
|
scrollContainers.forEach(container => {
|
||||||
|
container.scrollTo({ top: 0, behavior: 'smooth' });
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
|
});
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
title: '',
|
title: '',
|
||||||
description: '',
|
description: '',
|
||||||
|
|||||||
Reference in new issue
Block a user