优化界面

This commit is contained in:
刘祥超
2021-12-12 11:58:16 +08:00
parent 085770d0ad
commit 4dd6903025

View File

@@ -209,7 +209,7 @@ Vue.component("traffic-map-box", {
<tbody v-if="screenIsNarrow"> <tbody v-if="screenIsNarrow">
<tr> <tr>
<td colspan="2"> <td colspan="2">
<traffic-map-box-table :v-stats="stats" :v-is-attack="isAttack" @select="select"></traffic-map-box-table> <traffic-map-box-table :v-stats="stats" :v-is-attack="isAttack" :v-screen-is-narrow="true" @select="select"></traffic-map-box-table>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -218,7 +218,7 @@ Vue.component("traffic-map-box", {
}) })
Vue.component("traffic-map-box-table", { Vue.component("traffic-map-box-table", {
props: ["v-stats", "v-is-attack"], props: ["v-stats", "v-is-attack", "v-screen-is-narrow"],
data: function () { data: function () {
return { return {
stats: this.vStats, stats: this.vStats,
@@ -230,7 +230,7 @@ Vue.component("traffic-map-box-table", {
this.$emit("select", {countryName: countryName}) this.$emit("select", {countryName: countryName})
} }
}, },
template: `<div style="overflow-y: auto; max-height: 16em" class="narrow-scrollbar"> template: `<div style="overflow-y: auto" :style="{'max-height':vScreenIsNarrow ? 'auto' : '16em'}" class="narrow-scrollbar">
<table class="ui table selectable"> <table class="ui table selectable">
<thead> <thead>
<tr> <tr>