diff --git a/README.en.md b/README.en.md index ddda12c0b..b5d94000d 100644 --- a/README.en.md +++ b/README.en.md @@ -34,7 +34,9 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | ## Features * [x] Basic table -* [x] Grid +* [x] Configuration grid +* [x] Base form +* [x] Configuration form * [x] Striped * [x] Table with border * [x] Cell style @@ -63,7 +65,6 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | * [x] Context menu * [x] Detail - Expandable row * [x] Pager -* [x] Form * [x] Toolbar * [x] Pulldown * [x] Virtual list diff --git a/README.md b/README.md index 91ca27848..12418e4fe 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ [![pull requests closed](https://img.shields.io/github/issues-pr-closed/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/pulls?q=is%3Apr+is%3Aclosed) [![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE) -一个基于 [vue](https://www.npmjs.com/package/vue) 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计... +一个基于 [vue](https://www.npmjs.com/package/vue) 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计... * 设计理念 * 面向现代浏览器,高效的简洁 API 设计 @@ -35,7 +35,9 @@ ## 功能点 * [x] 基础表格 -* [x] 高级表格 +* [x] 配置式表格 +* [x] 基础表单 +* [x] 配置式表单 * [x] 斑马线条纹 * [x] 多种边框 * [x] 单元格样式 @@ -64,7 +66,6 @@ * [x] 快捷菜单 * [x] 展开行 * [x] 分页 -* [x] 表单 * [x] 工具栏 * [x] 下拉容器 * [x] 虚拟列表 diff --git a/README.zh-TW.md b/README.zh-TW.md index 6fd8966dc..8a4c09c3a 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -34,7 +34,9 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | ## 功能點 * [x] 基礎表格 -* [x] 高級表格 +* [x] 配置式表格 +* [x] 基礎表單 +* [x] 配置式表單 * [x] 斑馬線條紋 * [x] 多種邊框 * [x] 儲存格樣式 @@ -63,7 +65,6 @@ Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | * [x] 快捷選單 * [x] 展開行 * [x] 分頁 -* [x] 表單 * [x] 工具列 * [x] 下拉容器 * [x] 虛擬清單 diff --git a/gulpfile.js b/gulpfile.js index c6b64e203..1ab134ec6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -65,7 +65,8 @@ const languages = [ 'zh-TW', 'en-US', 'ja-JP', - 'es-ES' + 'es-ES', + 'pt-BR' ] const styleCode = 'require(\'./style.css\')' diff --git a/package.json b/package.json index cc9cfec0f..0610aa2cd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vxe-table", "version": "4.5.0-beta.15", - "description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计...", + "description": "一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计...", "scripts": { "update": "npm install --legacy-peer-deps", "serve": "vue-cli-service serve", diff --git a/packages/locale/lang/en-US.ts b/packages/locale/lang/en-US.ts index 6905af8cb..9b44c8084 100644 --- a/packages/locale/lang/en-US.ts +++ b/packages/locale/lang/en-US.ts @@ -23,6 +23,7 @@ export default { errProp: 'Unsupported parameter "{0}", possibly "{1}".', colRepet: 'column.{0}="{0}" is duplicated, which may make some features unusable', notFunc: 'method "{0}" not exist.', + errFunc: 'The argument "{0}" is not a method', notValidators: 'Global validators "{0}" no existe.', notFormats: 'Global formats "{0}" no existe.', notCommands: 'Global commands "{0}" no existe.', diff --git a/packages/locale/lang/es-ES.ts b/packages/locale/lang/es-ES.ts index af6975d71..41b928d40 100644 --- a/packages/locale/lang/es-ES.ts +++ b/packages/locale/lang/es-ES.ts @@ -23,6 +23,7 @@ export default { errProp: 'Parámetro no compatible "{0}", posiblemente "{1}".', colRepet: 'columna.{0}="{0}" está duplicado, lo que puede hacer que algunas funciones sean inutilizables', notFunc: 'El método "{0}" no existe.', + errFunc: 'The argument "{0}" is not a method', notValidators: 'Global validators "{0}" no existe.', notFormats: 'Global formats "{0}" no existe.', notCommands: 'Global commands "{0}" no existe.', diff --git a/packages/locale/lang/ja-JP.ts b/packages/locale/lang/ja-JP.ts index af7950c79..9b35c39b6 100644 --- a/packages/locale/lang/ja-JP.ts +++ b/packages/locale/lang/ja-JP.ts @@ -23,6 +23,7 @@ export default { errProp: 'サポートされていないパラメーター "{0}","{1}" の可能性があります', colRepet: 'column.{0}="{0}" が重複しているため、機能が使えなくなることがあります。', notFunc: 'method "{0}" はありません', + errFunc: 'The argument "{0}" is not a method', notValidators: 'Global validators "{0}" no existe.', notFormats: 'Global formats "{0}" no existe.', notCommands: 'Global commands "{0}" no existe.', diff --git a/packages/locale/lang/pt-BR.ts b/packages/locale/lang/pt-BR.ts index 39348e110..22b460d1e 100644 --- a/packages/locale/lang/pt-BR.ts +++ b/packages/locale/lang/pt-BR.ts @@ -23,6 +23,7 @@ export default { errProp: 'Parâmetro não suportado "{0}", possivelmente "{1}".', colRepet: 'column.{0}="{0}" está duplicado, o que pode tornar algumas funcionalidades inutilizáveis.', notFunc: 'método "{0}" não existe.', + errFunc: 'The argument "{0}" is not a method', notValidators: 'Validadores globais "{0}" não existem.', notFormats: 'Formatos globais "{0}" não existem.', notCommands: 'Comandos globais "{0}" não existem.', diff --git a/packages/locale/lang/zh-CN.ts b/packages/locale/lang/zh-CN.ts index 1208ae2ae..cb7898f03 100644 --- a/packages/locale/lang/zh-CN.ts +++ b/packages/locale/lang/zh-CN.ts @@ -23,6 +23,7 @@ export default { errProp: '不支持的参数 "{0}",可能为 "{1}"', colRepet: 'column.{0}="{1}" 重复了,这可能会导致某些功能无法使用', notFunc: '方法 "{0}" 不存在', + errFunc: '参数 "{0}" 不是一个方法', notValidators: '全局校验 "{0}" 不存在', notFormats: '全局格式化 "{0}" 不存在', notCommands: '全局指令 "{0}" 不存在', diff --git a/packages/locale/lang/zh-TC.ts b/packages/locale/lang/zh-TC.ts index cfc57b3d7..461106ee3 100644 --- a/packages/locale/lang/zh-TC.ts +++ b/packages/locale/lang/zh-TC.ts @@ -23,6 +23,7 @@ export default { errProp: '不支持的參數 "{0}",可能為 "{1}"', colRepet: 'column.{0}="{1}" 重複了,這可能會導致某些功能無法使用', notFunc: '方法 "{0}" 不存在', + errFunc: '參數 "{0}" 不是一個方法', notValidators: '全局校验 "{0}" 不存在', notFormats: '全局格式化 "{0}" 不存在', notCommands: '全局指令 "{0}" 不存在', diff --git a/packages/v-x-e-table/src/renderer.ts b/packages/v-x-e-table/src/renderer.ts index 2dc835de0..062369b68 100644 --- a/packages/v-x-e-table/src/renderer.ts +++ b/packages/v-x-e-table/src/renderer.ts @@ -3,7 +3,7 @@ import XEUtils from 'xe-utils' import GlobalConfig from './conf' import { getCellValue, setCellValue } from '../../table/src/util' import { getFuncText, formatText, isEmptyValue } from '../../tools/utils' -import { warnLog } from '../../tools/log' +import { errLog, warnLog } from '../../tools/log' import { getOnName } from '../../tools/vn' import { VxeGlobalRendererHandles, VxeGlobalRenderer, VxeColumnPropTypes } from '../../../types/all' @@ -166,6 +166,11 @@ function getComponentOns (renderOpts: any, params: any, modelFunc?: any, changeF const ons: any = {} XEUtils.objectEach(events, (func, key: any) => { ons[getOnName(key)] = function (...args: any[]) { + if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') { + if (!XEUtils.isFunction(key)) { + errLog('vxe.error.errFunc', [key]) + } + } func(params, ...args) } }) diff --git a/styles/index.scss b/styles/index.scss index 397d431ee..59a1cc3bf 100644 --- a/styles/index.scss +++ b/styles/index.scss @@ -1,2 +1,4 @@ +// 该文件已废弃,请使用 vxe-table/style/all.scss + @import './variable.scss'; @import './default.scss'; \ No newline at end of file diff --git a/styles/modules.scss b/styles/modules.scss index fabd222dd..279cdd6ba 100644 --- a/styles/modules.scss +++ b/styles/modules.scss @@ -1,6 +1,7 @@ // 该文件已废弃,请使用 vxe-table/style/all.scss -@import './cssvar.scss'; +@import './variable.scss'; +@import './css-variable.scss'; @import './icon.scss'; @import './filter.scss'; @import './menu.scss'; diff --git a/types/v-x-e-table/index.d.ts b/types/v-x-e-table/index.d.ts index 98f5a35e8..693da0846 100644 --- a/types/v-x-e-table/index.d.ts +++ b/types/v-x-e-table/index.d.ts @@ -137,7 +137,7 @@ export interface VXETableCore { } /** - * 一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计... + * 一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计... */ export const VXETable: VXETableCore