给 Node 页面添加了 本节点打包的区块列表模板。

给 各页面都读入了页头的数据,如IP地址,邻居数量。
This commit is contained in:
luk.lu
2018-11-28 16:38:52 +08:00
parent aca23682ca
commit f70e5bd73d
11 changed files with 241 additions and 55 deletions

View File

@@ -1,7 +1,46 @@
export default {
import axios from 'axios'
export default {
namespaced: true,
state: {},
mutations: {},
actions: {},
state: {
pageEntity: [5, 10, 25],
headers: [
{ text: 'node.thHeight', value: 'height', align: 'center' },
{ text: 'node.thTimestamp', value: 'timestamp', align: 'center' },
{ text: 'node.thType', value: 'type', align: 'center' },
{ text: 'node.thHash', value: 'hash', align: 'center' },
],
desserts: [
{
height: '1',
timestamp: '2011-11-20',
type: '0',
hash: 'null',
},
],
fetching: false,
filter: '',
modal: false,
ipAddress: '',
},
mutations: {
inputFilter(state, filter) {
state.filter = filter
},
updateIpAddress(state, ipAddress) {
state.ipAddress = ipAddress
},
updateDesserts(state, desserts) {
state.desserts = desserts
},
},
actions: {
updateNodeInfo({ state, commit }) {
commit('updateIpAddress', axios.defaults.baseURL)
},
},
getters: {},
}