refactor: 去掉label字段key即名称
This commit is contained in:
@@ -68,10 +68,7 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="label" label="名称" width="110">
|
||||
<template #default="s"><el-input v-model="s.row.label" size="small" @input="syncToJson"/></template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="method" label="方法" width="80">
|
||||
<el-table-column prop="method" label="方法" width="70">
|
||||
<template #default="s"><el-select v-model="s.row.method" size="small" @change="syncToJson"><el-option label="GET" value="GET"/><el-option label="POST" value="POST"/></el-select></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="URL" min-width="180">
|
||||
@@ -146,7 +143,7 @@ const editPage = async (row) => {
|
||||
|
||||
const syncToJson = () => { editorJson.value = JSON.stringify(parsed.value, null, 2) }
|
||||
const remove = (idx) => { parsed.value.splice(idx,1); syncToJson() }
|
||||
const addEntry = () => { parsed.value.push({key:'',label:'',url:'{base}',method:'GET'}); syncToJson() }
|
||||
const addEntry = () => { parsed.value.push({key:'',url:'{base}',method:'GET'}); syncToJson() }
|
||||
const deletePages = async () => {
|
||||
try { await ElMessageBox.confirm('删除后站点将使用默认模板','确认',{type:'warning',confirmButtonText:'确认删除'}) } catch { return }
|
||||
deleting.value = true
|
||||
|
||||
Reference in New Issue
Block a user