表格设置完成
This commit is contained in:
parent
277eac69f2
commit
8cb52b4cad
@ -10,7 +10,7 @@
|
||||
<template>
|
||||
<div class="scTable" :style="{'height':_height}" ref="scTableMain" v-loading="loading">
|
||||
<div class="scTable-table" :style="{'height':_table_height}">
|
||||
<el-table v-bind="$attrs" :header-cell-style="{'background': '#F5F7FA','color':'#606266'}" :data="tableData" :row-key="rowKey" :key="toggleIndex" ref="scTable" :height="height=='auto'?null:'100%'" :size="config.size" :border="config.border" :stripe="config.stripe" :summary-method="remoteSummary?remoteSummaryMethod:summaryMethod" @sort-change="sortChange" @filter-change="filterChange">
|
||||
<el-table v-bind="$attrs" :header-cell-style="{'background': '#F5F7FA','color':'#606266'}" :data="tableData" :row-key="rowKey" :key="toggleIndex" ref="scTable" :height="height=='auto'?null:'100%'" :size="config.size" :border="config.config.border" :stripe="config.config.stripe" :summary-method="remoteSummary?remoteSummaryMethod:summaryMethod" @sort-change="sortChange" @filter-change="filterChange">
|
||||
<slot></slot>
|
||||
<template v-for="(item, index) in userColumn" :key="index">
|
||||
<!-- item.showOverflowTooltip-->
|
||||
@ -53,8 +53,8 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="样式">
|
||||
<el-checkbox v-model="config.border" label="纵向边框"></el-checkbox>
|
||||
<el-checkbox v-model="config.stripe" label="斑马纹"></el-checkbox>
|
||||
<el-checkbox v-model="config.config.border" label="纵向边框" @change="configSizeChange"></el-checkbox>
|
||||
<el-checkbox v-model="config.config.stripe" label="斑马纹" @change="configSizeChange"></el-checkbox>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-popover>
|
||||
@ -137,8 +137,10 @@
|
||||
summary: {},
|
||||
config: {
|
||||
size: this.size,
|
||||
border: this.border,
|
||||
stripe: this.stripe
|
||||
config:{
|
||||
border: this.border,
|
||||
stripe: this.stripe
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -213,6 +215,9 @@
|
||||
if(response.data.columnConfig){
|
||||
this.userColumn = response.data.columnConfig; // 表头获取
|
||||
}
|
||||
if(response.data.tableConfig && response.data.tableConfig.size){
|
||||
this.config = response.data.tableConfig;
|
||||
}
|
||||
this.total = response.total || 0;
|
||||
this.summary = response.summary || {};
|
||||
this.loading = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user