From 5763f6dea25e6a88de5ce02f64076a3cbe2ac1db Mon Sep 17 00:00:00 2001
From: yuetsh <517252939@qq.com>
Date: Wed, 18 Jan 2023 21:06:50 +0800
Subject: [PATCH] delete all element-plus related.
---
package-lock.json | 165 ------
package.json | 2 -
src/App.vue | 7 +-
src/components.d.ts | 47 +-
src/learn/index.vue | 12 +-
src/learn/step-1/index.md | 4 +
src/main.ts | 1 -
src/oj/problem/components/Editor.vue | 59 +--
.../components/{SubmitPanel.vue => Panel.vue} | 484 +++++++++---------
src/oj/problem/components/ProblemContent.vue | 87 ++--
src/oj/problem/components/ProblemInfo.vue | 68 ++-
src/oj/problem/components/TestcasePanel.vue | 40 --
src/oj/problem/detail.vue | 41 +-
src/oj/problem/list.vue | 1 +
src/oj/status/list.vue | 5 +-
src/shared/Header/index.vue | 2 +-
src/shared/Monaco/index.vue | 2 +-
src/shared/layout/default.vue | 1 -
src/shared/monaco/index.vue | 2 +-
vite.config.ts | 6 +-
20 files changed, 405 insertions(+), 631 deletions(-)
rename src/oj/problem/components/{SubmitPanel.vue => Panel.vue} (65%)
delete mode 100644 src/oj/problem/components/TestcasePanel.vue
diff --git a/package-lock.json b/package-lock.json
index 818cb84..9dd0419 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,9 +14,7 @@
"@vueuse/integrations": "^9.10.0",
"axios": "^1.2.2",
"copy-text-to-clipboard": "^3.0.1",
- "element-plus": "^2.2.28",
"naive-ui": "^2.34.3",
- "normalize.css": "^8.0.1",
"party-js": "^2.2.0",
"pinia": "^2.0.28",
"vue": "^3.2.45",
@@ -80,14 +78,6 @@
"vue": "^3.0.11"
}
},
- "node_modules/@ctrl/tinycolor": {
- "version": "3.5.0",
- "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.5.0.tgz",
- "integrity": "sha512-tlJpwF40DEQcfR/QF+wNMVyGMaO9FQp6Z1Wahj4Gk3CJQYHwA2xVG7iKDFdW6zuxZY9XWOpGcfNCTsX4McOsOg==",
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/@element-plus/icons-vue": {
"version": "2.0.10",
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
@@ -453,19 +443,6 @@
"node": ">=12"
}
},
- "node_modules/@floating-ui/core": {
- "version": "1.1.0",
- "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.1.0.tgz",
- "integrity": "sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ=="
- },
- "node_modules/@floating-ui/dom": {
- "version": "1.1.0",
- "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.1.0.tgz",
- "integrity": "sha512-TSogMPVxbRe77QCj1dt8NmRiJasPvuc+eT5jnJ6YpLqgOD2zXc5UA3S1qwybN+GVCDNdKfpKy1oj8RpzLJvh6A==",
- "dependencies": {
- "@floating-ui/core": "^1.0.5"
- }
- },
"node_modules/@iconify-json/ep": {
"version": "1.1.8",
"resolved": "https://registry.npmmirror.com/@iconify-json/ep/-/ep-1.1.8.tgz",
@@ -580,12 +557,6 @@
"node": ">= 8"
}
},
- "node_modules/@popperjs/core": {
- "name": "@sxzz/popperjs-es",
- "version": "2.11.7",
- "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
- "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
- },
"node_modules/@rollup/pluginutils": {
"version": "5.0.2",
"resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",
@@ -1182,11 +1153,6 @@
"date-fns": ">=2.0.0"
}
},
- "node_modules/dayjs": {
- "version": "1.11.7",
- "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
- "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
- },
"node_modules/de-indent": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz",
@@ -1218,31 +1184,6 @@
"node": ">=0.4.0"
}
},
- "node_modules/element-plus": {
- "version": "2.2.28",
- "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.28.tgz",
- "integrity": "sha512-BsxF7iEaBydmRfw1Tt++EO9jRBjbtJr7ZRIrnEwz4J3Cwa1IzHCNCcx3ZwcYTlJq9CYFxv94JnbNr1EbkTou3A==",
- "dependencies": {
- "@ctrl/tinycolor": "^3.4.1",
- "@element-plus/icons-vue": "^2.0.6",
- "@floating-ui/dom": "^1.0.1",
- "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
- "@types/lodash": "^4.14.182",
- "@types/lodash-es": "^4.17.6",
- "@vueuse/core": "^9.1.0",
- "async-validator": "^4.2.5",
- "dayjs": "^1.11.3",
- "escape-html": "^1.0.3",
- "lodash": "^4.17.21",
- "lodash-es": "^4.17.21",
- "lodash-unified": "^1.0.2",
- "memoize-one": "^6.0.0",
- "normalize-wheel-es": "^1.2.0"
- },
- "peerDependencies": {
- "vue": "^3.2.0"
- }
- },
"node_modules/entities": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz",
@@ -1289,11 +1230,6 @@
"@esbuild/win32-x64": "0.16.17"
}
},
- "node_modules/escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
- },
"node_modules/escape-string-regexp": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
@@ -1677,16 +1613,6 @@
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
- "node_modules/lodash-unified": {
- "version": "1.0.3",
- "resolved": "https://registry.npmmirror.com/lodash-unified/-/lodash-unified-1.0.3.tgz",
- "integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==",
- "peerDependencies": {
- "@types/lodash-es": "*",
- "lodash": "*",
- "lodash-es": "*"
- }
- },
"node_modules/magic-string": {
"version": "0.27.0",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.27.0.tgz",
@@ -1727,11 +1653,6 @@
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==",
"dev": true
},
- "node_modules/memoize-one": {
- "version": "6.0.0",
- "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
- "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
- },
"node_modules/merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -1877,16 +1798,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/normalize-wheel-es": {
- "version": "1.2.0",
- "resolved": "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
- "integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw=="
- },
- "node_modules/normalize.css": {
- "version": "8.0.1",
- "resolved": "https://registry.npmmirror.com/normalize.css/-/normalize.css-8.0.1.tgz",
- "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg=="
- },
"node_modules/npm-run-path": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-4.0.1.tgz",
@@ -2648,11 +2559,6 @@
"integrity": "sha512-AQLGhhaE0F+rwybRCkKUdzBdTEM/5PZBYy+fSYe1T9z9+yxMuV/k7ZRqa4M69X+EI1W8pa4kc9Iq2VjQkZx4rg==",
"requires": {}
},
- "@ctrl/tinycolor": {
- "version": "3.5.0",
- "resolved": "https://registry.npmmirror.com/@ctrl/tinycolor/-/tinycolor-3.5.0.tgz",
- "integrity": "sha512-tlJpwF40DEQcfR/QF+wNMVyGMaO9FQp6Z1Wahj4Gk3CJQYHwA2xVG7iKDFdW6zuxZY9XWOpGcfNCTsX4McOsOg=="
- },
"@element-plus/icons-vue": {
"version": "2.0.10",
"resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz",
@@ -2818,19 +2724,6 @@
"dev": true,
"optional": true
},
- "@floating-ui/core": {
- "version": "1.1.0",
- "resolved": "https://registry.npmmirror.com/@floating-ui/core/-/core-1.1.0.tgz",
- "integrity": "sha512-zbsLwtnHo84w1Kc8rScAo5GMk1GdecSlrflIbfnEBJwvTSj1SL6kkOYV+nHraMCPEy+RNZZUaZyL8JosDGCtGQ=="
- },
- "@floating-ui/dom": {
- "version": "1.1.0",
- "resolved": "https://registry.npmmirror.com/@floating-ui/dom/-/dom-1.1.0.tgz",
- "integrity": "sha512-TSogMPVxbRe77QCj1dt8NmRiJasPvuc+eT5jnJ6YpLqgOD2zXc5UA3S1qwybN+GVCDNdKfpKy1oj8RpzLJvh6A==",
- "requires": {
- "@floating-ui/core": "^1.0.5"
- }
- },
"@iconify-json/ep": {
"version": "1.1.8",
"resolved": "https://registry.npmmirror.com/@iconify-json/ep/-/ep-1.1.8.tgz",
@@ -2933,11 +2826,6 @@
"fastq": "^1.6.0"
}
},
- "@popperjs/core": {
- "version": "npm:@sxzz/popperjs-es@2.11.7",
- "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
- "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
- },
"@rollup/pluginutils": {
"version": "5.0.2",
"resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz",
@@ -3396,11 +3284,6 @@
"integrity": "sha512-1t1b8zyJo+UI8aR+g3iqr5fkUHWpd58VBx8J/ZSQ+w7YrGlw80Ag4sA86qkfCXRBLmMc4I2US+aPMd4uKvwj5g==",
"requires": {}
},
- "dayjs": {
- "version": "1.11.7",
- "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
- "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
- },
"de-indent": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/de-indent/-/de-indent-1.0.2.tgz",
@@ -3421,28 +3304,6 @@
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
- "element-plus": {
- "version": "2.2.28",
- "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.28.tgz",
- "integrity": "sha512-BsxF7iEaBydmRfw1Tt++EO9jRBjbtJr7ZRIrnEwz4J3Cwa1IzHCNCcx3ZwcYTlJq9CYFxv94JnbNr1EbkTou3A==",
- "requires": {
- "@ctrl/tinycolor": "^3.4.1",
- "@element-plus/icons-vue": "^2.0.6",
- "@floating-ui/dom": "^1.0.1",
- "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
- "@types/lodash": "^4.14.182",
- "@types/lodash-es": "^4.17.6",
- "@vueuse/core": "^9.1.0",
- "async-validator": "^4.2.5",
- "dayjs": "^1.11.3",
- "escape-html": "^1.0.3",
- "lodash": "^4.17.21",
- "lodash-es": "^4.17.21",
- "lodash-unified": "^1.0.2",
- "memoize-one": "^6.0.0",
- "normalize-wheel-es": "^1.2.0"
- }
- },
"entities": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/entities/-/entities-3.0.1.tgz",
@@ -3479,11 +3340,6 @@
"@esbuild/win32-x64": "0.16.17"
}
},
- "escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
- },
"escape-string-regexp": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
@@ -3773,12 +3629,6 @@
"resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
- "lodash-unified": {
- "version": "1.0.3",
- "resolved": "https://registry.npmmirror.com/lodash-unified/-/lodash-unified-1.0.3.tgz",
- "integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==",
- "requires": {}
- },
"magic-string": {
"version": "0.27.0",
"resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.27.0.tgz",
@@ -3815,11 +3665,6 @@
"integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==",
"dev": true
},
- "memoize-one": {
- "version": "6.0.0",
- "resolved": "https://registry.npmmirror.com/memoize-one/-/memoize-one-6.0.0.tgz",
- "integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
- },
"merge-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz",
@@ -3935,16 +3780,6 @@
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
},
- "normalize-wheel-es": {
- "version": "1.2.0",
- "resolved": "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
- "integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw=="
- },
- "normalize.css": {
- "version": "8.0.1",
- "resolved": "https://registry.npmmirror.com/normalize.css/-/normalize.css-8.0.1.tgz",
- "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg=="
- },
"npm-run-path": {
"version": "4.0.1",
"resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-4.0.1.tgz",
diff --git a/package.json b/package.json
index a1dece6..721ab48 100644
--- a/package.json
+++ b/package.json
@@ -16,9 +16,7 @@
"@vueuse/integrations": "^9.10.0",
"axios": "^1.2.2",
"copy-text-to-clipboard": "^3.0.1",
- "element-plus": "^2.2.28",
"naive-ui": "^2.34.3",
- "normalize.css": "^8.0.1",
"party-js": "^2.2.0",
"pinia": "^2.0.28",
"vue": "^3.2.45",
diff --git a/src/App.vue b/src/App.vue
index 8b371a2..c1a5035 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,7 +6,12 @@ const theme = computed(() => (isDark.value ? darkTheme : null))
-
+
diff --git a/src/components.d.ts b/src/components.d.ts
index c74b36f..c0750ec 100644
--- a/src/components.d.ts
+++ b/src/components.d.ts
@@ -7,54 +7,22 @@ export {}
declare module '@vue/runtime-core' {
export interface GlobalComponents {
- ElAlert: typeof import('element-plus/es')['ElAlert']
- ElButton: typeof import('element-plus/es')['ElButton']
- ElCard: typeof import('element-plus/es')['ElCard']
- ElCol: typeof import('element-plus/es')['ElCol']
- ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
- ElContainer: typeof import('element-plus/es')['ElContainer']
- ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
- ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
- ElDialog: typeof import('element-plus/es')['ElDialog']
- ElDropdown: typeof import('element-plus/es')['ElDropdown']
- ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
- ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
- ElForm: typeof import('element-plus/es')['ElForm']
- ElFormItem: typeof import('element-plus/es')['ElFormItem']
- ElHeader: typeof import('element-plus/es')['ElHeader']
- ElIcon: typeof import('element-plus/es')['ElIcon']
- ElInput: typeof import('element-plus/es')['ElInput']
- ElLink: typeof import('element-plus/es')['ElLink']
- ElMain: typeof import('element-plus/es')['ElMain']
- ElMenu: typeof import('element-plus/es')['ElMenu']
- ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
- ElOption: typeof import('element-plus/es')['ElOption']
- ElPagination: typeof import('element-plus/es')['ElPagination']
- ElRow: typeof import('element-plus/es')['ElRow']
- ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
- ElSelect: typeof import('element-plus/es')['ElSelect']
- ElSpace: typeof import('element-plus/es')['ElSpace']
- ElSwitch: typeof import('element-plus/es')['ElSwitch']
- ElTable: typeof import('element-plus/es')['ElTable']
- ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
- ElTabPane: typeof import('element-plus/es')['ElTabPane']
- ElTabs: typeof import('element-plus/es')['ElTabs']
- ElTag: typeof import('element-plus/es')['ElTag']
IEpBell: typeof import('~icons/ep/bell')['default']
IEpCaretRight: typeof import('~icons/ep/caret-right')['default']
IEpLoading: typeof import('~icons/ep/loading')['default']
- IEpSelect: typeof import('~icons/ep/select')['default']
- IEpSemiSelect: typeof import('~icons/ep/semi-select')['default']
NAlert: typeof import('naive-ui')['NAlert']
NButton: typeof import('naive-ui')['NButton']
- NCard: typeof import('naive-ui')['NCard']
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
NDataTable: typeof import('naive-ui')['NDataTable']
+ NDescriptions: typeof import('naive-ui')['NDescriptions']
+ NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem']
NDropdown: typeof import('naive-ui')['NDropdown']
- NDropdownItem: typeof import('naive-ui')['NDropdownItem']
- NDropdownMenu: typeof import('naive-ui')['NDropdownMenu']
NForm: typeof import('naive-ui')['NForm']
+ NFormGrid: typeof import('naive-ui')['NFormGrid']
NFormItem: typeof import('naive-ui')['NFormItem']
+ NFormItemGi: typeof import('naive-ui')['NFormItemGi']
+ NGi: typeof import('naive-ui')['NGi']
+ NGrid: typeof import('naive-ui')['NGrid']
NIcon: typeof import('naive-ui')['NIcon']
NInput: typeof import('naive-ui')['NInput']
NLayout: typeof import('naive-ui')['NLayout']
@@ -63,9 +31,12 @@ declare module '@vue/runtime-core' {
NMenu: typeof import('naive-ui')['NMenu']
NModal: typeof import('naive-ui')['NModal']
NPagination: typeof import('naive-ui')['NPagination']
+ NScrollbar: typeof import('naive-ui')['NScrollbar']
NSelect: typeof import('naive-ui')['NSelect']
NSpace: typeof import('naive-ui')['NSpace']
NSwitch: typeof import('naive-ui')['NSwitch']
+ NTabPane: typeof import('naive-ui')['NTabPane']
+ NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
diff --git a/src/learn/index.vue b/src/learn/index.vue
index 8a3ee8b..3cfc163 100644
--- a/src/learn/index.vue
+++ b/src/learn/index.vue
@@ -18,14 +18,14 @@ function change(value: string) {
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/src/learn/step-1/index.md b/src/learn/step-1/index.md
index c608cd1..9f7fc8e 100644
--- a/src/learn/step-1/index.md
+++ b/src/learn/step-1/index.md
@@ -7,3 +7,7 @@ int main() {
return 0;
}
```
+
+## nihao
+
+我的
diff --git a/src/main.ts b/src/main.ts
index b8697c0..f3d0dae 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,6 +1,5 @@
import { createRouter, createWebHistory } from "vue-router"
import { createPinia } from "pinia"
-import "normalize.css"
import loader from "@monaco-editor/loader"
import storage from "utils/storage"
diff --git a/src/oj/problem/components/Editor.vue b/src/oj/problem/components/Editor.vue
index 146605b..12fef15 100644
--- a/src/oj/problem/components/Editor.vue
+++ b/src/oj/problem/components/Editor.vue
@@ -1,13 +1,9 @@
-
-
-
-
-
- {{ item }}
-
-
-
-
- 重置
-
- 提交信息
-
-
-
+
+
+
+
+
+
+ 重置
+
+ 提交信息
+
+
+
+
-
-
-
-
diff --git a/src/oj/problem/components/SubmitPanel.vue b/src/oj/problem/components/Panel.vue
similarity index 65%
rename from src/oj/problem/components/SubmitPanel.vue
rename to src/oj/problem/components/Panel.vue
index 51ddc11..5459c80 100644
--- a/src/oj/problem/components/SubmitPanel.vue
+++ b/src/oj/problem/components/Panel.vue
@@ -1,230 +1,254 @@
-
-
-
-
-
-
-
-
-
-
- {{ submitLabel }}
-
-
-
-
-
-
- {{ msg }}
-
-
-
-
-
-
-
-
-
-
- {{ submissionMemoryFormat(scope.row.memory) }}
-
-
-
-
- {{ submissionTimeFormat(scope.row.real_time) }}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 运行
+
+
+ {{ result }}
+
+
+
+
+
+
+
+
+
+ {{ submitLabel }}
+
+
+
+ {{ msg }}
+
+
+
+
+
+
diff --git a/src/oj/problem/components/ProblemContent.vue b/src/oj/problem/components/ProblemContent.vue
index 016c7a5..6def40a 100644
--- a/src/oj/problem/components/ProblemContent.vue
+++ b/src/oj/problem/components/ProblemContent.vue
@@ -6,6 +6,7 @@ import { SOURCES } from "utils/constants"
import { Problem, ProblemStatus } from "utils/types"
import { createTestSubmission } from "utils/judge"
import { submissionExists } from "oj/api"
+import { useThemeVars } from "naive-ui"
interface Props {
problem: Problem
@@ -20,6 +21,8 @@ type Sample = Problem["samples"][number] & {
const props = defineProps()
const route = useRoute()
const contestID = route.params.contestID
+const theme = useThemeVars()
+const style = computed(() => "color: " + theme.value.primaryColor)
const { data: hasSolved, execute } = submissionExists(props.problem.id)
if (contestID) {
execute()
@@ -68,86 +71,88 @@ async function test(sample: Sample, index: number) {
})
}
-const icon = (status: Sample["status"]) =>
+const icon = (status: ProblemStatus) =>
({
not_test: Flag,
failed: CloseBold,
passed: Select,
}[status])
-const type = (status: Sample["status"]) =>
+const type = (status: ProblemStatus) =>
({
not_test: "warning",
- failed: "danger",
+ failed: "error",
passed: "success",
- }[status])
+ }[status] as "warning" | "error" | "success")
-
-
+ />
{{ problem.title }}
- 描述
+ 描述
- 输入
+ 输入
- 输出
+ 输出
-
- 测试用例 {{ index + 1 }}
-
+ 测试用例 {{ index + 1 }}
+
-
-
-
+ >
+
+
+
+
+
+
+
-
+
输入
-
-
+
+
{{ sample.input }}
-
-
+
+
-
+
输出
-
-
+
+
{{ sample.output }}
-
-
+
+
{{ sample.msg }}
-
-
+
+
@@ -156,7 +161,6 @@ const type = (status: Sample["status"]) =>
.title {
font-size: 20px;
margin: 24px 0 16px 0;
- color: var(--el-color-primary);
}
.testcaseTitle {
@@ -164,15 +168,12 @@ const type = (status: Sample["status"]) =>
}
.content {
+ font-size: 16px;
line-height: 2;
}
-.label {
- display: flex;
- align-items: center;
-}
-
.testcase {
+ font-size: 14px;
white-space: pre;
}
diff --git a/src/oj/problem/components/ProblemInfo.vue b/src/oj/problem/components/ProblemInfo.vue
index 9e08fc8..8bc9144 100644
--- a/src/oj/problem/components/ProblemInfo.vue
+++ b/src/oj/problem/components/ProblemInfo.vue
@@ -11,50 +11,42 @@ defineProps()
-
-
+
+
{{ problem._id }}
-
-
+
+
{{ problem.created_by.username }}
-
-
+
+
{{ parseTime(problem.create_time) }}
-
-
-
- {{ problem.time_limit }}毫秒
-
-
- {{ problem.memory_limit }}MB
-
-
-
+
+
+
{{ DIFFICULTY[problem.difficulty] }}
-
-
-
-
+
+
+
+ {{ problem.time_limit }}毫秒
+
+
+ {{ problem.memory_limit }}MB
+
+
{{ problem.accepted_number }}次
-
-
+
+
{{ problem.submission_number - problem.accepted_number }}次
-
-
+
+
{{ getACRate(problem.accepted_number, problem.submission_number) }}
-
-
-
-
-
+
+
+
+
{{ tag }}
-
-
-
-
+
+
+
+
diff --git a/src/oj/problem/components/TestcasePanel.vue b/src/oj/problem/components/TestcasePanel.vue
deleted file mode 100644
index aee0419..0000000
--- a/src/oj/problem/components/TestcasePanel.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 运行
-
-
-
- {{ result }}
-
-
-
-
-
-
diff --git a/src/oj/problem/detail.vue b/src/oj/problem/detail.vue
index b13ff46..84b4943 100644
--- a/src/oj/problem/detail.vue
+++ b/src/oj/problem/detail.vue
@@ -3,6 +3,7 @@ import { getProblem } from "oj/api"
import { isDesktop, isMobile } from "~/shared/composables/breakpoints"
const Editor = defineAsyncComponent(() => import("./components/Editor.vue"))
+const Panel = defineAsyncComponent(() => import("./components/Panel.vue"))
const ProblemContent = defineAsyncComponent(
() => import("./components/ProblemContent.vue")
)
@@ -24,28 +25,34 @@ provide("problem", readonly(problem))
-
-
-
-
-
+
+
+
+
+
-
+
-
-
+
+
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
+
diff --git a/src/oj/problem/list.vue b/src/oj/problem/list.vue
index 8d1092b..53d55a2 100644
--- a/src/oj/problem/list.vue
+++ b/src/oj/problem/list.vue
@@ -184,6 +184,7 @@ function rowProps(row: ProblemFiltered) {
+ 搜索
重置
随机一题
diff --git a/src/oj/status/list.vue b/src/oj/status/list.vue
index 1421e58..71fa7dc 100644
--- a/src/oj/status/list.vue
+++ b/src/oj/status/list.vue
@@ -173,7 +173,10 @@ const columns: DataTableColumn[] = [
- 重置
+
+ 搜索
+ 重置
+
diff --git a/src/shared/Header/index.vue b/src/shared/Header/index.vue
index b89aa3a..81f3652 100644
--- a/src/shared/Header/index.vue
+++ b/src/shared/Header/index.vue
@@ -65,7 +65,7 @@ const options = computed>(() => [
-
+
diff --git a/src/shared/Monaco/index.vue b/src/shared/Monaco/index.vue
index 988291e..075f628 100644
--- a/src/shared/Monaco/index.vue
+++ b/src/shared/Monaco/index.vue
@@ -15,7 +15,7 @@ interface Props {
const props = withDefaults(defineProps(), {
language: "C",
- height: "calc(100vh - 100px)",
+ height: "100%",
fontSize: 20,
class: "",
})
diff --git a/src/shared/layout/default.vue b/src/shared/layout/default.vue
index 1038ce6..83e91e7 100644
--- a/src/shared/layout/default.vue
+++ b/src/shared/layout/default.vue
@@ -21,7 +21,6 @@ import Header from "../Header/index.vue"
.header {
padding: 8px;
}
-
.content {
padding: 16px;
}
diff --git a/src/shared/monaco/index.vue b/src/shared/monaco/index.vue
index 988291e..075f628 100644
--- a/src/shared/monaco/index.vue
+++ b/src/shared/monaco/index.vue
@@ -15,7 +15,7 @@ interface Props {
const props = withDefaults(defineProps(), {
language: "C",
- height: "calc(100vh - 100px)",
+ height: "100%",
fontSize: 20,
class: "",
})
diff --git a/vite.config.ts b/vite.config.ts
index f39b76d..bcbf767 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -3,10 +3,7 @@ import path from "path"
import Vue from "@vitejs/plugin-vue"
import AutoImport from "unplugin-auto-import/vite"
import Components from "unplugin-vue-components/vite"
-import {
- ElementPlusResolver,
- NaiveUiResolver,
-} from "unplugin-vue-components/resolvers"
+import { NaiveUiResolver } from "unplugin-vue-components/resolvers"
import IconsResolver from "unplugin-icons/resolver"
import Icons from "unplugin-icons/vite"
import Markdown from "vite-plugin-vue-markdown"
@@ -50,7 +47,6 @@ export default defineConfig({
Components({
resolvers: [
NaiveUiResolver(),
- ElementPlusResolver(),
IconsResolver({ enabledCollections: ["ep"] }),
],
dts: "./src/components.d.ts",