给 Node 页面添加了 本节点打包的区块列表模板。
给 各页面都读入了页头的数据,如IP地址,邻居数量。
This commit is contained in:
@@ -89,8 +89,10 @@ import Vue from 'vue'
|
||||
import store from '../store'
|
||||
import VueSocketio from 'vue-socket.io'
|
||||
import io from 'socket.io-client'
|
||||
|
||||
const { mapState, mapGetters, mapActions, mapMutations } = createNamespacedHelpers('chain')
|
||||
Vue.use(VueSocketio, io('http://localhost:6842'), store)
|
||||
|
||||
Vue.use(VueSocketio, io(`http://${window.location.hostname}:6842/api/`), store) // todo: luk: 整个控制台应当依赖于同一个全局的节点地址变量。
|
||||
|
||||
export default {
|
||||
name: 'Chain',
|
||||
@@ -114,9 +116,6 @@ export default {
|
||||
this.addNewBlock(msg)
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.queryBlockList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
@@ -130,6 +129,11 @@ export default {
|
||||
'addDesserts',
|
||||
]),
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.queryBlockList()
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -165,7 +169,7 @@ export default {
|
||||
margin: 0 20px;
|
||||
|
||||
.search-input {
|
||||
width: 400px;
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user