给 Node 页面添加了 本节点打包的区块列表模板。
给 各页面都读入了页头的数据,如IP地址,邻居数量。
This commit is contained in:
@@ -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: {},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user