-
-
Save swt02026/4f44a7155c80a239b8b545d9b09bc3dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Our Code World Rocks</title> | |
<link rel="stylesheet" href="node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.css"> | |
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css"> | |
<script src="node_modules/vue/dist/vue.js"></script> | |
<script src="node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.min.js"></script> | |
</head> | |
<body> | |
<div id="msglist"> | |
<RecycleScroller :items="msgs" :item-height="40"> | |
<div slot-scope="{ item }">{{ item.msg }}</div> | |
</RecycleScroller> | |
</div> | |
<script> | |
Vue.component('RecycleScroller', VueVirtualScroller.RecycleScroller); | |
'use strict'; | |
let msglist = new Vue({ | |
el: '#msglist', | |
data: { | |
msgs: [] | |
} | |
}); | |
const {ipcRenderer} = require('electron'); | |
ipcRenderer.on('update_msg', (event, msg_list)=>{ | |
msglist.msgs.push(...msg_list); | |
}); | |
ipcRenderer.on('update_log',(event, log_content)=>{ | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment