vxe-table 3.7.7-beta.2 → 3.7.7-beta.4
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/README.md +1 -1
- package/helper/vetur/tags.json +1 -1
- package/lib/edit/src/mixin.js +24 -5
- package/lib/edit/src/mixin.min.js +1 -1
- package/lib/grid/src/grid.js +21 -61
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +0 -18
- package/lib/grid/style/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.umd.js +496 -310
- package/lib/index.umd.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +19 -6
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/pulldown/style/style.css +2 -2
- package/lib/pulldown/style/style.min.css +1 -1
- package/lib/select/src/select.js +69 -48
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +23 -6
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/body.js +19 -14
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/methods.js +217 -130
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +10 -8
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +72 -23
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +1 -1
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +1 -1
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +1 -1
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/validator/src/mixin.js +111 -33
- package/lib/validator/src/mixin.min.js +1 -1
- package/package.json +1 -1
- package/packages/edit/src/mixin.js +24 -5
- package/packages/grid/src/grid.js +16 -45
- package/packages/pulldown/src/pulldown.js +18 -6
- package/packages/select/src/select.js +33 -12
- package/packages/table/src/body.js +20 -15
- package/packages/table/src/methods.js +106 -23
- package/packages/table/src/table.js +10 -7
- package/packages/textarea/src/textarea.js +1 -1
- package/packages/tooltip/src/tooltip.js +1 -1
- package/packages/v-x-e-table/src/conf.js +1 -1
- package/packages/validator/src/mixin.js +105 -35
- package/styles/grid.scss +0 -20
- package/styles/pulldown.scss +2 -2
- package/styles/select.scss +23 -6
- package/styles/table.scss +95 -23
- package/types/grid.d.ts +1 -1
- package/types/table.d.ts +22 -0
- package/types/v-x-e-table/renderer.d.ts +1 -1
- /package/lib/icon/style/{iconfont.1700611974815.ttf → iconfont.1703431233417.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1700611974815.woff → iconfont.1703431233417.woff} +0 -0
- /package/lib/icon/style/{iconfont.1700611974815.woff2 → iconfont.1703431233417.woff2} +0 -0
- /package/lib/{iconfont.1700611974815.ttf → iconfont.1703431233417.ttf} +0 -0
- /package/lib/{iconfont.1700611974815.woff → iconfont.1703431233417.woff} +0 -0
- /package/lib/{iconfont.1700611974815.woff2 → iconfont.1703431233417.woff2} +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils'
|
|
2
2
|
import VXETable from '../../v-x-e-table'
|
|
3
3
|
import GlobalConfig from '../../v-x-e-table/src/conf'
|
|
4
|
+
import { getRowid, handleFieldOrColumn } from '../../table/src/util'
|
|
4
5
|
import { eqEmptyValue, getFuncText } from '../../tools/utils'
|
|
5
6
|
import { warnLog, errLog } from '../../tools/log'
|
|
6
7
|
import DomTools from '../../tools/dom'
|
|
@@ -87,8 +88,9 @@ export default {
|
|
|
87
88
|
* 聚焦到校验通过的单元格并弹出校验错误提示
|
|
88
89
|
*/
|
|
89
90
|
handleValidError (params) {
|
|
91
|
+
const { validOpts } = this
|
|
90
92
|
return new Promise(resolve => {
|
|
91
|
-
if (
|
|
93
|
+
if (validOpts.autoPos === false) {
|
|
92
94
|
this.emitEvent('valid-error', params)
|
|
93
95
|
resolve()
|
|
94
96
|
} else {
|
|
@@ -100,6 +102,19 @@ export default {
|
|
|
100
102
|
}
|
|
101
103
|
})
|
|
102
104
|
},
|
|
105
|
+
handleErrMsgMode (validErrMaps) {
|
|
106
|
+
const { validOpts } = this
|
|
107
|
+
if (validOpts.msgMode === 'single') {
|
|
108
|
+
const keys = Object.keys(validErrMaps)
|
|
109
|
+
const resMaps = validErrMaps
|
|
110
|
+
if (keys.length) {
|
|
111
|
+
const firstKey = keys[0]
|
|
112
|
+
resMaps[firstKey] = validErrMaps[firstKey]
|
|
113
|
+
}
|
|
114
|
+
return resMaps
|
|
115
|
+
}
|
|
116
|
+
return validErrMaps
|
|
117
|
+
},
|
|
103
118
|
/**
|
|
104
119
|
* 对表格数据进行校验
|
|
105
120
|
* 如果不指定数据,则默认只校验临时变动的数据,例如新增或修改
|
|
@@ -111,7 +126,7 @@ export default {
|
|
|
111
126
|
*/
|
|
112
127
|
beginValidate (rows, cb, isFull) {
|
|
113
128
|
const validRest = {}
|
|
114
|
-
const { editRules, afterFullData, treeConfig, treeOpts } = this
|
|
129
|
+
const { editRules, afterFullData, visibleColumn, treeConfig, treeOpts } = this
|
|
115
130
|
const childrenField = treeOpts.children || treeOpts.childrenField
|
|
116
131
|
let vaildDatas
|
|
117
132
|
if (rows === true) {
|
|
@@ -130,6 +145,7 @@ export default {
|
|
|
130
145
|
this.lastCallTime = Date.now()
|
|
131
146
|
this.validRuleErr = false // 如果为快速校验,当存在某列校验不通过时将终止执行
|
|
132
147
|
this.clearValidate()
|
|
148
|
+
const validErrMaps = {}
|
|
133
149
|
if (editRules) {
|
|
134
150
|
const columns = this.getColumns()
|
|
135
151
|
const handleVaild = row => {
|
|
@@ -153,6 +169,12 @@ export default {
|
|
|
153
169
|
if (!validRest[column.property]) {
|
|
154
170
|
validRest[column.property] = []
|
|
155
171
|
}
|
|
172
|
+
validErrMaps[`${getRowid(this, row)}:${column.id}`] = {
|
|
173
|
+
column,
|
|
174
|
+
row,
|
|
175
|
+
rule,
|
|
176
|
+
content: rule.content
|
|
177
|
+
}
|
|
156
178
|
validRest[column.property].push(rest)
|
|
157
179
|
if (!isFull) {
|
|
158
180
|
this.validRuleErr = true
|
|
@@ -172,6 +194,7 @@ export default {
|
|
|
172
194
|
}
|
|
173
195
|
return Promise.all(rowValids).then(() => {
|
|
174
196
|
const ruleProps = Object.keys(validRest)
|
|
197
|
+
this.validErrorMaps = this.handleErrMsgMode(validErrMaps)
|
|
175
198
|
return this.$nextTick().then(() => {
|
|
176
199
|
if (ruleProps.length) {
|
|
177
200
|
return Promise.reject(validRest[ruleProps[0]][0])
|
|
@@ -207,20 +230,21 @@ export default {
|
|
|
207
230
|
* 将表格滚动到可视区
|
|
208
231
|
* 由于提示信息至少需要占一行,定位向上偏移一行
|
|
209
232
|
*/
|
|
210
|
-
const row = firstErrParams.row
|
|
211
|
-
const rowIndex = afterFullData.indexOf(row)
|
|
212
|
-
const locatRow = rowIndex > 0 ? afterFullData[rowIndex - 1] : row
|
|
213
233
|
if (this.validOpts.autoPos === false) {
|
|
214
234
|
finish()
|
|
215
235
|
} else {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
236
|
+
const row = firstErrParams.row
|
|
237
|
+
const column = firstErrParams.column
|
|
238
|
+
const rowIndex = afterFullData.indexOf(row)
|
|
239
|
+
const columnIndex = visibleColumn.indexOf(column)
|
|
240
|
+
const locatRow = rowIndex > 0 ? afterFullData[rowIndex - 1] : row
|
|
241
|
+
const locatColumn = columnIndex > 0 ? visibleColumn[rowIndex - 1] : column
|
|
242
|
+
this.scrollToRow(locatRow, locatColumn).then(posAndFinish)
|
|
221
243
|
}
|
|
222
244
|
})
|
|
223
245
|
})
|
|
246
|
+
} else {
|
|
247
|
+
this.validErrorMaps = {}
|
|
224
248
|
}
|
|
225
249
|
return this.$nextTick().then(() => {
|
|
226
250
|
if (cb) {
|
|
@@ -335,34 +359,66 @@ export default {
|
|
|
335
359
|
}
|
|
336
360
|
})
|
|
337
361
|
},
|
|
338
|
-
_clearValidate
|
|
362
|
+
_clearValidate (rows, fieldOrColumn) {
|
|
363
|
+
const { validOpts, validErrorMaps } = this
|
|
339
364
|
const validTip = this.$refs.validTip
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
content: '',
|
|
345
|
-
rule: null
|
|
346
|
-
})
|
|
347
|
-
if (validTip && validTip.visible) {
|
|
365
|
+
const rowList = XEUtils.isArray(rows) ? rows : (rows ? [rows] : [])
|
|
366
|
+
const colList = (XEUtils.isArray(fieldOrColumn) ? fieldOrColumn : (fieldOrColumn ? [fieldOrColumn] : []).map(column => handleFieldOrColumn(this, column)))
|
|
367
|
+
let validErrMaps = {}
|
|
368
|
+
if (validTip && validTip.reactData.visible) {
|
|
348
369
|
validTip.close()
|
|
349
370
|
}
|
|
371
|
+
// 如果是单个提示模式
|
|
372
|
+
if (validOpts.msgMode === 'single') {
|
|
373
|
+
this.validErrorMaps = {}
|
|
374
|
+
return this.$nextTick()
|
|
375
|
+
}
|
|
376
|
+
if (rowList.length && colList.length) {
|
|
377
|
+
validErrMaps = Object.assign({}, validErrorMaps)
|
|
378
|
+
rowList.forEach(row => {
|
|
379
|
+
colList.forEach((column) => {
|
|
380
|
+
const vaildKey = `${getRowid(this, row)}:${column.id}`
|
|
381
|
+
if (validErrMaps[vaildKey]) {
|
|
382
|
+
delete validErrMaps[vaildKey]
|
|
383
|
+
}
|
|
384
|
+
})
|
|
385
|
+
})
|
|
386
|
+
} else if (rowList.length) {
|
|
387
|
+
const rowidList = rowList.map(row => `${getRowid(this, row)}`)
|
|
388
|
+
XEUtils.each(validErrorMaps, (item, key) => {
|
|
389
|
+
if (rowidList.indexOf(key.split(':')[0]) > -1) {
|
|
390
|
+
validErrMaps[key] = item
|
|
391
|
+
}
|
|
392
|
+
})
|
|
393
|
+
} else if (colList.length) {
|
|
394
|
+
const colidList = colList.map(column => `${column.id}`)
|
|
395
|
+
XEUtils.each(validErrorMaps, (item, key) => {
|
|
396
|
+
if (colidList.indexOf(key.split(':')[1]) > -1) {
|
|
397
|
+
validErrMaps[key] = item
|
|
398
|
+
}
|
|
399
|
+
})
|
|
400
|
+
}
|
|
401
|
+
this.validErrorMaps = validErrMaps
|
|
350
402
|
return this.$nextTick()
|
|
351
403
|
},
|
|
352
404
|
/**
|
|
353
405
|
* 触发校验
|
|
354
406
|
*/
|
|
355
407
|
triggerValidate (type) {
|
|
356
|
-
const { editConfig, editStore, editRules,
|
|
408
|
+
const { editConfig, editStore, editRules, editOpts, validOpts } = this
|
|
357
409
|
const { actived } = editStore
|
|
358
|
-
|
|
410
|
+
// 检查清除校验消息
|
|
411
|
+
if (editRules && validOpts.msgMode === 'single') {
|
|
412
|
+
this.validErrorMaps = {}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// 校验单元格
|
|
416
|
+
if (editConfig && editRules && actived.row) {
|
|
359
417
|
const { row, column, cell } = actived.args
|
|
360
418
|
if (this.hasCellRules(type, row, column)) {
|
|
361
419
|
return this.validCellRules(type, row, column).then(() => {
|
|
362
|
-
if (
|
|
363
|
-
|
|
364
|
-
this.clearValidate()
|
|
365
|
-
}
|
|
420
|
+
if (editOpts.mode === 'row') {
|
|
421
|
+
this.clearValidate(row, column)
|
|
366
422
|
}
|
|
367
423
|
}).catch(({ rule }) => {
|
|
368
424
|
// 如果校验不通过与触发方式一致,则聚焦提示错误,否则跳过并不作任何处理
|
|
@@ -381,23 +437,37 @@ export default {
|
|
|
381
437
|
* 弹出校验错误提示
|
|
382
438
|
*/
|
|
383
439
|
showValidTooltip (params) {
|
|
384
|
-
const { $refs, height, tableData, validOpts } = this
|
|
440
|
+
const { $refs, height, validStore, validErrorMaps, tableData, validOpts } = this
|
|
385
441
|
const { rule, row, column, cell } = params
|
|
386
442
|
const validTip = $refs.validTip
|
|
387
443
|
const content = rule.content
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
column
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
444
|
+
validStore.visible = true
|
|
445
|
+
if (validOpts.msgMode === 'single') {
|
|
446
|
+
this.validErrorMaps = {
|
|
447
|
+
[`${getRowid(this, row)}:${column.id}`]: {
|
|
448
|
+
column,
|
|
449
|
+
row,
|
|
450
|
+
rule,
|
|
451
|
+
content
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
} else {
|
|
455
|
+
this.validErrorMaps = Object.assign({}, validErrorMaps, {
|
|
456
|
+
[`${getRowid(this, row)}:${column.id}`]: {
|
|
457
|
+
column,
|
|
458
|
+
row,
|
|
459
|
+
rule,
|
|
460
|
+
content
|
|
461
|
+
}
|
|
395
462
|
})
|
|
396
|
-
|
|
463
|
+
}
|
|
464
|
+
this.emitEvent('valid-error', params, null)
|
|
465
|
+
if (validTip) {
|
|
397
466
|
if (validTip && (validOpts.message === 'tooltip' || (validOpts.message === 'default' && !height && tableData.length < 2))) {
|
|
398
467
|
return validTip.open(cell, content)
|
|
399
468
|
}
|
|
400
|
-
}
|
|
469
|
+
}
|
|
470
|
+
return this.$nextTick()
|
|
401
471
|
}
|
|
402
472
|
}
|
|
403
473
|
}
|
package/styles/grid.scss
CHANGED
|
@@ -29,26 +29,6 @@
|
|
|
29
29
|
padding: 0.5em 1em;
|
|
30
30
|
background-color: $vxe-grid-maximize-background-color;
|
|
31
31
|
}
|
|
32
|
-
.vxe-body--row {
|
|
33
|
-
&.row--pending {
|
|
34
|
-
color: $vxe-table-validate-error-color;
|
|
35
|
-
text-decoration: line-through;
|
|
36
|
-
cursor: no-drop;
|
|
37
|
-
.vxe-body--column {
|
|
38
|
-
position: relative;
|
|
39
|
-
&:after {
|
|
40
|
-
content: "";
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: 50%;
|
|
43
|
-
left: 0;
|
|
44
|
-
width: 100%;
|
|
45
|
-
height: 0;
|
|
46
|
-
border-bottom: 1px solid $vxe-table-validate-error-color;
|
|
47
|
-
z-index: 1;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
32
|
.vxe-grid--form-wrapper,
|
|
53
33
|
.vxe-grid--top-wrapper,
|
|
54
34
|
.vxe-grid--bottom-wrapper {
|
package/styles/pulldown.scss
CHANGED
package/styles/select.scss
CHANGED
|
@@ -79,23 +79,40 @@
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.vxe-select-
|
|
82
|
+
.vxe-select--panel-search {
|
|
83
83
|
display: block;
|
|
84
|
-
.vxe-select-
|
|
84
|
+
.vxe-select-search--input {
|
|
85
85
|
width: 100%;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
.vxe-select--panel-wrapper {
|
|
90
|
+
position: relative;
|
|
91
|
+
border-radius: $vxe-border-radius;
|
|
92
|
+
border: 1px solid $vxe-table-popup-border-color;
|
|
93
|
+
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
|
|
94
|
+
background-color: $vxe-select-panel-background-color;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.vxe-select--panel-header {
|
|
98
|
+
border-bottom: 1px solid $vxe-table-popup-border-color;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.vxe-select--panel-footer {
|
|
102
|
+
border-top: 1px solid $vxe-table-popup-border-color;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.vxe-select--panel-header,
|
|
106
|
+
.vxe-select--panel-footer {
|
|
107
|
+
padding: 4px 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
89
110
|
.vxe-select-option--wrapper {
|
|
90
111
|
position: relative;
|
|
91
112
|
overflow-x: hidden;
|
|
92
113
|
overflow-y: auto;
|
|
93
114
|
padding: 4px 0;
|
|
94
115
|
max-height: 200px;
|
|
95
|
-
border-radius: $vxe-border-radius;
|
|
96
|
-
border: 1px solid $vxe-table-popup-border-color;
|
|
97
|
-
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
|
|
98
|
-
background-color: $vxe-select-panel-background-color;
|
|
99
116
|
}
|
|
100
117
|
|
|
101
118
|
.vxe-optgroup {
|
package/styles/table.scss
CHANGED
|
@@ -1067,7 +1067,7 @@
|
|
|
1067
1067
|
.vxe-footer--column {
|
|
1068
1068
|
&.col--ellipsis {
|
|
1069
1069
|
@extend %DefaultColumnHeight;
|
|
1070
|
-
&:not(.col--
|
|
1070
|
+
&:not(.col--active) {
|
|
1071
1071
|
& > .vxe-cell {
|
|
1072
1072
|
@extend %TextEllipsis;
|
|
1073
1073
|
}
|
|
@@ -1173,26 +1173,28 @@
|
|
|
1173
1173
|
|
|
1174
1174
|
/*校验不通过*/
|
|
1175
1175
|
.vxe-body--column {
|
|
1176
|
-
&.col--
|
|
1176
|
+
&.col--active,
|
|
1177
1177
|
&.col--selected {
|
|
1178
1178
|
position: relative;
|
|
1179
1179
|
}
|
|
1180
1180
|
&.col--valid-error {
|
|
1181
|
-
.vxe-cell--valid {
|
|
1182
|
-
width:
|
|
1181
|
+
.vxe-cell--valid-error-hint {
|
|
1182
|
+
width: 100%;
|
|
1183
1183
|
position: absolute;
|
|
1184
|
-
bottom: calc(100% + 4px);
|
|
1185
1184
|
left: 50%;
|
|
1185
|
+
font-size: 12px;
|
|
1186
|
+
line-height: 1.2em;
|
|
1186
1187
|
transform: translateX(-50%);
|
|
1187
|
-
text-align:
|
|
1188
|
+
text-align: left;
|
|
1188
1189
|
pointer-events: none;
|
|
1189
1190
|
z-index: 4;
|
|
1190
|
-
|
|
1191
|
+
padding-left: $vxe-table-cell-padding-left;
|
|
1192
|
+
padding-right: $vxe-table-cell-padding-right;
|
|
1193
|
+
.vxe-cell--valid-error-msg {
|
|
1191
1194
|
display: inline-block;
|
|
1192
1195
|
border-radius: $vxe-border-radius;
|
|
1193
|
-
|
|
1194
|
-
color:
|
|
1195
|
-
background-color: #f56c6c;
|
|
1196
|
+
color: $vxe-table-validate-error-color;
|
|
1197
|
+
background-color: $vxe-table-validate-error-background-color;
|
|
1196
1198
|
pointer-events: auto;
|
|
1197
1199
|
}
|
|
1198
1200
|
}
|
|
@@ -1209,20 +1211,90 @@
|
|
|
1209
1211
|
|
|
1210
1212
|
}
|
|
1211
1213
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1214
|
+
&.vaild-msg--single {
|
|
1215
|
+
.vxe-body--row {
|
|
1216
|
+
&:last-child {
|
|
1217
|
+
.vxe-cell--valid-error-hint {
|
|
1218
|
+
bottom: calc(100%);
|
|
1219
|
+
}
|
|
1220
|
+
&:first-child {
|
|
1221
|
+
.vxe-cell--valid-error-hint {
|
|
1222
|
+
bottom: auto;
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1217
1225
|
}
|
|
1218
1226
|
}
|
|
1219
1227
|
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1228
|
+
&.vaild-msg--full {
|
|
1229
|
+
.vxe-body--row {
|
|
1230
|
+
&:last-child {
|
|
1231
|
+
.vxe-cell--valid-error-hint {
|
|
1232
|
+
top: calc(100% - 1.3em);
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
/*已废弃,旧的校验样式**/
|
|
1238
|
+
&.old-cell-valid {
|
|
1239
|
+
.vxe-body--column {
|
|
1240
|
+
&.col--valid-error {
|
|
1241
|
+
.vxe-cell--valid-error-hint {
|
|
1242
|
+
width: 320px;
|
|
1243
|
+
position: absolute;
|
|
1244
|
+
bottom: calc(100% + 4px);
|
|
1245
|
+
left: 50%;
|
|
1246
|
+
transform: translateX(-50%);
|
|
1247
|
+
text-align: center;
|
|
1248
|
+
pointer-events: none;
|
|
1249
|
+
z-index: 4;
|
|
1250
|
+
.vxe-cell--valid-error-msg {
|
|
1251
|
+
display: inline-block;
|
|
1252
|
+
border-radius: $vxe-border-radius;
|
|
1253
|
+
padding: 8px 12px;
|
|
1254
|
+
color: #fff;
|
|
1255
|
+
background-color: #f56c6c;
|
|
1256
|
+
pointer-events: auto;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
.vxe-body--row {
|
|
1262
|
+
&:first-child {
|
|
1263
|
+
.vxe-cell--valid-error-hint {
|
|
1264
|
+
bottom: auto;
|
|
1265
|
+
top: calc(100% + 4px);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
.vxe-body--column {
|
|
1270
|
+
&:first-child {
|
|
1271
|
+
.vxe-cell--valid-error-hint {
|
|
1272
|
+
left: 10px;
|
|
1273
|
+
transform: translateX(0);
|
|
1274
|
+
text-align: left;
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
/*单元格标记删除状态*/
|
|
1281
|
+
.vxe-body--row {
|
|
1282
|
+
&.row--pending {
|
|
1283
|
+
color: $vxe-table-validate-error-color;
|
|
1284
|
+
text-decoration: line-through;
|
|
1285
|
+
cursor: no-drop;
|
|
1286
|
+
.vxe-body--column {
|
|
1287
|
+
position: relative;
|
|
1288
|
+
&:after {
|
|
1289
|
+
content: "";
|
|
1290
|
+
position: absolute;
|
|
1291
|
+
top: 50%;
|
|
1292
|
+
left: 0;
|
|
1293
|
+
width: 100%;
|
|
1294
|
+
height: 0;
|
|
1295
|
+
border-bottom: 1px solid $vxe-table-validate-error-color;
|
|
1296
|
+
z-index: 1;
|
|
1297
|
+
}
|
|
1226
1298
|
}
|
|
1227
1299
|
}
|
|
1228
1300
|
}
|
|
@@ -1265,7 +1337,7 @@
|
|
|
1265
1337
|
&.vxe-editable {
|
|
1266
1338
|
&.cell--highlight {
|
|
1267
1339
|
.vxe-body--column {
|
|
1268
|
-
&.col--
|
|
1340
|
+
&.col--active {
|
|
1269
1341
|
box-shadow: inset 0px 0px 0px 2px $vxe-primary-color;
|
|
1270
1342
|
&.col--valid-error {
|
|
1271
1343
|
box-shadow: inset 0px 0px 0px 2px $vxe-table-validate-error-color;
|
|
@@ -1297,7 +1369,7 @@
|
|
|
1297
1369
|
}
|
|
1298
1370
|
.vxe-body--column {
|
|
1299
1371
|
padding: 0;
|
|
1300
|
-
&.col--
|
|
1372
|
+
&.col--active {
|
|
1301
1373
|
padding: 0;
|
|
1302
1374
|
}
|
|
1303
1375
|
}
|
package/types/grid.d.ts
CHANGED
package/types/table.d.ts
CHANGED
|
@@ -600,6 +600,22 @@ export declare class Table extends VXETableComponent {
|
|
|
600
600
|
* @param row 指定行
|
|
601
601
|
*/
|
|
602
602
|
setRadioRow(row: RowInfo): Promise<any>;
|
|
603
|
+
/**
|
|
604
|
+
* 将指定行设置为取消/标记待删除状态
|
|
605
|
+
*/
|
|
606
|
+
setPendingRow(rows: any | any[], status: boolean): Promise<any>
|
|
607
|
+
/**
|
|
608
|
+
* 切换指定行的取消/标记待删除状态
|
|
609
|
+
*/
|
|
610
|
+
togglePendingRow(rows: any | any[]): Promise<any>
|
|
611
|
+
/**
|
|
612
|
+
* 获取待删除状态的数据
|
|
613
|
+
*/
|
|
614
|
+
getPendingRecords(): any[]
|
|
615
|
+
/**
|
|
616
|
+
* 清除所有标记状态
|
|
617
|
+
*/
|
|
618
|
+
clearPendingRow(): Promise<any>
|
|
603
619
|
/**
|
|
604
620
|
* 手动清除临时合并的单元格
|
|
605
621
|
*/
|
|
@@ -708,6 +724,11 @@ export declare class Table extends VXETableComponent {
|
|
|
708
724
|
* 用于 expand-config,判断行是否为展开状态
|
|
709
725
|
* @param row 指定行
|
|
710
726
|
*/
|
|
727
|
+
isRowExpandByRow(row: RowInfo): boolean;
|
|
728
|
+
/**
|
|
729
|
+
* 已废弃,请使用 isRowExpandByRow
|
|
730
|
+
* @deprecated
|
|
731
|
+
*/
|
|
711
732
|
isExpandByRow(row: RowInfo): boolean;
|
|
712
733
|
/**
|
|
713
734
|
* 用于 type=expand,手动清空展开行状态,数据会恢复成未展开的状态
|
|
@@ -908,6 +929,7 @@ export declare class Table extends VXETableComponent {
|
|
|
908
929
|
insertRecords: RowInfo[];
|
|
909
930
|
removeRecords: RowInfo[];
|
|
910
931
|
updateRecords: RowInfo[];
|
|
932
|
+
pendingRecords: RowInfo[]
|
|
911
933
|
};
|
|
912
934
|
|
|
913
935
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|