fix(p94): 「我的提交」编辑/删除按钮死链——Vue 2 风格渲染函数在 view-ui-plus 下 on: 不绑定
build / build (push) Successful in 3m22s
build / build (push) Successful in 3m22s
- 160 演练实测:填报页「我的提交」表点编辑/删除无任何反应(无 my/detail 请求、
无弹层)——Fill.vue 操作列用 h('Button', { props: {...}, on: { click } }) 的
Vue 2/view-design 语法;Vue 3 的 h() 第二参即 props,on: 被当未知属性丢弃,
按钮可渲染但点击处理器从未绑定。T7/T8 冒烟未覆盖这两颗按钮(点击断言缺位)。
- 修复:沿 tableActions 的 P51 文字链形态——operating-link/text-error div +
onClick 直挂(与数据管理等页操作列同构)。全仓扫 props:/on: 渲染残留=仅此一处
(UserCheckModal 的 props: 为 Options API 合法定义)。
- 验证:vue-tsc --noEmit 干净;vite build 通过。160 侧 UI 复验随下次部署
(修复前先用 API 完成 my/edit、my/delete 行为验证,见演练报告)。
This commit is contained in:
+4
-8
@@ -374,16 +374,12 @@ const readonlyReason = computed(() => {
|
||||
title: '操作',
|
||||
key: 'actions',
|
||||
width: 150,
|
||||
// P94:Vue 3 渲染函数不带 props/on 包装(view-ui-plus 下 on: 不绑定=按钮死链),
|
||||
// 沿 tableActions 的文字链形态 operating-link,onClick 直挂
|
||||
render: (_h: any, { row }: any) => {
|
||||
return h('div', { class: 'action-buttons' }, [
|
||||
h('Button', {
|
||||
props: { type: 'text', size: 'small' },
|
||||
on: { click: () => handleEditAnswer(row) }
|
||||
}, '编辑'),
|
||||
h('Button', {
|
||||
props: { type: 'text', size: 'small', color: 'error' },
|
||||
on: { click: () => handleDeleteAnswer(row) }
|
||||
}, '删除')
|
||||
h('div', { class: 'operating-link', onClick: () => handleEditAnswer(row) }, '编辑'),
|
||||
h('div', { class: 'operating-link text-error', onClick: () => handleDeleteAnswer(row) }, '删除')
|
||||
]);
|
||||
}
|
||||
}]" :data="myAnswers" border></Table>
|
||||
|
||||
Reference in New Issue
Block a user