feat: add carousel component for displaying user tasks with swipeable slides
This commit is contained in:
@@ -19,7 +19,7 @@ watch(
|
|||||||
(value) => {
|
(value) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 获取高度
|
// 获取高度
|
||||||
swiper.value.$el.style.height = questionComat.value[value].$el.scrollHeight + 30 + 'px';
|
swiper.value.$el.style.height = questionComat.value[value]?.$el.scrollHeight + 30 + 'px';
|
||||||
swiper.value.resize();
|
swiper.value.resize();
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ watch(
|
|||||||
function slideChange() {
|
function slideChange() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 获取高度
|
// 获取高度
|
||||||
swiper.value.$el.style.height = questionComat.value[active.value].$el.scrollHeight + 30 + 'px';
|
swiper.value.$el.style.height = questionComat.value[active.value]?.$el.scrollHeight + 30 + 'px';
|
||||||
swiper.value.resize();
|
swiper.value.resize();
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const tabs = computed(() => [
|
|||||||
title: '逻辑配额',
|
title: '逻辑配额',
|
||||||
props: [
|
props: [
|
||||||
{ prop: 'question_title', label: '题号', width: 80 },
|
{ prop: 'question_title', label: '题号', width: 80 },
|
||||||
{ prop: 'logic_text', label: '选项', width: 90 },
|
{ prop: 'text', label: '选项', width: 90 },
|
||||||
{ prop: 'sample_number', label: '样本量', width: 90 },
|
{ prop: 'sample_number', label: '样本量', width: 90 },
|
||||||
{ prop: 'percent', label: '进度', width: 90 }
|
{ prop: 'percent', label: '进度', width: 90 }
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user