fix(插件管理): 修复查看插件报错问题

This commit is contained in:
fit2-zhao 2021-09-07 18:52:11 +08:00 committed by fit2-zhao
parent c706564720
commit 9814b18588
3 changed files with 7 additions and 4 deletions

View File

@ -53,7 +53,6 @@ public class CommonUtil {
public static List<Class<?>> getSubClass(String fileName) throws Exception {
List<Class<?>> classes = new LinkedList<>();
ResourcePatternResolver resourceLoader = new PathMatchingResourcePatternResolver();
if (StringUtil.isNotEmpty(fileName) && fileName.endsWith(".jar")) {
fileName = fileName.substring(0, fileName.length() - 4);
}

View File

@ -91,7 +91,7 @@ export default {
this.initPlugins();
},
handleView(row){
this.$refs.scriptView.open(row.pluginId);
this.$refs.scriptView.open(row.scriptId);
},
handleDelete(id) {
this.$confirm(this.$t('api_test.jar_config.delete_tip'), '', {

View File

@ -45,8 +45,12 @@ export default {
getPlugin(id) {
if (id) {
this.$get('/plugin/get/' + id, response => {
this.plugin = response.data;
this.reload();
if (response.data) {
this.plugin = response.data;
this.reload();
} else {
this.$warning("未找到脚本内容");
}
});
}
},