This is an automated email from the ASF dual-hosted git repository.

min pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-ops.git


The following commit(s) were added to refs/heads/develop by this push:
     new 83dc250  global search support #211
83dc250 is described below

commit 83dc25088ead02dd6ddadb387bd512d27a8bb6e0
Author: nzomkxia <[email protected]>
AuthorDate: Thu Jan 10 22:40:25 2019 +0800

    global search support #211
---
 dubbo-admin-frontend/src/components/public/Toolbar.vue | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/dubbo-admin-frontend/src/components/public/Toolbar.vue 
b/dubbo-admin-frontend/src/components/public/Toolbar.vue
index edb9143..25db341 100644
--- a/dubbo-admin-frontend/src/components/public/Toolbar.vue
+++ b/dubbo-admin-frontend/src/components/public/Toolbar.vue
@@ -28,8 +28,10 @@
       hide-details
       solo-inverted
       prepend-inner-icon="search"
-      :label="$t('search')"
+      :label="$t('serviceSearch')"
       class="hidden-sm-and-down"
+      v-model="global"
+      @keyup.enter="submit"
     >
     </v-text-field>
 
@@ -96,6 +98,7 @@
     name: 'toolbar',
     data: () => ({
       selectedLang: '',
+      global: '',
       lang: [
         '简体中文',
         'English'
@@ -128,6 +131,15 @@
       ]
     }),
     methods: {
+      submit () {
+        if (window.location.href.includes('#/service')) {
+          window.location.href = '#/service?filter=' + this.global + 
'&pattern=service';
+          window.location.reload()
+        } else {
+          window.location.href = '#/service?filter=' + this.global + 
'&pattern=service';
+        }
+        this.global = ''
+      },
       handleDrawerToggle () {
         window.getApp.$emit('DRAWER_TOGGLED')
       },

Reply via email to