feat: update lists

This commit is contained in:
Qiuxia Fan
2022-01-17 23:16:16 +08:00
parent 652b3f2bbc
commit ff29b1314e
3 changed files with 57 additions and 15 deletions

View File

@@ -17,13 +17,20 @@ limitations under the License. -->
:data="selectorStore.instances"
style="width: 100%; height: 100%; overflow: auto"
>
<el-table-column prop="label" label="Service Instances" />
<el-table-column label="Service Instances">
<template #default="scope">
<span class="link" @click="linkInstance(scope.row)">
{{ scope.row.label }}
</span>
</template>
</el-table-column>
</el-table>
</template>
<script setup lang="ts">
import { defineProps, onBeforeMount } from "vue";
import { useSelectorStore } from "@/store/modules/selectors";
import { ElMessage } from "element-plus";
import router from "@/router";
defineProps({
data: {
@@ -43,4 +50,16 @@ onBeforeMount(async () => {
ElMessage.error(resp.errors);
}
});
function linkInstance(row: any) {
const path = `/dashboard/view/${row.layer}/serviceInstance/${selectorStore.currentService}/${row.value}`;
router.push(path);
}
</script>
<style lang="scss" scoped>
.link {
cursor: pointer;
color: #409eff;
display: inline-block;
width: 100%;
}
</style>