Merge pull request 'update' (#3) from dev into main
continuous-integration/drone/push Build is failing Details
continuous-integration/drone Build is failing Details

Reviewed-on: #3
main
Kelvin 3 years ago
commit 55bdfc9dac

@ -74,3 +74,11 @@ export function delKey(key){
method: 'delete' method: 'delete'
}) })
} }
export function updateKeyRemark(key){
return request({
url: '/cert/apiToken/updateKeyRemark',
method: 'post',
data: key
})
}

@ -14,6 +14,14 @@
<el-button @click="handleDel(obj.id)"></el-button> <el-button @click="handleDel(obj.id)"></el-button>
</template> </template>
</el-input> </el-input>
<el-input v-model="obj.remark" placeholder="请填写备注" class="w-50 m-2" size="large" style="margin-top:1px;">
<template #prepend>
备注
</template>
<template #append>
<el-button @click="save(obj)"></el-button>
</template>
</el-input>
</div> </div>
</el-card> </el-card>
</div> </div>
@ -21,7 +29,7 @@
<script setup name="key"> <script setup name="key">
import { ref } from 'vue'; import { ref } from 'vue';
import { delKey,getKeyList,generateKey } from "@/api/cert/apiToken"; import { delKey,getKeyList,generateKey,updateKeyRemark } from "@/api/cert/apiToken";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const keyList = ref([]); const keyList = ref([]);
@ -32,6 +40,13 @@
}) })
} }
function save(obj){
updateKeyRemark(obj).then(response => {
proxy.$modal.msgSuccess("保存成功");
Init();
})
}
function handleAdd(){ function handleAdd(){
generateKey().then(response => { generateKey().then(response => {
proxy.$modal.msgSuccess("添加成功"); proxy.$modal.msgSuccess("添加成功");

Loading…
Cancel
Save