소스 검색

修复表格样式继承问题

zhangqiOMG 2 년 전
부모
커밋
95e6fa25d7
2개의 변경된 파일6개의 추가작업 그리고 18개의 파일을 삭제
  1. 4 4
      src/components/normal-basic-layout/index.vue
  2. 2 14
      src/components/normal-basic-layout/modules/table.vue

+ 4 - 4
src/components/normal-basic-layout/index.vue

@@ -39,15 +39,15 @@
         <slot name="tableLeft"></slot>
         <div style="flex:0 1 auto;width: 100%;" v-if="listType === 'table' && refreshTable">
           <tableTemp ref="table" :layout="tableLayout" :tableName="tableName" :custom="true" :data="list" :fixRightData="fixRightData" :fixLeftData="fixLeftData" @headerSearch="onHeaderSearch" @checkboxCallBack="checkboxCallBack">
+             <template v-slot:temp="scope">
+              <slot name="tempChild" :data="scope.data"></slot>
+            </template>
             
             <template v-slot:customcol="scope">
               <slot :data="scope" name="tbList"></slot>
             </template>
 
-            <template v-slot:temp="scope">
-              <slot name="tempChild" :data="scope.data"></slot>
-            </template>
-            
+           
             <template v-slot:opreation="scope">
               <drawerTemp class="inline-16" v-if="detailPath" :data="scope.data" :detailPath="detailPath" :idName="idName" @onSuccess="listData"></drawerTemp>
               <slot :data="scope" name="tbOpreation"></slot>

+ 2 - 14
src/components/normal-basic-layout/modules/table.vue

@@ -11,23 +11,11 @@
         align="center"
         @handleSelectionChange="handleSelectionChange">
       </el-table-column>
-      <el-table-column  v-for="(col) in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width ? col.width : 0" :min-width="col.width ? col.width : 0" :fixed="checkFixed(col.columnname)">
+      <el-table-column  v-for="(col) in layout" :key="col.tablecolid">
         <template #header>
           
           <el-input v-if="col.filter === 1" size="mini" v-model="col.value" @change="inputChange" @keyup.native.enter="headerSearch(col.columnname)" @clear="headerSearch(col.columnname)" clearable/>
-          <!-- <p style="margin-top:5px" class="search-title">{{ col.title }}</p> -->
-          <!-- <div v-else class="flex-align-center flex-between" >
-            <span class="search-title">{{ col.title }}</span>
-            <i class="search-icon el-icon-search" v-if="col.filter === 1" @click="(act_column = col.columnname,show = true)"></i>
-          </div> -->
-          <!-- <el-popover placement="bottom-start" trigger="click"  v-if="col.filter === 1">
-            <div slot="reference" class="search-header flex-align-center">
-                <span class="search-title">{{ col.title }}</span>&nbsp;
-                <el-button size="mini" type="text" icon="el-icon-search"></el-button>
-            </div>
-            <el-input size="mini" v-model="value" :placeholder="'请输入' + col.title" @keyup.native.enter="headerSearch(col.columnname)" @clear="headerSearch(col.columnname)" clearable/>
-          </el-popover> -->
-          <!-- <span v-else class="search-title">{{ col.title }}</span> -->
+
           
         <slot v-if="col.filter === 2" name="temp" :data="col.columnname"></slot>