vxe-table 3.7.0-beta.9 → 3.7.0

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.
Files changed (103) hide show
  1. package/README.md +1 -1
  2. package/helper/vetur/attributes.json +26 -2
  3. package/helper/vetur/tags.json +6 -0
  4. package/lib/button/style/style.css +2 -3
  5. package/lib/button/style/style.min.css +1 -1
  6. package/lib/edit/src/mixin.js +265 -214
  7. package/lib/edit/src/mixin.min.js +1 -1
  8. package/lib/export/src/mixin.js +11 -7
  9. package/lib/export/src/mixin.min.js +1 -1
  10. package/lib/form/src/form-config-item.js +5 -1
  11. package/lib/form/src/form-config-item.min.js +1 -1
  12. package/lib/form/src/form-item.js +9 -1
  13. package/lib/form/src/form-item.min.js +1 -1
  14. package/lib/form/src/form.js +4 -0
  15. package/lib/form/src/form.min.js +1 -1
  16. package/lib/form/style/style.css +12 -0
  17. package/lib/form/style/style.min.css +1 -1
  18. package/lib/icon/style/style.css +1 -1
  19. package/lib/icon/style/style.min.css +1 -1
  20. package/lib/index.css +1 -1
  21. package/lib/index.umd.js +1151 -716
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/input/src/input.js +24 -1
  24. package/lib/input/src/input.min.js +1 -1
  25. package/lib/input/style/style.css +21 -0
  26. package/lib/input/style/style.min.css +1 -1
  27. package/lib/keyboard/src/mixin.js +4 -1
  28. package/lib/keyboard/src/mixin.min.js +1 -1
  29. package/lib/style.css +1 -1
  30. package/lib/style.min.css +1 -1
  31. package/lib/table/src/body.js +17 -14
  32. package/lib/table/src/body.min.js +1 -1
  33. package/lib/table/src/cell.js +38 -34
  34. package/lib/table/src/cell.min.js +1 -1
  35. package/lib/table/src/methods.js +641 -421
  36. package/lib/table/src/methods.min.js +1 -1
  37. package/lib/table/src/table.js +27 -19
  38. package/lib/table/src/table.min.js +1 -1
  39. package/lib/table/src/util.js +4 -2
  40. package/lib/table/src/util.min.js +1 -1
  41. package/lib/table/style/style.css +2 -2
  42. package/lib/table/style/style.min.css +1 -1
  43. package/lib/tools/log.js +1 -1
  44. package/lib/tools/log.min.js +1 -1
  45. package/lib/tools/utils.js +3 -5
  46. package/lib/tools/utils.min.js +1 -1
  47. package/lib/v-x-e-table/index.js +15 -12
  48. package/lib/v-x-e-table/index.min.js +1 -1
  49. package/lib/v-x-e-table/src/commands.js +7 -7
  50. package/lib/v-x-e-table/src/commands.min.js +1 -1
  51. package/lib/v-x-e-table/src/conf.js +2 -2
  52. package/lib/v-x-e-table/src/conf.min.js +1 -1
  53. package/lib/v-x-e-table/src/{setup.js → config.js} +3 -3
  54. package/lib/v-x-e-table/src/config.min.js +1 -0
  55. package/lib/v-x-e-table/src/formats.js +7 -7
  56. package/lib/v-x-e-table/src/formats.min.js +1 -1
  57. package/lib/v-x-e-table/src/menus.js +7 -7
  58. package/lib/v-x-e-table/src/menus.min.js +1 -1
  59. package/lib/v-x-e-table/src/renderer.js +4 -4
  60. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  61. package/lib/validator/src/mixin.js +4 -1
  62. package/lib/validator/src/mixin.min.js +1 -1
  63. package/package.json +7 -8
  64. package/packages/edit/src/mixin.js +185 -142
  65. package/packages/export/src/mixin.js +9 -7
  66. package/packages/form/src/form-config-item.js +4 -2
  67. package/packages/form/src/form-item.js +8 -2
  68. package/packages/form/src/form.js +4 -0
  69. package/packages/input/src/input.js +24 -1
  70. package/packages/keyboard/src/mixin.js +2 -1
  71. package/packages/table/src/body.js +17 -14
  72. package/packages/table/src/cell.js +32 -23
  73. package/packages/table/src/methods.js +476 -230
  74. package/packages/table/src/table.js +25 -17
  75. package/packages/table/src/util.js +4 -2
  76. package/packages/tools/utils.js +3 -6
  77. package/packages/v-x-e-table/index.js +7 -4
  78. package/packages/v-x-e-table/src/commands.js +6 -6
  79. package/packages/v-x-e-table/src/conf.js +2 -2
  80. package/packages/v-x-e-table/src/{setup.js → config.js} +2 -2
  81. package/packages/v-x-e-table/src/formats.js +6 -6
  82. package/packages/v-x-e-table/src/menus.js +6 -6
  83. package/packages/v-x-e-table/src/renderer.js +4 -4
  84. package/packages/validator/src/mixin.js +2 -1
  85. package/styles/button.scss +5 -3
  86. package/styles/css-variable.scss +3 -3
  87. package/styles/form.scss +14 -0
  88. package/styles/input.scss +25 -0
  89. package/styles/table.scss +6 -2
  90. package/styles/textarea.scss +3 -3
  91. package/styles/variable.scss +3 -3
  92. package/types/form-item.d.ts +1 -0
  93. package/types/form.d.ts +1 -0
  94. package/types/table.d.ts +16 -1
  95. package/types/v-x-e-table/index.d.ts +22 -10
  96. package/lib/v-x-e-table/src/setup.min.js +0 -1
  97. /package/lib/icon/style/{iconfont.1690761747506.ttf → iconfont.1694737793729.ttf} +0 -0
  98. /package/lib/icon/style/{iconfont.1690761747506.woff → iconfont.1694737793729.woff} +0 -0
  99. /package/lib/icon/style/{iconfont.1690761747506.woff2 → iconfont.1694737793729.woff2} +0 -0
  100. /package/lib/{iconfont.1690761747506.ttf → iconfont.1694737793729.ttf} +0 -0
  101. /package/lib/{iconfont.1690761747506.woff → iconfont.1694737793729.woff} +0 -0
  102. /package/lib/{iconfont.1690761747506.woff2 → iconfont.1694737793729.woff2} +0 -0
  103. /package/types/v-x-e-table/{setup.d.ts → config.d.ts} +0 -0
