This commit is contained in:
zhangjianjun 2026-04-23 11:57:37 +08:00
parent f2f3f99e8f
commit 651fc7337e
1 changed files with 29 additions and 12 deletions

View File

@ -289,19 +289,36 @@ const data: TableData = {
{ {
key: 'weight', key: 'weight',
name: '权重', name: '权重',
width: '100px', width: '120px',
sort: 'desc', sort: 'desc',
editor: { // editor: {
type: 'input', // type: 'input',
subFun(self, data, row) { // subFun(self, data, row) {
return self.api?.updateData({ // return self.api?.updateData({
id: String(data.id), // id: String(data.id),
// category_id: String(row.category_id),
// weight: data.weight,
// pinned: String(row.pinned),
// cover_show: row.covers_show
// })
// }
// }
renderBodyCell({row, column, rowIndex, self}) {
const key = column.columnKey
const value = row[key]
return <el-input vModel={value} size="small" onBlur={(e: any) => {
const v = e.target.value
console.log(v, value)
if(v !== value) {
self.api?.updateData({
id: String(row.id),
category_id: String(row.category_id), category_id: String(row.category_id),
weight: data.weight, weight: String(v),
pinned: String(row.pinned), pinned: String(row.pinned),
cover_show: row.covers_show cover_show: row.covers_show
}) })
} }
}} />
} }
}, },
{ {