|
@@ -4,8 +4,9 @@ import utils from "../../../utils/index"
|
|
|
import "../../../assets/style/CommonBigScreenHome.css"
|
|
|
|
|
|
function ListeningRate(prop) {
|
|
|
- onMount(() => { })
|
|
|
-
|
|
|
+ let len = Math.ceil((prop.list.length || 0) / 2);
|
|
|
+ onMount(() => { })
|
|
|
+
|
|
|
return (
|
|
|
<div class="livRang" style={{
|
|
|
width: `${prop.width}px`
|
|
@@ -22,7 +23,7 @@ function ListeningRate(prop) {
|
|
|
<div style={{
|
|
|
height: `${prop.height - 42}px`,
|
|
|
}}>
|
|
|
- <For each={prop.list}>{(item, i) => <div class="tr trColor" style={{ display: i() + 1 > 6 ? 'none' : 'flex' }}>
|
|
|
+ <For each={prop.list}>{(item, i) => <Show when={i() + 1 <= len}><div class="tr trColor" style={{ display: 'flex' }}>
|
|
|
<div class='td'>{i() + 1}</div>
|
|
|
<Show when={item.activity.length > 11}>
|
|
|
<marquee class='td' style={{ "flex": "2", "min-width": "0" }}>
|
|
@@ -35,7 +36,7 @@ function ListeningRate(prop) {
|
|
|
</dev>
|
|
|
</Show>
|
|
|
<div class='td'>{utils.formatNum(item.readCount)}</div>
|
|
|
- </div>}</For>
|
|
|
+ </div></Show>}</For>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="table">
|
|
@@ -47,7 +48,7 @@ function ListeningRate(prop) {
|
|
|
<div style={{
|
|
|
height: `${prop.height - 42}px`,
|
|
|
}}>
|
|
|
- <For each={prop.list}>{(item, i) => <div class="tr trColor" style={{ display: i() + 1 <= 6 ? 'none' : 'flex' }}>
|
|
|
+ <For each={prop.list}>{(item, i) => <Show when={i() + 1 > len}><div class="tr trColor" style={{ display: 'flex' }}>
|
|
|
<div class='td'>{i() + 1}</div>
|
|
|
<Show when={item.activity.length > 11}>
|
|
|
<marquee class='td' style={{ "flex": "2", "min-width": "0" }}>
|
|
@@ -60,7 +61,7 @@ function ListeningRate(prop) {
|
|
|
</dev>
|
|
|
</Show>
|
|
|
<div class='td'>{utils.formatNum(item.readCount)}</div>
|
|
|
- </div>}</For>
|
|
|
+ </div></Show>}</For>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|