Skip to content

Commit

Permalink
add shortcut for sending request
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed Jul 5, 2024
1 parent 1e1aed1 commit e4836f5
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 46 deletions.
243 changes: 197 additions & 46 deletions console/atest-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions console/atest-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"test": "vitest"
},
"dependencies": {
"@vueuse/core": "^10.11.0",
"element-plus": "^2.3.7",
"intro.js": "^7.0.1",
"jsonlint-mod": "^1.7.6",
Expand Down
9 changes: 9 additions & 0 deletions console/atest-ui/src/views/TestCase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { useI18n } from 'vue-i18n'
import { JSONPath } from 'jsonpath-plus'
import { Codemirror } from 'vue-codemirror'
import jsonlint from 'jsonlint-mod'
import { useMagicKeys } from '@vueuse/core'
const keys = useMagicKeys()
const keyAltS = keys['Alt+S']
const { t } = useI18n()
const props = defineProps({
Expand All @@ -27,6 +30,12 @@ let querySuggestedAPIs = NewSuggestedAPIsQuery(Cache.GetCurrentStore().name!, pr
const testResultActiveTab = ref(Cache.GetPreference().responseActiveTab)
watch(testResultActiveTab, Cache.WatchResponseActiveTab)
watch(keyAltS, (v) => {
if (v) {
sendRequest()
}
})
const parameters = ref([] as Pair[])
const requestLoading = ref(false)
const testResult = ref({ header: [] as Pair[] } as TestResult)
Expand Down

0 comments on commit e4836f5

Please sign in to comment.