Bladeren bron

refactor(live-stream, lss): enhance component formatting for improved readability

- Consolidated attributes in various components, including el-table, el-pagination, and el-drawer, to streamline the code structure.
- Reduced unnecessary line breaks and improved overall formatting in both live-stream and LSS views for better maintainability.
- Enhanced user experience by maintaining a clean and organized layout across the components.
yb 6 dagen geleden
bovenliggende
commit
bb22e6af1b
2 gewijzigde bestanden met toevoegingen van 11 en 5 verwijderingen
  1. 10 4
      src/views/live-stream/index.vue
  2. 1 1
      src/views/lss/index.vue

+ 10 - 4
src/views/live-stream/index.vue

@@ -89,9 +89,15 @@
         </el-table-column>
         <el-table-column :label="t('操作')" align="center" fixed="right">
           <template #default="{ row }">
-            <el-button :icon="VideoPlay" type="primary" link @click="handleViewCloudflare(row)"></el-button>
-            <el-button type="primary" :icon="Edit" link @click="handleEdit(row)"></el-button>
-            <el-button type="danger" :icon="Delete" link @click="handleDelete(row)"></el-button>
+            <el-button type="primary" link @click="handleViewCloudflare(row)">
+              <Icon icon="mdi:play" width="20" height="20" />
+            </el-button>
+            <el-button type="primary" link @click="handleEdit(row)">
+              <Icon icon="mdi:edit" width="20" height="20" />
+            </el-button>
+            <el-button type="danger" link @click="handleDelete(row)">
+              <Icon icon="mdi:delete" width="20" height="20" />
+            </el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -406,7 +412,7 @@ import {
 import { listLiveStreams, addLiveStream, updateLiveStream, deleteLiveStream } from '@/api/live-stream'
 import { listAllLssNodes } from '@/api/lss'
 import { adminListCameras } from '@/api/camera'
-
+import { Icon } from '@iconify/vue'
 import { startStreamTask, stopStreamTask, getStreamPlayback } from '@/api/stream-push'
 import VideoPlayer from '@/components/VideoPlayer.vue'
 import CodeEditor from '@/components/CodeEditor.vue'

+ 1 - 1
src/views/lss/index.vue

@@ -264,7 +264,7 @@
                   <el-button
                     :tooltip="t('查看Cloudflare Stream')"
                     link
-                    :class="['crosshairs-btn', { active: !row.streamSn }]"
+                    :class="['crosshairs-btn', { active: row.streamSn }]"
                     @click="handleViewCamera(row)"
                   >
                     <Icon icon="mdi:crosshairs" width="20" height="20" />