vxe-table 3.4.14-beta.2 → 3.5.0-beta.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 (160) hide show
  1. package/README.md +2 -6
  2. package/lib/button/src/button.js +19 -9
  3. package/lib/button/src/button.min.js +1 -1
  4. package/lib/checkbox/src/checkbox.js +2 -2
  5. package/lib/checkbox/src/checkbox.min.js +1 -1
  6. package/lib/edit/src/mixin.js +26 -18
  7. package/lib/edit/src/mixin.min.js +1 -1
  8. package/lib/export/src/export-panel.js +2 -2
  9. package/lib/export/src/export-panel.min.js +1 -1
  10. package/lib/export/src/import-panel.js +2 -2
  11. package/lib/export/src/import-panel.min.js +1 -1
  12. package/lib/export/src/mixin.js +26 -24
  13. package/lib/export/src/mixin.min.js +1 -1
  14. package/lib/filter/src/mixin.js +28 -21
  15. package/lib/filter/src/mixin.min.js +1 -1
  16. package/lib/filter/src/panel.js +2 -2
  17. package/lib/filter/src/panel.min.js +1 -1
  18. package/lib/footer/src/footer.js +7 -4
  19. package/lib/footer/src/footer.min.js +1 -1
  20. package/lib/form/src/form-gather.js +2 -2
  21. package/lib/form/src/form-gather.min.js +1 -1
  22. package/lib/form/src/form-item.js +8 -3
  23. package/lib/form/src/form-item.min.js +1 -1
  24. package/lib/form/src/form.js +48 -38
  25. package/lib/form/src/form.min.js +1 -1
  26. package/lib/form/src/render.js +5 -5
  27. package/lib/form/src/render.min.js +1 -1
  28. package/lib/form/src/util.js +13 -2
  29. package/lib/form/src/util.min.js +1 -1
  30. package/lib/grid/src/grid.js +44 -34
  31. package/lib/grid/src/grid.min.js +1 -1
  32. package/lib/header/src/header.js +10 -8
  33. package/lib/header/src/header.min.js +1 -1
  34. package/lib/index.umd.js +2322 -2170
  35. package/lib/index.umd.min.js +1 -2
  36. package/lib/input/src/input.js +30 -18
  37. package/lib/input/src/input.min.js +1 -1
  38. package/lib/keyboard/src/mixin.js +12 -8
  39. package/lib/keyboard/src/mixin.min.js +1 -1
  40. package/lib/list/src/list.js +7 -5
  41. package/lib/list/src/list.min.js +1 -1
  42. package/lib/menu/src/mixin.js +24 -14
  43. package/lib/menu/src/mixin.min.js +1 -1
  44. package/lib/menu/src/panel.js +3 -3
  45. package/lib/menu/src/panel.min.js +1 -1
  46. package/lib/modal/src/modal.js +24 -12
  47. package/lib/modal/src/modal.min.js +1 -1
  48. package/lib/pulldown/src/pulldown.js +16 -12
  49. package/lib/pulldown/src/pulldown.min.js +1 -1
  50. package/lib/radio/src/button.js +2 -2
  51. package/lib/radio/src/button.min.js +1 -1
  52. package/lib/radio/src/radio.js +2 -2
  53. package/lib/radio/src/radio.min.js +1 -1
  54. package/lib/select/src/select.js +26 -16
  55. package/lib/select/src/select.min.js +1 -1
  56. package/lib/switch/src/switch.js +4 -4
  57. package/lib/switch/src/switch.min.js +1 -1
  58. package/lib/table/src/body.js +46 -22
  59. package/lib/table/src/body.min.js +1 -1
  60. package/lib/table/src/cell.js +19 -11
  61. package/lib/table/src/cell.min.js +1 -1
  62. package/lib/table/src/column.js +3 -3
  63. package/lib/table/src/column.min.js +1 -1
  64. package/lib/table/src/columnInfo.js +201 -0
  65. package/lib/table/src/columnInfo.min.js +1 -0
  66. package/lib/table/src/methods.js +339 -307
  67. package/lib/table/src/methods.min.js +1 -1
  68. package/lib/table/src/table.js +80 -62
  69. package/lib/table/src/table.min.js +1 -1
  70. package/lib/table/src/util.js +38 -3
  71. package/lib/table/src/util.min.js +1 -1
  72. package/lib/textarea/src/textarea.js +2 -2
  73. package/lib/textarea/src/textarea.min.js +1 -1
  74. package/lib/toolbar/src/toolbar.js +16 -10
  75. package/lib/toolbar/src/toolbar.min.js +1 -1
  76. package/lib/tools/{src/dom.js → dom.js} +12 -1
  77. package/lib/tools/dom.min.js +1 -0
  78. package/lib/tools/{src/event.js → event.js} +3 -6
  79. package/lib/tools/event.min.js +1 -0
  80. package/lib/tools/log.js +29 -0
  81. package/lib/tools/log.min.js +1 -0
  82. package/lib/tools/{src/resize.js → resize.js} +1 -1
  83. package/lib/tools/resize.min.js +1 -0
  84. package/lib/tools/utils.js +155 -0
  85. package/lib/tools/utils.min.js +1 -0
  86. package/lib/tooltip/src/tooltip.js +89 -50
  87. package/lib/tooltip/src/tooltip.min.js +1 -1
  88. package/lib/v-x-e-table/index.js +7 -4
  89. package/lib/v-x-e-table/index.min.js +1 -1
  90. package/lib/v-x-e-table/src/conf.js +4 -1
  91. package/lib/v-x-e-table/src/conf.min.js +1 -1
  92. package/lib/v-x-e-table/src/interceptor.js +4 -4
  93. package/lib/v-x-e-table/src/interceptor.min.js +1 -1
  94. package/lib/v-x-e-table/src/renderer.js +18 -10
  95. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  96. package/lib/v-x-e-table/src/store.js +3 -3
  97. package/lib/v-x-e-table/src/store.min.js +1 -1
  98. package/lib/validator/src/mixin.js +4 -4
  99. package/lib/validator/src/mixin.min.js +1 -1
  100. package/package.json +3 -3
  101. package/packages/button/src/button.js +4 -2
  102. package/packages/checkbox/src/checkbox.js +2 -2
  103. package/packages/edit/src/mixin.js +7 -6
  104. package/packages/export/src/export-panel.js +1 -1
  105. package/packages/export/src/import-panel.js +1 -1
  106. package/packages/export/src/mixin.js +20 -19
  107. package/packages/filter/src/mixin.js +18 -14
  108. package/packages/filter/src/panel.js +1 -1
  109. package/packages/footer/src/footer.js +4 -2
  110. package/packages/form/src/form-gather.js +2 -2
  111. package/packages/form/src/form-item.js +7 -2
  112. package/packages/form/src/form.js +29 -23
  113. package/packages/form/src/render.js +4 -4
  114. package/packages/form/src/util.js +9 -2
  115. package/packages/grid/src/grid.js +22 -20
  116. package/packages/header/src/header.js +3 -2
  117. package/packages/input/src/input.js +6 -3
  118. package/packages/keyboard/src/mixin.js +1 -2
  119. package/packages/list/src/list.js +3 -2
  120. package/packages/menu/src/mixin.js +5 -3
  121. package/packages/menu/src/panel.js +3 -3
  122. package/packages/modal/src/modal.js +7 -4
  123. package/packages/pulldown/src/pulldown.js +3 -1
  124. package/packages/radio/src/button.js +2 -2
  125. package/packages/radio/src/radio.js +2 -2
  126. package/packages/select/src/select.js +5 -3
  127. package/packages/switch/src/switch.js +4 -4
  128. package/packages/table/src/body.js +36 -17
  129. package/packages/table/src/cell.js +5 -4
  130. package/packages/table/src/column.js +1 -1
  131. package/packages/table/src/columnInfo.js +148 -0
  132. package/packages/table/src/methods.js +100 -75
  133. package/packages/table/src/table.js +56 -41
  134. package/packages/table/src/util.js +19 -1
  135. package/packages/textarea/src/textarea.js +2 -2
  136. package/packages/toolbar/src/toolbar.js +7 -4
  137. package/packages/tools/{src/dom.js → dom.js} +13 -1
  138. package/packages/tools/{src/event.js → event.js} +1 -3
  139. package/packages/tools/log.js +16 -0
  140. package/packages/tools/{src/resize.js → resize.js} +1 -1
  141. package/packages/tools/utils.js +108 -0
  142. package/packages/tooltip/src/tooltip.js +49 -24
  143. package/packages/v-x-e-table/index.js +4 -2
  144. package/packages/v-x-e-table/src/conf.js +4 -1
  145. package/packages/v-x-e-table/src/interceptor.js +3 -3
  146. package/packages/v-x-e-table/src/renderer.js +4 -3
  147. package/packages/v-x-e-table/src/store.js +2 -2
  148. package/packages/validator/src/mixin.js +3 -3
  149. package/types/v-x-e-table/index.d.ts +8 -0
  150. package/README.en.md +0 -170
  151. package/README.zh-TW.md +0 -174
  152. package/lib/tools/index.js +0 -76
  153. package/lib/tools/index.min.js +0 -1
  154. package/lib/tools/src/dom.min.js +0 -1
  155. package/lib/tools/src/event.min.js +0 -1
  156. package/lib/tools/src/resize.min.js +0 -1
  157. package/lib/tools/src/utils.js +0 -365
  158. package/lib/tools/src/utils.min.js +0 -1
  159. package/packages/tools/index.js +0 -14
  160. package/packages/tools/src/utils.js +0 -272
