| | |
| | | @current-change="currentChange" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <template v-if="isSelection"> |
| | | <el-table-column type="selection" width="55" /> |
| | | </template> |
| | | <template> |
| | | <el-table-column type="selection" width="55" v-if="isSelection" /> |
| | | <el-table-column |
| | | align="center" |
| | | label="序号" |
| | |
| | | width="60" |
| | | :index="indexMethod" |
| | | /> |
| | | </template> |
| | | |
| | | <template v-for="(item, index) in column"> |
| | | <el-table-column |
| | | v-for="(item, index) in column" |
| | | :key="index" |
| | | :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" |
| | | :filter-multiple="item.filterMultiple" |
| | |
| | | </div> |
| | | <!-- 图片 --> |
| | | <div v-else-if="item.dataType == 'image'"> |
| | | <img :src="javaApi+'/img/'+item.prop" |
| | | alt="" style="width: 40px;height: 40px;margin-top: 10px;"> |
| | | <img |
| | | :src="javaApi + '/img/' + item.prop" |
| | | alt="" |
| | | style="width: 40px; height: 40px; margin-top: 10px" |
| | | /> |
| | | </div> |
| | | |
| | | <!-- tag --> |
| | |
| | | " |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</el-tag |
| | | >{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag |
| | | > |
| | | <el-tag |
| | | v-for="(tag, index) in dataTypeFn( |
| | |
| | | v-else |
| | | :title="scope.row[item.prop] | formatters(item.formatData)" |
| | | :type="formatType(scope.row[item.prop], item.formatType)" |
| | | >{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | | }}</el-tag |
| | | >{{ scope.row[item.prop] | formatters(item.formatData) }}</el-tag |
| | | > |
| | | </div> |
| | | |
| | |
| | | :style="{ color: o.name === '删除' ? '#f56c6c' : o.color }" |
| | | :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" |
| | | :key="key" |
| | | > |
| | | {{ o.name }} |
| | | </el-button> |
| | |
| | | :auto-upload="false" |
| | | :on-exceed="onExceed" |
| | | :show-file-list="false" |
| | | :key="key" |
| | | > |
| | | <el-button |
| | | :size="o.size ? o.size : 'small'" |
| | |
| | | </template> |
| | | </div> |
| | | <!-- 默认纯展示数据 --> |
| | | <div v-else> |
| | | <div v-else class="cell" style="width: 100%"> |
| | | <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> |
| | | <span v-else>{{ |
| | | scope.row[item.prop] | formatters(item.formatData) |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </el-table> |
| | | <pagination |
| | | v-show="page.total > 0" |
| | |
| | | .el-table >>> .el-table__empty-text { |
| | | text-align: center; |
| | | } |
| | | .cell { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | padding-right: 4px; |
| | | padding-left: 4px; |
| | | } |
| | | >>> .cell { |
| | | padding: 0 !important; |
| | | } |
| | | </style> |