mirror of
https://gitee.com/xuliangzhan_admin/vxe-table.git
synced 2026-01-21 05:27:57 +08:00
修复已知问题
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
[简体中文](README.md) | [繁體中文](README.zh-TW.md) | English
|
||||
|
||||
[](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
|
||||
[](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
|
||||
[](https://www.npmjs.com/package/vxe-table)
|
||||
[](https://travis-ci.com/x-extends/vxe-table)
|
||||
[](https://npm-stat.com/charts.html?package=vxe-table)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
简体中文 | [繁體中文](README.zh-TW.md) | [English](README.en.md)
|
||||
|
||||
[](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
|
||||
[](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
|
||||
[](https://www.npmjs.com/package/vxe-table)
|
||||
[](https://travis-ci.com/x-extends/vxe-table)
|
||||
[](https://npm-stat.com/charts.html?package=vxe-table)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[简体中文](README.md) | 繁體中文 | [English](README.en.md)
|
||||
|
||||
[](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
|
||||
[](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
|
||||
[](https://www.npmjs.com/package/vxe-table)
|
||||
[](https://travis-ci.com/x-extends/vxe-table)
|
||||
[](https://npm-stat.com/charts.html?package=vxe-table)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<span class="title">vxe-table</span>
|
||||
</a>
|
||||
<a href='https://gitee.com/xuliangzhan_admin/vxe-table/stargazers'>
|
||||
<img src='https://gitee.com/xuliangzhan_admin/vxe-table/badge/star.svg?theme=dark' alt='star'>
|
||||
<img src='https://gitee.com/xuliangzhan_admin/vxe-table/badge/star.svg?theme=gvp' alt='star'>
|
||||
</a>
|
||||
<a href="https://github.com/x-extends/vxe-table/stargazers">
|
||||
<img src="https://img.shields.io/github/stars/xuliangzhan/vxe-table.svg">
|
||||
|
||||
@@ -182,6 +182,15 @@ const apis = [
|
||||
defVal: '',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
name: 'enabled',
|
||||
desc: '是否启用',
|
||||
version: '3.0.23',
|
||||
type: 'boolean',
|
||||
enum: '',
|
||||
defVal: 'true',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
name: 'props',
|
||||
desc: '渲染的参数(请查看目标渲染的 Props)',
|
||||
|
||||
@@ -4222,7 +4222,7 @@ const apis = [
|
||||
version: '',
|
||||
type: 'Promise<ErrMap>',
|
||||
enum: '',
|
||||
defVal: 'rows?: boolean | Row | Row[], callback?: callback?: (errMap) => void',
|
||||
defVal: 'rows?: boolean | Row | Row[] | ((errMap) => void), callback?: callback?: (errMap) => void',
|
||||
list: []
|
||||
},
|
||||
{
|
||||
|
||||
@@ -325,7 +325,7 @@ export default {
|
||||
compatibility: 'Compatibility',
|
||||
releases: 'Releases',
|
||||
donation: '支持我们',
|
||||
issuesTitle: '該群供大家交流問題,若人满则剔除不活跃的<br>作者很忙基本沒有時間去看群,如果有 bug 请通过 issues 反馈',
|
||||
issuesTitle: '该群供大家交流問題,群人数已达上限,将不定期剔除不活跃的<br>,如果有 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!'
|
||||
},
|
||||
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
compatibility: '兼容性变动',
|
||||
releases: '更新日志',
|
||||
donation: '支持我们',
|
||||
issuesTitle: '該群供大家交流問題,若人满则剔除不活跃的<br>作者很忙基本沒有時間去看群,如果有 bug 请通过 issues 反馈',
|
||||
issuesTitle: '该群供大家交流問題,群人数已达上限,将不定期剔除不活跃的<br>,如果有 bug 请通过 issues 反馈',
|
||||
newFunc: '由于作者很忙,后续有时间可能会支持该功能!',
|
||||
newDevelopment: '该版本正在重构中,敬请期待!'
|
||||
},
|
||||
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
compatibility: '相容性變動',
|
||||
releases: '更新日誌',
|
||||
donation: '支持我们',
|
||||
issuesTitle: '該群供大家交流問題,若人满则剔除不活跃的<br>作者很忙基本沒有時間去看群,如果有 bug 請通過 issues 迴響',
|
||||
issuesTitle: '该群供大家交流問題,群人数已达上限,将不定期剔除不活跃的<br>,如果有 bug 请通过 issues 反馈',
|
||||
newFunc: '由於作者很忙,後續有時間可能會支持該功能!',
|
||||
newDevelopment: '該版本正在重構中,敬請期待!'
|
||||
},
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
|
||||
<p>
|
||||
<vxe-form
|
||||
title-colon
|
||||
ref="xForm"
|
||||
class="my-form2"
|
||||
title-align="right"
|
||||
@@ -117,15 +118,11 @@
|
||||
:loading="loading2"
|
||||
@submit="submitEvent2"
|
||||
@reset="resetEvent">
|
||||
<vxe-form-item title="名称" field="name" span="24">
|
||||
<template v-slot="scope">
|
||||
<vxe-input v-model="formData2.name" placeholder="请输入名称" clearable @input="$refs.xForm.updateStatus(scope)"></vxe-input>
|
||||
</template>
|
||||
<vxe-form-item title="名称" span="24">
|
||||
<template v-slot>{{ formData2.name }}</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item title="昵称" field="nickname" span="24">
|
||||
<template v-slot="scope">
|
||||
<vxe-input v-model="formData2.nickname" placeholder="请输入昵称" clearable @input="$refs.xForm.updateStatus(scope)"></vxe-input>
|
||||
</template>
|
||||
<vxe-form-item title="昵称" span="24">
|
||||
<template v-slot>{{ formData2.nickname }}</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item title="性别" field="sex" span="24">
|
||||
<template v-slot="scope">
|
||||
@@ -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 {
|
||||
|
||||
<p>
|
||||
<vxe-form
|
||||
title-colon
|
||||
ref="xForm"
|
||||
class="my-form2"
|
||||
title-align="right"
|
||||
@@ -428,15 +426,11 @@ export default {
|
||||
:loading="loading2"
|
||||
@submit="submitEvent2"
|
||||
@reset="resetEvent">
|
||||
<vxe-form-item title="名称" field="name" span="24">
|
||||
<template v-slot="scope">
|
||||
<vxe-input v-model="formData2.name" placeholder="请输入名称" clearable @input="$refs.xForm.updateStatus(scope)"></vxe-input>
|
||||
</template>
|
||||
<vxe-form-item title="名称" span="24">
|
||||
<template v-slot>{{ formData2.name }}</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item title="昵称" field="nickname" span="24">
|
||||
<template v-slot="scope">
|
||||
<vxe-input v-model="formData2.nickname" placeholder="请输入昵称" clearable @input="$refs.xForm.updateStatus(scope)"></vxe-input>
|
||||
</template>
|
||||
<vxe-form-item title="昵称" span="24">
|
||||
<template v-slot>{{ formData2.nickname }}</template>
|
||||
</vxe-form-item>
|
||||
<vxe-form-item title="性别" field="sex" span="24">
|
||||
<template v-slot="scope">
|
||||
@@ -559,8 +553,8 @@ export default {
|
||||
},
|
||||
loading2: false,
|
||||
formData2: {
|
||||
name: '',
|
||||
nickname: '',
|
||||
name: 'test1',
|
||||
nickname: 'Testing',
|
||||
sex: '',
|
||||
age: 26,
|
||||
date: null,
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<p class="tip">通过设置 <table-api-link prop="expand-config"/> 属性和 type=<table-api-link prop="expand"/> 与 <table-column-api-link prop="slot"/> 可以开启展开行功能</p>
|
||||
<p class="tip">
|
||||
通过设置 <table-api-link prop="expand-config"/> 属性和 type=<table-api-link prop="expand"/> 与 <table-column-api-link prop="slot"/> 可以开启展开行功能<br>
|
||||
<span class="red">(注:展开行不能用于虚拟滚动,该示例仅供参考)</span>
|
||||
</p>
|
||||
|
||||
<vxe-toolbar>
|
||||
<template v-slot:buttons>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div>
|
||||
<p class="tip">手风琴展开效果,通过配置 expand-config={<table-api-link prop="accordion"/>} 属性来开启同一级的节点,每次只能展开一个</p>
|
||||
<p class="tip">
|
||||
手风琴展开效果,通过配置 expand-config={<table-api-link prop="accordion"/>} 属性来开启同一级的节点,每次只能展开一个<br>
|
||||
<span class="red">(注:展开行不能用于虚拟滚动,该示例仅供参考)</span>
|
||||
</p>
|
||||
|
||||
<vxe-table
|
||||
border
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
"vxe-table-plugin-virtual-tree": "0.5.6",
|
||||
"xe-ajax": "^4.0.5",
|
||||
"xe-ajax-mock": "^1.12.0",
|
||||
"xe-clipboard": "^1.10.0",
|
||||
"xe-clipboard": "^1.10.1",
|
||||
"xe-utils": "^3.0.4",
|
||||
"xlsx": "^0.16.8"
|
||||
},
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import XEUtils from 'xe-utils/ctor'
|
||||
import VXETable from '../../v-x-e-table'
|
||||
import { UtilTools, DomTools } from '../../tools'
|
||||
import { isEnableConf } from '../../table/src/util'
|
||||
import { UtilTools, DomTools, isEnableConf } from '../../tools'
|
||||
|
||||
export default {
|
||||
methods: {
|
||||
|
||||
@@ -2,7 +2,7 @@ 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 } from '../../tools'
|
||||
import { UtilTools, DomTools, isEnableConf } from '../../tools'
|
||||
import { createItem } from './util'
|
||||
|
||||
class Rule {
|
||||
@@ -55,7 +55,7 @@ function renderSuffixIcon (h, titleSuffix) {
|
||||
function renderTitle (h, _vm, item) {
|
||||
const { data } = _vm
|
||||
const { slots, field, itemRender, titlePrefix, titleSuffix } = item
|
||||
const compConf = itemRender ? VXETable.renderer.get(itemRender.name) : null
|
||||
const compConf = isEnableConf(itemRender) ? VXETable.renderer.get(itemRender.name) : null
|
||||
const params = { data, property: field, item, $form: _vm }
|
||||
const tss = []
|
||||
if (titlePrefix) {
|
||||
@@ -100,7 +100,7 @@ function renderItems (h, _vm) {
|
||||
const { _e, rules, formItems, data, collapseAll, validOpts } = _vm
|
||||
return formItems.map((item, index) => {
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
/**
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
},
|
||||
/**
|
||||
* 快速校验,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
4
types/table.d.ts
vendored
4
types/table.d.ts
vendored
@@ -931,13 +931,13 @@ export declare class Table extends VXETableComponent {
|
||||
* @param rows 指定行
|
||||
* @param callback 回调函数
|
||||
*/
|
||||
fullValidate(rows?: boolean | RowInfo | RowInfo[], callback?: (errMap: ColumnEditValidErrMapParams) => void): Promise<ColumnEditValidErrMapParams>;
|
||||
fullValidate(rows?: boolean | RowInfo | RowInfo[] | ((errMap?: ColumnEditValidErrMapParams) => void), callback?: (errMap: ColumnEditValidErrMapParams) => void): Promise<ColumnEditValidErrMapParams>;
|
||||
/**
|
||||
* 快速校验,如果存在记录不通过的记录,则返回不再继续校验(异步校验除外);如果第一个参数为 true 则校验当前表格数据,如果指定 row 或 rows 则校验指定一行或多行,如果不指定数据,则默认只校验临时变动的数据,例如新增或修改。该回调函数会在校验结束后被调用 callback(errMap)。若不传入回调函数,则会返回一个 promise
|
||||
* @param rows 指定行
|
||||
* @param callback 回调函数
|
||||
*/
|
||||
validate(rows?: boolean | RowInfo | RowInfo[], callback?: (errMap?: ColumnEditValidErrMapParams) => void): Promise<ColumnEditValidErrMapParams>;
|
||||
validate(rows?: boolean | RowInfo | RowInfo[] | ((errMap?: ColumnEditValidErrMapParams) => void), callback?: (errMap?: ColumnEditValidErrMapParams) => void): Promise<ColumnEditValidErrMapParams>;
|
||||
/**
|
||||
* 打开高级导出
|
||||
* @param options 参数
|
||||
|
||||
Reference in New Issue
Block a user