Compare commits
15 Commits
942ff0a739
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 97917164ea | |||
| 59f3747496 | |||
| 86cc5cc500 | |||
| e8b9a190ec | |||
| 507d77a576 | |||
| 22b9405ed2 | |||
| 711c446f74 | |||
| e6e4d71b1c | |||
| 6ae879ba80 | |||
| 9137a12dc9 | |||
| f4b9f34ec8 | |||
| 0ca1a142a4 | |||
| 5c9972315c | |||
| 9afb57a9ed | |||
| 21a3ff322b |
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm install
|
||||||
- run: npm run ${{ matrix.build_command }}
|
- run: npm run ${{ matrix.build_command }}
|
||||||
env:
|
env:
|
||||||
CI: false
|
CI: false
|
||||||
|
|||||||
795
package-lock.json
generated
795
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@@ -9,6 +9,14 @@
|
|||||||
"build:test": "rsbuild build --env-mode=test",
|
"build:test": "rsbuild build --env-mode=test",
|
||||||
"fmt": "prettier --write src *.ts"
|
"fmt": "prettier --write src *.ts"
|
||||||
},
|
},
|
||||||
|
"overrides": {
|
||||||
|
"dompurify": "3.4.2",
|
||||||
|
"lodash": "4.18.1",
|
||||||
|
"lodash-es": "4.18.1",
|
||||||
|
"picomatch": "4.0.4",
|
||||||
|
"uuid": "14.0.0",
|
||||||
|
"yaml": "2.8.4"
|
||||||
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@codemirror/autocomplete": "^6.20.1",
|
"@codemirror/autocomplete": "^6.20.1",
|
||||||
"@codemirror/lang-cpp": "^6.0.3",
|
"@codemirror/lang-cpp": "^6.0.3",
|
||||||
@@ -19,11 +27,11 @@
|
|||||||
"@vue-flow/minimap": "^1.5.4",
|
"@vue-flow/minimap": "^1.5.4",
|
||||||
"@vue-flow/node-resizer": "^1.5.1",
|
"@vue-flow/node-resizer": "^1.5.1",
|
||||||
"@vue-flow/node-toolbar": "^1.1.1",
|
"@vue-flow/node-toolbar": "^1.1.1",
|
||||||
"@vueuse/core": "^14.2.1",
|
"@vueuse/core": "^14.3.0",
|
||||||
"@vueuse/router": "^14.2.1",
|
"@vueuse/router": "^14.3.0",
|
||||||
"@wangeditor-next/editor": "^5.7.0",
|
"@wangeditor-next/editor": "^5.7.0",
|
||||||
"@wangeditor-next/editor-for-vue": "^5.1.14",
|
"@wangeditor-next/editor-for-vue": "^5.1.14",
|
||||||
"axios": "^1.15.0",
|
"axios": "^1.16.0",
|
||||||
"canvas-confetti": "^1.9.4",
|
"canvas-confetti": "^1.9.4",
|
||||||
"chart.js": "^4.5.1",
|
"chart.js": "^4.5.1",
|
||||||
"codemirror": "^6.0.2",
|
"codemirror": "^6.0.2",
|
||||||
@@ -31,29 +39,29 @@
|
|||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
"fflate": "^0.8.2",
|
"fflate": "^0.8.2",
|
||||||
"highlight.js": "^11.11.1",
|
"highlight.js": "^11.11.1",
|
||||||
"md-editor-v3": "^6.4.2",
|
"md-editor-v3": "^6.5.0",
|
||||||
"mermaid": "^11.14.0",
|
"mermaid": "^11.14.0",
|
||||||
"naive-ui": "^2.44.1",
|
"naive-ui": "^2.44.1",
|
||||||
"nanoid": "^5.1.7",
|
"nanoid": "^5.1.11",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"pinia": "^3.0.4",
|
"pinia": "^3.0.4",
|
||||||
"skulpt": "^1.2.0",
|
"skulpt": "^1.2.0",
|
||||||
"vue": "^3.5.32",
|
"vue": "^3.5.33",
|
||||||
"vue-chartjs": "^5.3.3",
|
"vue-chartjs": "^5.3.3",
|
||||||
"vue-codemirror": "^6.1.1",
|
"vue-codemirror": "^6.1.1",
|
||||||
"vue-router": "^5.0.4",
|
"vue-router": "^5.0.6",
|
||||||
"y-codemirror.next": "^0.3.5",
|
"y-codemirror.next": "^0.3.5",
|
||||||
"y-webrtc": "^10.3.0",
|
"y-webrtc": "^10.3.0",
|
||||||
"yjs": "^13.6.30"
|
"yjs": "^13.6.30"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@iconify/vue": "^5.0.0",
|
"@iconify/vue": "^5.0.0",
|
||||||
"@rsbuild/core": "^1.7.5",
|
"@rsbuild/core": "^2.0.3",
|
||||||
"@rsbuild/plugin-vue": "^1.2.7",
|
"@rsbuild/plugin-vue": "^1.2.7",
|
||||||
"@types/canvas-confetti": "^1.9.0",
|
"@types/canvas-confetti": "^1.9.0",
|
||||||
"@types/node": "^25.6.0",
|
"@types/node": "^25.6.0",
|
||||||
"prettier": "^3.8.2",
|
"prettier": "^3.8.3",
|
||||||
"typescript": "^6.0.2",
|
"typescript": "^6.0.3",
|
||||||
"unplugin-auto-import": "^21.0.0",
|
"unplugin-auto-import": "^21.0.0",
|
||||||
"unplugin-vue-components": "^32.0.0"
|
"unplugin-vue-components": "^32.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import AutoImport from "unplugin-auto-import/rspack"
|
|||||||
import Components from "unplugin-vue-components/rspack"
|
import Components from "unplugin-vue-components/rspack"
|
||||||
import { NaiveUiResolver } from "unplugin-vue-components/resolvers"
|
import { NaiveUiResolver } from "unplugin-vue-components/resolvers"
|
||||||
|
|
||||||
export default defineConfig(({ envMode }) => {
|
const config: ReturnType<typeof defineConfig> = defineConfig(({ envMode }) => {
|
||||||
const { publicVars, rawPublicVars } = loadEnv({
|
const { publicVars, rawPublicVars } = loadEnv({
|
||||||
cwd: process.cwd(),
|
cwd: process.cwd(),
|
||||||
mode: envMode,
|
mode: envMode,
|
||||||
@@ -20,9 +20,20 @@ export default defineConfig(({ envMode }) => {
|
|||||||
ws: true,
|
ws: true,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
plugins: [pluginVue()],
|
plugins: [pluginVue()],
|
||||||
tools: {
|
tools: {
|
||||||
|
swc: {
|
||||||
|
detectSyntax: false,
|
||||||
|
jsc: {
|
||||||
|
parser: {
|
||||||
|
decorators: true,
|
||||||
|
syntax: "typescript",
|
||||||
|
tsx: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
rspack: {
|
rspack: {
|
||||||
plugins: [
|
plugins: [
|
||||||
AutoImport({
|
AutoImport({
|
||||||
@@ -96,3 +107,5 @@ export default defineConfig(({ envMode }) => {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
export default config
|
||||||
@@ -24,7 +24,7 @@ const formOrder = ref(0)
|
|||||||
|
|
||||||
const mcqQuestion = ref("")
|
const mcqQuestion = ref("")
|
||||||
const mcqOptions = ref(["", ""])
|
const mcqOptions = ref(["", ""])
|
||||||
const mcqAnswer = ref(0)
|
const mcqAnswer = ref<number[]>([])
|
||||||
|
|
||||||
const sortQuestion = ref("")
|
const sortQuestion = ref("")
|
||||||
const sortCode = ref("")
|
const sortCode = ref("")
|
||||||
@@ -44,7 +44,7 @@ function openCreate() {
|
|||||||
formOrder.value = exercises.value.length
|
formOrder.value = exercises.value.length
|
||||||
mcqQuestion.value = ""
|
mcqQuestion.value = ""
|
||||||
mcqOptions.value = ["", ""]
|
mcqOptions.value = ["", ""]
|
||||||
mcqAnswer.value = 0
|
mcqAnswer.value = []
|
||||||
sortQuestion.value = ""
|
sortQuestion.value = ""
|
||||||
sortCode.value = ""
|
sortCode.value = ""
|
||||||
fillQuestion.value = ""
|
fillQuestion.value = ""
|
||||||
@@ -60,7 +60,7 @@ function openEdit(ex: Exercise) {
|
|||||||
const d = ex.data as ExerciseMcqData
|
const d = ex.data as ExerciseMcqData
|
||||||
mcqQuestion.value = d.question
|
mcqQuestion.value = d.question
|
||||||
mcqOptions.value = [...d.options]
|
mcqOptions.value = [...d.options]
|
||||||
mcqAnswer.value = d.answer
|
mcqAnswer.value = [...d.answer]
|
||||||
} else if (ex.type === "sort") {
|
} else if (ex.type === "sort") {
|
||||||
const d = ex.data as ExerciseSortData
|
const d = ex.data as ExerciseSortData
|
||||||
sortQuestion.value = d.question
|
sortQuestion.value = d.question
|
||||||
@@ -73,7 +73,17 @@ function openEdit(ex: Exercise) {
|
|||||||
showForm.value = true
|
showForm.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleAnswer(i: number) {
|
||||||
|
const idx = mcqAnswer.value.indexOf(i)
|
||||||
|
if (idx === -1) mcqAnswer.value.push(i)
|
||||||
|
else mcqAnswer.value.splice(idx, 1)
|
||||||
|
}
|
||||||
|
|
||||||
async function save() {
|
async function save() {
|
||||||
|
if (formType.value === "mcq" && mcqAnswer.value.length === 0) {
|
||||||
|
message.error("请至少勾选一个正确答案")
|
||||||
|
return
|
||||||
|
}
|
||||||
let data: Record<string, unknown>
|
let data: Record<string, unknown>
|
||||||
if (formType.value === "mcq") {
|
if (formType.value === "mcq") {
|
||||||
data = {
|
data = {
|
||||||
@@ -218,7 +228,7 @@ function typeTagType(type: string): "success" | "info" | "warning" {
|
|||||||
placeholder="下面选项中正确是哪个?"
|
placeholder="下面选项中正确是哪个?"
|
||||||
/>
|
/>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item label="选项(正确答案前选择单选按钮)">
|
<n-form-item label="选项(勾选所有正确答案)">
|
||||||
<n-space vertical style="width: 100%">
|
<n-space vertical style="width: 100%">
|
||||||
<n-flex
|
<n-flex
|
||||||
v-for="(opt, i) in mcqOptions"
|
v-for="(opt, i) in mcqOptions"
|
||||||
@@ -226,10 +236,9 @@ function typeTagType(type: string): "success" | "info" | "warning" {
|
|||||||
align="center"
|
align="center"
|
||||||
:size="8"
|
:size="8"
|
||||||
>
|
>
|
||||||
<n-radio
|
<n-checkbox
|
||||||
:value="i"
|
:checked="mcqAnswer.includes(i)"
|
||||||
:checked="mcqAnswer === i"
|
@update:checked="toggleAnswer(i)"
|
||||||
@update:checked="$event && (mcqAnswer = i)"
|
|
||||||
/>
|
/>
|
||||||
<n-input
|
<n-input
|
||||||
v-model:value="mcqOptions[i]"
|
v-model:value="mcqOptions[i]"
|
||||||
@@ -242,8 +251,9 @@ function typeTagType(type: string): "success" | "info" | "warning" {
|
|||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
mcqOptions.splice(i, 1)
|
mcqOptions.splice(i, 1)
|
||||||
if (mcqAnswer >= mcqOptions.length)
|
mcqAnswer.value = mcqAnswer.value
|
||||||
mcqAnswer = mcqOptions.length - 1
|
.filter((a) => a !== i)
|
||||||
|
.map((a) => (a > i ? a - 1 : a))
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -3,37 +3,61 @@ import { Exercise, ExerciseMcqData } from "utils/types"
|
|||||||
|
|
||||||
const props = defineProps<{ exercise: Exercise }>()
|
const props = defineProps<{ exercise: Exercise }>()
|
||||||
const data = computed(() => props.exercise.data as ExerciseMcqData)
|
const data = computed(() => props.exercise.data as ExerciseMcqData)
|
||||||
|
const isSingle = computed(() => data.value.answer.length === 1)
|
||||||
|
|
||||||
const selected = ref<number | null>(null)
|
const selected = ref<Set<number>>(new Set())
|
||||||
const correct = ref(false)
|
const correct = ref(false)
|
||||||
const wrong = ref(false)
|
const wrong = ref(false)
|
||||||
|
const partial = ref(false)
|
||||||
|
|
||||||
function select(idx: number) {
|
function select(idx: number) {
|
||||||
if (correct.value) return
|
if (correct.value) return
|
||||||
selected.value = idx
|
const s = new Set(selected.value)
|
||||||
|
if (isSingle.value) {
|
||||||
|
s.clear()
|
||||||
|
if (!selected.value.has(idx)) s.add(idx)
|
||||||
|
} else {
|
||||||
|
if (s.has(idx)) s.delete(idx)
|
||||||
|
else s.add(idx)
|
||||||
|
}
|
||||||
|
selected.value = s
|
||||||
wrong.value = false
|
wrong.value = false
|
||||||
|
partial.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
if (selected.value === null || correct.value) return
|
if (selected.value.size === 0 || correct.value) return
|
||||||
if (selected.value === data.value.answer) {
|
const answer = new Set(data.value.answer)
|
||||||
|
const sel = selected.value
|
||||||
|
const isEqual =
|
||||||
|
sel.size === answer.size && [...sel].every((v) => answer.has(v))
|
||||||
|
if (isEqual) {
|
||||||
correct.value = true
|
correct.value = true
|
||||||
wrong.value = false
|
wrong.value = false
|
||||||
|
partial.value = false
|
||||||
} else {
|
} else {
|
||||||
wrong.value = true
|
selected.value = new Set()
|
||||||
selected.value = null
|
const hasIntersection = [...sel].some((v) => answer.has(v))
|
||||||
|
if (hasIntersection) {
|
||||||
|
partial.value = true
|
||||||
|
wrong.value = false
|
||||||
|
} else {
|
||||||
|
wrong.value = true
|
||||||
|
partial.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
selected.value = null
|
selected.value = new Set()
|
||||||
correct.value = false
|
correct.value = false
|
||||||
wrong.value = false
|
wrong.value = false
|
||||||
|
partial.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
function optionType(idx: number): "default" | "primary" | "success" {
|
function optionType(idx: number): "default" | "primary" | "success" {
|
||||||
if (correct.value && idx === data.value.answer) return "success"
|
if (correct.value && data.value.answer.includes(idx)) return "success"
|
||||||
if (idx === selected.value) return "primary"
|
if (selected.value.has(idx)) return "primary"
|
||||||
return "default"
|
return "default"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -45,9 +69,9 @@ function optionType(idx: number): "default" | "primary" | "success" {
|
|||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
<n-space align="center" :size="8">
|
<n-space align="center" :size="8">
|
||||||
<n-tag type="success" size="small" :bordered="false"
|
<n-tag type="success" size="small" :bordered="false">
|
||||||
>练一练 · 选择题</n-tag
|
练一练 · {{ isSingle ? "单选题" : "多选题" }}
|
||||||
>
|
</n-tag>
|
||||||
</n-space>
|
</n-space>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -60,7 +84,7 @@ function optionType(idx: number): "default" | "primary" | "success" {
|
|||||||
:type="optionType(idx)"
|
:type="optionType(idx)"
|
||||||
:secondary="optionType(idx) !== 'default'"
|
:secondary="optionType(idx) !== 'default'"
|
||||||
:tertiary="optionType(idx) === 'default'"
|
:tertiary="optionType(idx) === 'default'"
|
||||||
:strong="idx === selected"
|
:strong="selected.has(idx)"
|
||||||
:style="{
|
:style="{
|
||||||
justifyContent: 'flex-start',
|
justifyContent: 'flex-start',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
@@ -78,9 +102,11 @@ function optionType(idx: number): "default" | "primary" | "success" {
|
|||||||
</n-space>
|
</n-space>
|
||||||
|
|
||||||
<n-alert
|
<n-alert
|
||||||
v-if="correct || wrong"
|
v-if="correct || wrong || partial"
|
||||||
:type="correct ? 'success' : 'error'"
|
:type="correct ? 'success' : partial ? 'warning' : 'error'"
|
||||||
:title="correct ? '正确!' : '选择有误,请重试'"
|
:title="
|
||||||
|
correct ? '正确!' : partial ? '部分正确,请重试' : '选择有误,请重试'
|
||||||
|
"
|
||||||
style="margin-top: 12px"
|
style="margin-top: 12px"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -88,7 +114,7 @@ function optionType(idx: number): "default" | "primary" | "success" {
|
|||||||
<n-button
|
<n-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="selected === null || correct"
|
:disabled="selected.size === 0 || correct"
|
||||||
@click="submit"
|
@click="submit"
|
||||||
>
|
>
|
||||||
提交
|
提交
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import { renderTableTitle } from "utils/renders"
|
|||||||
import ProblemStatus from "./components/ProblemStatus.vue"
|
import ProblemStatus from "./components/ProblemStatus.vue"
|
||||||
import AuthorSelect from "shared/components/AuthorSelect.vue"
|
import AuthorSelect from "shared/components/AuthorSelect.vue"
|
||||||
import ProblemListTitle from "./components/ProblemListTitle.vue"
|
import ProblemListTitle from "./components/ProblemListTitle.vue"
|
||||||
import { labelRect } from "mermaid/dist/rendering-util/rendering-elements/shapes/labelRect"
|
|
||||||
|
|
||||||
interface Tag {
|
interface Tag {
|
||||||
id: number
|
id: number
|
||||||
@@ -221,12 +220,12 @@ function rowProps(row: ProblemFiltered) {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-flex vertical size="large">
|
<n-flex vertical size="large">
|
||||||
<n-flex justify="space-between">
|
<div class="problem-list-toolbar">
|
||||||
<n-space>
|
<n-space>
|
||||||
<n-form :show-feedback="false" inline label-placement="left">
|
<n-form :show-feedback="false" inline label-placement="left">
|
||||||
<n-form-item label="难度">
|
<n-form-item label="难度">
|
||||||
<n-select
|
<n-select
|
||||||
style="width: 120px"
|
style="width: 100px"
|
||||||
v-model:value="query.difficulty"
|
v-model:value="query.difficulty"
|
||||||
:options="difficultyOptions"
|
:options="difficultyOptions"
|
||||||
/>
|
/>
|
||||||
@@ -238,7 +237,7 @@ function rowProps(row: ProblemFiltered) {
|
|||||||
<n-form :show-feedback="false" inline label-placement="left">
|
<n-form :show-feedback="false" inline label-placement="left">
|
||||||
<n-form-item label="排序">
|
<n-form-item label="排序">
|
||||||
<n-select
|
<n-select
|
||||||
style="width: 120px"
|
style="width: 100px"
|
||||||
v-model:value="query.sort"
|
v-model:value="query.sort"
|
||||||
:options="sortOptions"
|
:options="sortOptions"
|
||||||
/>
|
/>
|
||||||
@@ -274,8 +273,8 @@ function rowProps(row: ProblemFiltered) {
|
|||||||
</n-form-item>
|
</n-form-item>
|
||||||
</n-form>
|
</n-form>
|
||||||
</n-space>
|
</n-space>
|
||||||
<Hitokoto v-if="isDesktop" />
|
<Hitokoto v-if="isDesktop" class="problem-list-hitokoto" />
|
||||||
</n-flex>
|
</div>
|
||||||
<n-collapse-transition :show="showTag">
|
<n-collapse-transition :show="showTag">
|
||||||
<n-flex>
|
<n-flex>
|
||||||
<n-tag
|
<n-tag
|
||||||
@@ -304,4 +303,32 @@ function rowProps(row: ProblemFiltered) {
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
.problem-list-toolbar {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, auto) minmax(250px, 1fr);
|
||||||
|
align-items: start;
|
||||||
|
gap: 12px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.problem-list-toolbar :deep(.n-space) {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.problem-list-hitokoto {
|
||||||
|
justify-self: end;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 720px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.problem-list-toolbar {
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.problem-list-toolbar :deep(.n-space) {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -26,27 +26,44 @@ onMounted(receive)
|
|||||||
@click="receive"
|
@click="receive"
|
||||||
v-if="hitokoto.sentence"
|
v-if="hitokoto.sentence"
|
||||||
>
|
>
|
||||||
<div class="sentence">{{ hitokoto.sentence }}</div>
|
<span class="from">{{ "来自 " + hitokoto.from }}</span>
|
||||||
<div class="from">{{ "来自 " + hitokoto.from }}</div>
|
<span class="sentence">{{ hitokoto.sentence }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.hitokoto {
|
.hitokoto {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 34px;
|
height: 36px;
|
||||||
|
min-width: 0;
|
||||||
|
display: flow-root;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: right;
|
||||||
|
line-height: 18px;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hitokoto::before {
|
||||||
|
content: "";
|
||||||
|
float: right;
|
||||||
|
width: 0;
|
||||||
|
height: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hitokoto .sentence {
|
.hitokoto .sentence {
|
||||||
max-width: 400px;
|
text-align: right;
|
||||||
text-overflow: ellipsis;
|
|
||||||
overflow: hidden;
|
|
||||||
word-break: break-all;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hitokoto .from {
|
.hitokoto .from {
|
||||||
float: right;
|
float: right;
|
||||||
|
clear: right;
|
||||||
|
max-width: min(45%, 260px);
|
||||||
|
margin-left: 8px;
|
||||||
|
text-align: right;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
line-height: 18px;
|
||||||
color: grey;
|
color: grey;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -582,7 +582,7 @@ export interface Tutorial {
|
|||||||
export interface ExerciseMcqData {
|
export interface ExerciseMcqData {
|
||||||
question: string
|
question: string
|
||||||
options: string[]
|
options: string[]
|
||||||
answer: number
|
answer: number[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExerciseSortData {
|
export interface ExerciseSortData {
|
||||||
|
|||||||
14
tsconfig.app.json
Normal file
14
tsconfig.app.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||||
|
|
||||||
|
/* Linting */
|
||||||
|
"strict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"noUncheckedSideEffectImports": true
|
||||||
|
},
|
||||||
|
"include": ["src/**/*.ts", "src/**/*.vue"]
|
||||||
|
}
|
||||||
@@ -1,24 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"files": [],
|
||||||
"target": "ESNext",
|
"references": [
|
||||||
"useDefineForClassFields": true,
|
{ "path": "./tsconfig.app.json" },
|
||||||
"module": "ESNext",
|
{ "path": "./tsconfig.node.json" }
|
||||||
"strict": true,
|
]
|
||||||
"jsx": "preserve",
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"lib": ["ESNext", "DOM"],
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"paths": {
|
|
||||||
"shared/*": ["./src/shared/*"],
|
|
||||||
"utils/*": ["./src/utils/*"],
|
|
||||||
"oj/*": ["./src/oj/*"],
|
|
||||||
"admin/*": ["./src/admin/*"],
|
|
||||||
},
|
|
||||||
"types": ["naive-ui/volar"]
|
|
||||||
},
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.vue"],
|
|
||||||
"references": [{ "path": "./tsconfig.node.json" }]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,24 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||||
|
"target": "ES2022",
|
||||||
|
"lib": ["ES2023"],
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "Node",
|
"skipLibCheck": true,
|
||||||
"allowSyntheticDefaultImports": true
|
|
||||||
|
/* Bundler mode */
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"moduleDetection": "force",
|
||||||
|
"noEmit": true,
|
||||||
|
|
||||||
|
/* Linting */
|
||||||
|
"strict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"noUncheckedSideEffectImports": true
|
||||||
},
|
},
|
||||||
"include": ["rsbuild.config.ts"]
|
"include": ["rsbuild.config.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user