show config in the home page
This commit is contained in:
@@ -1,17 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="home">
|
<div class="home">
|
||||||
<HelloWorld msg="Welcome to kafka console ui." />
|
<a-card title="kafka console 配置" style="width: 100%">
|
||||||
|
<!-- <a slot="extra" href="#">more</a>-->
|
||||||
|
<p v-for="(v, k) in config" :key="k">{{ k }}={{ v }}</p>
|
||||||
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// @ is an alias to /src
|
// @ is an alias to /src
|
||||||
import HelloWorld from "@/components/HelloWorld.vue";
|
import request from "@/utils/request";
|
||||||
|
import { KafkaConfigApi } from "@/utils/api";
|
||||||
export default {
|
export default {
|
||||||
name: "Home",
|
name: "Home",
|
||||||
components: {
|
components: {},
|
||||||
HelloWorld,
|
data() {
|
||||||
|
return {
|
||||||
|
config: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
request({
|
||||||
|
url: KafkaConfigApi.getConfig.url,
|
||||||
|
method: KafkaConfigApi.getConfig.method,
|
||||||
|
}).then((res) => {
|
||||||
|
this.config = res.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user