vxe-table 3.4.14-beta.3 → 3.5.0-beta.1

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 (171) hide show
  1. package/README.md +2 -6
  2. package/helper/vetur/attributes.json +30 -10
  3. package/helper/vetur/tags.json +7 -2
  4. package/lib/button/src/button.js +19 -9
  5. package/lib/button/src/button.min.js +1 -1
  6. package/lib/checkbox/src/checkbox.js +2 -2
  7. package/lib/checkbox/src/checkbox.min.js +1 -1
  8. package/lib/edit/src/mixin.js +26 -18
  9. package/lib/edit/src/mixin.min.js +1 -1
  10. package/lib/export/src/export-panel.js +2 -2
  11. package/lib/export/src/export-panel.min.js +1 -1
  12. package/lib/export/src/import-panel.js +2 -2
  13. package/lib/export/src/import-panel.min.js +1 -1
  14. package/lib/export/src/mixin.js +26 -24
  15. package/lib/export/src/mixin.min.js +1 -1
  16. package/lib/filter/src/mixin.js +4 -4
  17. package/lib/filter/src/mixin.min.js +1 -1
  18. package/lib/filter/src/panel.js +2 -2
  19. package/lib/filter/src/panel.min.js +1 -1
  20. package/lib/footer/src/footer.js +7 -4
  21. package/lib/footer/src/footer.min.js +1 -1
  22. package/lib/form/src/form-gather.js +2 -2
  23. package/lib/form/src/form-gather.min.js +1 -1
  24. package/lib/form/src/form-item.js +10 -5
  25. package/lib/form/src/form-item.min.js +1 -1
  26. package/lib/form/src/form.js +72 -83
  27. package/lib/form/src/form.min.js +1 -1
  28. package/lib/form/src/render.js +17 -14
  29. package/lib/form/src/render.min.js +1 -1
  30. package/lib/form/src/util.js +13 -2
  31. package/lib/form/src/util.min.js +1 -1
  32. package/lib/grid/src/grid.js +44 -34
  33. package/lib/grid/src/grid.min.js +1 -1
  34. package/lib/header/src/header.js +10 -8
  35. package/lib/header/src/header.min.js +1 -1
  36. package/lib/index.css +1 -1
  37. package/lib/index.umd.js +2301 -2267
  38. package/lib/index.umd.min.js +1 -2
  39. package/lib/input/src/input.js +30 -18
  40. package/lib/input/src/input.min.js +1 -1
  41. package/lib/keyboard/src/mixin.js +12 -8
  42. package/lib/keyboard/src/mixin.min.js +1 -1
  43. package/lib/list/src/list.js +7 -5
  44. package/lib/list/src/list.min.js +1 -1
  45. package/lib/menu/src/mixin.js +24 -14
  46. package/lib/menu/src/mixin.min.js +1 -1
  47. package/lib/menu/src/panel.js +3 -3
  48. package/lib/menu/src/panel.min.js +1 -1
  49. package/lib/modal/src/modal.js +24 -12
  50. package/lib/modal/src/modal.min.js +1 -1
  51. package/lib/pulldown/src/pulldown.js +16 -12
  52. package/lib/pulldown/src/pulldown.min.js +1 -1
  53. package/lib/radio/src/button.js +2 -2
  54. package/lib/radio/src/button.min.js +1 -1
  55. package/lib/radio/src/radio.js +2 -2
  56. package/lib/radio/src/radio.min.js +1 -1
  57. package/lib/select/src/select.js +26 -16
  58. package/lib/select/src/select.min.js +1 -1
  59. package/lib/select/style/style.css +1 -1
  60. package/lib/select/style/style.min.css +1 -1
  61. package/lib/style.css +1 -1
  62. package/lib/style.min.css +1 -1
  63. package/lib/switch/src/switch.js +4 -4
  64. package/lib/switch/src/switch.min.js +1 -1
  65. package/lib/table/src/body.js +36 -38
  66. package/lib/table/src/body.min.js +1 -1
  67. package/lib/table/src/cell.js +22 -14
  68. package/lib/table/src/cell.min.js +1 -1
  69. package/lib/table/src/column.js +6 -4
  70. package/lib/table/src/column.min.js +1 -1
  71. package/lib/table/src/columnInfo.js +202 -0
  72. package/lib/table/src/columnInfo.min.js +1 -0
  73. package/lib/table/src/methods.js +241 -242
  74. package/lib/table/src/methods.min.js +1 -1
  75. package/lib/table/src/table.js +99 -124
  76. package/lib/table/src/table.min.js +1 -1
  77. package/lib/table/src/util.js +38 -3
  78. package/lib/table/src/util.min.js +1 -1
  79. package/lib/textarea/src/textarea.js +2 -2
  80. package/lib/textarea/src/textarea.min.js +1 -1
  81. package/lib/toolbar/src/toolbar.js +16 -10
  82. package/lib/toolbar/src/toolbar.min.js +1 -1
  83. package/lib/tools/{src/dom.js → dom.js} +6 -8
  84. package/lib/tools/dom.min.js +1 -0
  85. package/lib/tools/{src/event.js → event.js} +3 -6
  86. package/lib/tools/event.min.js +1 -0
  87. package/lib/tools/log.js +29 -0
  88. package/lib/tools/log.min.js +1 -0
  89. package/lib/tools/{src/resize.js → resize.js} +1 -1
  90. package/lib/tools/resize.min.js +1 -0
  91. package/lib/tools/utils.js +155 -0
  92. package/lib/tools/utils.min.js +1 -0
  93. package/lib/tooltip/src/tooltip.js +138 -76
  94. package/lib/tooltip/src/tooltip.min.js +1 -1
  95. package/lib/tooltip/style/style.css +1 -1
  96. package/lib/tooltip/style/style.min.css +1 -1
  97. package/lib/v-x-e-table/index.js +7 -4
  98. package/lib/v-x-e-table/index.min.js +1 -1
  99. package/lib/v-x-e-table/src/conf.js +12 -7
  100. package/lib/v-x-e-table/src/conf.min.js +1 -1
  101. package/lib/v-x-e-table/src/interceptor.js +4 -4
  102. package/lib/v-x-e-table/src/interceptor.min.js +1 -1
  103. package/lib/v-x-e-table/src/renderer.js +18 -10
  104. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  105. package/lib/v-x-e-table/src/store.js +3 -3
  106. package/lib/v-x-e-table/src/store.min.js +1 -1
  107. package/lib/validator/src/mixin.js +4 -4
  108. package/lib/validator/src/mixin.min.js +1 -1
  109. package/package.json +3 -3
  110. package/packages/button/src/button.js +4 -2
  111. package/packages/checkbox/src/checkbox.js +2 -2
  112. package/packages/edit/src/mixin.js +7 -6
  113. package/packages/export/src/export-panel.js +1 -1
  114. package/packages/export/src/import-panel.js +1 -1
  115. package/packages/export/src/mixin.js +20 -19
  116. package/packages/filter/src/mixin.js +3 -3
  117. package/packages/filter/src/panel.js +1 -1
  118. package/packages/footer/src/footer.js +4 -2
  119. package/packages/form/src/form-gather.js +2 -2
  120. package/packages/form/src/form-item.js +9 -4
  121. package/packages/form/src/form.js +41 -48
  122. package/packages/form/src/render.js +9 -9
  123. package/packages/form/src/util.js +9 -2
  124. package/packages/grid/src/grid.js +22 -20
  125. package/packages/header/src/header.js +3 -2
  126. package/packages/input/src/input.js +6 -3
  127. package/packages/keyboard/src/mixin.js +1 -2
  128. package/packages/list/src/list.js +3 -2
  129. package/packages/menu/src/mixin.js +5 -3
  130. package/packages/menu/src/panel.js +3 -3
  131. package/packages/modal/src/modal.js +7 -4
  132. package/packages/pulldown/src/pulldown.js +3 -1
  133. package/packages/radio/src/button.js +2 -2
  134. package/packages/radio/src/radio.js +2 -2
  135. package/packages/select/src/select.js +5 -3
  136. package/packages/switch/src/switch.js +4 -4
  137. package/packages/table/src/body.js +25 -27
  138. package/packages/table/src/cell.js +8 -7
  139. package/packages/table/src/column.js +4 -2
  140. package/packages/table/src/columnInfo.js +149 -0
  141. package/packages/table/src/methods.js +90 -101
  142. package/packages/table/src/table.js +68 -98
  143. package/packages/table/src/util.js +19 -1
  144. package/packages/textarea/src/textarea.js +2 -2
  145. package/packages/toolbar/src/toolbar.js +7 -4
  146. package/packages/tools/{src/dom.js → dom.js} +6 -6
  147. package/packages/tools/{src/event.js → event.js} +1 -3
  148. package/packages/tools/log.js +16 -0
  149. package/packages/tools/{src/resize.js → resize.js} +1 -1
  150. package/packages/tools/utils.js +108 -0
  151. package/packages/tooltip/src/tooltip.js +90 -46
  152. package/packages/v-x-e-table/index.js +4 -2
  153. package/packages/v-x-e-table/src/conf.js +12 -7
  154. package/packages/v-x-e-table/src/interceptor.js +3 -3
  155. package/packages/v-x-e-table/src/renderer.js +4 -3
  156. package/packages/v-x-e-table/src/store.js +2 -2
  157. package/packages/validator/src/mixin.js +3 -3
  158. package/styles/select.scss +1 -1
  159. package/styles/tooltip.scss +1 -1
  160. package/types/v-x-e-table/index.d.ts +8 -0
  161. package/README.en.md +0 -170
  162. package/README.zh-TW.md +0 -174
  163. package/lib/tools/index.js +0 -76
  164. package/lib/tools/index.min.js +0 -1
  165. package/lib/tools/src/dom.min.js +0 -1
  166. package/lib/tools/src/event.min.js +0 -1
  167. package/lib/tools/src/resize.min.js +0 -1
  168. package/lib/tools/src/utils.js +0 -365
  169. package/lib/tools/src/utils.min.js +0 -1
  170. package/packages/tools/index.js +0 -14
  171. 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,43 @@ 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
