doway-coms 2.10.67 → 2.10.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1926,6 +1926,9 @@ export default {
|
|
|
1926
1926
|
if(originCol.cellStyle){
|
|
1927
1927
|
colParams['cellStyle'] =originCol.cellStyle
|
|
1928
1928
|
}
|
|
1929
|
+
if(originCol.headerCellStyle){
|
|
1930
|
+
colParams['headerCellStyle'] =originCol.headerCellStyle
|
|
1931
|
+
}
|
|
1929
1932
|
|
|
1930
1933
|
if (originCol.footerSum === true) {
|
|
1931
1934
|
this.showFooter = true
|
|
@@ -3063,7 +3066,7 @@ export default {
|
|
|
3063
3066
|
}
|
|
3064
3067
|
}
|
|
3065
3068
|
},
|
|
3066
|
-
cellClick({ row, column }) {
|
|
3069
|
+
async cellClick({ row, column }) {
|
|
3067
3070
|
this.$emit('cellClick', { row, column })
|
|
3068
3071
|
//判断是否可以跳转
|
|
3069
3072
|
if (
|
|
@@ -3101,6 +3104,32 @@ export default {
|
|
|
3101
3104
|
return
|
|
3102
3105
|
}
|
|
3103
3106
|
// column.editRender.enabled = false
|
|
3107
|
+
|
|
3108
|
+
// 检查其他行的编辑状态
|
|
3109
|
+
const checkEditStatus = async () => {
|
|
3110
|
+
let maxAttempts = 10 // 最大尝试次数
|
|
3111
|
+
let attempt = 0
|
|
3112
|
+
|
|
3113
|
+
while (attempt < maxAttempts) {
|
|
3114
|
+
const editingRecord = this.$refs.baseGrid.getEditRecord()
|
|
3115
|
+
// 如果没有正在编辑的行,或者只有当前行在编辑,则退出等待
|
|
3116
|
+
if (!editingRecord || editingRecord.row===row) {
|
|
3117
|
+
// console.debug('当前行编辑')
|
|
3118
|
+
return true
|
|
3119
|
+
}
|
|
3120
|
+
// console.debug('等待',editingRecord.sort)
|
|
3121
|
+
// 等待100ms后重试
|
|
3122
|
+
await new Promise(resolve => setTimeout(resolve, 5))
|
|
3123
|
+
attempt++
|
|
3124
|
+
}
|
|
3125
|
+
return false
|
|
3126
|
+
}
|
|
3127
|
+
// 等待其他行编辑状态关闭
|
|
3128
|
+
await checkEditStatus()
|
|
3129
|
+
|
|
3130
|
+
//检查是否存在其他行还是编辑状态,如果还是编辑状态就等待关闭编辑状态后再执行当前行的编辑
|
|
3131
|
+
//因为会存在如果有校验的话会存在切换快,并且页面卡顿的情况的话会出现当前行打开编辑后又
|
|
3132
|
+
|
|
3104
3133
|
if (column.editRender && column.editRender.enabled === true) {
|
|
3105
3134
|
this.$refs.baseGrid.setEditCell(row, column)
|
|
3106
3135
|
} else {
|
|
@@ -3124,7 +3153,14 @@ export default {
|
|
|
3124
3153
|
}
|
|
3125
3154
|
// console.debug('customStyle',customStyle)
|
|
3126
3155
|
if(this.headerCellStyle){
|
|
3127
|
-
|
|
3156
|
+
for(let loopProp in this.headerCellStyle){
|
|
3157
|
+
customStyle[loopProp] = this.headerCellStyle[loopProp]
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
if(scope.column?.params.headerCellStyle){
|
|
3161
|
+
for(let loopProp in scope.column.params.headerCellStyle){
|
|
3162
|
+
customStyle[loopProp] = scope.column.params.headerCellStyle[loopProp]
|
|
3163
|
+
}
|
|
3128
3164
|
}
|
|
3129
3165
|
this.$emit('headerCellStyleCallback',scope,customStyle)
|
|
3130
3166
|
return customStyle
|
|
@@ -3143,7 +3179,9 @@ export default {
|
|
|
3143
3179
|
customStyle = this.cellStyle
|
|
3144
3180
|
}
|
|
3145
3181
|
if(scope.column?.params.cellStyle){
|
|
3146
|
-
|
|
3182
|
+
for(let loopProp in scope.column.params.cellStyle){
|
|
3183
|
+
customStyle[loopProp] = scope.column.params.cellStyle[loopProp]
|
|
3184
|
+
}
|
|
3147
3185
|
}
|
|
3148
3186
|
this.$emit('cellStyleCallback',scope,customStyle)
|
|
3149
3187
|
return customStyle
|