Browse Source

feat: 内存限制提示保留2位小数 (#1549)

pull/1551/head
zhengkunwang223 1 year ago committed by GitHub
parent
commit
b5a1ffe338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      frontend/src/views/app-store/detail/install/index.vue

4
frontend/src/views/app-store/detail/install/index.vue

@ -165,7 +165,7 @@ const initData = () => ({
advanced: true, advanced: true,
cpuQuota: 0, cpuQuota: 0,
memoryLimit: 0, memoryLimit: 0,
memoryUnit: 'MB', memoryUnit: 'M',
containerName: '', containerName: '',
allowPort: false, allowPort: false,
editCompose: false, editCompose: false,
@ -187,7 +187,7 @@ const changeUnit = () => {
if (req.memoryUnit == 'M') { if (req.memoryUnit == 'M') {
limits.value.memory = oldMemory.value; limits.value.memory = oldMemory.value;
} else { } else {
limits.value.memory = oldMemory.value / 1024; limits.value.memory = Number((oldMemory.value / 1024).toFixed(2));
} }
}; };

Loading…
Cancel
Save