',
enum: '',
- defVal: 'rows?: boolean | Row | Row[], callback?: callback?: (errMap) => void',
+ defVal: 'rows?: boolean | Row | Row[] | ((errMap) => void), callback?: callback?: (errMap) => void',
list: []
},
{
diff --git a/examples/i18n/lang/en-US.js b/examples/i18n/lang/en-US.js
index 1d890565d..b539cf5a4 100644
--- a/examples/i18n/lang/en-US.js
+++ b/examples/i18n/lang/en-US.js
@@ -325,7 +325,7 @@ export default {
compatibility: 'Compatibility',
releases: 'Releases',
donation: '支持我们',
- issuesTitle: '該群供大家交流問題,若人满则剔除不活跃的
作者很忙基本沒有時間去看群,如果有 bug 请通过 issues 反馈',
+ issuesTitle: '该群供大家交流問題,群人数已达上限,将不定期剔除不活跃的
,如果有 bug 请通过 issues 反馈',
newFunc: 'Since the author is busy, there may be time to support this function later!',
newDevelopment: 'this release is being refactored. Stay tuned!'
},
diff --git a/examples/i18n/lang/zh-CN.js b/examples/i18n/lang/zh-CN.js
index 4c5821912..f8decab37 100644
--- a/examples/i18n/lang/zh-CN.js
+++ b/examples/i18n/lang/zh-CN.js
@@ -324,7 +324,7 @@ export default {
compatibility: '兼容性变动',
releases: '更新日志',
donation: '支持我们',
- issuesTitle: '該群供大家交流問題,若人满则剔除不活跃的
作者很忙基本沒有時間去看群,如果有 bug 请通过 issues 反馈',
+ issuesTitle: '该群供大家交流問題,群人数已达上限,将不定期剔除不活跃的
,如果有 bug 请通过 issues 反馈',
newFunc: '由于作者很忙,后续有时间可能会支持该功能!',
newDevelopment: '该版本正在重构中,敬请期待!'
},
diff --git a/examples/i18n/lang/zh-TC.js b/examples/i18n/lang/zh-TC.js
index ffae5f7f6..547c3096f 100644
--- a/examples/i18n/lang/zh-TC.js
+++ b/examples/i18n/lang/zh-TC.js
@@ -324,7 +324,7 @@ export default {
compatibility: '相容性變動',
releases: '更新日誌',
donation: '支持我们',
- issuesTitle: '該群供大家交流問題,若人满则剔除不活跃的
作者很忙基本沒有時間去看群,如果有 bug 請通過 issues 迴響',
+ issuesTitle: '该群供大家交流問題,群人数已达上限,将不定期剔除不活跃的
,如果有 bug 请通过 issues 反馈',
newFunc: '由於作者很忙,後續有時間可能會支持該功能!',
newDevelopment: '該版本正在重構中,敬請期待!'
},
diff --git a/examples/views/form/Form.vue b/examples/views/form/Form.vue
index 7fb87f28c..3c044cff6 100644
--- a/examples/views/form/Form.vue
+++ b/examples/views/form/Form.vue
@@ -108,6 +108,7 @@
-
-
-
-
+
+ {{ formData2.name }}
-
-
-
-
+
+ {{ formData2.nickname }}
@@ -265,8 +262,8 @@ export default {
},
loading2: false,
formData2: {
- name: '',
- nickname: '',
+ name: 'test1',
+ nickname: 'Testing',
sex: '',
age: 26,
date: null,
@@ -419,6 +416,7 @@ export default {
-
-
-
-
+
+ {{ formData2.name }}
-
-
-
-
+
+ {{ formData2.nickname }}
@@ -559,8 +553,8 @@ export default {
},
loading2: false,
formData2: {
- name: '',
- nickname: '',
+ name: 'test1',
+ nickname: 'Testing',
sex: '',
age: 26,
date: null,
diff --git a/examples/views/table/advanced/Expand.vue b/examples/views/table/advanced/Expand.vue
index 3ccec45b3..30dd34cde 100644
--- a/examples/views/table/advanced/Expand.vue
+++ b/examples/views/table/advanced/Expand.vue
@@ -1,6 +1,9 @@
-
通过设置 属性和 type= 与 可以开启展开行功能
+
+ 通过设置 属性和 type= 与 可以开启展开行功能
+ (注:展开行不能用于虚拟滚动,该示例仅供参考)
+
diff --git a/examples/views/table/advanced/ExpandAccordion.vue b/examples/views/table/advanced/ExpandAccordion.vue
index a9457de33..08601bd14 100644
--- a/examples/views/table/advanced/ExpandAccordion.vue
+++ b/examples/views/table/advanced/ExpandAccordion.vue
@@ -1,6 +1,9 @@
-
手风琴展开效果,通过配置 expand-config={} 属性来开启同一级的节点,每次只能展开一个
+
+ 手风琴展开效果,通过配置 expand-config={} 属性来开启同一级的节点,每次只能展开一个
+ (注:展开行不能用于虚拟滚动,该示例仅供参考)
+
{
const { slots, title, folding, visible, visibleMethod, field, collapseNode, itemRender, showError, errRule } = item
- const compConf = itemRender ? VXETable.renderer.get(itemRender.name) : null
+ const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
const span = item.span || _vm.span
const align = item.align || _vm.align
const titleAlign = item.titleAlign || _vm.titleAlign
@@ -127,6 +127,8 @@ function renderItems (h, _vm) {
contentVNs = compConf.renderItem.call(_vm, h, itemRender, params)
} else if (slots && slots.default) {
contentVNs = slots.default.call(_vm, params, h)
+ } else if (field) {
+ contentVNs = [`${XEUtils.get(data, field)}`]
}
return h('div', {
class: ['vxe-form--item', item.id, span ? `vxe-col--${span} is--span` : null, {
@@ -303,7 +305,7 @@ export default {
const { field, resetValue, itemRender } = item
if (field) {
XEUtils.set(data, field, resetValue === null ? getResetValue(XEUtils.get(data, field), undefined) : resetValue)
- const compConf = itemRender ? VXETable.renderer.get(itemRender.name) : null
+ const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
if (compConf && compConf.itemResetMethod) {
compConf.itemResetMethod({ data, property: field, item, $form: this })
}
@@ -465,7 +467,7 @@ export default {
const { $el, formItems } = this
fields.some(property => {
const item = formItems.find(item => item.field === property)
- if (item && item.itemRender) {
+ if (item && isEnableConf(item.itemRender)) {
const { itemRender } = item
const compConf = VXETable.renderer.get(itemRender.name)
let inputElem
diff --git a/packages/grid/src/grid.js b/packages/grid/src/grid.js
index ef31ae8c4..9aa402152 100644
--- a/packages/grid/src/grid.js
+++ b/packages/grid/src/grid.js
@@ -3,8 +3,8 @@ import XEUtils from 'xe-utils/ctor'
import GlobalConfig from '../../conf'
import vSize from '../../mixins/size'
import VXETable from '../../v-x-e-table'
-import { UtilTools, DomTools, GlobalEvent } from '../../tools'
-import { clearTableDefaultStatus, clearTableAllStatus, isEnableConf } from '../../table/src/util'
+import { UtilTools, DomTools, GlobalEvent, isEnableConf } from '../../tools'
+import { clearTableDefaultStatus, clearTableAllStatus } from '../../table/src/util'
const methods = {}
const propKeys = Object.keys(Table.props)
diff --git a/packages/table/src/body.js b/packages/table/src/body.js
index f5c2b844a..86788fb6d 100644
--- a/packages/table/src/body.js
+++ b/packages/table/src/body.js
@@ -1,8 +1,8 @@
import XEUtils from 'xe-utils/ctor'
import GlobalConfig from '../../conf'
import VXETable from '../../v-x-e-table'
-import { UtilTools, DomTools } from '../../tools'
-import { getOffsetSize, calcTreeLine, mergeBodyMethod, isEnableConf } from './util'
+import { UtilTools, DomTools, isEnableConf } from '../../tools'
+import { getOffsetSize, calcTreeLine, mergeBodyMethod } from './util'
const cellType = 'body'
diff --git a/packages/table/src/cell.js b/packages/table/src/cell.js
index 641044fa1..cf2afc690 100644
--- a/packages/table/src/cell.js
+++ b/packages/table/src/cell.js
@@ -1,8 +1,7 @@
import XEUtils from 'xe-utils/ctor'
import GlobalConfig from '../../conf'
import VXETable from '../../v-x-e-table'
-import { UtilTools, DomTools } from '../../tools'
-import { isEnableConf } from './util'
+import { UtilTools, DomTools, isEnableConf } from '../../tools'
function renderHelpIcon (h, params) {
const { $table, column } = params
diff --git a/packages/table/src/methods.js b/packages/table/src/methods.js
index 9c292912b..3dd906c68 100644
--- a/packages/table/src/methods.js
+++ b/packages/table/src/methods.js
@@ -2,8 +2,8 @@ import XEUtils from 'xe-utils/ctor'
import GlobalConfig from '../../conf'
import Cell from './cell'
import VXETable from '../../v-x-e-table'
-import { UtilTools, DomTools } from '../../tools'
-import { clearTableAllStatus, isEnableConf } from './util'
+import { UtilTools, DomTools, isEnableConf } from '../../tools'
+import { clearTableAllStatus } from './util'
import formats from '../../v-x-e-table/src/formats'
const { getRowid, getRowkey, setCellValue, hasChildrenList, getColumnList } = UtilTools
diff --git a/packages/table/src/table.js b/packages/table/src/table.js
index 3818fa684..5fac7057c 100644
--- a/packages/table/src/table.js
+++ b/packages/table/src/table.js
@@ -3,8 +3,7 @@ import GlobalConfig from '../../conf'
import VXETable from '../../v-x-e-table'
import VxeTableBody from './body'
import vSize from '../../mixins/size'
-import { UtilTools, GlobalEvent, createResizeEvent } from '../../tools'
-import { isEnableConf } from './util'
+import { UtilTools, GlobalEvent, createResizeEvent, isEnableConf } from '../../tools'
import methods from './methods'
/**
diff --git a/packages/table/src/util.js b/packages/table/src/util.js
index 8717e553f..6fcde75b8 100644
--- a/packages/table/src/util.js
+++ b/packages/table/src/util.js
@@ -7,10 +7,6 @@ const lineOffsetSizes = {
medium: 1
}
-export function isEnableConf (conf) {
- return conf && conf.enabled !== false
-}
-
function getPaddingLeftRightSize (elem) {
if (elem) {
const computedStyle = getComputedStyle(elem)
diff --git a/packages/tools/src/utils.js b/packages/tools/src/utils.js
index 51f913d3c..11e9f90a8 100644
--- a/packages/tools/src/utils.js
+++ b/packages/tools/src/utils.js
@@ -141,6 +141,10 @@ class ColumnInfo {
}
}
+export function isEnableConf (conf) {
+ return conf && conf.enabled !== false
+}
+
function outLog (type) {
return function (message, params) {
const msg = UtilTools.getLog(message, params)
diff --git a/packages/validator/src/mixin.js b/packages/validator/src/mixin.js
index 07ed769ae..b02979555 100644
--- a/packages/validator/src/mixin.js
+++ b/packages/validator/src/mixin.js
@@ -34,11 +34,7 @@ export default {
* 完整校验,和 validate 的区别就是会给有效数据中的每一行进行校验
*/
_fullValidate (rows, cb) {
- const { afterFullData } = this
- if (XEUtils.isFunction(rows)) {
- return this.beginValidate(afterFullData, cb, true)
- }
- return this.beginValidate(rows || afterFullData, cb, true)
+ return this.beginValidate(rows, cb, true)
},
/**
* 快速校验,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外)
diff --git a/styles/base/common.scss b/styles/base/common.scss
index e7f82f368..6339a56de 100644
--- a/styles/base/common.scss
+++ b/styles/base/common.scss
@@ -9,6 +9,8 @@
}
[class*="vxe-"] {
+ font-variant: tabular-nums;
+ font-feature-settings: 'tnum';
@extend %boxSizing;
&:after, &:before,
*:after, *:before {
@@ -16,13 +18,6 @@
}
}
-body {
- margin: 0;
- line-height: 1.5;
- font-variant: tabular-nums;
- font-feature-settings: 'tnum';
-}
-
.vxe-primary-color {
color: $vxe-primary-color;
}
diff --git a/types/table.d.ts b/types/table.d.ts
index 8a44a0e51..76b7b7100 100644
--- a/types/table.d.ts
+++ b/types/table.d.ts
@@ -931,13 +931,13 @@ export declare class Table extends VXETableComponent {
* @param rows 指定行
* @param callback 回调函数
*/
- fullValidate(rows?: boolean | RowInfo | RowInfo[], callback?: (errMap: ColumnEditValidErrMapParams) => void): Promise;
+ fullValidate(rows?: boolean | RowInfo | RowInfo[] | ((errMap?: ColumnEditValidErrMapParams) => void), callback?: (errMap: ColumnEditValidErrMapParams) => void): Promise;
/**
* 快速校验,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外);如果第一个参数为 true 则校验当前表格数据,如果指定 row 或 rows 则校验指定一行或多行,如果不指定数据,则默认只校验临时变动的数据,例如新增或修改。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
* @param rows 指定行
* @param callback 回调函数
*/
- validate(rows?: boolean | RowInfo | RowInfo[], callback?: (errMap?: ColumnEditValidErrMapParams) => void): Promise;
+ validate(rows?: boolean | RowInfo | RowInfo[] | ((errMap?: ColumnEditValidErrMapParams) => void), callback?: (errMap?: ColumnEditValidErrMapParams) => void): Promise;
/**
* 打开高级导出
* @param options 参数