...
|
...
|
@@ -18,7 +18,7 @@ |
|
|
<template #default>
|
|
|
<div style="display: flex;width: 300px;">
|
|
|
<el-input v-model="item.name" style="min-width: 200px;"></el-input>
|
|
|
<el-button v-if="index>0" type="danger" style="margin-left: 20px;" @click="del(index)">删除</el-button>
|
|
|
<el-button type="danger" style="margin-left: 20px;" @click="del(index)">删除</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-popover>
|
...
|
...
|
@@ -61,8 +61,16 @@ export default { |
|
|
window.localStorage.setItem('kibana_key',this.useKey);
|
|
|
},
|
|
|
del(index){
|
|
|
if(this.items.length===1) return;
|
|
|
// if(this.items.length===1) return;
|
|
|
this.items.splice(index,1);
|
|
|
if(this.items.length===0){
|
|
|
this.add();
|
|
|
this.useKey = 0;
|
|
|
return;
|
|
|
}
|
|
|
if(index === this.useKey){
|
|
|
this.useKey = index-1;
|
|
|
}
|
|
|
},
|
|
|
add(){
|
|
|
this.items.push({
|
...
|
...
|
|