@@ -304,14 +304,14 @@ export default {
304
304
  isAllSelected: false,
305
305
  // 复选框属性,有选中且非全选状态
306
306
  isIndeterminate: false,
307
- // 复选框属性,已选中的行
308
- selectCheckboxRows: [],
307
+ // 复选框属性,已选中的行集合
308
+ selectCheckboxMaps: {},
309
309
  // 当前行
310
310
  currentRow: null,
311
311
  // 单选框属性,选中列
312
312
  currentColumn: null,
313
313
  // 单选框属性,选中行
314
- selectRow: null,
314
+ selectRadioRow: null,
315
315
  // 表尾合计数据
316
316
  footerTableData: [],
317
317
  // 展开列信息
@@ -319,16 +319,16 @@ export default {
319
319
  hasFixedColumn: false,
320
320
  // 树节点列信息
321
321
  treeNodeColumn: null,
322
- // 已展开的行
323
- rowExpandeds: [],
324
- // 懒加载中的展开行的列表
325
- expandLazyLoadeds: [],
326
- // 已展开树节点
327
- treeExpandeds: [],
328
- // 懒加载中的树节点的列表
329
- treeLazyLoadeds: [],
330
- // 树节点不确定状态的列表
331
- treeIndeterminates: [],
322
+ // 已展开的行集合
323
+ rowExpandedMaps: {},
324
+ // 懒加载中的展开行的集合
325
+ rowExpandLazyLoadedMaps: {},
326
+ // 已展开树节点集合
327
+ treeExpandedMaps: {},
328
+ // 懒加载中的树节点的集合
329
+ treeExpandLazyLoadedMaps: {},
330
+ // 树节点不确定状态的集合
331
+ treeIndeterminateMaps: {},
332
332
  // 合并单元格的对象集
333
333
  mergeList: [],
334
334
  // 合并表尾数据的对象集
@@ -743,6 +743,8 @@ export default {
743
743
  // 完整数据、条件处理后
744
744
  tableFullData: [],
745
745
  afterFullData: [],
746
+ // 列表条件处理后数据集合
747
+ afterFullRowMaps: {},
746
748
  // 收集的列配置(带分组)
747
749
  collectColumn: [],
748
750
  // 完整所有列(不带分组)
@@ -801,11 +803,11 @@ export default {
801
803
  // }
802
804
  // 检查导入导出类型,如果自定义导入导出方法,则不校验类型
803
805
  const { exportConfig, exportOpts, importConfig, importOpts } = this
804
- if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(VXETable.config.importTypes, importOpts.types)) {
805
- warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter(type => XEUtils.includes(VXETable.config.importTypes, type)).join(',') || VXETable.config.importTypes.join(',')])
806
+ if (importConfig && importOpts.types && !importOpts.importMethod && !XEUtils.includeArrays(VXETable.globalConfs.importTypes, importOpts.types)) {
807
+ warnLog('vxe.error.errProp', [`export-config.types=${importOpts.types.join(',')}`, importOpts.types.filter(type => XEUtils.includes(VXETable.globalConfs.importTypes, type)).join(',') || VXETable.globalConfs.importTypes.join(',')])
806
808
  }
807
- if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(VXETable.config.exportTypes, exportOpts.types)) {
808
- warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter(type => XEUtils.includes(VXETable.config.exportTypes, type)).join(',') || VXETable.config.exportTypes.join(',')])
809
+ if (exportConfig && exportOpts.types && !exportOpts.exportMethod && !XEUtils.includeArrays(VXETable.globalConfs.exportTypes, exportOpts.types)) {
810
+ warnLog('vxe.error.errProp', [`export-config.types=${exportOpts.types.join(',')}`, exportOpts.types.filter(type => XEUtils.includes(VXETable.globalConfs.exportTypes, type)).join(',') || VXETable.globalConfs.exportTypes.join(',')])
809
811
  }
