@xuda.io/xuda-worker-bundle 1.3.2621 → 1.3.2623
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +13 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -278,8 +278,9 @@ func.runtime.platform.set_title = function (title) {
|
|
|
278
278
|
}
|
|
279
279
|
};
|
|
280
280
|
func.runtime.platform.set_cursor = function (element, cursor) {
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
const node = func.runtime.ui?.get_first_node ? func.runtime.ui.get_first_node(element) : element;
|
|
282
|
+
if (node?.style) {
|
|
283
|
+
node.style.cursor = cursor;
|
|
283
284
|
}
|
|
284
285
|
};
|
|
285
286
|
|
|
@@ -2000,10 +2001,12 @@ func.common.get_data_from_websocket = async function (SESSION_ID, serviceP, data
|
|
|
2000
2001
|
} else {
|
|
2001
2002
|
if (RUNTIME_SERVER_WEBSOCKET && RUNTIME_SERVER_WEBSOCKET_CONNECTED) {
|
|
2002
2003
|
RUNTIME_SERVER_WEBSOCKET.emit('message', obj);
|
|
2003
|
-
|
|
2004
|
+
const _ws_event = 'get_ws_data_response_' + glb.websocket_queue_num;
|
|
2005
|
+
const _ws_handler = function (data) {
|
|
2004
2006
|
resolve(data.data);
|
|
2005
|
-
|
|
2006
|
-
}
|
|
2007
|
+
func.runtime.platform.off('get_ws_data_response_' + data.e.websocket_queue_num, _ws_handler);
|
|
2008
|
+
};
|
|
2009
|
+
func.runtime.platform.on(_ws_event, _ws_handler);
|
|
2007
2010
|
} else {
|
|
2008
2011
|
throw new Error('fail to fetch from ws websocket inactive');
|
|
2009
2012
|
}
|
|
@@ -2017,10 +2020,11 @@ func.common.get_data_from_websocket = async function (SESSION_ID, serviceP, data
|
|
|
2017
2020
|
|
|
2018
2021
|
if (RUNTIME_SERVER_WEBSOCKET && RUNTIME_SERVER_WEBSOCKET_CONNECTED) {
|
|
2019
2022
|
RUNTIME_SERVER_WEBSOCKET.emit('message', obj);
|
|
2020
|
-
|
|
2023
|
+
const _hb_handler = function (data) {
|
|
2021
2024
|
resolve(data.data);
|
|
2022
|
-
|
|
2023
|
-
}
|
|
2025
|
+
func.runtime.platform.off('heartbeat_response', _hb_handler);
|
|
2026
|
+
};
|
|
2027
|
+
func.runtime.platform.on('heartbeat_response', _hb_handler);
|
|
2024
2028
|
} else {
|
|
2025
2029
|
throw new Error('fail to fetch from ws websocket inactive');
|
|
2026
2030
|
}
|
|
@@ -7572,7 +7576,7 @@ func.events.execute = async function (
|
|
|
7572
7576
|
var field_elm = elementP;
|
|
7573
7577
|
|
|
7574
7578
|
var calling_field_id = field_elm;
|
|
7575
|
-
if (field_elm && typeof field_elm === 'object') calling_field_id =
|
|
7579
|
+
if (field_elm && typeof field_elm === 'object') calling_field_id = func.runtime.ui.get_attr(field_elm, 'xu-ui-id');
|
|
7576
7580
|
|
|
7577
7581
|
var log_nodeId;
|
|
7578
7582
|
var log_prog_id;
|