测试版终
This commit is contained in:
@@ -1,15 +1,16 @@
|
|||||||
// pythonBridge.js
|
// pythonBridge.js
|
||||||
import { ref, onMounted } from 'vue';
|
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() {
|
export function usePythonBridge() {
|
||||||
const bridge = ref(null);
|
|
||||||
|
|
||||||
// 初始化 QWebChannel
|
|
||||||
const initBridge = () => {
|
|
||||||
new QWebChannel(qt.webChannelTransport, (channel) => {
|
|
||||||
bridge.value = channel.objects.bridge;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 调用 Python 方法
|
// 调用 Python 方法
|
||||||
const fetchDataConfig = (data) => {
|
const fetchDataConfig = (data) => {
|
||||||
|
|||||||
@@ -254,6 +254,8 @@ const submit = () => {
|
|||||||
getHostTimer.value = setInterval(() => {
|
getHostTimer.value = setInterval(() => {
|
||||||
fetchDataCount().then((res) => {
|
fetchDataCount().then((res) => {
|
||||||
hostData.value = JSON.parse(res);
|
hostData.value = JSON.parse(res);
|
||||||
|
tkaccountuse(tkData.value[0].account, 0)
|
||||||
|
tkaccountuse(tkData.value[1].account, 1)
|
||||||
})
|
})
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user