lcw
This commit is contained in:
@ -8,9 +8,8 @@
|
||||
:stripe="getConfiger.stripe" :height="tableHeight" v-loading="tableConfiger.loading" :lazy="getConfiger.lazy"
|
||||
:load="load" :tree-props="treePros" style="width: 100%" :header-cell-class-name="() => 'HeadBgColor'"
|
||||
:highlight-current-row="getConfiger.showSelectType === 'radio'"
|
||||
|
||||
|
||||
@row-click="handleRowClick"
|
||||
@cell-click="handleCellClick"
|
||||
:row-style="(row, index) => getRowStyle(row, index)"
|
||||
:row-class-name="(row, index) => getRowClassName(row, index)">
|
||||
|
||||
@ -98,7 +97,7 @@ const props = defineProps({
|
||||
}
|
||||
});
|
||||
// 可选的时候选择的数据
|
||||
const emit = defineEmits(["chooseData","handleRowClick"]);
|
||||
const emit = defineEmits(["chooseData","handleRowClick","handleCellClick"]);
|
||||
const multipleTableRef = ref();
|
||||
const currentRow = ref();
|
||||
let getConfiger = reactive({
|
||||
@ -160,7 +159,6 @@ const load = (date, treeNode, resolve) => {
|
||||
const getRowStyle = (row, index) => {
|
||||
// 基础行高样式
|
||||
const baseStyle = { height: getConfiger.rowHeight === 'auto' ? getConfiger.rowHeight : getConfiger.rowHeight + 'px' };
|
||||
|
||||
// 如果有自定义行样式函数,合并样式
|
||||
if (props.rowStyle) {
|
||||
const customStyle = props.rowStyle(row, index);
|
||||
@ -200,6 +198,9 @@ function setDefaultChoose() {
|
||||
const handleRowClick = (row) => {
|
||||
emit("handleRowClick", row);
|
||||
}
|
||||
const handleCellClick = (row,column,event,cell) => {
|
||||
emit("handleCellClick", {row,column,event,cell});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss"></style>
|
||||
|
||||
Reference in New Issue
Block a user