@@ -1,7 +1,8 @@
1
1
  import XEUtils from 'xe-utils'
2
2
  import GlobalConfig from '../../v-x-e-table/src/conf'
3
3
  import vSize from '../../mixins/size'
4
- import { UtilTools, DomTools } from '../../tools'
4
+ import UtilTools from '../../tools/utils'
5
+ import DomTools from '../../tools/dom'
5
6
 
6
7
  function updateTipStyle (_vm) {
7
8
  const { $el: wrapperElem, tipTarget, tipStore } = _vm
@@ -26,6 +27,20 @@ function updateTipStyle (_vm) {
26
27
  }
27
28
  }
28
29
 
30
+ function showTip (_vm) {
31
+ const { $el, tipStore, zIndex } = _vm
32
+ const parentNode = $el.parentNode
33
+ if (!parentNode) {
34
+ document.body.appendChild($el)
35
+ }
36
+ _vm.updateValue(true)
37
+ _vm.updateZindex()
38
+ tipStore.placement = 'top'
39
+ tipStore.style = { width: 'auto', left: 0, top: 0, zIndex: zIndex || _vm.tipZindex }
40
+ tipStore.arrowStyle = { left: '50%' }
41
+ return _vm.updatePlacement()
42
+ }
43
+
29
44
  export default {
30
45
  name: 'VxeTooltip',
31
46
  mixins: [vSize],
@@ -38,15 +53,16 @@ export default {
38
53
  zIndex: [String, Number],
39
54
  isArrow: { type: Boolean, default: true },
40
55
  enterable: Boolean,
56
+ enterDelay: { type: Number, default: () => GlobalConfig.tooltip.enterDelay },
41
57
  leaveDelay: { type: Number, default: () => GlobalConfig.tooltip.leaveDelay },
42
58
  leaveMethod: Function
43
59
  },
44
60
  data () {
45
61
  return {
46
62
  isUpdate: false,
47
- isHover: false,
48
63
  visible: false,
49
64
  message: '',
65
+ tipActive: false,
50
66
  tipTarget: null,
51
67
  tipZindex: 0,
52
68
  tipStore: {
@@ -67,6 +83,13 @@ export default {
67
83
  this.isUpdate = false
68
84
  }
69
85
  },
86
+ created () {
87
+ this.showDelayTip = XEUtils.debounce(() => {
88
+ if (this.tipActive) {
89
+ showTip(this)
90
+ }
91
+ }, this.enterDelay, { leading: false, trailing: true })
92
+ },
70
93
  mounted () {
71
94
  const { $el, trigger, content, value } = this
72
95
  const parentNode = $el.parentNode
@@ -111,7 +134,7 @@ export default {
111
134
  }
112
135
  },
113
136
  render (h) {
114
- const { $scopedSlots, vSize, theme, message, isHover, isArrow, visible, tipStore, enterable } = this
137
+ const { $scopedSlots, vSize, theme, message, tipActive, isArrow, visible, tipStore, enterable } = this
115
138
  let on
116
139
  if (enterable) {
117
140
  on = {
@@ -126,7 +149,7 @@ export default {
126
149
  'is--enterable': enterable,
127
150
  'is--visible': visible,
128
151
  'is--arrow': isArrow,
129
- 'is--hover': isHover
152
+ 'is--actived': tipActive
130
153
  }],
131
154
  style: tipStore.style,
132
155
  ref: 'tipWrapper',
@@ -147,15 +170,16 @@ export default {
147
170
  },
148
171
  close () {
149
172
  this.tipTarget = null
173
+ this.tipActive = false
150
174
  Object.assign(this.tipStore, {
151
175
  style: {},
152
176
  placement: '',
153
177
  arrowStyle: null
154
178
  })
155
- this.update(false)
179
+ this.updateValue(false)
156
180
  return this.$nextTick()
157
181
  },
158
- update (value) {
182
+ updateValue (value) {
159
183
  if (value !== this.visible) {
160
184
  this.visible = value
161
185
  this.isUpdate = true
@@ -170,23 +194,18 @@ export default {
170
194
  }
171
195
  },
172
196
  toVisible (target, message) {
173
- this.targetActive = true
174
197
  if (target) {
175
- const { $el, tipStore, zIndex } = this
176
- const parentNode = $el.parentNode
177
- if (!parentNode) {
178
- document.body.appendChild($el)
179
- }
198
+ const { trigger, enterDelay } = this
199
+ this.tipActive = true
200
+ this.tipTarget = target
180
201
  if (message) {
181
202
  this.message = message
182
203
  }
183
- this.tipTarget = target
184
- this.update(true)
185
- this.updateZindex()
186
- tipStore.placement = 'top'
187
- tipStore.style = { width: 'auto', left: 0, top: 0, zIndex: zIndex || this.tipZindex }
188
- tipStore.arrowStyle = { left: '50%' }
189
- return this.updatePlacement()
204
+ if (enterDelay && trigger === 'hover') {
205
+ this.showDelayTip()
206
+ } else {
207
+ return showTip(this)
208
+ }
190
209
  }
191
210
  return this.$nextTick()
192
211
  },
@@ -199,6 +218,12 @@ export default {
199
218
  }
200
219
  })
201
220
  },
221
+ isActived () {
222
+ return this.tipActive
223
+ },
224
+ setActived (actived) {
225
+ this.tipActive = !!actived
226
+ },
202
227
  clickEvent () {
203
228
  this[this.visible ? 'close' : 'open']()
204
229
  },
@@ -207,10 +232,10 @@ export default {
207
232
  },
208
233
  targetMouseleaveEvent () {
209
234
  const { trigger, enterable, leaveDelay } = this
210
- this.targetActive = false
235
+ this.tipActive = false
211
236
  if (enterable && trigger === 'hover') {
212
237
  setTimeout(() => {
213
- if (!this.isHover) {
238
+ if (!this.tipActive) {
214
239
  this.close()
215
240
  }
216
241
  }, leaveDelay)
@@ -219,15 +244,15 @@ export default {
219
244
  }
220
245
  },
221
246
  wrapperMouseenterEvent () {
222
- this.isHover = true
247
+ this.tipActive = true
223
248
  },
224
249
  wrapperMouseleaveEvent (evnt) {
225
250
  const { leaveMethod, trigger, enterable, leaveDelay } = this
226
- this.isHover = false
251
+ this.tipActive = false
227
252
  if (!leaveMethod || leaveMethod({ $event: evnt }) !== false) {
228
253
  if (enterable && trigger === 'hover') {
229
254
  setTimeout(() => {
230
- if (!this.targetActive) {
255
+ if (!this.tipActive) {
231
256
  this.close()
232
257
  }
233
258
  }, leaveDelay)
@@ -6,7 +6,8 @@ import { commands } from './src/commands'
6
6
  import { menus } from './src/menus'
7
7
  import { formats } from './src/formats'
8
8
  import { setup } from './src/setup'
9
- import { UtilTools } from '../tools'
9
+ import { UtilTools } from '../tools/utils'
10
+ import { errLog } from '../tools/log'
10
11
 
11
12
  const installedPlugins = []
12
13
 
@@ -29,7 +30,7 @@ function reg (key) {
29
30
  // 检测安装顺序是否正确
30
31
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
31
32
  if (VXETable.Table) {
32
- UtilTools.error('vxe.error.useErr', [key])
33
+ errLog('vxe.error.useErr', [key])
33
34
  }
34
35
  }
35
36
  VXETable[`_${key}`] = 1
@@ -88,6 +89,7 @@ export const v = 'v3'
88
89
 
89
90
  export const VXETable = {
90
91
  v,
92
+ version: process.env.VUE_APP_VXE_TABLE_VERSION,
91
93
  reg,
92
94
  use,
93
95
  setup,
@@ -26,6 +26,9 @@ export default {
26
26
  // emptyRender: {
27
27
  // name: ''
28
28
  // },
29
+ // rowConfig: {
30
+ // keyField: '_X_ID' // 行数据的唯一主键字段名
31
+ // },
29
32
  radioConfig: {
30
33
  // trigger: 'default'
31
34
  strict: true
@@ -49,7 +52,6 @@ export default {
49
52
  // storage: false,
50
53
  // checkMethod () {}
51
54
  // },
52
- // rowId: '_X_ID', // 行数据的唯一主键字段名
53
55
  sortConfig: {
54
56
  // remote: false,
55
57
  // trigger: 'default',
@@ -228,6 +230,7 @@ export default {
228
230
  // size: null,
229
231
  trigger: 'hover',
230
232
  theme: 'dark',
233
+ enterDelay: 500,
231
234
  leaveDelay: 300
232
235
  },
233
236
  pager: {
@@ -1,5 +1,5 @@
1
- import { UtilTools } from '../../tools'
2
1
  import XEUtils from 'xe-utils'
2
+ import { warnLog } from '../../tools/log'
3
3
 
4
4
  function toType (type) {
5
5
  return XEUtils.toValueString(type).replace('_', '').toLowerCase()
@@ -22,7 +22,7 @@ export const interceptor = {
22
22
  // 检测类型
23
23
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
24
24
  if (eventTypes.indexOf(type) === -1) {
25
- UtilTools.warn('vxe.error.errProp', [`Interceptor.${type}`, eventTypes.join('|')])
25
+ warnLog('vxe.error.errProp', [`Interceptor.${type}`, eventTypes.join('|')])
26
26
  }
27
27
  }
28
28
 
@@ -35,7 +35,7 @@ export const interceptor = {
35
35
  // 检测重复
36
36
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
37
37
  if (eList.indexOf(callback) > -1) {
38
- UtilTools.warn('vxe.error.coverProp', ['Interceptor', type])
38
+ warnLog('vxe.error.coverProp', ['Interceptor', type])
39
39
  }
40
40
  }
41
41
 
@@ -1,6 +1,7 @@
1
1
  import XEUtils from 'xe-utils'
2
2
  import GlobalConfig from '../../v-x-e-table/src/conf'
3
- import { UtilTools } from '../../tools'
3
+ import UtilTools, { getFuncText } from '../../tools/utils'
4
+ import { warnLog } from '../../tools/log'
4
5
 
5
6
  const defaultCompProps = { transfer: true }
6
7
 
@@ -92,7 +93,7 @@ function getCellLabelVNs (h, renderOpts, params, cellLabel) {
92
93
  }, placeholder && isEmptyValue(cellLabel) ? [
93
94
  h('span', {
94
95
  class: 'vxe-cell--placeholder'
95
- }, UtilTools.formatText(UtilTools.getFuncText(placeholder), 1))
96
+ }, UtilTools.formatText(getFuncText(placeholder), 1))
96
97
  ] : UtilTools.formatText(cellLabel, 1))
97
98
  ]
98
99
  }
@@ -672,7 +673,7 @@ export const renderer = {
672
673
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
673
674
  XEUtils.each(options, (val, key) => {
674
675
  if (!XEUtils.eqNull(renders[key]) && renders[key] !== val) {
675
- UtilTools.warn('vxe.error.coverProp', [`Renderer.${name}`, key])
676
+ warnLog('vxe.error.coverProp', [`Renderer.${name}`, key])
676
677
  }
677
678
  })
678
679
  }
@@ -1,5 +1,5 @@
1
- import { UtilTools } from '../../tools'
2
1
  import XEUtils from 'xe-utils'
2
+ import { warnLog } from '../../tools/log'
3
3
 
4
4
  /**
5
5
  * 创建数据仓库
@@ -22,7 +22,7 @@ class Store {
22
22
  // 检测是否覆盖
23
23
  if (process.env.VUE_APP_VXE_TABLE_ENV === 'development') {
24
24
  if (!XEUtils.eqNull(this.store[name]) && this.store[name] !== render) {
25
- UtilTools.warn('vxe.error.coverProp', [this._name, name])
25
+ warnLog('vxe.error.coverProp', [this._name, name])
26
26
  }
27
27
  }
28
28
  this.store[name] = render
@@ -1,7 +1,7 @@
1
1
  import XEUtils from 'xe-utils'
2
2
  import GlobalConfig from '../../v-x-e-table/src/conf'
3
- import { UtilTools, DomTools } from '../../tools'
4
- import { eqEmptyValue } from '../../tools/src/utils'
3
+ import { eqEmptyValue, getFuncText } from '../../tools/utils'
4
+ import DomTools from '../../tools/dom'
5
5
 
6
6
  /**
7
7
  * 校验规则
@@ -26,7 +26,7 @@ class Rule {
26
26
  * 支持国际化翻译
27
27
  */
28
28
  get content () {
29
- return UtilTools.getFuncText(this.$options.content || this.$options.message)
29
+ return getFuncText(this.$options.content || this.$options.message)
30
30
  }
31
31
 
32
32
  get message () {
@@ -38,7 +38,15 @@ export type VXETableVersion = 'v1' | 'v2' | 'v3' | 'v4'
38
38
  export const v: VXETableVersion
39
39
 
40
40
  export interface VXETableCore {
41
+ /**
42
+ * 已被 version 替换
43
+ * @deprecated
44
+ */
41
45
  v: VXETableVersion;
46
+ /**
47
+ * 版本号
48
+ */
49
+ version: string;
42
50
  /**
43
51
  * 设置全局参数/获取所有参数
44
52
  */
package/README.en.md DELETED
@@ -1,170 +0,0 @@
1
- # vxe-table
2
-
3
- [简体中文](README.md) | [繁體中文](README.zh-TW.md) | English
4
-
5
- [![star](https://gitee.com/xuliangzhan_admin/vxe-table/badge/star.svg?theme=gvp)](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
6
- [![npm version](https://img.shields.io/npm/v/vxe-table.svg?style=flat-square)](https://www.npmjs.com/package/vxe-table)
7
- [![npm build](https://travis-ci.com/x-extends/vxe-table.svg?branch=master)](https://travis-ci.com/x-extends/vxe-table)
8
- [![npm downloads](https://img.shields.io/npm/dt/vxe-table.svg?style=flat-square)](https://npm-stat.com/charts.html?package=vxe-table)
9
- [![issues](https://img.shields.io/github/issues/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/issues)
10
- [![issues closed](https://img.shields.io/github/issues-closed/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/issues?q=is%3Aissue+is%3Aclosed)
11
- [![pull requests](https://img.shields.io/github/issues-pr/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/pulls)
12
- [![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)
13
- [![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
14
-
15
- A [vue](https://www.npmjs.com/package/vue) based PC form component, support add, delete, change, virtual list, virtual tree, lazy load, shortcut menu, data validation, print export, form rendering, data paging, modal window, custom template, renderer, flexible configuration items, extension interface, etc...
16
-
17
- * Design concept
18
- * Efficient and concise API design for modern browsers
19
- * Modular tables, on-demand loading, extended interfaces
20
- * Designed for single row table editing, supports addition, deletion, modification and query as well as more expansion, with powerful functions and performance at the same time
21
-
22
- ## Browser Support
23
-
24
- ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png)
25
- --- | --- | --- | --- | --- | --- |
26
- 11+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 8+ ✔ |
27
-
28
- ## Features
29
-
30
- * [x] Basic table
31
- * [x] Grid
32
- * [x] Striped
33
- * [x] Table with border
34
- * [x] Cell style
35
- * [x] Column resizing
36
- * [x] Maximum table height
37
- * [x] Resize height & width
38
- * [x] Fixed column
39
- * [x] Grouping table header
40
- * [x] Table footer
41
- * [x] Highlight row & column
42
- * [x] Table sequence
43
- * [x] Radio
44
- * [x] Checkbox
45
- * [x] Select
46
- * [x] Switch
47
- * [x] Sorting
48
- * [x] Multi field sorting
49
- * [x] Filter
50
- * [x] Merged cells
51
- * [x] Merged footer items
52
- * [x] Import/Export/Print
53
- * [x] Show/Hide column
54
- * [x] Loading
55
- * [x] Formatted cell
56
- * [x] Slot - template
57
- * [x] Context menu
58
- * [x] Detail - Expandable row
59
- * [x] Pager
60
- * [x] Form
61
- * [x] Toolbar
62
- * [x] Pulldown
63
- * [x] Virtual list
64
- * [x] Virtual tree
65
- * [x] Editable CRUD
66
- * [x] Validate
67
- * [x] Data Proxy
68
- * [x] Keyboard navigation
69
- * [x] Modal
70
- * [x] Renderer
71
- * [x] Virtual scroller
72
- * [x] Virtual merger
73
- * [x] (pro) Cell area selection
74
- * [x] (pro) Cell copy & paste
75
- * [x] (pro) Cell find and replace
76
-
77
- ## Installing
78
-
79
- Version:[vue](https://www.npmjs.com/package/vue) 2.6.x, Dependent: [xe-utils](https://www.npmjs.com/package/xe-utils)
80
-
81
- ```shell
82
- npm install xe-utils vxe-table@3
83
- ```
84
-
85
- Get on [unpkg](https://unpkg.com/vxe-table/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-table/)
86
-
87
- ### npm
88
-
89
- ```javascript
90
- import Vue from 'vue'
91
- import 'xe-utils'
92
- import VXETable from 'vxe-table'
93
- import 'vxe-table/lib/style.css'
94
-
95
- Vue.use(VXETable)
96
- ```
97
-
98
- ### CDN
99
-
100
- It is not recommended to use the public CDN address for production, because the connection may fail at any time, causing the project to hang up;
101
- Remember to lock the version number by using CDN to avoid being affected by incompatible updates.
102
-
103
- ```HTML
104
- <!-- Style -->
105
- <link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
106
- <!-- Script -->
107
- <script src="https://unpkg.com/xe-utils"></script>
108
- <script src="https://unpkg.com/vxe-table"></script>
109
- ```
110
-
111
- ## Example
112
-
113
- ```html
114
- <template>
115
- <div>
116
- <vxe-table :data="tableData">
117
- <vxe-column type="seq" title="Seq" width="60"></vxe-column>
118
- <vxe-column field="name" title="Name"></vxe-column>
119
- <vxe-colgroup title="Group1">
120
- <vxe-column field="sex" title="Sex"></vxe-column>
121
- <vxe-column field="address" title="Address"></vxe-column>
122
- </vxe-colgroup>
123
- </vxe-table>
124
- </div>
125
- </template>
126
-
127
- <script>
128
- export default {
129
- data () {
130
- return {
131
- tableData: [
132
- { id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', address: 'Shenzhen' },
133
- { id: 10002, name: 'Test2', role: 'Test', sex: 'Man', address: 'Guangzhou' },
134
- { id: 10003, name: 'Test3', role: 'PM', sex: 'Man', address: 'Shanghai' }
135
- ]
136
- }
137
- }
138
- }
139
- </script>
140
- ```
141
-
142
- ## Docs
143
-
144
- 💡 [User guide](https://github.com/xuliangzhan/vxe-table-demo)
145
- 👉 [View example](https://x-extends.github.io/vxe-table/#/table/base/basic)
146
- 👉 [View API](https://x-extends.github.io/vxe-table/#/table/api)
147
-
148
- ## Run the project
149
-
150
- Install dependencies
151
-
152
- ```shell
153
- npm install
154
- ```
155
-
156
- Start local debugging
157
-
158
- ```shell
159
- npm run serve
160
- ```
161
-
162
- Compile packaging, generated compiled directory: lib
163
-
164
- ```shell
165
- npm run lib
166
- ```
167
-
168
- ## License
169
-
170
- [MIT](LICENSE) © 2019-present, Xu Liangzhan
package/README.zh-TW.md DELETED
@@ -1,174 +0,0 @@
1
- # vxe-table
2
-
3
- [简体中文](README.md) | 繁體中文 | [English](README.en.md)
4
-
5
- [![star](https://gitee.com/xuliangzhan_admin/vxe-table/badge/star.svg?theme=gvp)](https://gitee.com/xuliangzhan_admin/vxe-table/stargazers)
6
- [![npm version](https://img.shields.io/npm/v/vxe-table.svg?style=flat-square)](https://www.npmjs.com/package/vxe-table)
7
- [![npm build](https://travis-ci.com/x-extends/vxe-table.svg?branch=master)](https://travis-ci.com/x-extends/vxe-table)
8
- [![npm downloads](https://img.shields.io/npm/dt/vxe-table.svg?style=flat-square)](https://npm-stat.com/charts.html?package=vxe-table)
9
- [![issues](https://img.shields.io/github/issues/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/issues)
10
- [![issues closed](https://img.shields.io/github/issues-closed/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/issues?q=is%3Aissue+is%3Aclosed)
11
- [![pull requests](https://img.shields.io/github/issues-pr/x-extends/vxe-table.svg)](https://github.com/x-extends/vxe-table/pulls)
12
- [![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)
13
- [![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
14
-
15
- 一個基於 [vue](https://www.npmjs.com/package/vue) 的PC端表格組件,支持增删改查、虛擬清單、虛擬樹、懶加載、快捷選單、數據校驗、列印匯出、表單渲染、數據分頁、彈窗、自定義範本、渲染器、賊靈活的配寘項、擴展接口等…
16
-
17
- * 設計理念
18
- * 面向現代瀏覽器,高效的簡潔 API 設計
19
- * 模組化表格、按需加載、擴展介面
20
- * 為單行編輯表格而設計,支持增删改查及更多擴展,强大的功能的同時兼具效能
21
-
22
- ## QQ 交流群
23
-
24
- ![qq](https://gitee.com/xuliangzhan_admin/vxe-table/raw/master/public/static/donation/qq.png)
25
-
26
- ## 瀏覽器支持
27
-
28
- ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png)
29
- --- | --- | --- | --- | --- | --- |
30
- 11+ ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 8+ ✔ |
31
-
32
- ## 功能點
33
-
34
- * [x] 基礎表格
35
- * [x] 高級表格
36
- * [x] 斑馬線條紋
37
- * [x] 多種邊框
38
- * [x] 儲存格樣式
39
- * [x] 列寬拖動
40
- * [x] 最大高度
41
- * [x] 自我調整寬高
42
- * [x] 固定列
43
- * [x] 多級表頭
44
- * [x] 錶尾數據
45
- * [x] 高亮行或列
46
- * [x] 序號
47
- * [x] 單選框
48
- * [x] 核取方塊
49
- * [x] 下拉選項
50
- * [x] 開關
51
- * [x] 排序
52
- * [x] 多欄位組合排序
53
- * [x] 篩選
54
- * [x] 儲存格合併
55
- * [x] 合併錶尾
56
- * [x] 導入/匯出/列印
57
- * [x] 顯示/隱藏列
58
- * [x] 加載中
59
- * [x] 格式化內容
60
- * [x] 自定義插槽 - 範本
61
- * [x] 快捷選單
62
- * [x] 展開行
63
- * [x] 分頁
64
- * [x] 表單
65
- * [x] 工具列
66
- * [x] 下拉容器
67
- * [x] 虛擬清單
68
- * [x] 虛擬樹
69
- * [x] 增删改查
70
- * [x] 數據校驗
71
- * [x] 數據代理
72
- * [x] 鍵盤導航
73
- * [x] 彈窗
74
- * [x] 渲染器
75
- * [x] 虛擬滾動
76
- * [x] 虛擬合併
77
- * [x] (pro) 儲存格區域選取
78
- * [x] (pro) 儲存格複製/粘貼
79
- * [x] (pro) 儲存格查找和替換
80
-
81
- ## 安裝
82
-
83
- 版本:[vue](https://www.npmjs.com/package/vue) 2.6.x, 依賴庫:[xe-utils](https://www.npmjs.com/package/xe-utils)
84
-
85
- ```shell
86
- npm install xe-utils vxe-table@3
87
- ```
88
-
89
- Get on [unpkg](https://unpkg.com/vxe-table/) and [cdnjs](https://cdn.jsdelivr.net/npm/vxe-table/)
90
-
91
- ### npm
92
-
93
- ```javascript
94
- import Vue from 'vue'
95
- import 'xe-utils'
96
- import VXETable from 'vxe-table'
97
- import 'vxe-table/lib/style.css'
98
-
99
- Vue.use(VXETable)
100
- ```
101
-
102
- ### CDN
103
-
104
- 不建議將公共的CDN地址用於生產,因為該連接隨時都可能會失效,導致項目掛掉;
105
- 使用CDN管道記得鎖定版本號,避免受到非相容性更新的影響
106
-
107
- ```HTML
108
- <!-- 引入樣式 -->
109
- <link rel="stylesheet" href="https://unpkg.com/vxe-table/lib/style.css">
110
- <!-- 引入腳本 -->
111
- <script src="https://unpkg.com/xe-utils"></script>
112
- <script src="https://unpkg.com/vxe-table"></script>
113
- ```
114
-
115
- ## 示例
116
-
117
- ```html
118
- <template>
119
- <div>
120
- <vxe-table :data="tableData">
121
- <vxe-column type="seq" title="Seq" width="60"></vxe-column>
122
- <vxe-column field="name" title="Name"></vxe-column>
123
- <vxe-colgroup title="Group1">
124
- <vxe-column field="sex" title="Sex"></vxe-column>
125
- <vxe-column field="address" title="Address"></vxe-column>
126
- </vxe-colgroup>
127
- </vxe-table>
128
- </div>
129
- </template>
130
-
131
- <script>
132
- export default {
133
- data () {
134
- return {
135
- tableData: [
136
- { id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', address: 'Shenzhen' },
137
- { id: 10002, name: 'Test2', role: 'Test', sex: 'Man', address: 'Guangzhou' },
138
- { id: 10003, name: 'Test3', role: 'PM', sex: 'Man', address: 'Shanghai' }
139
- ]
140
- }
141
- }
142
- }
143
- </script>
144
- ```
145
-
146
- ## 檔案
147
-
148
- 💡 [使用指南](https://github.com/xuliangzhan/vxe-table-demo)
149
- 👉 [查看檔案](https://xuliangzhan_admin.gitee.io/vxe-table/) [👀備用地址1](https://x-extends.github.io/vxe-table/#/table/base/basic)
150
- 👉 [查看檔案](https://xuliangzhan_admin.gitee.io/vxe-table/#/table/api) [👀備用地址1](https://x-extends.github.io/vxe-table/#/table/api)
151
-
152
- ## 運行項目
153
-
154
- 安裝依賴
155
-
156
- ```shell
157
- npm install
158
- ```
159
-
160
- 啓動本地調試
161
-
162
- ```shell
163
- npm run serve
164
- ```
165
-
166
- 編譯打包,生成編譯後的目錄:lib
167
-
168
- ```shell
169
- npm run lib
170
- ```
171
-
172
- ## License
173
-
174
- [MIT](LICENSE) © 2019-present, Xu Liangzhan