We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
下面是触发bug的表格代码:
<el-table-column v-for="(item,index) in tableTitleTree" :key="item.key" :label="item.label" align="center" min-width="200" :fixed="spanMethod ? ( index === 0 || index === 1) ? 'left':false : index === 0 ? 'left':false " > <el-table-column :label="item.list[0].label" :prop="`${item.list[0].key}`" align="center" min-width="200" show-overflow-tooltip > <template slot-scope="scope"> <el-input v-if="(item.list[0].type === 3 && scope.row.type === 1 && hasPermissionToEdit ) && isEditStatus" v-model.trim="scope.row[item.list[0].key]" :autofocus="true" placeholder="请输入" /> <span v-else>{{ scope.row[item.list[0].key] }}</span> </template> </el-table-column> <el-table-column v-for="Sitem in item.list.slice(1)" :key="Sitem.key" :prop="`${Sitem.key}`" :label="Sitem.label" align="center" min-width="200" show-overflow-tooltip > <template slot-scope="scope"> <el-input v-if="(Sitem.type === 3 && scope.row.type === 1 && hasPermissionToEdit ) && isEditStatus" v-model.trim="scope.row[Sitem.key]" :autofocus="true" placeholder="请输入" /> <span v-else>{{ scope.row[Sitem.key]}}</span> </template> </el-table-column> </el-table-column> </el-table>
如果 :autofocus="true"那么在第一次进入页面时,进入编辑状态后会导致输入框的所在表格移位到其他表格中,导致页面单元格错乱,但是再进行一次浏览器刷新后,再进入编辑状态后输入框就恢复正常了。 formData: { handler (newVal) { const { tableData, tableTitle, tableTitleTree } = newVal if (tableData || tableTitle) { this.tableTitle = tableTitle.map((item) => { return { ...item, key: item.key.toString(), } }) this.tableData = JSON.parse(JSON.stringify(tableData)) this.tableTitleTree = JSON.parse(JSON.stringify(tableTitleTree)) this.changedData = JSON.parse(JSON.stringify(tableData)) } }, deep: true, immediate: true, },
The text was updated successfully, but these errors were encountered:
No branches or pull requests
下面是触发bug的表格代码:
如果 :autofocus="true"那么在第一次进入页面时,进入编辑状态后会导致输入框的所在表格移位到其他表格中,导致页面单元格错乱,但是再进行一次浏览器刷新后,再进入编辑状态后输入框就恢复正常了。
formData: {
handler (newVal) {
const { tableData, tableTitle, tableTitleTree } = newVal
if (tableData || tableTitle) {
this.tableTitle = tableTitle.map((item) => {
return {
...item,
key: item.key.toString(),
}
})
this.tableData = JSON.parse(JSON.stringify(tableData))
this.tableTitleTree = JSON.parse(JSON.stringify(tableTitleTree))
this.changedData = JSON.parse(JSON.stringify(tableData))
}
},
deep: true,
immediate: true,
},
The text was updated successfully, but these errors were encountered: