+ edit
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user