🐛(table): typescript 警告
This commit is contained in:
parent
be94f818a9
commit
0058721468
@ -20,7 +20,7 @@ export interface LayTableRowProps {
|
|||||||
expandSpace: boolean;
|
expandSpace: boolean;
|
||||||
expandIndex: number;
|
expandIndex: number;
|
||||||
selectedKeys: Recordable[];
|
selectedKeys: Recordable[];
|
||||||
selectedKey: any;
|
selectedKey: string;
|
||||||
tableColumnKeys: Recordable[];
|
tableColumnKeys: Recordable[];
|
||||||
childrenColumnName?: string;
|
childrenColumnName?: string;
|
||||||
columns: Recordable[];
|
columns: Recordable[];
|
||||||
@ -73,7 +73,7 @@ const tableSelectedKeys: WritableComputedRef<Recordable[]> = computed({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const tableSelectedKey: WritableComputedRef<Recordable[]> = computed({
|
const tableSelectedKey: WritableComputedRef<string> = computed({
|
||||||
get() {
|
get() {
|
||||||
return props.selectedKey;
|
return props.selectedKey;
|
||||||
},
|
},
|
||||||
|
@ -34,7 +34,7 @@ export interface LayTableProps {
|
|||||||
columns: Recordable[];
|
columns: Recordable[];
|
||||||
dataSource: Recordable[];
|
dataSource: Recordable[];
|
||||||
defaultToolbar?: boolean;
|
defaultToolbar?: boolean;
|
||||||
selectedKey?: any;
|
selectedKey?: string;
|
||||||
selectedKeys?: Recordable[];
|
selectedKeys?: Recordable[];
|
||||||
indentSize?: number;
|
indentSize?: number;
|
||||||
childrenColumnName?: string;
|
childrenColumnName?: string;
|
||||||
@ -58,6 +58,7 @@ const props = withDefaults(defineProps<LayTableProps>(), {
|
|||||||
childrenColumnName: "children",
|
childrenColumnName: "children",
|
||||||
dataSource: () => [],
|
dataSource: () => [],
|
||||||
selectedKeys: () => [],
|
selectedKeys: () => [],
|
||||||
|
selectedKey: '',
|
||||||
maxHeight: "auto",
|
maxHeight: "auto",
|
||||||
even: false,
|
even: false,
|
||||||
rowClassName: "",
|
rowClassName: "",
|
||||||
@ -117,7 +118,7 @@ watch(
|
|||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
const tableSelectedKey: WritableComputedRef<Recordable[]> = computed({
|
const tableSelectedKey: WritableComputedRef<string> = computed({
|
||||||
get() {
|
get() {
|
||||||
return props.selectedKey;
|
return props.selectedKey;
|
||||||
},
|
},
|
||||||
@ -318,10 +319,10 @@ const getFixedColumn = () => {
|
|||||||
hasr.value = true;
|
hasr.value = true;
|
||||||
} else {
|
} else {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
if (
|
const t = tableBody.value?.scrollLeft + tableBody.value?.offsetWidth + 2;
|
||||||
tableBody.value?.scrollLeft + tableBody.value?.offsetWidth + 2 >
|
const s = tableBody.value?.scrollWidth;
|
||||||
tableBody.value?.scrollWidth
|
// @ts-ignore
|
||||||
) {
|
if (t > s) {
|
||||||
hasl.value = true;
|
hasl.value = true;
|
||||||
hasr.value = false;
|
hasr.value = false;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user