Skip to content

Commit

Permalink
perf(frontend): mongodb工具箱重构_清档 #8498
Browse files Browse the repository at this point in the history
  • Loading branch information
3octaves committed Dec 19, 2024
1 parent 85e6ffb commit 4b30132
Show file tree
Hide file tree
Showing 9 changed files with 627 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@

const newRowIndex = rowIndex + 1;

if (rowIndex > 0) {
if (newRowIndex > 0) {
tableData.value.splice(newRowIndex, 0, _.cloneDeep(tableData.value[rowIndex]));
editTableContext!.validateByRowIndex(newRowIndex);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!--
* TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available.
*
* Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License athttps://opensource.org/licenses/MIT
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for
* the specific language governing permissions and limitations under the License.
-->

<template>
<Component :is="com" />
</template>
<script setup lang="ts">
import { computed, ref } from 'vue';
import { useRoute } from 'vue-router';

import Page1 from './pages/page1/Index.vue';
import Page2 from './pages/page2/Index.vue';

const route = useRoute();

const comMap = {
ticket: Page1,
success: Page2,
};

const page = ref('');

const com = computed(() => {
if (comMap[page.value as keyof typeof comMap]) {
return comMap[page.value as keyof typeof comMap];
}
return Page1;
});

watch(
route,
() => {
page.value = route.params.page as string;
},
{
immediate: true,
},
);
</script>
Loading

0 comments on commit 4b30132

Please sign in to comment.