+
44
+ function renderContent (h, _vm) {
45
+ const { $scopedSlots, useHTML, tipContent } = _vm
46
+ if ($scopedSlots.content) {
47
+ return h('div', {
48
+ key: 1,
49
+ class: 'vxe-table--tooltip-content'
50
+ }, $scopedSlots.content.call(this, {}))
51
+ }
52
+ if (useHTML) {
53
+ return h('div', {
54
+ key: 2,
55
+ class: 'vxe-table--tooltip-content',
56
+ domProps: {
57
+ innerHTML: tipContent
58
+ }
59
+ })
60
+ }
61
+ return h('div', {
62
+ key: 3,
63
+ class: 'vxe-table--tooltip-content'
64
+ }, UtilTools.formatText(tipContent))
65
+ }
66
+
29
67
  export default {
30
68
  name: 'VxeTooltip',
31
69
  mixins: [vSize],
@@ -34,19 +72,20 @@ export default {
34
72
  size: { type: String, default: () => GlobalConfig.tooltip.size || GlobalConfig.size },
35
73
  trigger: { type: String, default: () => GlobalConfig.tooltip.trigger },
36
74
  theme: { type: String, default: () => GlobalConfig.tooltip.theme },
37
- content: [String, Number],
75
+ content: { type: [String, Number], default: null },
76
+ useHTML: Boolean,
38
77
  zIndex: [String, Number],
39
78
  isArrow: { type: Boolean, default: true },
40
79
  enterable: Boolean,
41
- leaveDelay: { type: Number, default: () => GlobalConfig.tooltip.leaveDelay },
42
- leaveMethod: Function
80
+ enterDelay: { type: Number, default: () => GlobalConfig.tooltip.enterDelay },
81
+ leaveDelay: { type: Number, default: () => GlobalConfig.tooltip.leaveDelay }
43
82
  },
44
83
  data () {
45
84
  return {
46
85
  isUpdate: false,
47
- isHover: false,
48
86
  visible: false,
49
- message: '',
87
+ tipContent: '',
88
+ tipActive: false,
50
89
  tipTarget: null,
51
90
  tipZindex: 0,
52
91
  tipStore: {
@@ -58,7 +97,7 @@ export default {
58
97
  },
59
98
  watch: {
60
99
  content (value) {
61
- this.message = value
100
+ this.tipContent = value
62
101
  },
63
102
  value (value) {
64
103
  if (!this.isUpdate) {
@@ -67,11 +106,18 @@ export default {
67
106
  this.isUpdate = false
68
107
  }
69
108
  },
109
+ created () {
110
+ this.showDelayTip = XEUtils.debounce(() => {
111
+ if (this.tipActive) {
112
+ showTip(this)
113
+ }
114
+ }, this.enterDelay, { leading: false, trailing: true })
115
+ },
70
116
  mounted () {
71
117
  const { $el, trigger, content, value } = this
72
118
  const parentNode = $el.parentNode
73
119
  let target
74
- this.message = content
120
+ this.tipContent = content
75
121
  this.tipZindex = UtilTools.nextZIndex()
76
122
  XEUtils.arrayEach($el.children, (elem, index) => {
77
123
  if (index > 1) {
@@ -111,7 +157,7 @@ export default {
111
157
  }
112
158
  },
113
159
  render (h) {
114
- const { $scopedSlots, vSize, theme, message, isHover, isArrow, visible, tipStore, enterable } = this
160
+ const { $scopedSlots, vSize, theme, tipActive, isArrow, visible, tipStore, enterable } = this
115
161
  let on
116
162
  if (enterable) {
117
163
  on = {
@@ -126,15 +172,13 @@ export default {
126
172
  'is--enterable': enterable,
127
173
  'is--visible': visible,
128
174
  'is--arrow': isArrow,
129
- 'is--hover': isHover
175
+ 'is--actived': tipActive
130
176
  }],
131
177
  style: tipStore.style,
132
178
  ref: 'tipWrapper',
133
179
  on
134
180
  }, [
135
- h('div', {
136
- class: 'vxe-table--tooltip-content'
137
- }, $scopedSlots.content ? $scopedSlots.content.call(this, {}) : message),
181
+ renderContent(h, this),
138
182
  h('div', {
139
183
  class: 'vxe-table--tooltip-arrow',
140
184
  style: tipStore.arrowStyle
@@ -142,20 +186,21 @@ export default {
142
186
  ].concat($scopedSlots.default ? $scopedSlots.default.call(this, {}) : []))
143
187
  },
144
188
  methods: {
145
- open (target, message) {
146
- return this.toVisible(target || this.target, message)
189
+ open (target, content) {
190
+ return this.toVisible(target || this.target, content)
147
191
  },
148
192
  close () {
149
193
  this.tipTarget = null
194
+ this.tipActive = false
150
195
  Object.assign(this.tipStore, {
151
196
  style: {},
152
197
  placement: '',
153
198
  arrowStyle: null
154
199
  })
155
- this.update(false)
200
+ this.updateValue(false)
156
201
  return this.$nextTick()
157
202
  },
158
- update (value) {
203
+ updateValue (value) {
159
204
  if (value !== this.visible) {
160
205
  this.visible = value
161
206
  this.isUpdate = true
@@ -169,24 +214,19 @@ export default {
169
214
  this.tipZindex = UtilTools.nextZIndex()
170
215
  }
171
216
  },
172
- toVisible (target, message) {
173
- this.targetActive = true
217
+ toVisible (target, content) {
174
218
  if (target) {
175
- const { $el, tipStore, zIndex } = this
176
- const parentNode = $el.parentNode
177
- if (!parentNode) {
178
- document.body.appendChild($el)
219
+ const { trigger, enterDelay } = this
220
+ this.tipActive = true
221
+ this.tipTarget = target
222
+ if (content) {
223
+ this.tipContent = content
179
224
  }
180
- if (message) {
181
- this.message = message
225
+ if (enterDelay && trigger === 'hover') {
226
+ this.showDelayTip()
227
+ } else {
228
+ return showTip(this)
182
229
  }
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()
190
230
  }
191
231
  return this.$nextTick()
192
232
  },
@@ -199,6 +239,12 @@ export default {
199
239
  }
200
240
  })
201
241
  },
242
+ isActived () {
243
+ return this.tipActive
244
+ },
245
+ setActived (actived) {
246
+ this.tipActive = !!actived
247
+ },
202
248
  clickEvent () {
203
249
  this[this.visible ? 'close' : 'open']()
204
250
  },
@@ -207,10 +253,10 @@ export default {
207
253
  },
208
254
  targetMouseleaveEvent () {
209
255
  const { trigger, enterable, leaveDelay } = this
210
- this.targetActive = false
256
+ this.tipActive = false
211
257
  if (enterable && trigger === 'hover') {
212
258
  setTimeout(() => {
213
- if (!this.isHover) {
259
+ if (!this.tipActive) {
214
260
  this.close()
215
261
  }
216
262
  }, leaveDelay)
@@ -219,19 +265,17 @@ export default {
219
265
  }
220
266
  },
221
267
  wrapperMouseenterEvent () {
222
- this.isHover = true
268
+ this.tipActive = true
223
269
  },
224
- wrapperMouseleaveEvent (evnt) {
225
- const { leaveMethod, trigger, enterable, leaveDelay } = this
226
- this.isHover = false
227
- if (!leaveMethod || leaveMethod({ $event: evnt }) !== false) {
228
- if (enterable && trigger === 'hover') {
229
- setTimeout(() => {
230
- if (!this.targetActive) {
231
- this.close()
232
- }
233
- }, leaveDelay)
234
- }
270
+ wrapperMouseleaveEvent () {
271
+ const { trigger, enterable, leaveDelay } = this
272
+ this.tipActive = false
273
+ if (enterable && trigger === 'hover') {
274
+ setTimeout(() => {
275
+ if (!this.tipActive) {
276
+ this.close()
277
+ }
278
+ }, leaveDelay)
235
279
  }
236
280
  }
237
281
  }
@@ -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
@@ -34,10 +37,9 @@ export default {
34
37
  // trigger: 'default',
35
38
  strict: true
36
39
  },
37
- // tooltipConfig: {
38
- // theme: 'dark',
39
- // enterable: false
40
- // },
40
+ tooltipConfig: {
41
+ enterable: true
42
+ },
41
43
  validConfig: {
42
44
  showMessage: true,
43
45
  message: 'default'
@@ -49,7 +51,6 @@ export default {
49
51
  // storage: false,
50
52
  // checkMethod () {}
51
53
  // },
52
- // rowId: '_X_ID', // 行数据的唯一主键字段名
53
54
  sortConfig: {
54
55
  // remote: false,
55
56
  // trigger: 'default',
@@ -228,6 +229,7 @@ export default {
228
229
  // size: null,
229
230
  trigger: 'hover',
230
231
  theme: 'dark',
232
+ enterDelay: 500,
231
233
  leaveDelay: 300
232
234
  },
233
235
  pager: {
@@ -241,12 +243,15 @@ export default {
241
243
  },
242
244
  form: {
243
245
  // preventSubmit: false,
246
+ // size: null,
247
+ // colon: false,
244
248
  validConfig: {
245
249
  showMessage: true,
246
250
  autoPos: true
247
251
  },
248
- // size: null,
249
- // colon: false,
252
+ tooltipConfig: {
253
+ enterable: true
254
+ },
250
255
  titleAsterisk: true
251
256
  },
252
257
  input: {
@@ -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 () {
@@ -104,7 +104,7 @@
104
104
 
105
105
  .vxe-select-option {
106
106
  padding: 0 10px;
107
- max-width: 400px;
107
+ max-width: 600px;
108
108
  white-space: nowrap;
109
109
  overflow: hidden;
110
110
  text-overflow: ellipsis;
@@ -7,7 +7,7 @@
7
7
  top: -100%;
8
8
  left: -100%;
9
9
  font-size: 12px;
10
- max-width: 500px;
10
+ max-width: 600px;
11
11
  border-radius: $vxe-border-radius;
12
12
  padding: 8px 12px;
13
13
  white-space: normal;
@@ -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