Commit 4e5d0bc6 authored by wxk's avatar wxk

表格数据单位后端控制,切换路由刷新滚动条

parent 29850592
...@@ -443,7 +443,7 @@ ...@@ -443,7 +443,7 @@
<el-table-column <el-table-column
label="手续费"> label="手续费">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.fee }}</span> <span>{{ scope.row.fee || '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -710,10 +710,6 @@ ...@@ -710,10 +710,6 @@
this.total = result.count; this.total = result.count;
if (result.list) { if (result.list) {
this.list = result.list.map(item => { this.list = result.list.map(item => {
const unit = item.opt === "0" ? item.symbol.split('/')[1] : item.symbol.split('/')[0];
item.price = item.price + unit;
item.sum = item.sum + unit;
item.fee = item.fee + unit;
item.opt = item.opt==="0" ? "买入" : "卖出"; item.opt = item.opt==="0" ? "买入" : "卖出";
return item; return item;
}) })
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="aside"> <div class="aside">
<nav-left :platInfo="platInfo"></nav-left> <nav-left :platInfo="platInfo"></nav-left>
</div> </div>
<div class="main"> <div class="main" ref="mainBox">
<router-view :platInfo="platInfo"></router-view> <router-view :platInfo="platInfo"></router-view>
</div> </div>
</div> </div>
...@@ -58,6 +58,11 @@ ...@@ -58,6 +58,11 @@
} }
}) })
}, },
},
watch: {
$route() {
this.$refs.mainBox.scrollTop = 0;
}
} }
} }
</script> </script>
......
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