From 0b9b621d3d60d29b1590bf17cb402b387e90444f Mon Sep 17 00:00:00 2001
From: dingchaofa <571797089@qq.com>
Date: Tue, 24 Mar 2020 13:07:29 +0800
Subject: [PATCH 1/5] feature:allow set vars filter
---
src/components/VarArgs/index.vue | 121 +++++++++++++++++++++++++++++++
1 file changed, 121 insertions(+)
create mode 100644 src/components/VarArgs/index.vue
diff --git a/src/components/VarArgs/index.vue b/src/components/VarArgs/index.vue
new file mode 100644
index 0000000000..9e36fbab8c
--- /dev/null
+++ b/src/components/VarArgs/index.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t("button.delete") }}
+
+
+
+
+
+ {{ $t("button.add_var") }}
+
+
+
+
+
+
From 5afc406849aa5d59b6342a4bc641c813f1b32bd6 Mon Sep 17 00:00:00 2001
From: dingchaofa <571797089@qq.com>
Date: Tue, 24 Mar 2020 13:11:58 +0800
Subject: [PATCH 2/5] feature:allow set vars filter in router configuration
page
---
src/lang/en.ts | 1 +
src/lang/zh.ts | 1 +
src/views/schema/routes/edit.vue | 23 ++++++++++++++++++++++-
vue.config.js | 2 +-
4 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/lang/en.ts b/src/lang/en.ts
index 40157301ab..8a2f4c2c16 100644
--- a/src/lang/en.ts
+++ b/src/lang/en.ts
@@ -67,6 +67,7 @@ export default {
cancel: 'Cancel',
add_plugin: 'Add Plugin',
add_node: 'Add Node',
+ add_var: 'Add Var',
delete: 'Delete',
addValue: 'Add Value'
},
diff --git a/src/lang/zh.ts b/src/lang/zh.ts
index c594dda522..64164e1085 100644
--- a/src/lang/zh.ts
+++ b/src/lang/zh.ts
@@ -75,6 +75,7 @@ export default {
cancel: '取消',
add_plugin: '添加 Plugin',
add_node: '添加 Node',
+ add_var: '添加 Var',
delete: '删除',
addValue: '添加值'
},
diff --git a/src/views/schema/routes/edit.vue b/src/views/schema/routes/edit.vue
index 890f6760a2..8acefae0a9 100644
--- a/src/views/schema/routes/edit.vue
+++ b/src/views/schema/routes/edit.vue
@@ -194,6 +194,7 @@
{{ $t('button.add_plugin') }}
+
{})
}
+
+ private onVarArgsChange(val: any) {
+ this.form.vars = val
+ }
}
@@ -497,5 +508,15 @@ export default class extends Vue {
}
}
}
+ .var-item {
+ .el-form-item {
+ margin-bottom: 10px;
+ display: inline-block;
+ .el-form-item__label {}
+ .el-form-item__content {
+ margin-right: 10px;
+ }
+ }
+ }
}
diff --git a/vue.config.js b/vue.config.js
index 5e6dad19b7..06f3289fc6 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -28,7 +28,7 @@ module.exports = {
productionSourceMap: false,
devServer: {
// https://cli.vuejs.org/zh/config/#devserver-proxy
- proxy: 'http://127.0.0.1:9080/apisix/admin/'
+ proxy: 'http://192.168.10.152/apisix/admin/'
},
pluginOptions: {
'style-resources-loader': {
From 1f8ab14eed03ddc116eb4ee1c36b2fe06e77a661 Mon Sep 17 00:00:00 2001
From: dingchaofa <571797089@qq.com>
Date: Tue, 24 Mar 2020 15:39:35 +0800
Subject: [PATCH 3/5] feature:allow set vars filter in router configuration
page
---
src/components/VarArgs/index.vue | 39 +++++++++++++++++++-------------
src/views/schema/routes/edit.vue | 5 +++-
2 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/src/components/VarArgs/index.vue b/src/components/VarArgs/index.vue
index 9e36fbab8c..23d2d3ce6d 100644
--- a/src/components/VarArgs/index.vue
+++ b/src/components/VarArgs/index.vue
@@ -28,10 +28,11 @@
{{ $t("button.delete") }}
@@ -76,44 +79,48 @@