810
812
  }
811
813
 
@@ -885,6 +887,12 @@ export default {
885
887
  if (this.editConfig && this.editOpts.activeMethod) {
886
888
  warnLog('vxe.error.delProp', ['table.edit-config.activeMethod', 'table.edit-config.beforeEditMethod'])
887
889
  }
890
+ if (this.treeConfig && this.checkboxOpts.isShiftKey) {
891
+ errLog('vxe.error.errConflicts', ['tree-config', 'checkbox-config.isShiftKey'])
892
+ }
893
+ if (this.checkboxOpts.halfField) {
894
+ warnLog('vxe.error.delProp', ['checkbox-config.halfField', 'checkbox-config.indeterminateField'])
895
+ }
888
896
  }
889
897
 
890
898
  // 检查是否有安装需要的模块
@@ -157,8 +157,10 @@ function countTreeExpand (prevRow, params) {
157
157
  return count
158
158
  }
159
159
  const { $table } = params
160
- const rowChildren = prevRow[$table.treeOpts.childrenField || $table.treeOpts.children]
161
- if ($table.isTreeExpandByRow(prevRow)) {
160
+ const { treeOpts } = $table
161
+ const childrenField = treeOpts.children || treeOpts.childrenField
162
+ const rowChildren = prevRow[childrenField]
163
+ if (rowChildren && $table.isTreeExpandByRow(prevRow)) {
162
164
  for (let index = 0; index < rowChildren.length; index++) {
163
165
  count += countTreeExpand(rowChildren[index], params)
164
166
  }
@@ -1,10 +1,8 @@
1
1
  import XEUtils from 'xe-utils'
2
2
  import GlobalConfig from '../v-x-e-table/src/conf'
3
+ import DomZIndex from 'dom-zindex'
3
4
  import { warnLog, errLog } from '../tools/log'
4
5
 
5
- let zindexIndex = 0
6
- let lastZindex = 1
7
-
8
6
  export function isEnableConf (conf) {
9
7
  return conf && conf.enabled !== false
10
8
  }
@@ -31,11 +29,10 @@ export function getColumnList (columns) {
31
29
 
32
30
  export const UtilTools = {
33
31
  nextZIndex () {
34
- lastZindex = GlobalConfig.zIndex + zindexIndex++
35
- return lastZindex
32
+ return DomZIndex.getNext()
36
33
  },
37
34
  getLastZIndex () {
38
- return lastZindex
35
+ return DomZIndex.getCurrent()
39
36
  },
40
37
  getColumnList,
41
38
  getClass (property, params) {
@@ -6,7 +6,7 @@ import { commands } from './src/commands'
6
6
  import { menus } from './src/menus'
7
7
  import { formats } from './src/formats'
8
8
  import { validators } from './src/validators'
9
- import { setup } from './src/setup'
9
+ import { config } from './src/config'
10
10
  import { UtilTools } from '../tools/utils'
11
11
  import { errLog } from '../tools/log'
12
12
 
@@ -76,7 +76,9 @@ class VXETableConfig {
76
76
  return getExportOrImpotType(GlobalConfig.export.types, 2)
77
77
  }
78
78
  }
79
- export const config = new VXETableConfig()
79
+
80
+ // 已废弃
81
+ export const globalConfs = new VXETableConfig()
80
82
 
81
83
  export function t (key, args) {
82
84
  return GlobalConfig.i18n(key, args)
@@ -87,6 +89,7 @@ export function _t (key, args) {
87
89
  }
88
90
 
89
91
  export const v = 'v3'
92
+ export const setup = config
90
93
 
91
94
  export const VXETable = {
92
95
  v,
@@ -94,13 +97,13 @@ export const VXETable = {
94
97
  reg,
95
98
  use,
96
99
  setup,
100
+ config,
97
101
  interceptor,
98
102
  renderer,
99
103
  commands,
100
104
  formats,
101
105
  menus,
102
106
  validators,
103
- config,
104
107
  t,
105
108
  _t
106
109
  }
@@ -110,6 +113,6 @@ export * from './src/renderer'
110
113
  export * from './src/commands'
111
114
  export * from './src/menus'
112
115
  export * from './src/formats'
113
- export * from './src/setup'
116
+ export * from './src/config'
114
117
 
115
118
  export default VXETable
@@ -20,12 +20,12 @@ class VXECommandsStore {
20
20
  add (name, render) {
21
21
  const conf = this.store[name]
22
22
  // 兼容
23
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
24
- if (XEUtils.isFunction(render)) {
25
- warnLog('vxe.error.delProp', ['callback', 'commandMethod'])
26
- render = {
27
- commandMethod: render
28
- }
23
+ if (XEUtils.isFunction(render)) {
24
+ // if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
25
+ // warnLog('vxe.error.delProp', ['commands -> callback', 'commandMethod'])
26
+ // }
27
+ render = {
28
+ commandMethod: render
29
29
  }
30
30
  }
31
31
 
@@ -119,12 +119,12 @@ export default {
119
119
  isReplace: true
120
120
  },
121
121
  scrollX: {
122
- enabled: true,
122
+ // enabled: false,
123
123
  gt: 60
124
124
  // oSize: 0
125
125
  },
126
126
  scrollY: {
127
- enabled: true,
127
+ // enabled: false,
128
128
  gt: 100
129
129
  // oSize: 0
130
130
  }
@@ -1,9 +1,9 @@
1
- import GlobalConfig from '../../v-x-e-table/src/conf'
1
+ import GlobalConfig from './conf'
2
2
  import XEUtils from 'xe-utils'
3
3
 
4
4
  /**
5
5
  * 全局参数设置
6
6
  */
7
- export function setup (options) {
7
+ export function config (options) {
8
8
  return XEUtils.merge(GlobalConfig, options)
9
9
  }
@@ -20,12 +20,12 @@ class VXEFormatsStore {
20
20
  add (name, render) {
21
21
  const conf = this.store[name]
22
22
  // 兼容
23
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
24
- if (XEUtils.isFunction(render)) {
25
- warnLog('vxe.error.delProp', ['callback', 'cellFormatMethod'])
26
- render = {
27
- cellFormatMethod: render
28
- }
23
+ if (XEUtils.isFunction(render)) {
24
+ // if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
25
+ // warnLog('vxe.error.delProp', ['formats -> callback', 'cellFormatMethod'])
26
+ // }
27
+ render = {
28
+ cellFormatMethod: render
29
29
  }
30
30
  }
31
31
 
@@ -20,12 +20,12 @@ class VXEMenusStore {
20
20
  add (name, render) {
21
21
  const conf = this.store[name]
22
22
  // 兼容
23
- if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
24
- if (XEUtils.isFunction(render)) {
25
- warnLog('vxe.error.delProp', ['callback', 'menuMethod'])
26
- render = {
27
- menuMethod: render
28
- }
23
+ if (XEUtils.isFunction(render)) {
24
+ // if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
25
+ // warnLog('vxe.error.delProp', ['menus -> callback', 'menuMethod'])
26
+ // }
27
+ render = {
28
+ menuMethod: render
29
29
  }
30
30
  }
31
31
 
@@ -104,8 +104,8 @@ function getNativeOns (renderOpts, params) {
104
104
  XEUtils.objectEach(nativeEvents, (func, key) => {
105
105
  nativeOns[key] = function (...args) {
106
106
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
107
- if (!XEUtils.isFunction(key)) {
108
- errLog('vxe.error.errFunc', [key])
107
+ if (!XEUtils.isFunction(func)) {
108
+ errLog('vxe.error.errFunc', [func])
109
109
  }
110
110
  }
111
111
  func(params, ...args)
@@ -123,8 +123,8 @@ function getOns (renderOpts, params, inputFunc, changeFunc) {
123
123
  XEUtils.objectEach(events, (func, key) => {
124
124
  ons[key] = function (...args) {
125
125
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
126
- if (!XEUtils.isFunction(key)) {
127
- errLog('vxe.error.errFunc', [key])
126
+ if (!XEUtils.isFunction(func)) {
127
+ errLog('vxe.error.errFunc', [func])
128
128
  }
129
129
  }
130
130
  func(params, ...args)
@@ -112,6 +112,7 @@ export default {
112
112
  beginValidate (rows, cb, isFull) {
113
113
  const validRest = {}
114
114
  const { editRules, afterFullData, treeConfig, treeOpts } = this
115
+ const childrenField = treeOpts.children || treeOpts.childrenField
115
116
  let vaildDatas
116
117
  if (rows === true) {
117
118
  vaildDatas = afterFullData
@@ -165,7 +166,7 @@ export default {
165
166
  }
166
167
  }
167
168
  if (treeConfig) {
168
- XEUtils.eachTree(vaildDatas, handleVaild, treeOpts)
169
+ XEUtils.eachTree(vaildDatas, handleVaild, { children: childrenField })
169
170
  } else {
170
171
  vaildDatas.forEach(handleVaild)
171
172
  }
@@ -334,12 +334,14 @@ $btnThemeList: (
334
334
  border-radius: $vxe-border-radius;
335
335
  border: 1px solid $vxe-input-border-color;
336
336
  box-shadow: 0 1px 6px rgba(0,0,0,.2);
337
- & > .vxe-button {
338
- margin-left: 0;
339
- margin-top: 0.4em;
337
+ & > .vxe-button.type--text,
338
+ & > .vxe-button.type--button {
340
339
  display: block;
341
340
  width: 100%;
342
341
  border: 0;
342
+ margin: 0.4em 0 0 0;
343
+ }
344
+ & > .vxe-button {
343
345
  &.type--text {
344
346
  padding: 2px 8px;
345
347
  }
@@ -233,13 +233,13 @@
233
233
  --vxe-input-height-medium: #{$vxe-input-height-medium};
234
234
  --vxe-input-height-small: #{$vxe-input-height-small};
235
235
  --vxe-input-height-mini: #{$vxe-input-height-mini};
236
+ --vxe-input-count-color: #{$vxe-input-count-color};
237
+ --vxe-input-count-background-color: #{$vxe-input-count-background-color};
238
+ --vxe-input-count-error-color: #{$vxe-input-count-error-color};
236
239
 
237
240
  /*textarea*/
238
241
  --vxe-textarea-line-height: #{$vxe-textarea-line-height};
239
242
  --vxe-textarea-background-color: #{$vxe-textarea-background-color};
240
- --vxe-textarea-count-color: #{$vxe-textarea-count-color};
241
- --vxe-textarea-count-background-color: #{$vxe-textarea-count-background-color};
242
- --vxe-textarea-count-error-color: #{$vxe-textarea-count-error-color};
243
243
 
244
244
  /*form*/
245
245
  --vxe-form-item-min-height-default: #{$vxe-form-item-min-height-default};
package/styles/form.scss CHANGED
@@ -138,6 +138,20 @@
138
138
  }
139
139
  }
140
140
  }
141
+ &.is--vertical {
142
+ .vxe-form--item-inner {
143
+ flex-direction: column;
144
+ align-items: initial;
145
+ .vxe-form--item-title {
146
+ height: 2em;
147
+ line-height: 2em;
148
+ padding-right: 0;
149
+ }
150
+ .vxe-form--item-title-content {
151
+ flex-grow: initial;
152
+ }
153
+ }
154
+ }
141
155
  &.is--span {
142
156
  .vxe-default-input:not([type="submit"]):not([type="reset"]),
143
157
  .vxe-default-textarea,
package/styles/input.scss CHANGED
@@ -81,6 +81,18 @@ $iconWidth: 1.6em;
81
81
  }
82
82
  }
83
83
 
84
+ .vxe-input--count {
85
+ position: absolute;
86
+ top: 1px;
87
+ right: 0.5em;
88
+ height: calc(100% - 2px);
89
+ color: var($vxe-input-count-color);
90
+ background-color: var($vxe-input-count-background-color);
91
+ &.is--error {
92
+ color: var($vxe-input-count-error-color);
93
+ }
94
+ }
95
+
84
96
  // 前缀图标
85
97
  .vxe-input {
86
98
  .vxe-input--prefix {
@@ -106,6 +118,14 @@ $iconWidth: 1.6em;
106
118
  .vxe-input--inner {
107
119
  padding-right: $iconWidth + 0.2em;
108
120
  }
121
+ &.is--count {
122
+ .vxe-input--inner {
123
+ padding-right: 5em;
124
+ }
125
+ }
126
+ .vxe-input--count {
127
+ right: $iconWidth + 0.5em;
128
+ }
109
129
  }
110
130
  &.is--left {
111
131
  .vxe-input--inner {
@@ -122,6 +142,11 @@ $iconWidth: 1.6em;
122
142
  text-align: right;
123
143
  }
124
144
  }
145
+ &.is--count {
146
+ .vxe-input--inner {
147
+ padding-right: 3.4em;
148
+ }
149
+ }
125
150
  &.is--controls {
126
151
  &.type--search,
127
152
  &.type--password,
package/styles/table.scss CHANGED
@@ -454,10 +454,14 @@
454
454
  font-family: $vxe-font-family;
455
455
  direction: ltr;
456
456
  .vxe-table--body-wrapper {
457
- background-color: $vxe-table-body-background-color;
457
+ table {
458
+ background-color: $vxe-table-body-background-color;
459
+ }
458
460
  }
459
461
  .vxe-table--footer-wrapper {
460
- background-color: $vxe-table-footer-background-color;
462
+ table {
463
+ background-color: $vxe-table-footer-background-color;
464
+ }
461
465
  }
462
466
  .vxe-table--header,
463
467
  .vxe-table--body,
@@ -60,10 +60,10 @@
60
60
  bottom: 0.2em;
61
61
  right: 1.4em;
62
62
  padding-left: 0.2em;
63
- color: $vxe-textarea-count-color;
64
- background-color: $vxe-textarea-count-background-color;
63
+ color: $vxe-input-count-color;
64
+ background-color: $vxe-input-count-background-color;
65
65
  &.is--error {
66
- color: $vxe-textarea-count-error-color;
66
+ color: $vxe-input-count-error-color;
67
67
  }
68
68
  }
69
69
 
@@ -230,13 +230,13 @@ $vxe-input-height-default: $vxe-button-height-default !default;
230
230
  $vxe-input-height-medium: $vxe-button-height-medium !default;
231
231
  $vxe-input-height-small: $vxe-button-height-small !default;
232
232
  $vxe-input-height-mini: $vxe-button-height-mini !default;
233
+ $vxe-input-count-color: #999 !default;
234
+ $vxe-input-count-background-color: #fff !default;
235
+ $vxe-input-count-error-color: $vxe-table-validate-error-color !default;
233
236
 
234
237
  /*textarea*/
235
238
  $vxe-textarea-line-height: 1.5715 !default;
236
239
  $vxe-textarea-background-color: #fff !default;
237
- $vxe-textarea-count-color: #999 !default;
238
- $vxe-textarea-count-background-color: #fff !default;
239
- $vxe-textarea-count-error-color: $vxe-table-validate-error-color !default;
240
240
 
241
241
  /*form*/
242
242
  $vxe-form-item-min-height-default: 36px !default;
@@ -40,6 +40,7 @@ export class FormItem extends VXETableComponent {
40
40
  * 后缀配置项
41
41
  */
42
42
  titleSuffix?: FormItemTitleOptions;
43
+ vertical?: boolean
43
44
  showTitle?: boolean
44
45
  /**
45
46
  * 重置时的默认值
package/types/form.d.ts CHANGED
@@ -14,6 +14,7 @@ export declare class Form extends VXETableComponent {
14
14
  titleAlign?: 'left' | 'center' | 'right';
15
15
  titleWidth?: string | number;
16
16
  titleColon?: boolean;
17
+ vertical?: boolean
17
18
  items?: FormItemOptions[];
18
19
  rules?: FormVaildRules;
19
20
  preventSubmit?: boolean;
package/types/table.d.ts CHANGED
@@ -866,6 +866,15 @@ export declare class Table extends VXETableComponent {
866
866
  * @param {Row} row 指定行
867
867
  */
868
868
  insertAt(records: RecordInfo | RecordInfo[], row: RowInfo | -1 | null): Promise<{ row: RowInfo, rows: RowInfo[] }>;
869
+ /**
870
+ * 往表格在指定行中的下一行插入临时数据
871
+ * 如果 row 为空则从插入到顶部,如果为树结构,则插入到目标节点顶部
872
+ * 如果 row 为 -1 则从插入到底部,如果为树结构,则插入到目标节点底部
873
+ * 如果 row 为有效行则插入到该行的下一行位置,如果为树结构,则有插入到效的目标节点该行的下一行位置
874
+ * @param records records 新的数据
875
+ * @param row row 指定行
876
+ */
877
+ insertNextAtt(records: RecordInfo | RecordInfo[], row: RowInfo | -1 | null): Promise<{ row: RowInfo, rows: RowInfo[] }>;
869
878
  /**
870
879
  * 删除指定行数据,指定 row 或 [row, ...] 删除多条数据,如果为空则删除所有数据
871
880
  * @param rows 指定行
@@ -1340,7 +1349,7 @@ export interface TableCheckboxConfig {
1340
1349
  reserve?: boolean;
1341
1350
  labelField?: string;
1342
1351
  checkField?: string;
1343
- halfField?: string;
1352
+ indeterminateField?: string;
1344
1353
  showHeader?: boolean;
1345
1354
  checkAll?: boolean;
1346
1355
  checkRowKeys?: string[] | number[];
@@ -1350,6 +1359,12 @@ export interface TableCheckboxConfig {
1350
1359
  trigger?: 'default' | 'cell' | 'row' | '';
1351
1360
  highlight?: boolean;
1352
1361
  range?: boolean;
1362
+
1363
+ /**
1364
+ * 请使用 indeterminateField
1365
+ * @deprecated
1366
+ */
1367
+ halfField?: string;
1353
1368
  }
1354
1369
  export type CheckboxConfig = TableCheckboxConfig
1355
1370
 
@@ -9,7 +9,7 @@ import { VxeGlobalCommands } from './commands'
9
9
  import { VxeGlobalFormats } from './formats'
10
10
  import { VxeGlobalMenus } from './menus'
11
11
  import { VxeGlobalValidators } from './validators'
12
- import { VxeGlobalConfigMethod } from './setup'
12
+ import { VxeGlobalConfigMethod } from './config'
13
13
 
14
14
  /* eslint-disable no-use-before-define */
15
15
 
@@ -17,7 +17,7 @@ export type VxeGlobalI18n = (key: string, args?: any) => number | string;
17
17
  export type VxeGlobalTranslate = (key: string, args?: any) => string;
18
18
  export type VxeGlobalUse = (plugin: VXETablePluginObject, ...options: any[]) => VXETableCore;
19
19
 
20
- export const setup: VxeGlobalConfigMethod
20
+ export const config: VxeGlobalConfigMethod
21
21
  export const interceptor: VxeGlobalInterceptor
22
22
  export const renderer: VxeGlobalRenderer
23
23
  export const commands: VxeGlobalCommands
@@ -31,6 +31,12 @@ export const t: VxeGlobalI18n
31
31
  export const _t: VxeGlobalTranslate
32
32
  export const use: VxeGlobalUse
33
33
 
34
+ /**
35
+ * 请使用 config
36
+ * @deprecated
37
+ */
38
+ export const setup: VxeGlobalConfigMethod
39
+
34
40
  export interface VXETablePluginObject {
35
41
  install(vxetable: VXETableCore, ...options: any[]): void;
36
42
  [key: string]: any;
@@ -41,11 +47,6 @@ export type VXETableVersion = 'v1' | 'v2' | 'v3' | 'v4'
41
47
  export const v: VXETableVersion
42
48
 
43
49
  export interface VXETableCore {
44
- /**
45
- * 已被 version 替换
46
- * @deprecated
47
- */
48
- v: VXETableVersion;
49
50
  /**
50
51
  * 版本号
51
52
  */
@@ -53,7 +54,7 @@ export interface VXETableCore {
53
54
  /**
54
55
  * 设置全局参数/获取所有参数
55
56
  */
56
- setup: VxeGlobalConfigMethod;
57
+ config: VxeGlobalConfigMethod;
57
58
  /**
58
59
  * Table interceptor
59
60
  */
@@ -105,10 +106,21 @@ export interface VXETableCore {
105
106
  */
106
107
  t: VxeGlobalI18n;
107
108
  _t: VxeGlobalTranslate;
109
+
110
+ /**
111
+ * 已被 version 替换
112
+ * @deprecated
113
+ */
114
+ v: VXETableVersion;
115
+ /**
116
+ * 请使用 config
117
+ * @deprecated
118
+ */
119
+ setup: VxeGlobalConfigMethod;
108
120
  }
109
121
 
110
122
  /**
111
- * 一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式为零代码而设计...
123
+ * 一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式...
112
124
  */
113
125
  export const VXETable: VXETableCore
114
126
 
@@ -118,6 +130,6 @@ export * from './commands'
118
130
  export * from './formats'
119
131
  export * from './menus'
120
132
  export * from './validators'
121
- export * from './setup'
133
+ export * from './config'
122
134
 
123
135
  export default VXETable
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setup=setup;var _conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function setup(e){return _xeUtils.default.merge(_conf.default,e)}
File without changes