import { PropType, defineComponent, onMounted, ref, toRefs, watch } from 'vue'; import styles from '../index.module.less'; import icons from '../icons.json'; import { Badge, Grid, GridItem, Icon, Image, Progress, Tab, Tabs } from 'vant'; import iconLine from '../image/icon-line.png'; import { IStudentLessons } from '../type'; const colors = [ { name: '正常', background: 'linear-gradient(180deg, #02E2DB 0%, #01C1B5 100%)' }, { text: '迟到', background: 'linear-gradient(180deg, rgba(148, 194, 253, 0.85) 0%, rgba(91, 143, 249, 0.85) 100%)' }, { text: '请假', background: 'linear-gradient(180deg, rgba(251,224,49,0.85) 0%, rgba(246,189,22,0.85) 100%)' }, { text: '旷课', background: 'linear-gradient(180deg, rgba(245,161,129,0.85) 0%, rgba(232,104,74,0.85) 100%)' } ]; export default defineComponent({ name: 'Practice', props: { data: { type: Object as PropType, default: () => ({}) } }, emits: ['change'], setup(props, { emit }) { const { data } = toRefs(props); const tab = ref('week') return () => (
学员练习
{ console.log(value); emit('change', value); }}>
{{ icon: () => (
{data.value.commitRate || 0} %
), text: () =>
练习率
}}
{{ icon: () => (
{data.value.passRate || 0} %
), text: () =>
合格率
}}
应提交{' '} {data.value.expectNum || 0}
实际提交{' '} {data.value.actualNum || 0}
合格提交{' '} {data.value.passNum || 0}
); } });