update:yt

This commit is contained in:
zhangjianjun 2026-04-23 13:55:23 +08:00
parent 174b9ba7b3
commit 423254fc4b
2 changed files with 29 additions and 59 deletions

View File

@ -210,27 +210,13 @@ const data: TableData = {
name: '权重',
sort: "desc",
width: '200px',
// editor: {
// type: "input",
// subFun(self, data, row) {
// return self.api?.updateData({ ...data, id: String(data.id), })
// },
// },
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
if(v !== value) {
self.api?.updateData({
...row,
category_id: String(row.category_id),
id: String(row.id),
weight: String(v),
})
}
}} />
}
editor: {
type: "input",
subFun(self, data, row) {
self.api?.updateData({ ...data, id: String(data.id), })
return Promise.reject()
},
},
},
{
key: 'table_tools',

View File

@ -291,34 +291,18 @@ const data: TableData = {
name: '权重',
width: '120px',
sort: 'desc',
// editor: {
// type: 'input',
// subFun(self, data, row) {
// return self.api?.updateData({
// 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) {
editor: {
type: 'input',
subFun(self, data, row) {
self.api?.updateData({
id: String(row.id),
id: String(data.id),
category_id: String(row.category_id),
weight: String(v),
weight: data.weight,
pinned: String(row.pinned),
cover_show: row.covers_show
})
return Promise.reject()
}
}} />
}
},
{