Commit f102c826 authored by chenqikuai's avatar chenqikuai

fix: 修复错误提示

parent 4f5fe512
...@@ -128,7 +128,10 @@ export default Vue.extend({ ...@@ -128,7 +128,10 @@ export default Vue.extend({
this.initTimer() this.initTimer()
}, },
moveBlock(i: number, b: boolean) { moveBlock(i: number, b: boolean) {
if(!this.$refs.box)return;
const el = (this.$refs.box as any & { style: () => any })?.style const el = (this.$refs.box as any & { style: () => any })?.style
// 当第四个点时回归原始translate // 当第四个点时回归原始translate
if (b) { if (b) {
el.transform = `translate3d(-${this.l_width * (i - 2)}px, 0, 0)` el.transform = `translate3d(-${this.l_width * (i - 2)}px, 0, 0)`
......
...@@ -97,8 +97,9 @@ export default Vue.extend({ ...@@ -97,8 +97,9 @@ export default Vue.extend({
} }
info.map((i: any) => { info.map((i: any) => {
Rpc.getBlockHash(i.height).then((ret) => { Rpc.getBlockHash(i.height).then((ret) => {
this.Blocks.find((block) => block.height === i.height).hash = (
ret.result.hash; this.Blocks.find((block) => block.height === i.height) || {}
).hash = ret.result.hash;
this.Blocks = [...this.Blocks]; this.Blocks = [...this.Blocks];
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment