diff --git a/console/atest-ui/src/views/DataManager.vue b/console/atest-ui/src/views/DataManager.vue index a525de0d..02a43d3b 100644 --- a/console/atest-ui/src/views/DataManager.vue +++ b/console/atest-ui/src/views/DataManager.vue @@ -336,7 +336,7 @@ const executeQueryWithoutShowingNativeSQL = () => { executeWithQuery(sqlQuery.value) } -Magic.LoadMagicKeys(import.meta.url, new Map([ +Magic.LoadMagicKeys('DataManager', new Map([ ["executeQuery", executeQuery], ["executeWithSelectedQuery", executeWithSelectedQuery], ["executeQueryWithoutShowingNativeSQL", executeQueryWithoutShowingNativeSQL], diff --git a/console/atest-ui/src/views/StoreManager.vue b/console/atest-ui/src/views/StoreManager.vue index 8b82d67c..59c91498 100644 --- a/console/atest-ui/src/views/StoreManager.vue +++ b/console/atest-ui/src/views/StoreManager.vue @@ -108,10 +108,10 @@ function addStore() { createAction.value = true } -Magic.LoadMagicKeys(import.meta.url, { - "addStore": addStore, - "loadStores": loadStores, -}) +Magic.LoadMagicKeys('StoreManager', new Map([ + ["addStore", addStore], + ["loadStores", loadStores], +])) const rules = reactive>({ name: [{ required: true, message: 'Name is required', trigger: 'blur' }], diff --git a/console/atest-ui/src/views/TestCase.vue b/console/atest-ui/src/views/TestCase.vue index c7165e77..90631f51 100644 --- a/console/atest-ui/src/views/TestCase.vue +++ b/console/atest-ui/src/views/TestCase.vue @@ -935,14 +935,14 @@ const openQueryTab = () => { testResultActiveTab.value = 'query' } -Magic.LoadMagicKeys(import.meta.url), { - "sendRequest": sendRequest, - "openDuplicateTestCaseDialog": openDuplicateTestCaseDialog, - "openOutputTab": openOutputTab, - "openBodyTab": openBodyTab, - "openHeaderTab": openHeaderTab, - "openQueryTab": openQueryTab -} +Magic.LoadMagicKeys('TestCase', new Map([ + ["sendRequest", sendRequest], + ["openDuplicateTestCaseDialog", openDuplicateTestCaseDialog], + ["openOutputTab", openOutputTab], + ["openBodyTab", openBodyTab], + ["openHeaderTab", openHeaderTab], + ["openQueryTab", openQueryTab] +]))