From 1a5d32ee47a086247dec5cd7f3fde28700c6b187 Mon Sep 17 00:00:00 2001
From: zhang_12370 <z2864490065@outlook.com>
Date: 星期三, 02 七月 2025 20:39:41 +0800
Subject: [PATCH] 提交设备管理模块

---
 src/components/Table/table.vue |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/src/components/Table/table.vue b/src/components/Table/table.vue
new file mode 100644
index 0000000..01509b1
--- /dev/null
+++ b/src/components/Table/table.vue
@@ -0,0 +1,39 @@
+<template>
+  <el-table :data="tableData" :column="columnss" style="width: 100%">
+    <el-table-column type="index" width="50">
+      <template #default="scope">
+        {{ getRowIndex(scope.$index) }}
+      </template>
+    </el-table-column>
+    <el-table-column
+      v-for="(item, index) in columnss"
+      :key="index"
+      :prop="item.prop"
+      :label="item.label"
+      :align="item.align || 'center'"
+      :min-width="item.minWidth || '100px'"
+      :width="item.width"
+      :fixed="item.fixed || false"
+      :show-overflow-tooltip="showOverflowTooltip || true"
+    >
+    </el-table-column>
+  </el-table>
+</template>
+<script setup>
+import { ref, onMounted, watch, nextTick } from "vue";
+
+const props = defineProps({
+  tableData: {
+    type: Array,
+    default: () => [],
+  },
+  columnss: {
+    type: Array,
+    default: () => [],
+  },
+});
+const getRowIndex = (index) => {
+  return index + 1;
+};
+</script>
+<style scoped></style>

--
Gitblit v1.9.3