Переглянути джерело

样式覆盖问题i需改

Koishi 3 роки тому
батько
коміт
ed5fe247ee

+ 2 - 2
src/assets/styles/el-override/el-table.less

@@ -1,6 +1,6 @@
 // el-table
-.main-body {
-  .custom-table.el-table {
+.main-body,.df-table {
+  .el-table,.custom-table.el-table {
     background: transparent;
     border: 0px;
 

+ 25 - 3
src/components/coms/table/table2.vue

@@ -1,5 +1,12 @@
 <template>
-  <el-table class="custom-table" stripe :data="data.data" :height="height" style="width: 100%" @cell-click="onClick">
+  <el-table
+    class="custom-table"
+    stripe
+    :data="data.data"
+    :height="height"
+    style="width: 100%"
+    @cell-click="onClick"
+  >
     <el-table-column
       v-for="col in data.column"
       :key="col"
@@ -14,11 +21,26 @@
       :header-align="'center'"
     >
       <template v-if="col.slot == true" #default="item">
-        <slot :name="col.field" :column="col" :row="item.row" :all="item" :data="item.row[col.field]"></slot>
+        <slot
+          :name="col.field"
+          :column="col"
+          :row="item.row"
+          :all="item"
+          :data="item.row[col.field]"
+        ></slot>
       </template>
     </el-table-column>
   </el-table>
-  <el-pagination class="mg-t-8" v-if="pageable" @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize" :total="data.total" v-bind="elPaggingProps"> </el-pagination>
+  <el-pagination
+    class="mg-t-8"
+    v-if="pageable"
+    @current-change="handleCurrentChange"
+    :current-page="currentPage"
+    :page-size="pageSize"
+    :total="data.total"
+    v-bind="elPaggingProps"
+  >
+  </el-pagination>
 </template>
 
 <script>