diff --git a/hoj-springboot/DataBackup/target/classes/top/hcode/hoj/controller/admin/FileController.class b/hoj-springboot/DataBackup/target/classes/top/hcode/hoj/controller/admin/FileController.class index 6f113e5c..d3ac2f9f 100644 Binary files a/hoj-springboot/DataBackup/target/classes/top/hcode/hoj/controller/admin/FileController.class and b/hoj-springboot/DataBackup/target/classes/top/hcode/hoj/controller/admin/FileController.class differ diff --git a/hoj-vue/src/App.vue b/hoj-vue/src/App.vue index 442cbb63..809f365a 100644 --- a/hoj-vue/src/App.vue +++ b/hoj-vue/src/App.vue @@ -123,7 +123,7 @@ samp { a { text-decoration: none; background-color: transparent; - color: #495060; + color: #495060 !important; outline: 0; cursor: pointer; transition: color 0.2s ease; diff --git a/hoj-vue/src/components/oj/common/Announcements.vue b/hoj-vue/src/components/oj/common/Announcements.vue index 61b54eba..95c22085 100644 --- a/hoj-vue/src/components/oj/common/Announcements.vue +++ b/hoj-vue/src/components/oj/common/Announcements.vue @@ -70,7 +70,7 @@ v-highlight v-html="announcement.content" key="content" - class="content-container maize-markdown-body" + class="content-container markdown-body" > diff --git a/hoj-vue/src/main.js b/hoj-vue/src/main.js index 9cf52857..0c3d978c 100644 --- a/hoj-vue/src/main.js +++ b/hoj-vue/src/main.js @@ -46,8 +46,8 @@ import SlideVerify from 'vue-monoplasty-slide-verify' // markdown编辑器 import mavonEditor from 'mavon-editor' //引入markdown编辑器 import 'mavon-editor/dist/css/index.css' -// 前端所用markdown样式 -import '@/assets/css/maize.css' +// // 前端所用markdown样式 +// import '@/assets/css/maize.css' Vue.use(mavonEditor) Object.keys(filters).forEach(key => { // 注册全局过滤器 diff --git a/hoj-vue/src/views/oj/Home.vue b/hoj-vue/src/views/oj/Home.vue index ae71864f..032961d6 100644 --- a/hoj-vue/src/views/oj/Home.vue +++ b/hoj-vue/src/views/oj/Home.vue @@ -207,6 +207,11 @@ export default { getRecentContests() { api.getRecentContests().then((res) => { this.contests = res.data.data; + for (let i = 0; i < this.contests.length; i++) { + this.contests[i].description = this.$markDown.render( + this.contests[i].description + ); + } }); }, getRecentOtherContests() { diff --git a/hoj-vue/src/views/oj/contest/ContestDetails.vue b/hoj-vue/src/views/oj/contest/ContestDetails.vue index 8edb843b..9ab40d14 100644 --- a/hoj-vue/src/views/oj/contest/ContestDetails.vue +++ b/hoj-vue/src/views/oj/contest/ContestDetails.vue @@ -15,11 +15,11 @@ v-if="contest.auth != null" > {{ CONTEST_TYPE_REVERSE[contest.auth]['name'] }} @@ -97,7 +97,12 @@  Overview -
+
@@ -319,6 +324,11 @@ export default { showAdminHelper() { return this.isContestAdmin && this.contestRuleType === RULE_TYPE.ACM; }, + descriptionHtml() { + if (this.contest.description) { + return this.$markDown.render(this.contest.description); + } + }, }, watch: { $route(newVal) { diff --git a/hoj-vue/src/views/oj/problem/Problem.vue b/hoj-vue/src/views/oj/problem/Problem.vue index e777de06..69ef58a6 100644 --- a/hoj-vue/src/views/oj/problem/Problem.vue +++ b/hoj-vue/src/views/oj/problem/Problem.vue @@ -66,13 +66,21 @@

Description

-

+

Input

-

+

Output

-

+

Hint

-
+
@@ -422,6 +434,26 @@ export default { result.problem.examples = utils.stringToExamples( result.problem.examples ); + if (result.problem.description) { + result.problem.description = this.$markDown.render( + result.problem.description.toString() + ); + } + if (result.problem.input) { + result.problem.input = this.$markDown.render( + result.problem.input.toString() + ); + } + if (result.problem.output) { + result.problem.output = this.$markDown.render( + result.problem.output.toString() + ); + } + if (result.problem.hint) { + result.problem.hint = this.$markDown.render( + result.problem.hint.toString() + ); + } this.problemData = result; this.isRemote = result.problem.isRemote; this.changePie(result.problemCount); @@ -740,7 +772,9 @@ export default { .problem-menu { float: right; } - +a { + color: #3091f2 !important ; +} .problem-menu span { margin-left: 10px; }