From 1a9386904a6e6bd555491b20a7be42e91b9b2a3f Mon Sep 17 00:00:00 2001 From: a20070322 <1031839775@qq.com> Date: Tue, 30 Apr 2024 11:13:30 +0800 Subject: [PATCH] i18n: pages/docker --- web-vue/.env.dev | 2 +- web-vue/src/i18n/locales/en_US/index.ts | 4 +- .../en_US/pages/docker/buildContainer.ts | 50 +------- .../i18n/locales/en_US/pages/docker/list.ts | 116 +++++------------- .../zh-CN/pages/docker/buildContainer.ts | 3 +- .../i18n/locales/zh-CN/pages/docker/list.ts | 53 ++++---- web-vue/src/pages/dispatch/status.vue | 9 +- web-vue/src/pages/docker/buildContainer.vue | 2 +- web-vue/src/pages/docker/container.vue | 20 ++- web-vue/src/pages/docker/list.vue | 105 ++++++++-------- web-vue/src/pages/docker/log-view.vue | 2 +- web-vue/src/pages/docker/swarm/node.vue | 8 +- web-vue/src/pages/docker/swarm/pull-log.vue | 2 +- web-vue/src/pages/docker/swarm/service.vue | 8 +- web-vue/src/pages/docker/swarm/task.vue | 8 +- web-vue/vite.config.ts | 2 +- 16 files changed, 160 insertions(+), 234 deletions(-) diff --git a/web-vue/.env.dev b/web-vue/.env.dev index 21a29ea6c..0e41ffe60 100644 --- a/web-vue/.env.dev +++ b/web-vue/.env.dev @@ -1 +1 @@ -JPOM_PROXY_HOST="127.0.0.1:2122" +JPOM_PROXY_HOST="https://demo.jpom.top" diff --git a/web-vue/src/i18n/locales/en_US/index.ts b/web-vue/src/i18n/locales/en_US/index.ts index 97ce754ee..f15f682df 100644 --- a/web-vue/src/i18n/locales/en_US/index.ts +++ b/web-vue/src/i18n/locales/en_US/index.ts @@ -12,11 +12,13 @@ import page404 from './pages/404/404' import build from './pages/build' import certificate from './pages/certificate' import dispatch from './pages/dispatch' +import docker from './pages/docker' export default { pages: { 404: page404, build, certificate, - dispatch + dispatch, + docker } } diff --git a/web-vue/src/i18n/locales/en_US/pages/docker/buildContainer.ts b/web-vue/src/i18n/locales/en_US/pages/docker/buildContainer.ts index 1c48b4bf7..8ebe6788d 100644 --- a/web-vue/src/i18n/locales/en_US/pages/docker/buildContainer.ts +++ b/web-vue/src/i18n/locales/en_US/pages/docker/buildContainer.ts @@ -63,54 +63,6 @@ export default { containerLabelExample: 'Container labels, such as: key1=values1&keyvalue2', autoStart: 'Auto Start', start: 'Start', - port_1: 'Port', - container_1: 'Container', - rebuildContainer_1: 'Rebuild Container', - operationPrompt_1: 'Operation Prompt', - containerRebuildDesc_1: - 'Container rebuild refers to creating an identical container using the already created container parameters.', - containerRestartDeleteBefore_1: 'Before restarting, the previous container will be automatically deleted.', - containerDataBackupWarning_1: - 'If the container data directory is not mounted, please backup the data before using this feature.', - newContainerParamNotGuaranteed_1: - 'This feature cannot guarantee that the new container and the previous container parameters are exactly the same. Please use it carefully.', - baseImage_1: 'Base Image', - containerName_1: 'Container Name:', - hostIp_1: 'Host IP', - containerPort_1: 'Container Port', - portProtocol_1: 'Port Protocol', - mountedVolume_1: 'Mounted Volume', - host_1: 'Host', - hostDirectory_1: 'Host Directory', - containerDirectory_1: 'Container Directory', - environmentVariables_1: 'Environment Variables', - variableName_1: 'Variable Name', - variableValue_1: 'Variable Value', - command_1: 'Command', - commandValue_1: 'Command Value', - fillRunningCommand_1: 'Fill in the running command', - hostname_1: 'Hostname', - network_1: 'Network', - networkMode_1: 'Network Mode: bridge, container:, host, container, none', - createNetworkStack_1: 'Create a new network stack for containers on docker bridge', - containerNoNetwork_1: 'This container has no network', - reuseAnotherContainerNetworkStack_1: "Reuse another container's network stack", - useHostNetworkStack_1: - 'Use the host network stack inside the container. Note: Host mode grants containers full access to local system services (such as D-bus), so it is considered insecure.', - restartPolicy_1: 'Restart Policy', - restartPolicyOptions_1: 'Restart Policy: no, always, unless-stopped, on-failure', - noAutoRestart_1: 'Do not automatically restart', - alwaysRestart_1: 'Always restart the container regardless of the exit code.', - restartOnFailure_1: - 'Restart the container if it exits with a non-zero exit code. You can specify the number of times: on-failure:2', - restartUnlessStopped_1: 'Restart the container unless it has been stopped', - storageOptions_1: 'Storage Options', - configName_1: 'Configuration Name (e.g., size)', - configValue_1: 'Configuration Value (e.g., 5g)', - containerRuntime_1: 'Container Runtime', - containerLabels_1: 'Container Labels', - containerLabelExample_1: 'Container labels, e.g., key1=values1&keyvalue2', - autoStart_1: 'Auto Start', - start_1: 'Start' + noStart: 'No Start' } } diff --git a/web-vue/src/i18n/locales/en_US/pages/docker/list.ts b/web-vue/src/i18n/locales/en_US/pages/docker/list.ts index f67e76bb9..46de38ab5 100644 --- a/web-vue/src/i18n/locales/en_US/pages/docker/list.ts +++ b/web-vue/src/i18n/locales/en_US/pages/docker/list.ts @@ -2,107 +2,53 @@ export default { c: { name: 'Name', containerName: 'Container Name', - tag: 'Tag', - pleaseSelectWorkspace: 'Please select workspace', - tagLimitToAlphaNumericWithLength1To10: 'Tags are limited to alphanumeric with a length of 1-10', - name_1: 'Name', - containerName_1: 'Container Name', - tag_1: 'Tag', - pleaseSelectWorkspace_1: 'Please select workspace', - tagLimitToAlphaNumericWithLength1To10_11: 'Tag is limited to alphanumeric with length 1-10' + label: 'Label', + selectWorkspace: 'Please select a workspace', + labelRestriction: 'Label is restricted to alphanumeric characters with a length of 1-10' }, p: { - currentWorkspaceDoesNotHaveDocker: 'The current workspace does not have Docker', - pleaseGoToSystemManagementAssetManagementDockerManagementToAddDockerOrAuthorizeAndAssignAnExistingDockerToThisWorkspace: - 'Please go to [System Management] -> [Asset Management] -> [Docker Management] to add a new Docker, or authorize and associate an existing Docker with this workspace', - goNow: 'Go now', + noDockerInWorkspace: 'There is no Docker in the current workspace', + goToDockerManagement: + 'Please go to [System Management] -> [Asset Management] -> [Docker Management] to add a new Docker, or authorize and associate an existing Docker to this workspace', + goToNow: 'Go now', noDocker: 'No Docker', - pressCtrOrAltOptionToQuicklyReturnToTheFirstPage: - 'Press Ctr or Alt/Option and click the button to quickly return to the first page', + quickReturn: 'Hold Ctrl or Alt/Option key and click the button to quickly return to the first page', search: 'Search', - workspaceSynchronization: 'Workspace Synchronization', - normal: 'Normal', + workspaceSync: 'Workspace synchronization', + statusNormal: 'Normal', unableToConnect: 'Unable to connect', - clusterAssociatedDockerInfoIsLostCannotContinueToUseManagementFunctions: - 'The cluster-associated Docker information is lost, and management functions cannot be used', + dockerInfoLost: + 'The associated Docker information for the cluster is lost and cannot continue to use management functions', infoLost: 'Information lost', console: 'Console', edit: 'Edit', delete: 'Delete', editDocker: 'Edit Docker', - tagIsUsedForContainerBuildingToSelectContainerFunctionFromTag: - 'Tags are used for container building to select container functions (fromTag)', - pleaseEnterTagNameAlphaNumericWithLength1To10: - 'Please enter a tag name with alphanumeric characters and a length of 1-10', + tagForContainerBuild: 'Tag is used for container build selection (fromTag)', + enterTagName: 'Please enter a tag name with alphanumeric characters with a length of 1-10', add: 'Add', - synchronizeToOtherWorkspaces: 'Synchronize to other workspaces', - warmPrompt: 'Warm prompt', - synchronizationMechanismDeterminesThatTheContainerHostIsTheSameServerDocker: - 'The synchronization mechanism determines that the container host is the same server (Docker)', - whenTheTargetWorkspaceDoesNotExistACorrespondingNodeItWillBeAutomaticallyCreatedADockerLogicDocker: - 'When the target workspace does not exist, a corresponding node will be automatically created, and a new Docker (logical Docker) will be created', - whenTheTargetWorkspaceAlreadyExistsANodeItWillBeAutomaticallySynchronizedDockerRepositoryConfigurationInformation: - 'When the target workspace already exists, a node will be automatically synchronized, and Docker repository configuration information will be synchronized', - selectWorkspace: 'Select workspace', + syncToOtherWorkspace: 'Synchronize to other workspaces', + warmTip: 'Friendly reminder', + syncMechanism: + 'The synchronization mechanism determines that it is the same server (Docker) using the container host', + createNewDocker: + 'When the target workspace does not have a corresponding node, a new Docker (logical Docker) will be automatically created', + syncDockerInfo: + 'When the target workspace already has a node, the Docker repository configuration information will be automatically synchronized', + chooseWorkspace: 'Choose workspace', status: 'Status', version: 'Version', - lastModifier: 'Last modifier', + lastModifiedBy: 'Last modified by', creationTime: 'Creation time', modificationTime: 'Modification time', - operation: 'Operation', - pleaseFillInTheContainerName: 'Please fill in the container name', - pleaseFillInTheContainerAddress: 'Please fill in the container address', - pleaseFillInTheAssociatedContainerTag: 'Please fill in the associated container tag', + action: 'Action', + enterContainerName: 'Please enter a container name', + enterContainerAddress: 'Please enter a container address', + enterAssociatedContainerTag: 'Please enter an associated container tag', systemPrompt: 'System prompt', - areYouSureYouWantToDeleteThisRecordAfterDeletionTheAssociatedContainerTagWillBeUnavailableForBuilding: - 'Are you sure you want to delete this record? After deletion, the associated container tag will be unavailable for building', + confirmDeletion: + 'Are you sure you want to delete this record? After deletion, the associated container tag for the build will no longer be usable', confirm: 'Confirm', - cancel: 'Cancel', - currentWorkspaceDoesNotHaveDocker_1: 'The current workspace does not have Docker', - pleaseGoToSystemManagementAssetManagementDockerManagementToAddDockerOrAuthorizeAndAssignAnExistingDockerToThisWorkspace_1: - 'Please go to [System Management] -> [Asset Management] -> [Docker Management] to add a new Docker, or authorize and assign an existing Docker to this workspace', - goNow_1: 'Go now', - noDocker_1: 'No Docker', - pressCtrOrAltOptionToQuicklyReturnToTheFirstPage_1: - 'Press Ctr or Alt/Option and click the button to quickly return to the first page', - search_1: 'Search', - workspaceSynchronization_1: 'Workspace Synchronization', - normal_1: 'Normal', - unableToConnect_1: 'Unable to connect', - clusterAssociatedDockerInfoIsLostCannotContinueToUseManagementFunctions_1: - 'The cluster-associated Docker information is lost, and management functions cannot be used', - infoLost_1: 'Information lost', - console_1: 'Console', - edit_1: 'Edit', - delete_1: 'Delete', - editDocker_1: 'Edit Docker', - tagIsUsedForContainerBuildingToSelectContainerFunctionFromTag_1: - 'The tag is used for container building to select container function (fromTag)', - pleaseEnterTagNameAlphaNumericWithLength1To10_11: - 'Please enter a tag name with alphanumeric characters and a length of 1-10', - add_1: 'Add', - synchronizeToOtherWorkspaces_1: 'Synchronize to other workspaces', - warmPrompt_1: 'Warm prompt', - synchronizationMechanismDeterminesThatTheContainerHostIsTheSameServerDocker_1: - 'The synchronization mechanism determines that the container host is the same server (Docker)', - whenTheTargetWorkspaceDoesNotExistACorrespondingNodeItWillBeAutomaticallyCreatedADockerLogicDocker_1: - 'When the target workspace does not exist, a corresponding node will be automatically created (a logical Docker)', - whenTheTargetWorkspaceAlreadyExistsANodeItWillBeAutomaticallySynchronizedDockerRepositoryConfigurationInformation_1: - 'When the target workspace already exists, a node will be automatically synchronized with the Docker repository configuration information', - selectWorkspace_1: 'Select workspace', - status_1: 'Status', - version_1: 'Version', - lastModifier_1: 'Last modifier', - creationTime_1: 'Creation time', - modificationTime_1: 'Modification time', - operation_1: 'Operation', - pleaseFillInTheContainerName_1: 'Please fill in the container name', - pleaseFillInTheContainerAddress_1: 'Please fill in the container address', - pleaseFillInTheAssociatedContainerTag_1: 'Please fill in the associated container tag', - systemPrompt_1: 'System prompt', - areYouSureYouWantToDeleteThisRecordAfterDeletionTheAssociatedContainerTagWillBeUnavailableForBuilding_1: - 'Are you sure you want to delete this record? After deletion, the associated container tag will be unavailable for building', - confirm_1: 'Confirm', - cancel_1: 'Cancel' + cancel: 'Cancel' } } diff --git a/web-vue/src/i18n/locales/zh-CN/pages/docker/buildContainer.ts b/web-vue/src/i18n/locales/zh-CN/pages/docker/buildContainer.ts index a295b23b7..0757c9991 100644 --- a/web-vue/src/i18n/locales/zh-CN/pages/docker/buildContainer.ts +++ b/web-vue/src/i18n/locales/zh-CN/pages/docker/buildContainer.ts @@ -58,6 +58,7 @@ export default { containerLabels: '容器标签', containerLabelExample: '容器标签,如:key1=values1&keyvalue2', autoStart: '自动启动', - start: '启动' + start: '启动', + noStart: '未启动' } } diff --git a/web-vue/src/i18n/locales/zh-CN/pages/docker/list.ts b/web-vue/src/i18n/locales/zh-CN/pages/docker/list.ts index 114ea8727..9f8aaf379 100644 --- a/web-vue/src/i18n/locales/zh-CN/pages/docker/list.ts +++ b/web-vue/src/i18n/locales/zh-CN/pages/docker/list.ts @@ -2,52 +2,47 @@ export default { c: { name: '名称', containerName: '容器名称', - tag: '标签', - pleaseSelectWorkspace: '请选择工作空间', - tagLimitToAlphaNumericWithLength1To10: '标签限制为字母数字且长度 1-10' + label: '标签', + selectWorkspace: '请选择工作空间', + labelRestriction: '标签限制为字母数字且长度 1-10' }, p: { - currentWorkspaceDoesNotHaveDocker: '当前工作空间还没有 Docker', - pleaseGoToSystemManagementAssetManagementDockerManagementToAddDockerOrAuthorizeAndAssignAnExistingDockerToThisWorkspace: + noDockerInWorkspace: '当前工作空间还没有 Docker', + goToDockerManagement: '请到【系统管理】-> 【资产管理】-> 【Docker管理】新增Docker,或者将已新增的Docker授权关联、分配到此工作空间', - goNow: '现在就去', + goToNow: '现在就去', noDocker: '没有docker', - pressCtrOrAltOptionToQuicklyReturnToTheFirstPage: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页', + quickReturn: '按住 Ctr 或者 Alt/Option 键点击按钮快速回到第一页', search: '搜索', - workspaceSynchronization: '工作空间同步', - normal: '正常', + workspaceSync: '工作空间同步', + statusNormal: '正常', unableToConnect: '无法连接', - clusterAssociatedDockerInfoIsLostCannotContinueToUseManagementFunctions: - '集群关联的 docker 信息丢失,不能继续使用管理功能', + dockerInfoLost: '集群关联的 docker 信息丢失,不能继续使用管理功能', infoLost: '信息丢失', console: '控制台', edit: '编辑', delete: '删除', editDocker: '编辑 Docker', - tagIsUsedForContainerBuildingToSelectContainerFunctionFromTag: '标签用于容器构建选择容器功能(fromTag)', - pleaseEnterTagNameAlphaNumericWithLength1To10: '请输入标签名 字母数字 长度 1-10', + tagForContainerBuild: '标签用于容器构建选择容器功能(fromTag)', + enterTagName: '请输入标签名 字母数字 长度 1-10', add: '新增', - synchronizeToOtherWorkspaces: '同步到其他工作空间', - warmPrompt: '温馨提示', - synchronizationMechanismDeterminesThatTheContainerHostIsTheSameServerDocker: - '同步机制采用容器 host 确定是同一个服务器(docker)', - whenTheTargetWorkspaceDoesNotExistACorrespondingNodeItWillBeAutomaticallyCreatedADockerLogicDocker: - '当目标工作空间不存在对应的节点时候将自动创建一个新的docker(逻辑docker)', - whenTheTargetWorkspaceAlreadyExistsANodeItWillBeAutomaticallySynchronizedDockerRepositoryConfigurationInformation: - '当目标工作空间已经存在节点时候将自动同步 docker 仓库配置信息', - selectWorkspace: '选择工作空间', + syncToOtherWorkspace: '同步到其他工作空间', + warmTip: '温馨提示', + syncMechanism: '同步机制采用容器 host 确定是同一个服务器(docker)', + createNewDocker: '当目标工作空间不存在对应的节点时候将自动创建一个新的docker(逻辑docker)', + syncDockerInfo: '当目标工作空间已经存在节点时候将自动同步 docker 仓库配置信息', + chooseWorkspace: '选择工作空间', status: '状态', version: '版本', - lastModifier: '最后修改人', + lastModifiedBy: '最后修改人', creationTime: '创建时间', modificationTime: '修改时间', - operation: '操作', - pleaseFillInTheContainerName: '请填写容器名称', - pleaseFillInTheContainerAddress: '请填写容器地址', - pleaseFillInTheAssociatedContainerTag: '请填写关联容器标签', + action: '操作', + enterContainerName: '请填写容器名称', + enterContainerAddress: '请填写容器地址', + enterAssociatedContainerTag: '请填写关联容器标签', systemPrompt: '系统提示', - areYouSureYouWantToDeleteThisRecordAfterDeletionTheAssociatedContainerTagWillBeUnavailableForBuilding: - '真的要删除该记录么?删除后构建关联的容器标签将无法使用', + confirmDeletion: '真的要删除该记录么?删除后构建关联的容器标签将无法使用', confirm: '确认', cancel: '取消' } diff --git a/web-vue/src/pages/dispatch/status.vue b/web-vue/src/pages/dispatch/status.vue index bc9d71fd6..4a5ca831f 100644 --- a/web-vue/src/pages/dispatch/status.vue +++ b/web-vue/src/pages/dispatch/status.vue @@ -44,13 +44,16 @@ {{ $tl('p.refresh') }} - + > + + diff --git a/web-vue/src/pages/docker/list.vue b/web-vue/src/pages/docker/list.vue index 0f90ab6fa..a4f096a07 100644 --- a/web-vue/src/pages/docker/list.vue +++ b/web-vue/src/pages/docker/list.vue @@ -1,13 +1,10 @@ @@ -102,16 +102,20 @@ v-model:open="editVisible" destroy-on-close :confirm-loading="confirmLoading" - title="编辑 Docker" + :title="$tl('p.editDocker')" :mask-closable="false" @ok="handleEditOk" > - - + + - +
@@ -135,7 +139,7 @@ v-model:value="temp.tagInput" type="text" size="small" - placeholder="请输入标签名 字母数字 长度 1-10" + :placeholder="$tl('p.enterTagName')" @blur="handleInputConfirm" @keyup.enter="handleInputConfirm" /> @@ -145,7 +149,7 @@ style="borderstyle: dashed" @click="showInput" > - 新增 + {{ $tl('p.add') }} @@ -166,22 +170,22 @@ v-model:open="syncToWorkspaceVisible" destroy-on-close :confirm-loading="confirmLoading" - title="同步到其他工作空间" + :title="$tl('p.syncToOtherWorkspace')" :mask-closable="false" @ok="handleSyncToWorkspace" > - + - + {{ item.name @@ -236,7 +240,7 @@ export default { columns: [ { - title: '名称', + title: this.$tl('c.name'), dataIndex: 'name', ellipsis: true, width: 100 @@ -249,33 +253,33 @@ export default { tooltip: true }, { - title: '状态', + title: this.$tl('p.status'), dataIndex: ['machineDocker', 'status'], ellipsis: true, align: 'center', width: '100px' }, { - title: 'docker版本', + title: `docker${this.$tl('p.version')}`, dataIndex: ['machineDocker', 'dockerVersion'], ellipsis: true, width: '120px', tooltip: true }, { - title: '标签', + title: this.$tl('c.label'), dataIndex: 'tags', width: 100, ellipsis: true }, { - title: '最后修改人', + title: this.$tl('p.lastModifiedBy'), dataIndex: 'modifyUser', width: '120px', ellipsis: true }, { - title: '创建时间', + title: this.$tl('p.creationTime'), dataIndex: 'createTimeMillis', ellipsis: true, sorter: true, @@ -283,7 +287,7 @@ export default { width: '170px' }, { - title: '修改时间', + title: this.$tl('p.modificationTime'), dataIndex: 'modifyTimeMillis', sorter: true, ellipsis: true, @@ -291,7 +295,7 @@ export default { width: '170px' }, { - title: '操作', + title: this.$tl('p.action'), dataIndex: 'operation', fixed: 'right', @@ -301,16 +305,16 @@ export default { ], rules: { // id: [{ required: true, message: "Please input ID", trigger: "blur" }], - name: [{ required: true, message: '请填写容器名称', trigger: 'blur' }], - host: [{ required: true, message: '请填写容器地址', trigger: 'blur' }], + name: [{ required: true, message: this.$tl('p.enterContainerName'), trigger: 'blur' }], + host: [{ required: true, message: this.$tl('p.enterContainerAddress'), trigger: 'blur' }], tagInput: [ // { required: true, message: "Please input ID", trigger: "blur" }, - { pattern: /^\w{1,10}$/, message: '标签限制为字母数字且长度 1-10' } + { pattern: /^\w{1,10}$/, message: this.$tl('c.labelRestriction') } ], tag: [ - { required: true, message: '请填写关联容器标签', trigger: 'blur' }, - { pattern: /^\w{1,10}$/, message: '标签限制为字母数字且长度 1-10' } + { required: true, message: this.$tl('p.enterAssociatedContainerTag'), trigger: 'blur' }, + { pattern: /^\w{1,10}$/, message: this.$tl('c.labelRestriction') } ] }, workspaceList: [], @@ -360,6 +364,9 @@ export default { this.loadData() }, methods: { + $tl(key, ...args) { + return this.$t(`pages.docker.list.${key}`, ...args) + }, // 加载数据 loadData(pointerEvent) { this.loading = true @@ -452,11 +459,11 @@ export default { // 删除 handleDelete(record) { $confirm({ - title: '系统提示', + title: this.$tl('p.systemPrompt'), zIndex: 1009, - content: '真的要删除该记录么?删除后构建关联的容器标签将无法使用', - okText: '确认', - cancelText: '取消', + content: this.$tl('p.confirmDeletion'), + okText: this.$tl('p.confirm'), + cancelText: this.$tl('p.cancel'), onOk: () => { return deleteDcoker({ id: record.id @@ -530,7 +537,7 @@ export default { handleSyncToWorkspace() { if (!this.temp.workspaceId) { $notification.warn({ - message: '请选择工作空间' + message: this.$tl('c.selectWorkspace') }) return false } diff --git a/web-vue/src/pages/docker/log-view.vue b/web-vue/src/pages/docker/log-view.vue index 49d0b556c..e9b369259 100644 --- a/web-vue/src/pages/docker/log-view.vue +++ b/web-vue/src/pages/docker/log-view.vue @@ -25,7 +25,7 @@
{{ $tl('p.search') }} + > + +
diff --git a/web-vue/src/pages/docker/swarm/task.vue b/web-vue/src/pages/docker/swarm/task.vue index 54c39fef1..56474d8ef 100644 --- a/web-vue/src/pages/docker/swarm/task.vue +++ b/web-vue/src/pages/docker/swarm/task.vue @@ -62,11 +62,15 @@ {{ $tl('p.search') }} + > + + diff --git a/web-vue/vite.config.ts b/web-vue/vite.config.ts index 7788287a5..925962444 100644 --- a/web-vue/vite.config.ts +++ b/web-vue/vite.config.ts @@ -64,7 +64,7 @@ export default defineConfig(({ mode }: ConfigEnv) => { proxy: { // http '/api': { - target: `http://${HOST}`, + target: HOST.includes('http') ? HOST : `http://${HOST}`, changeOrigin: true, ws: true, rewrite: (path) => path.replace(/^\/api/, ''),