fix 空白点击

This commit is contained in:
Theluyuan 2023-02-16 14:23:57 +08:00
parent 560115644c
commit 4afba8dd1a
7 changed files with 129 additions and 120 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -566,6 +566,7 @@ const radioProps = props.getRadioProps(props.data, props.index);
renderCellClassName(data, column, index, columnIndex),
column.fixed ? `layui-table-fixed-${column.fixed}` : '',
]"
@click="editIndex[columnIndex] = true"
>
<div
style="display: flex"
@ -607,7 +608,7 @@ const radioProps = props.getRadioProps(props.data, props.index);
</lay-tooltip>
<template v-else>
<template v-if="column.edit">
<span v-if="!editIndex[columnIndex]" @click="editIndex[columnIndex] = true"> {{ data[column.key] }} </span>
<span v-if="!editIndex[columnIndex]"> {{ 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>
<span v-else> {{ data[column.key] }} </span>
@ -681,3 +682,10 @@ const radioProps = props.getRadioProps(props.data, props.index);
</template>
</template>
</template>
<style scoped>
.layui-table-cell :deep(.layui-input input){
padding-left: 0;
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long