mirror of https://github.com/1Panel-dev/1Panel
fix: 解决列表设置导致的浏览器抖动问题 (#3236)
parent
0fe9a87ea0
commit
5f60ea3f81
|
@ -326,7 +326,9 @@ func updateDNS(list []string) error {
|
|||
}
|
||||
}
|
||||
for _, item := range list {
|
||||
newFile += fmt.Sprintf("nameserver %s \n", item)
|
||||
if len(item) != 0 {
|
||||
newFile += fmt.Sprintf("nameserver %s \n", item)
|
||||
}
|
||||
}
|
||||
file, err := os.OpenFile(defaultDNSPath, os.O_WRONLY|os.O_TRUNC, 0640)
|
||||
if err != nil {
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
:closable="false"
|
||||
type="error"
|
||||
/>
|
||||
<el-form @submit.prevent ref="formRef" v-loading="loading" :model="form" label-position="top">
|
||||
<el-form @submit.prevent ref="formRef" :model="form" label-position="top">
|
||||
<el-form-item :label="$t('container.oldImage')" prop="oldImage">
|
||||
<el-tooltip placement="top-start" :content="form.imageName" v-if="form.imageName.length > 50">
|
||||
<el-tag>{{ form.imageName.substring(0, 50) }}...:{{ form.oldTag }}</el-tag>
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
@ -196,7 +195,7 @@ const loadRepos = async () => {
|
|||
};
|
||||
|
||||
const onDelete = (row: Container.ImageInfo) => {
|
||||
let names = row.tags;
|
||||
let names = row.tags || [row.id.replaceAll('sha256:', '').substring(0, 12)];
|
||||
opRef.value.acceptParams({
|
||||
title: i18n.global.t('commons.button.delete'),
|
||||
names: names,
|
||||
|
@ -243,7 +242,7 @@ const buttons = [
|
|||
label: i18n.global.t('container.tag'),
|
||||
click: (row: Container.ImageInfo) => {
|
||||
let params = {
|
||||
itemName: row.tags.length !== 0 ? row.tags[0].split(':')[0] : '',
|
||||
itemName: row.tags && row.tags?.length !== 0 ? row.tags[0].split(':')[0] : '',
|
||||
repos: repos.value,
|
||||
sourceID: row.id,
|
||||
};
|
||||
|
@ -273,16 +272,16 @@ const buttons = [
|
|||
{
|
||||
label: i18n.global.t('commons.button.delete'),
|
||||
click: async (row: Container.ImageInfo) => {
|
||||
if (!row.tags?.length || row.tags.length <= 1) {
|
||||
if (row.tags && row.tags.length > 1) {
|
||||
let params = {
|
||||
id: row.id,
|
||||
isUsed: row.isUsed,
|
||||
tags: row.tags,
|
||||
};
|
||||
dialogDeleteRef.value!.acceptParams(params);
|
||||
} else {
|
||||
onDelete(row);
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
id: row.id,
|
||||
isUsed: row.isUsed,
|
||||
tags: row.tags,
|
||||
};
|
||||
dialogDeleteRef.value!.acceptParams(params);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
|
@ -96,8 +96,12 @@
|
|||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item @click="goDashboard('phpMyAdmin')">phpMyAdmin</el-dropdown-item>
|
||||
<el-dropdown-item @click="goDashboard('Adminer')" divided>Adminer</el-dropdown-item>
|
||||
<el-dropdown-item icon="Position" @click="goDashboard('phpMyAdmin')">
|
||||
phpMyAdmin
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item icon="Position" @click="goDashboard('Adminer')" divided>
|
||||
Adminer
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
suffix-icon="Search"
|
||||
@change="search()"
|
||||
:placeholder="$t('commons.button.search')"
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
suffix-icon="Search"
|
||||
@change="search()"
|
||||
:placeholder="$t('commons.button.search')"
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
<el-input
|
||||
v-model="searchInfo"
|
||||
@clear="search()"
|
||||
clearable
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
@change="search()"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<div class="search-button">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
clearable
|
||||
@clear="search()"
|
||||
suffix-icon="Search"
|
||||
@keyup.enter="search()"
|
||||
|
|
Loading…
Reference in New Issue