Verified Commit 88e0b9f6 authored by jxtxzzw's avatar jxtxzzw

course

Signed-off-by: jxtxzzw's avatarjxtxzzw <jxtxzzw@126.com>
parent 07699e88
Pipeline #266 passed with stages
in 9 minutes and 6 seconds
[
{
"id": "1",
"course": "Foundations of Computer System",
"university": "Carnegie Mellon University",
"score": null,
"max_score": null,
"grade": "A"
},
{
"id": "2",
"course": "计算机组成原理",
"university": "华东师范大学",
"score": 3.9,
"max_score": 4.0,
"grade": null
},
{
"id": "3",
"course": "Another Course",
"university": "另一所学校",
"score": 80,
"max_score": 100,
"grade": "A-"
}
]
......@@ -23,6 +23,7 @@
"publication": "Publication",
"honor": "Honor",
"exhibit": "Exhibit",
"course": "Course",
"exam": "Exam",
"coding": "Coding Problem",
"technique": "Technique",
......
......@@ -23,6 +23,7 @@
"publication": "出版",
"honor": "荣誉榜",
"exhibit": "陈列室",
"course": "课程",
"exam": "考试成绩",
"coding": "编程题",
"technique": "技术栈",
......
......@@ -36,3 +36,4 @@ export const footprint = require('./data/footprint.json')
export const exam = require('./data/exam.json')
export const income = require('./data/income.json')
export const advancedIncome = require('./data/advanced_income.json')
export const course = require('./data/course.json')
......@@ -45,6 +45,9 @@
<Icon type="md-school" />
{{ $t('navigation.skill') }}
</template>
<MenuItem name="course" to="course">
{{ $t('navigation.course') }}
</MenuItem>
<MenuItem name="exam" to="exam">
{{ $t('navigation.exam') }}
</MenuItem>
......
<template>
<div>
<span v-for="c in course" :key="c.id" style="margin-right: 20px">
<Badge :text="getShowText(c.score, c.max_score, c.grade)" type="success">
<Tag type="dot" color="primary">{{
`${c.course} (${c.university})`
}}</Tag>
</Badge>
</span>
</div>
</template>
<script>
import { course } from 'assets/reader'
export default {
name: 'Course',
data() {
return {
course,
}
},
methods: {
getShowText(score, maxScore, grade) {
let text = ''
if (score != null && score > 0) {
text += ` ${score}/${maxScore} `
}
if (grade != null) {
text += ` ${grade} `
}
return text
},
},
}
</script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment