简单汉化
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="优先级" prop="priority">
|
||||
<el-select v-model="form.priority" placeholder="请选择">
|
||||
<el-option v-for="p in priorities" :key="p" :label="p" :value="p" />
|
||||
<el-option v-for="p in priorities" :key="p" :label="priorityLabel(p)" :value="p" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="截止日期" prop="due_date">
|
||||
@@ -25,7 +25,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择">
|
||||
<el-option v-for="s in statuses" :key="s" :label="s" :value="s" />
|
||||
<el-option v-for="s in statuses" :key="s" :label="statusLabel(s)" :value="s" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -62,6 +62,14 @@ const visible = computed({
|
||||
|
||||
const priorities = ["LOW", "MEDIUM", "HIGH"];
|
||||
const statuses = ["TODO", "DOING", "DONE", "BLOCKED"];
|
||||
const priorityLabel = (v: string) => ({ LOW: "低", MEDIUM: "中", HIGH: "高" }[v] || v);
|
||||
const statusLabel = (v: string) =>
|
||||
({
|
||||
TODO: "待处理",
|
||||
DOING: "进行中",
|
||||
DONE: "已完成",
|
||||
BLOCKED: "阻塞",
|
||||
}[v] || v);
|
||||
|
||||
const form = reactive({
|
||||
title: "",
|
||||
|
||||
Reference in New Issue
Block a user