|
|
@@ -529,17 +529,23 @@ onMounted(() => {
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
<el-row :gutter="16">
|
|
|
- <el-col :span="6">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="时间限制" prop="timeLimitMs">
|
|
|
- <el-input-number v-model="problemForm.timeLimitMs" :min="1" controls-position="right" style="width: 100%" /> ms
|
|
|
+ <div class="input-with-unit">
|
|
|
+ <el-input-number v-model="problemForm.timeLimitMs" :min="1" controls-position="right" />
|
|
|
+ <span class="unit">ms</span>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="内存限制" prop="memoryLimitMb">
|
|
|
- <el-input-number v-model="problemForm.memoryLimitMb" :min="1" controls-position="right" style="width: 100%" /> MB
|
|
|
+ <div class="input-with-unit">
|
|
|
+ <el-input-number v-model="problemForm.memoryLimitMb" :min="1" controls-position="right" />
|
|
|
+ <span class="unit">MB</span>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="6">
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="难度" prop="difficulty">
|
|
|
<el-select v-model="problemForm.difficulty" style="width: 100%">
|
|
|
<el-option v-for="item in difficultyOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
@@ -718,4 +724,21 @@ onMounted(() => {
|
|
|
.markdown-editor-wrapper.case-description :deep(.bytemd) {
|
|
|
height: 180px;
|
|
|
}
|
|
|
+
|
|
|
+.input-with-unit {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ gap: 8px;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.input-with-unit :deep(.el-input-number) {
|
|
|
+ flex: 1;
|
|
|
+ min-width: 0;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.input-with-unit .unit {
|
|
|
+ flex-shrink: 0;
|
|
|
+}
|
|
|
</style>
|