fix(X-Pack): 分布式X-Pack前端父组件无法调用子组件方法

This commit is contained in:
fit2cloud-chenyw 2024-06-06 15:37:15 +08:00
parent 9bbc05e1c8
commit b6ef3da2c9

View File

@ -1,6 +1,6 @@
<script lang="ts" setup>
import noLic from './nolic.vue'
import { ref, useAttrs, onMounted, watch } from 'vue'
import { ref, useAttrs, onMounted } from 'vue'
import { execute, randomKey, formatArray } from './convert'
import { load, loadDistributed, xpackModelApi } from '@/api/plugin'
import { useCache } from '@/hooks/web/useCache'
@ -81,7 +81,11 @@ const storeCacheProxy = byteArray => {
}
const pluginProxy = ref(null)
const invokeMethod = param => {
pluginProxy.value['invokeMethod'](param)
if (pluginProxy.value['invokeMethod']) {
pluginProxy.value['invokeMethod'](param)
} else {
pluginProxy.value[param.methodName](param.args)
}
}
onMounted(async () => {