From 0796eebe3520fafb0ac5d36ee584af81506d7e9c Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期六, 20 九月 2025 14:05:52 +0800
Subject: [PATCH] 2025.9.20 数据产品(待完成)

---
 src/views/fysp/data-product/components/CompImgInfo.vue |   62 +++++++++++++++++++++++++-----
 1 files changed, 51 insertions(+), 11 deletions(-)

diff --git a/src/views/fysp/data-product/components/CompImgInfo.vue b/src/views/fysp/data-product/components/CompImgInfo.vue
index 5fcfd7e..48a0b51 100644
--- a/src/views/fysp/data-product/components/CompImgInfo.vue
+++ b/src/views/fysp/data-product/components/CompImgInfo.vue
@@ -4,15 +4,19 @@
       <tr v-if="!downTitle">
         <td>
           <el-row justify="space-between" align="middle">
-            {{ title }}
-            <el-button size="small" @click="$emit('change')">{{
-              btnName
-            }}</el-button>
+            <!-- {{ title }} -->
+            <el-input
+              size="small"
+              :model-value="title"
+              @input="handleInputChange"
+              placeholder="鏍囬"
+              style="width: 150px"
+            />
           </el-row>
         </td>
       </tr>
       <tr>
-        <td>
+        <td style="position: relative">
           <el-image
             class="image"
             :src="imgSrc"
@@ -20,16 +24,31 @@
             :initial-index="0"
             fit="cover"
             lazy
-          />
+          >
+            <template #error>
+              <div class="image-slot">
+                <el-button type="primary" size="small" @click="$emit('change')"
+                  >閫夋嫨鍥剧墖</el-button
+                >
+              </div>
+            </template>
+          </el-image>
+          <el-button class="pop-button" size="small" @click="$emit('change')">{{
+            btnName
+          }}</el-button>
         </td>
       </tr>
       <tr v-if="downTitle">
         <td>
           <el-row justify="space-between" align="middle">
-            {{ title }}
-            <el-button size="small" @click="$emit('change')">{{
-              btnName
-            }}</el-button>
+            <!-- {{ title }} -->
+            <el-input
+              size="small"
+              :model-value="title"
+              @input="handleInputChange"
+              placeholder="鏍囬"
+              style="width: 150px"
+            />
           </el-row>
         </td>
       </tr>
@@ -50,7 +69,13 @@
   }
 });
 
-const emit = defineEmits(['change']);
+// const unchangeImg = '../../../../assets/image/unchange.png'
+
+const emit = defineEmits(['change', 'update:title']);
+
+function handleInputChange(value) {
+  emit('update:title', value);
+}
 </script>
 <style scoped>
 .image {
@@ -77,4 +102,19 @@
   border-style: solid;
   border-color: #666666; */
 }
+
+.image-slot {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 100%;
+  height: 100%;
+  background: var(--el-fill-color-light);
+}
+
+.pop-button {
+  position: absolute;
+  bottom: 0;
+  right: 0;
+}
 </style>

--
Gitblit v1.9.3