vxe-table 3.8.10 → 3.8.11
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/lib/form/src/form-config-item.js +5 -1
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +5 -1
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +16 -0
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/render.js +4 -0
- package/lib/form/src/render.min.js +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 +40 -9
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/src/methods.js +5 -3
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +3 -2
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/style/style.css +1 -1
- package/lib/table/style/style.min.css +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.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/vxe-table/style/style.css +1 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/form/src/form-config-item.js +3 -3
- package/packages/form/src/form-item.js +3 -3
- package/packages/form/src/form.js +14 -0
- package/packages/form/src/render.js +2 -2
- package/packages/table/src/methods.js +5 -3
- package/packages/table/src/table.js +3 -2
- package/styles/table.scss +1 -2
- /package/lib/icon/style/{iconfont.1720403140187.ttf → iconfont.1720519524864.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1720403140187.woff → iconfont.1720519524864.woff} +0 -0
- /package/lib/icon/style/{iconfont.1720403140187.woff2 → iconfont.1720519524864.woff2} +0 -0
- /package/lib/{iconfont.1720403140187.ttf → iconfont.1720519524864.ttf} +0 -0
- /package/lib/{iconfont.1720403140187.woff → iconfont.1720519524864.woff} +0 -0
- /package/lib/{iconfont.1720403140187.woff2 → iconfont.1720519524864.woff2} +0 -0
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ const VxeFormConfigItem = {
|
|
|
27
27
|
},
|
|
28
28
|
render (h) {
|
|
29
29
|
const { _e, $xeform, itemConfig: item } = this
|
|
30
|
-
const { rules, data, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = $xeform
|
|
30
|
+
const { rules, data, disabled, readonly, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = $xeform
|
|
31
31
|
const { slots, title, folding, visible, field, collapseNode, itemRender, showError, errRule, className, titleOverflow, vertical, children, showTitle, contentClassName, contentStyle, titleClassName, titleStyle } = item
|
|
32
32
|
const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
|
|
33
33
|
const itemClassName = compConf ? (compConf.formItemClassName || compConf.itemClassName) : ''
|
|
@@ -48,7 +48,7 @@ const VxeFormConfigItem = {
|
|
|
48
48
|
const ovTitle = itemOverflow === 'title'
|
|
49
49
|
const ovTooltip = itemOverflow === true || itemOverflow === 'tooltip'
|
|
50
50
|
const hasEllipsis = ovTitle || ovTooltip || ovEllipsis
|
|
51
|
-
const params = { data, field, property: field, item, $form: $xeform, $grid: $xeform.xegrid }
|
|
51
|
+
const params = { data, disabled, readonly, field, property: field, item, $form: $xeform, $grid: $xeform.xegrid }
|
|
52
52
|
let isRequired
|
|
53
53
|
if (visible === false) {
|
|
54
54
|
return _e()
|
|
@@ -68,7 +68,7 @@ const VxeFormConfigItem = {
|
|
|
68
68
|
class: ['vxe-form--gather vxe-form--item-row', item.id, span ? `vxe-form--item-col_${span} is--span` : '', className ? (XEUtils.isFunction(className) ? className(params) : className) : '']
|
|
69
69
|
}, childVNs) : _e()
|
|
70
70
|
}
|
|
71
|
-
if (rules) {
|
|
71
|
+
if (!readonly && rules) {
|
|
72
72
|
const itemRules = rules[field]
|
|
73
73
|
if (itemRules) {
|
|
74
74
|
isRequired = itemRules.some(rule => rule.required)
|
|
@@ -64,7 +64,7 @@ Object.keys(props).forEach(name => {
|
|
|
64
64
|
})
|
|
65
65
|
|
|
66
66
|
const renderItem = (h, _vm, item, slots) => {
|
|
67
|
-
const { _e, rules, data, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = _vm
|
|
67
|
+
const { _e, rules, data, disabled, readonly, collapseAll, validOpts, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = _vm
|
|
68
68
|
const { title, folding, visible, field, collapseNode, itemRender, showError, errRule, className, titleOverflow, vertical, showTitle, contentClassName, contentStyle, titleClassName, titleStyle } = item
|
|
69
69
|
const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
|
|
70
70
|
const itemClassName = compConf ? (compConf.formItemClassName || compConf.itemClassName) : ''
|
|
@@ -85,12 +85,12 @@ const renderItem = (h, _vm, item, slots) => {
|
|
|
85
85
|
const ovTitle = itemOverflow === 'title'
|
|
86
86
|
const ovTooltip = itemOverflow === true || itemOverflow === 'tooltip'
|
|
87
87
|
const hasEllipsis = ovTitle || ovTooltip || ovEllipsis
|
|
88
|
-
const params = { data, field, property: field, item, $form: _vm, $grid: _vm.xegrid }
|
|
88
|
+
const params = { data, disabled, readonly, field, property: field, item, $form: _vm, $grid: _vm.xegrid }
|
|
89
89
|
let isRequired
|
|
90
90
|
if (visible === false) {
|
|
91
91
|
return _e()
|
|
92
92
|
}
|
|
93
|
-
if (rules) {
|
|
93
|
+
if (!readonly && rules) {
|
|
94
94
|
const itemRules = rules[field]
|
|
95
95
|
if (itemRules) {
|
|
96
96
|
isRequired = itemRules.some(rule => rule.required)
|
|
@@ -84,6 +84,7 @@ export default {
|
|
|
84
84
|
default: null
|
|
85
85
|
},
|
|
86
86
|
className: [String, Function],
|
|
87
|
+
disabled: Boolean,
|
|
87
88
|
readonly: Boolean,
|
|
88
89
|
items: Array,
|
|
89
90
|
rules: Object,
|
|
@@ -251,9 +252,14 @@ export default {
|
|
|
251
252
|
this.dispatchEvent('collapse', { status, collapse: status, data: this.data }, evnt)
|
|
252
253
|
},
|
|
253
254
|
submitEvent (evnt) {
|
|
255
|
+
const { readonly } = this
|
|
254
256
|
evnt.preventDefault()
|
|
255
257
|
if (!this.preventSubmit) {
|
|
256
258
|
this.clearValidate()
|
|
259
|
+
if (readonly) {
|
|
260
|
+
this.dispatchEvent('submit', { data: this.data }, evnt)
|
|
261
|
+
return
|
|
262
|
+
}
|
|
257
263
|
this.beginValidate(this.getItems()).then((errMap) => {
|
|
258
264
|
if (errMap) {
|
|
259
265
|
this.dispatchEvent('submit-invalid', { data: this.data, errMap }, evnt)
|
|
@@ -361,10 +367,18 @@ export default {
|
|
|
361
367
|
return this.$nextTick()
|
|
362
368
|
},
|
|
363
369
|
validate (callback) {
|
|
370
|
+
const { readonly } = this
|
|
364
371
|
this.clearValidate()
|
|
372
|
+
if (readonly) {
|
|
373
|
+
return this.$nextTick()
|
|
374
|
+
}
|
|
365
375
|
return this.beginValidate(this.getItems(), '', callback)
|
|
366
376
|
},
|
|
367
377
|
validateField (fieldOrItem, callback) {
|
|
378
|
+
const { readonly } = this
|
|
379
|
+
if (readonly) {
|
|
380
|
+
return this.$nextTick()
|
|
381
|
+
}
|
|
368
382
|
let fields = []
|
|
369
383
|
if (XEUtils.isArray(fieldOrItem)) {
|
|
370
384
|
fields = fieldOrItem
|
|
@@ -24,10 +24,10 @@ function renderSuffixIcon (h, titleSuffix) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export function renderTitle (h, _vm, item) {
|
|
27
|
-
const { data, tooltipOpts } = _vm
|
|
27
|
+
const { data, readonly, disabled, tooltipOpts } = _vm
|
|
28
28
|
const { slots, field, itemRender, titlePrefix, titleSuffix } = item
|
|
29
29
|
const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
|
|
30
|
-
const params = { data, field, property: field, item, $form: _vm, $grid: _vm.xegrid }
|
|
30
|
+
const params = { data, readonly, disabled, field, property: field, item, $form: _vm, $grid: _vm.xegrid }
|
|
31
31
|
const contVNs = []
|
|
32
32
|
const titVNs = []
|
|
33
33
|
if (titlePrefix) {
|
|
@@ -2978,7 +2978,7 @@ const Methods = {
|
|
|
2978
2978
|
tooltipStore.row = null
|
|
2979
2979
|
tooltipStore.column = column
|
|
2980
2980
|
tooltipStore.visible = true
|
|
2981
|
-
|
|
2981
|
+
tooltipStore.currOpts = iconParams
|
|
2982
2982
|
this.$nextTick(() => {
|
|
2983
2983
|
const $tooltip = $refs.tooltip
|
|
2984
2984
|
if ($tooltip) {
|
|
@@ -3064,7 +3064,8 @@ const Methods = {
|
|
|
3064
3064
|
Object.assign(tooltipStore, {
|
|
3065
3065
|
row,
|
|
3066
3066
|
column,
|
|
3067
|
-
visible: true
|
|
3067
|
+
visible: true,
|
|
3068
|
+
currOpts: {}
|
|
3068
3069
|
})
|
|
3069
3070
|
this.$nextTick(() => {
|
|
3070
3071
|
const $tooltip = $refs.tooltip
|
|
@@ -3095,7 +3096,8 @@ const Methods = {
|
|
|
3095
3096
|
row: null,
|
|
3096
3097
|
column: null,
|
|
3097
3098
|
content: null,
|
|
3098
|
-
visible: false
|
|
3099
|
+
visible: false,
|
|
3100
|
+
currOpts: {}
|
|
3099
3101
|
})
|
|
3100
3102
|
if (tooltip) {
|
|
3101
3103
|
tooltip.close()
|
|
@@ -432,7 +432,8 @@ export default {
|
|
|
432
432
|
tooltipStore: {
|
|
433
433
|
row: null,
|
|
434
434
|
column: null,
|
|
435
|
-
visible: false
|
|
435
|
+
visible: false,
|
|
436
|
+
currOpts: {}
|
|
436
437
|
},
|
|
437
438
|
// 存放数据校验相关信息
|
|
438
439
|
validStore: {
|
|
@@ -1254,7 +1255,7 @@ export default {
|
|
|
1254
1255
|
*/
|
|
1255
1256
|
hasTip ? h('vxe-tooltip', {
|
|
1256
1257
|
ref: 'tooltip',
|
|
1257
|
-
props: this.tipConfig
|
|
1258
|
+
props: Object.assign({}, this.tipConfig, this.tooltipStore.currOpts)
|
|
1258
1259
|
}) : _e(),
|
|
1259
1260
|
/**
|
|
1260
1261
|
* 校验提示
|
package/styles/table.scss
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|