代码格式化

This commit is contained in:
Theluyuan 2023-02-17 11:35:23 +08:00
parent 0df15d84de
commit e734ad64f0

View File

@ -57,7 +57,7 @@ const props = withDefaults(defineProps<TableRowProps>(), {
const tableExpandAll = ref(props.defaultExpandAll); const tableExpandAll = ref(props.defaultExpandAll);
const editIndex:any = ref({}) const editIndex: any = ref({});
const tableExpandKeys: WritableComputedRef<Recordable[]> = computed({ const tableExpandKeys: WritableComputedRef<Recordable[]> = computed({
get() { get() {
@ -608,8 +608,16 @@ const radioProps = props.getRadioProps(props.data, props.index);
</lay-tooltip> </lay-tooltip>
<template v-else> <template v-else>
<template v-if="column.edit"> <template v-if="column.edit">
<span v-if="!editIndex[columnIndex]"> {{ data[column.key] }} </span> <span v-if="!editIndex[columnIndex]">
<lay-input :autofocus="true" v-model="data[column.key]" v-else @keyup.enter = "editIndex[columnIndex] = false" @blur="editIndex[columnIndex] = false"></lay-input> {{ data[column.key] }}
</span>
<lay-input
:autofocus="true"
v-model="data[column.key]"
v-else
@keyup.enter="editIndex[columnIndex] = false"
@blur="editIndex[columnIndex] = false"
></lay-input>
</template> </template>
<span v-else> {{ data[column.key] }} </span> <span v-else> {{ data[column.key] }} </span>
</template> </template>
@ -683,9 +691,8 @@ const radioProps = props.getRadioProps(props.data, props.index);
</template> </template>
</template> </template>
<style scoped> <style scoped>
.layui-table-cell :deep(.layui-input input){ .layui-table-cell :deep(.layui-input input) {
padding-left: 0; padding-left: 0;
} }
</style> </style>