verce-vue-test 0.0.113 → 0.0.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "verce-vue-test",
3
- "version": "0.0.113",
3
+ "version": "0.0.114",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -821,6 +821,26 @@ td {
821
821
  .shibor-section th:nth-child(5) { width: 16%; }
822
822
  .shibor-section th:nth-child(6) { width: 16%; }
823
823
 
824
+ .shibor-section thead {
825
+ position: relative;
826
+ z-index: 1;
827
+ }
828
+
829
+ .shibor-section tbody.is-looping {
830
+ animation: shibor-table-loop var(--shibor-scroll-duration) linear infinite;
831
+ will-change: transform;
832
+ }
833
+
834
+ .shibor-section .table-shell:hover tbody.is-looping {
835
+ animation-play-state: paused;
836
+ }
837
+
838
+ @keyframes shibor-table-loop {
839
+ to {
840
+ transform: translate3d(0, -50%, 0);
841
+ }
842
+ }
843
+
824
844
  .monitor-section th:nth-child(1) { width: 38%; }
825
845
  .monitor-section th:nth-child(2) { width: 36%; }
826
846
  .monitor-section th:nth-child(3) { width: 26%; }
@@ -334,7 +334,7 @@ const gaugeCards = computed<GaugeCard[]>(() => [
334
334
  ])
335
335
 
336
336
  const shiborRows = computed<ShiborRow[]>(() =>
337
- shiborRecords.value.slice(0, 4).map((item) => {
337
+ shiborRecords.value.map((item) => {
338
338
  const useAssetFtp = Boolean(String(item.zcFtp ?? '').trim())
339
339
  return {
340
340
  date: displayText(item.dateDt),
@@ -347,6 +347,17 @@ const shiborRows = computed<ShiborRow[]>(() =>
347
347
  }),
348
348
  )
349
349
 
350
+ const isShiborLooping = computed(() => shiborRows.value.length > 4)
351
+ const shiborDisplayRows = computed(() =>
352
+ isShiborLooping.value ? [...shiborRows.value, ...shiborRows.value] : shiborRows.value,
353
+ )
354
+ const shiborScrollStyle = computed<Record<string, string> | undefined>(() => {
355
+ if (!isShiborLooping.value) return undefined
356
+ return {
357
+ '--shibor-scroll-duration': `${Math.max(shiborRows.value.length * 2.5, 12)}s`,
358
+ }
359
+ })
360
+
350
361
  const projectMetricRows = computed<ProjectMetricRow[]>(() => [
351
362
  { project: '同业负债占比', dataTime: displayText(interbankRecord.value.tyfzzbTime), current: displayText(interbankRecord.value.tyfzzb) },
352
363
  { project: '同业活期存款余额', dataTime: displayText(interbankRecord.value.tyhqckyeTime), current: displayText(interbankRecord.value.tyhqckye) },
@@ -1244,8 +1255,14 @@ onUnmounted(() => {
1244
1255
  <th>比上日(BP)</th>
1245
1256
  </tr>
1246
1257
  </thead>
1247
- <tbody>
1248
- <tr v-for="row in shiborRows" :key="`${row.date}-${row.term}`">
1258
+ <tbody
1259
+ :class="{ 'is-looping': isShiborLooping }"
1260
+ :style="shiborScrollStyle"
1261
+ >
1262
+ <tr
1263
+ v-for="(row, index) in shiborDisplayRows"
1264
+ :key="`${row.date}-${row.term}-${index}`"
1265
+ >
1249
1266
  <td>{{ row.date }}</td>
1250
1267
  <td>{{ row.term }}</td>
1251
1268
  <td>{{ row.shibor }}</td>