This commit is contained in:
2023-02-16 13:55:34 +08:00
parent dda349419d
commit d3b3161574
4 changed files with 109 additions and 57 deletions

View File

@@ -57,6 +57,8 @@ const props = withDefaults(defineProps<TableRowProps>(), {
const tableExpandAll = ref(props.defaultExpandAll);
const editIndex:any = ref({})
const tableExpandKeys: WritableComputedRef<Recordable[]> = computed({
get() {
return [...props.expandKeys];
@@ -603,8 +605,16 @@ const radioProps = props.getRadioProps(props.data, props.index);
>
{{ data[column.key] }}
</lay-tooltip>
<template v-else>
<template v-if="column.edit">
<span v-if="editIndex[columnIndex] == false" @click="editIndex[columnIndex] = true"> {{ data[column.key] }} </span>
<lay-input v-model="data[column.key]" v-else @keyup.enter = "editIndex[columnIndex] = false" @blur="editIndex[columnIndex] = false"></lay-input>
</template>
<template v-esle>
<span> {{ data[column.key] }} </span>
</template>
<span v-else> {{ data[column.key] }} </span>
</template>
</div>
</td>
</template>