Эх сурвалжийг харах

refactor(product-manage): 优化商品管理模块多个组件的展示效果和功能

- 调整图片加载方式,移除 lazy属性
- 优化表格展示,移除多余的 VerticalDivider 组件
- 添加商品详情页链接,提升用户体验
- 调整卡片样式,增加 border-none 类
- 优化图表展示,使用 v-show 替代 v-if
- 修复商品标题链接,添加 target="_blank" 属性
WanGxC 6 сар өмнө
parent
commit
4e1d8698af

+ 0 - 1
src/views/product-manage/comment-detail/component/DataTable.vue

@@ -196,7 +196,6 @@ defineExpose({ fetchList });
         </el-row>
       </div>
     </div>
-    <VerticalDivider />
     <div class="flex gap-1.5 ml-5">
       <el-button :icon="Search" :loading="btnLoading" type="primary" @click="handleQuery">
         查 询

+ 1 - 1
src/views/product-manage/comment-detail/component/NegativeLabelChart.vue

@@ -135,7 +135,7 @@ function setOption() {
 </script>
 
 <template>
-  <el-card v-loading="loading" class="border-none" shadow="never">
+  <el-card v-loading="loading" class="border-none" shadow="hover">
     <!-- 空状态 和 词云图 -->
     <div class="w-full" style="min-height: 400px">
       <div v-show="!loading && !hasData" style="min-height: 400px">

+ 1 - 1
src/views/product-manage/comment-detail/component/TitleCard.vue

@@ -37,6 +37,7 @@ const { img, url, title, asin } = props;
       <div class="flex flex-col justify-between">
         <el-link :href="url"
                  :underline="false"
+                 target="_blank"
                  style="font-size: 18px;justify-content: left !important;"
                  :disabled="!title"
                  type="primary">
@@ -46,7 +47,6 @@ const { img, url, title, asin } = props;
           <div class="font-semibold italic">{{ asin }}</div>
           <VerticalDivider />
           <el-button :icon="DocumentCopy" link class="ml-2 cursor-pointer" :disabled="!asin" @click="handleCopy(asin || '')">
-            
           </el-button>
           <!--<el-icon class="ml-2 cursor-pointer" @click="handleCopy(asin || '')">-->
           <!--  <DocumentCopy />-->

+ 2 - 1
src/views/product-manage/competitor-monitor/component/DataTableSlot.vue

@@ -68,7 +68,8 @@ function goto() {
     query: {
       asin: row.asin,
       title: row.goods.title,
-      img: row.goods.img
+      img: row.goods.img,
+      url: row.goods.url
     }
   });
   window.open(routeUrl.href, '_blank');

+ 2 - 2
src/views/product-manage/historical-detail/component/ChangeValue.vue

@@ -39,13 +39,13 @@ const formatedVal = computed(() => {
           <el-image
               :src="`https://m.media-amazon.com/images/I/${img}.jpg`"
               fit="fill"
-              lazy
+              
               style="width: 40px; margin-right: 5px;"
           />
           <template #content>
             <el-image
                 :src="`https://m.media-amazon.com/images/I/${img}.jpg`"
-                lazy
+                
                 style="width: 250px"
             />
           </template>

+ 1 - 1
src/views/product-manage/historical-detail/component/PriceChart.vue

@@ -133,7 +133,7 @@ async function fetchChartData() {
 <template>
   <el-card class="border-none mt-2">
     <div v-show="chartData.length > 0" ref="chartRef" class="chart"></div>
-    <el-empty v-if="chartData.length == 0" description="暂无数据" class="chart" />
+    <el-empty v-show="chartData.length == 0" description="暂无数据" class="chart" />
   </el-card>
 </template>
 

+ 1 - 4
src/views/product-manage/historical-detail/index.vue

@@ -18,9 +18,6 @@ const props = defineProps({
 });
 const { rowData, title } = props;
 
-const heightObj = { topBar: 50, cardMargin: 8, cardPadding: 20 };
-const { tableHeight } = useTableHeight(heightObj);
-
 
 </script>
 
@@ -34,7 +31,7 @@ const { tableHeight } = useTableHeight(heightObj);
         direction="btt"
         size="85%"
         style="background-color:#F3F4FB;">
-      <div class="sticky top-0" style="background-color:#F3F4FB; min-height: 20px; z-index: 999"></div>
+      <div class="sticky top-0" style="background-color:#F3F4FB; min-height: 20px; z-index: 99"></div>
       <div class="px-5">
         <PriceChart :asin="rowData.asin" :country="rowData.country_code" />
         <DataTable :asin="rowData.asin" :country="rowData.country_code" />

+ 2 - 1
src/views/product-manage/product-monitor/component/DataTableSlot.vue

@@ -48,7 +48,8 @@ function goto() {
     query: {
       asin: row.asin,
       title: row.goods.title,
-      img: row.goods.img
+      img: row.goods.img,
+      url: row.goods.url
     }
   });
   window.open(routeUrl.href, '_blank');