Bläddra i källkod

fix(KeepView组件): 修复KeepView组件初次加载时,数据不更新的BUG

fxs 6 månader sedan
förälder
incheckning
fbc0418485

+ 4 - 4
index.html

@@ -2,11 +2,11 @@
 <html lang="en">
   <head>
     <meta charset="UTF-8" />
-    <link rel="icon" href="/logoTest.svg" />
-    <!-- <link rel="icon" href="/logo.svg" /> -->
+    <!-- <link rel="icon" href="/logoTest.svg" /> -->
+    <link rel="icon" href="/logo.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <!-- <title>淳皓游戏管理平台</title> -->
-    <title>测试库-游戏管理平台</title>
+    <title>淳皓游戏管理平台</title>
+    <!-- <title>测试库-游戏管理平台</title> -->
   </head>
   <body>
     <div id="app"></div>

+ 7 - 2
src/components/table/CustomTable.vue

@@ -2,7 +2,7 @@
  * @Author: fxs bjnsfxs@163.com
  * @Date: 2024-08-20 18:16:18
  * @LastEditors: fxs bjnsfxs@163.com
- * @LastEditTime: 2024-12-03
+ * @LastEditTime: 2024-12-04
  * @Description: 
  * 
 -->
@@ -115,8 +115,10 @@ const loadTableData = async (): Promise<boolean> => {
   loading.value = true
 
   try {
+    console.log('执行')
     // 如果是直接传入的数据
     if (props.dataList) {
+      console.log('执行')
       tableData.splice(0, tableData.length, ...props.dataList)
       if (props.paginationConfig) {
         paginationConfig.total = props.paginationConfig.total
@@ -338,7 +340,9 @@ const watchPf = watch(
 const changeDataList = watch(
   () => [props.dataList],
   () => {
-    filterFormRef.value?.throttleResetQuery()
+    // console.log('执行')
+    getData()
+    // filterFormRef.value?.throttleResetQuery()
   },
   {
     deep: true
@@ -486,6 +490,7 @@ onMounted(() => {
         v-loading="loading"
         :row-key="createRowKey()"
         @sort-change="tableSortChange"
+        @query="throttleGetData"
         table-layout="auto"
       >
         <el-table-column

+ 10 - 1
src/views/Home/AdvertisingData/AdvertisingList.vue

@@ -2,6 +2,14 @@
  * @Author: fxs bjnsfxs@163.com
  * @Date: 2024-11-29
  * @LastEditors: fxs bjnsfxs@163.com
+ * @LastEditTime: 2024-12-05
+ * @Description: 
+ * 
+-->
+<!--
+ * @Author: fxs bjnsfxs@163.com
+ * @Date: 2024-11-29
+ * @LastEditors: fxs bjnsfxs@163.com
  * @LastEditTime: 2024-12-03
  * @Description: 
  * 
@@ -201,7 +209,8 @@ const queryInfo = reactive<Array<QueryInfo>>([
 ])
 
 const headerCardInfo: HeaderCardProps = {
-  title: '广告数据(正式服数据)',
+  // title: '广告数据(正式服数据)',
+  title: '广告数据',
   openDateSelect: true
 }
 

+ 1 - 1
src/views/Home/AdvertisingData/AdvertisingOverview.vue

@@ -100,7 +100,7 @@ watchPageChange(() => [selectInfo.pf, selectInfo.gid], backupSelect, updateSelec
     <div class="adOverviewHeader">
       <HeaderCard
         :open-date-select="true"
-        :title="'广告数据总览(正式服数据)'"
+        :title="'广告数据总览'"
         @change-date="changeDate"
       ></HeaderCard>
       <!--      :title="'广告数据总览(正式服数据)'"-->

+ 2 - 1
src/views/Home/Analysis/KeepView.vue

@@ -2,7 +2,7 @@
  * @Author: fxs bjnsfxs@163.com
  * @Date: 2024-08-27 17:11:23
  * @LastEditors: fxs bjnsfxs@163.com
- * @LastEditTime: 2024-11-25
+ * @LastEditTime: 2024-12-05
  * @Description: 
  * 
 -->
@@ -164,6 +164,7 @@ const getTableData = () => {
           }
           keepTableData.splice(0, keepTableData.length, ...newList)
           keepDataTableInfo.paginationConfig.total = newList.length
+          console.log(keepTableData)
         })
         .finally(() => {
           loading.value = false

+ 12 - 4
src/views/IndexView.vue

@@ -2,6 +2,14 @@
  * @Author: fxs bjnsfxs@163.com
  * @Date: 2024-09-18
  * @LastEditors: fxs bjnsfxs@163.com
+ * @LastEditTime: 2024-12-05
+ * @Description: 
+ * 
+-->
+<!--
+ * @Author: fxs bjnsfxs@163.com
+ * @Date: 2024-09-18
+ * @LastEditors: fxs bjnsfxs@163.com
  * @LastEditTime: 2024-12-04
  * @Description: 
  * 
@@ -119,8 +127,8 @@ const changeNavBar = (val: string) => {
 
 // 资源的加载路径
 const resourceInfo: Record<string, string> = {
-  // logo: `/img/logo.svg`,
-  logo: `/img/logoTest.svg`,
+  logo: `/img/logo.svg`,
+  // logo: `/img/logoTest.svg`,
   defaultHead: `/img/default/defaultHead.png`
 }
 
@@ -252,8 +260,8 @@ onMounted(() => {
       <div class="navBarBox">
         <div class="logoBox">
           <el-image :fit="'fill'" class="logoImg" :src="blobUrlInfo.logo"></el-image>
-          <span class="logoTitle">测试库</span>
-          <!-- <span class="logoTitle">淳皓科技</span> -->
+          <!-- <span class="logoTitle">测试库</span> -->
+          <span class="logoTitle">淳皓科技</span>
         </div>
 
         <div class="gameSelect">