fix: 修复表格default-expand-all属性无效BUG
This commit is contained in:
parent
9c44006ec2
commit
6657bbc9f1
|
@ -89,7 +89,7 @@ export default defineComponent({
|
||||||
type: [Function, Object] as PropType<
|
type: [Function, Object] as PropType<
|
||||||
(row: Recordable, rowIndex: number) => Recordable | CSSProperties
|
(row: Recordable, rowIndex: number) => Recordable | CSSProperties
|
||||||
>,
|
>,
|
||||||
default: () => undefined
|
default: undefined
|
||||||
},
|
},
|
||||||
cellClassName: {
|
cellClassName: {
|
||||||
type: [Function, String] as PropType<
|
type: [Function, String] as PropType<
|
||||||
|
@ -101,7 +101,7 @@ export default defineComponent({
|
||||||
type: [Function, Object] as PropType<
|
type: [Function, Object] as PropType<
|
||||||
(row: Recordable, column: any, rowIndex: number) => Recordable | CSSProperties
|
(row: Recordable, column: any, rowIndex: number) => Recordable | CSSProperties
|
||||||
>,
|
>,
|
||||||
default: () => undefined
|
default: undefined
|
||||||
},
|
},
|
||||||
headerRowClassName: {
|
headerRowClassName: {
|
||||||
type: [Function, String] as PropType<(row: Recordable, rowIndex: number) => string | string>,
|
type: [Function, String] as PropType<(row: Recordable, rowIndex: number) => string | string>,
|
||||||
|
@ -111,7 +111,7 @@ export default defineComponent({
|
||||||
type: [Function, Object] as PropType<
|
type: [Function, Object] as PropType<
|
||||||
(row: Recordable, rowIndex: number) => Recordable | CSSProperties
|
(row: Recordable, rowIndex: number) => Recordable | CSSProperties
|
||||||
>,
|
>,
|
||||||
default: () => undefined
|
default: undefined
|
||||||
},
|
},
|
||||||
headerCellClassName: {
|
headerCellClassName: {
|
||||||
type: [Function, String] as PropType<
|
type: [Function, String] as PropType<
|
||||||
|
@ -123,14 +123,14 @@ export default defineComponent({
|
||||||
type: [Function, Object] as PropType<
|
type: [Function, Object] as PropType<
|
||||||
(row: Recordable, column: any, rowIndex: number) => Recordable | CSSProperties
|
(row: Recordable, column: any, rowIndex: number) => Recordable | CSSProperties
|
||||||
>,
|
>,
|
||||||
default: () => undefined
|
default: undefined
|
||||||
},
|
},
|
||||||
rowKey: propTypes.string.def('id'),
|
rowKey: propTypes.string.def('id'),
|
||||||
emptyText: propTypes.string.def('No Data'),
|
emptyText: propTypes.string.def('No Data'),
|
||||||
defaultExpandAll: propTypes.bool.def(false),
|
defaultExpandAll: propTypes.bool.def(false),
|
||||||
expandRowKeys: {
|
expandRowKeys: {
|
||||||
type: Array as PropType<string[]>,
|
type: Array as PropType<string[]>,
|
||||||
default: () => []
|
default: undefined
|
||||||
},
|
},
|
||||||
defaultSort: {
|
defaultSort: {
|
||||||
type: Object as PropType<{ prop: string; order: string }>,
|
type: Object as PropType<{ prop: string; order: string }>,
|
||||||
|
@ -490,7 +490,6 @@ export default defineComponent({
|
||||||
if (props?.slots?.header) {
|
if (props?.slots?.header) {
|
||||||
slots['header'] = (...args: any[]) => props.slots.header(...args)
|
slots['header'] = (...args: any[]) => props.slots.header(...args)
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ElTableColumn
|
<ElTableColumn
|
||||||
showOverflowTooltip={showOverflowTooltip}
|
showOverflowTooltip={showOverflowTooltip}
|
||||||
|
|
|
@ -258,7 +258,9 @@ const getSelections = async () => {
|
||||||
v-model:currentPage="currentPage"
|
v-model:currentPage="currentPage"
|
||||||
showAction
|
showAction
|
||||||
showSummary
|
showSummary
|
||||||
|
default-expand-all
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
|
row-key="id"
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:pagination="
|
:pagination="
|
||||||
|
|
Loading…
Reference in New Issue