From 014aac413f6d75479cddd3f7003bfd517ac79d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E7=AB=AD=E5=8A=9B?= Date: Wed, 11 Dec 2024 15:37:26 +0800 Subject: [PATCH] Fix: Can't display app icon when import from app file or docker run cmd. --- src/components/Apps/ComposeConfig.vue | 23 +- src/components/forms/ImportPanel.vue | 291 +++++++++++++------------- 2 files changed, 162 insertions(+), 152 deletions(-) diff --git a/src/components/Apps/ComposeConfig.vue b/src/components/Apps/ComposeConfig.vue index a5351b62..825aa72e 100644 --- a/src/components/Apps/ComposeConfig.vue +++ b/src/components/Apps/ComposeConfig.vue @@ -64,6 +64,14 @@ export default { CommandsInput, VueSlider, }, + filters: { + duplexDisplay(val) { + if (!val) { + return 256 + } + return (isNumber(val) && val) || (val && val.replace(/m/i, '')) + }, + }, props: { state: String, totalMemory: { @@ -244,6 +252,7 @@ export default { immediate: true, }, }, + created() { // Set Front-end base url this.baseUrl = `${document.domain}` @@ -325,7 +334,6 @@ export default { /** * @description: Validate form async - * @param {object} ref ref of component * @return {boolean} */ async checkStep() { @@ -346,7 +354,6 @@ export default { if (!yaml) { return } - // 其他配置 this.volumes = yaml.volumes || {} @@ -624,7 +631,7 @@ export default { makeArray(foo) { const newArray = typeof foo == 'string' ? [foo] : foo - return newArray == undefined ? [] : newArray + return newArray === undefined ? [] : newArray }, // ****** migration !!! end !!! @@ -741,12 +748,6 @@ export default { } return result }, - duplexDisplay(val) { - if (!val) { - return 256 // this.memory_min - } - return (isNumber(val) && val) || (val && val.replace(/M/i, '')) - }, // unused filteredBeidgePort(service) { return this.bridgePorts(service).filter((port) => { @@ -787,7 +788,7 @@ export default { - + diff --git a/src/components/forms/ImportPanel.vue b/src/components/forms/ImportPanel.vue index 47053881..b50e4d4d 100644 --- a/src/components/forms/ImportPanel.vue +++ b/src/components/forms/ImportPanel.vue @@ -1,168 +1,111 @@ - - + + \ No newline at end of file +