✨(all): update
This commit is contained in:
parent
e5fd1c6995
commit
dfe2d372b3
@ -9,6 +9,7 @@ import { computed, ref, useSlots, WritableComputedRef } from "vue";
|
|||||||
import { Recordable } from "../../types";
|
import { Recordable } from "../../types";
|
||||||
|
|
||||||
export interface LayTableRowProps {
|
export interface LayTableRowProps {
|
||||||
|
expandSpace: boolean;
|
||||||
selectedKeys: Recordable[];
|
selectedKeys: Recordable[];
|
||||||
tableColumnKeys: Recordable[];
|
tableColumnKeys: Recordable[];
|
||||||
columns: Recordable[];
|
columns: Recordable[];
|
||||||
@ -26,7 +27,7 @@ const emit = defineEmits([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
const props = withDefaults(defineProps<LayTableRowProps>(), {
|
const props = withDefaults(defineProps<LayTableRowProps>(), {
|
||||||
checkbox: false
|
checkbox: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const tableSelectedKeys: WritableComputedRef<Recordable[]> = computed({
|
const tableSelectedKeys: WritableComputedRef<Recordable[]> = computed({
|
||||||
@ -166,6 +167,7 @@ const handleExpand = () => {
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:checkbox="checkbox"
|
:checkbox="checkbox"
|
||||||
:tableColumnKeys="tableColumnKeys"
|
:tableColumnKeys="tableColumnKeys"
|
||||||
|
:expandSpace="expandSpace"
|
||||||
@row="rowClick"
|
@row="rowClick"
|
||||||
@row-double="rowDoubleClick"
|
@row-double="rowDoubleClick"
|
||||||
@contextmenu="contextmenu"
|
@contextmenu="contextmenu"
|
||||||
|
@ -362,11 +362,7 @@
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layui-table-cell-expand-icon-none {
|
.layui-table-cell-expand-icon-spaced {
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.layui-table-cell-expand-icon-hidden {
|
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,6 +207,15 @@ props.columns.map((value: any) => {
|
|||||||
slotsData.value.push(value.customSlot);
|
slotsData.value.push(value.customSlot);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// is tree
|
||||||
|
const childrenExpandSpace = ref(false);
|
||||||
|
|
||||||
|
props.dataSource.map((value: any) => {
|
||||||
|
if(value.children) {
|
||||||
|
childrenExpandSpace.value = true;
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -324,6 +333,7 @@ props.columns.map((value: any) => {
|
|||||||
:columns="columns"
|
:columns="columns"
|
||||||
:checkbox="checkbox"
|
:checkbox="checkbox"
|
||||||
:tableColumnKeys="tableColumnKeys"
|
:tableColumnKeys="tableColumnKeys"
|
||||||
|
:expandSpace="childrenExpandSpace"
|
||||||
@row="rowClick"
|
@row="rowClick"
|
||||||
@row-double="rowDoubleClick"
|
@row-double="rowDoubleClick"
|
||||||
@contextmenu="contextmenu"
|
@contextmenu="contextmenu"
|
||||||
|
Loading…
Reference in New Issue
Block a user