fix(render): 修复表格内点击无响应(Vue2 on:{click} → Vue3 onClick)
班级管理「班主任/副班主任/校区」三列、任教管理操作列用的是
h(..., { on: { click: fn } })。Vue3 不再识别 on 对象,事件根本没绑上,
所以点单元格毫无反应。改为顶层 onClick(含带 stopPropagation 的清空按钮),
treeMixin 的树节点点击同步修正。
This commit is contained in:
@@ -365,9 +365,7 @@ style: { width: '150px' }})
|
||||
cursor: 'pointer',
|
||||
margin: '0 auto'
|
||||
},
|
||||
on: {
|
||||
click: () => this.openTeacherSelect(params.index, 'headTeacher')
|
||||
}
|
||||
onClick: () => this.openTeacherSelect(params.index, 'headTeacher')
|
||||
}, [
|
||||
h('span', {
|
||||
style: {
|
||||
@@ -391,8 +389,7 @@ style: { width: '150px' }})
|
||||
flexShrink: 0,
|
||||
fontSize: '14px'
|
||||
},
|
||||
on: {
|
||||
click: (e) => {
|
||||
onClick: (e) => {
|
||||
e.stopPropagation()
|
||||
var item={
|
||||
id:params.row.id,
|
||||
@@ -407,7 +404,6 @@ style: { width: '150px' }})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, '×') : null
|
||||
])
|
||||
}
|
||||
@@ -428,9 +424,7 @@ style: { width: '150px' }})
|
||||
cursor: 'pointer',
|
||||
margin: '0 auto'
|
||||
},
|
||||
on: {
|
||||
click: () => this.openTeacherSelect(params.index, 'secondTeacherName')
|
||||
}
|
||||
onClick: () => this.openTeacherSelect(params.index, 'secondTeacherName')
|
||||
}, [
|
||||
h('span', {
|
||||
style: {
|
||||
@@ -454,8 +448,7 @@ style: { width: '150px' }})
|
||||
flexShrink: 0,
|
||||
fontSize: '14px'
|
||||
},
|
||||
on: {
|
||||
click: (e) => {
|
||||
onClick: (e) => {
|
||||
e.stopPropagation()
|
||||
var item={
|
||||
id:params.row.id,
|
||||
@@ -470,7 +463,6 @@ style: { width: '150px' }})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, '×') : null
|
||||
])
|
||||
}
|
||||
@@ -491,9 +483,7 @@ style: { width: '150px' }})
|
||||
cursor: 'pointer',
|
||||
margin: '0 auto'
|
||||
},
|
||||
on: {
|
||||
click: () => this.openCampusSelect(params.index)
|
||||
}
|
||||
onClick: () => this.openCampusSelect(params.index)
|
||||
}, [
|
||||
h('span', {
|
||||
style: {
|
||||
@@ -517,8 +507,7 @@ style: { width: '150px' }})
|
||||
flexShrink: 0,
|
||||
fontSize: '14px'
|
||||
},
|
||||
on: {
|
||||
click: (e) => {
|
||||
onClick: (e) => {
|
||||
e.stopPropagation()
|
||||
var item={
|
||||
id:params.row.id,
|
||||
@@ -533,7 +522,6 @@ style: { width: '150px' }})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, '×') : null
|
||||
])
|
||||
}
|
||||
@@ -726,17 +714,7 @@ onClick: () => this.deleteRow(params.index, params.row)})
|
||||
|
||||
<style scoped>
|
||||
/* 根容器占满父高度 */
|
||||
.container-full-height {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 6px;
|
||||
padding: 12px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.container-full-height {width: 100%; height: 100%; box-sizing: border-box; display: flex; flex-direction: column}
|
||||
.layout-flex-row {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
Reference in New Issue
Block a user