From 5b8a15e218998905f42f66929a6e9c2ebc162527 Mon Sep 17 00:00:00 2001 From: Rena-Yuan Date: Tue, 31 May 2022 18:05:21 +0800 Subject: [PATCH] Feature: search in event list. --- frontend/src/api.js | 3 ++ frontend/src/components/BugitDevices.vue | 30 ++++++++++++++----- frontend/src/components/BugitExtra.vue | 14 ++++----- frontend/src/components/event/CodeEditor.vue | 3 +- .../src/components/event/EventInspector.vue | 20 ++++++++++++- .../form/CompoundTextAreaFormItem.vue | 8 ++--- frontend/src/store/event.js | 13 ++++++-- setup.py | 2 +- 8 files changed, 69 insertions(+), 24 deletions(-) diff --git a/frontend/src/api.js b/frontend/src/api.js index 27dc0c4..50b1b8e 100644 --- a/frontend/src/api.js +++ b/frontend/src/api.js @@ -35,6 +35,9 @@ export const getEvent = (options) => { } else if (options && options.hasOwnProperty('page') && options.page) { url += '/page/' + options.page } + if (options.searchStr && options.searchStr.trim()) { + url += '/search/' + options.searchStr.trim().split(/\s+/).join('+') + } return axios({ url: url }) diff --git a/frontend/src/components/BugitDevices.vue b/frontend/src/components/BugitDevices.vue index 97214ce..53844b3 100644 --- a/frontend/src/components/BugitDevices.vue +++ b/frontend/src/components/BugitDevices.vue @@ -1,15 +1,15 @@