package config

This commit is contained in:
许晓东
2021-09-03 14:39:12 +08:00
parent 28546e4798
commit f2ee4680d4
13 changed files with 164 additions and 62 deletions

3
ui/.env Normal file
View File

@@ -0,0 +1,3 @@
NODE_ENV=production
VUE_APP_PREVIEW=false
VUE_APP_API_BASE_URL=/

3
ui/.env.development Normal file
View File

@@ -0,0 +1,3 @@
NODE_ENV=development
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/kafka-console

View File

@@ -5,7 +5,7 @@ import { VueAxios } from "./axios";
// 创建 axios 实例
const request = axios.create({
// API 请求的默认前缀
baseURL: "/kafka-console",
baseURL: process.env.VUE_APP_API_BASE_URL,
timeout: 10000, // 请求超时时间
});

View File

@@ -201,10 +201,6 @@ export default {
Object.assign(rowData, row);
this.selectRow = rowData;
},
cancel(e) {
console.log(e);
this.$message.error("Click on No");
},
closeManageProducerAuthDialog() {
this.openManageProducerAuthDialog = false;
getAclList(this.data, this.queryParam);

View File

@@ -1,36 +0,0 @@
<template>
<a-popconfirm
:title="title"
ok-text="确认"
cancel-text="取消"
@confirm="confirm"
@cancel="cancel"
>
</a-popconfirm>
</template>
<script>
export default {
name: "ConfirmDialog",
props: {
title: {
type: String,
default: "",
},
confirmEvent: {
default: "",
},
},
methods: {
confirm(e) {
console.log(e);
this.$message.success("Click on Yes");
},
cancel(e) {
console.log(e);
this.$message.error("Click on No");
},
},
};
</script>
<style scoped></style>

View File

@@ -5,9 +5,9 @@ module.exports = {
"/kafka-console": {
target: `${process.env.SW_PROXY_TARGET || "http://127.0.0.1:7766"}`,
changeOrigin: true,
// pathRewrite: {
// '^/kafka-console': '/'
// }
pathRewrite: {
"^/kafka-console": "/",
},
},
},
},