0
<script>
$(function(){
var ws_scheme = window.location.protocol == "https:" ? "wss": "ws";
var ws_path = ws_scheme + "://" + window.location.host + "/dashboard";
console.log("Connecting to " + ws_path);
var socket = new ReconnectingWebSocket(ws_path);
socket.onmessage = function (message) {
// Decode the JSON
console.log("Got websocket message " + message.data);
var display = '<div class="uk-alert uk-alert-success">'+ message.data + "</div>";
console.log("Got websocket message " + display);
UIkit.notify({
message : display,
status : 'info',
timeout : 0,
pos : 'top-center'
});
}
});
</script>
對於以下代碼段,UI工具包notify將在屏幕左下角顯示通知。 它不會改變,如果我可以到其他位置possible values.UI工具包通知pos問題
我必須做一些非常愚蠢的事情。任何幫助表示讚賞。
不知道我有多少次可能忽視它。謝謝。 –