|
@ -19,7 +19,7 @@ |
|
|
header-row-class-name="uTableHeader" |
|
|
header-row-class-name="uTableHeader" |
|
|
> |
|
|
> |
|
|
<!-- :tree-props="treeProps" 与 “height” 不能共存, 此组件暂不支持tree的格式--> |
|
|
<!-- :tree-props="treeProps" 与 “height” 不能共存, 此组件暂不支持tree的格式--> |
|
|
<!-- 操作列 --> |
|
|
<!-- 操作列 (左侧)--> |
|
|
<u-table-column |
|
|
<u-table-column |
|
|
v-if="buttonOperationList_left" |
|
|
v-if="buttonOperationList_left" |
|
|
:fixed="'left'" |
|
|
:fixed="'left'" |
|
@ -40,6 +40,28 @@ |
|
|
>{{itemButton.label}}</el-button> |
|
|
>{{itemButton.label}}</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</u-table-column> |
|
|
</u-table-column> |
|
|
|
|
|
<!-- 操作列 (右侧)--> |
|
|
|
|
|
<u-table-column |
|
|
|
|
|
v-if="buttonOperationList_right" |
|
|
|
|
|
:fixed="'right'" |
|
|
|
|
|
:width="120" |
|
|
|
|
|
:align="'center'" |
|
|
|
|
|
:header-align="'center'" |
|
|
|
|
|
> |
|
|
|
|
|
<template #header> |
|
|
|
|
|
<span>操作</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-button |
|
|
|
|
|
v-for="(itemButton, indexButton) in buttonOperationList_right(scope.row)" |
|
|
|
|
|
v-show="!itemButton.hide" |
|
|
|
|
|
:key="indexButton" |
|
|
|
|
|
type="text" |
|
|
|
|
|
size="mini" |
|
|
|
|
|
@click="buttonOperationClick_right(scope.row, itemButton, indexButton)" |
|
|
|
|
|
>{{itemButton.label}}</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</u-table-column> |
|
|
<u-table-column v-if="selectionTable" fixed="left" type="selection" :reserve-selection="true" /> |
|
|
<u-table-column v-if="selectionTable" fixed="left" type="selection" :reserve-selection="true" /> |
|
|
<u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" /> |
|
|
<u-table-column v-if="isShowIndex" type="index" fixed="left" label="序号" width="50" /> |
|
|
<template v-for="(item, index) in TableSize"> |
|
|
<template v-for="(item, index) in TableSize"> |
|
@ -441,11 +463,16 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
// 操作列按钮 |
|
|
// 操作列按钮(左侧) |
|
|
buttonOperationList_left:{ |
|
|
buttonOperationList_left:{ |
|
|
type: Array, |
|
|
type: Array, |
|
|
default: null, |
|
|
default: null, |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 操作列按钮(右侧) |
|
|
|
|
|
buttonOperationList_right:{ |
|
|
|
|
|
type: Function, |
|
|
|
|
|
default: null, |
|
|
|
|
|
}, |
|
|
// 超出内容是否提示 |
|
|
// 超出内容是否提示 |
|
|
showOverflowTooltip:{ |
|
|
showOverflowTooltip:{ |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
@ -880,10 +907,14 @@ export default { |
|
|
buttonClick(row, index, label) { |
|
|
buttonClick(row, index, label) { |
|
|
this.$emit("buttonClick", row, index, label); |
|
|
this.$emit("buttonClick", row, index, label); |
|
|
}, |
|
|
}, |
|
|
//点击table操作列按钮 |
|
|
//点击table操作列(左侧)按钮 |
|
|
buttonOperationClick_left(row, item, index) { |
|
|
buttonOperationClick_left(row, item, index) { |
|
|
this.$emit("buttonOperationClick_left", row, item, index); |
|
|
this.$emit("buttonOperationClick_left", row, item, index); |
|
|
}, |
|
|
}, |
|
|
|
|
|
//点击table操作列(右侧)按钮 |
|
|
|
|
|
buttonOperationClick_right(row, item, index) { |
|
|
|
|
|
this.$emit("buttonOperationClick_right", row, item, index); |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|