测试版终

This commit is contained in:
2025-04-14 22:50:22 +08:00
parent 6a6dabeca1
commit 60ed4f5ff7
3 changed files with 11 additions and 8 deletions

View File

@@ -1,15 +1,16 @@
// pythonBridge.js
import { ref, onMounted } from 'vue';
const bridge = ref(null);
// 初始化 QWebChannel
const initBridge = () => {
new QWebChannel(qt.webChannelTransport, (channel) => {
bridge.value = channel.objects.bridge;
});
};
export function usePythonBridge() {
const bridge = ref(null);
// 初始化 QWebChannel
const initBridge = () => {
new QWebChannel(qt.webChannelTransport, (channel) => {
bridge.value = channel.objects.bridge;
});
};
// 调用 Python 方法
const fetchDataConfig = (data) => {