vxe-table 3.8.6-beta.0 → 3.8.6-beta.2

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 (56) hide show
  1. package/lib/all.js +4 -0
  2. package/lib/all.min.js +1 -1
  3. package/lib/custom/src/panel.js +15 -1
  4. package/lib/custom/src/panel.min.js +1 -1
  5. package/lib/export/style/style.css +1 -0
  6. package/lib/export/style/style.min.css +1 -1
  7. package/lib/icon/style/style.css +1 -1
  8. package/lib/icon/style/style.min.css +1 -1
  9. package/lib/index.css +1 -1
  10. package/lib/index.umd.js +61 -16
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/input/src/input.js +1 -0
  13. package/lib/input/src/input.min.js +1 -1
  14. package/lib/style.css +1 -1
  15. package/lib/style.min.css +1 -1
  16. package/lib/table/src/body.js +4 -2
  17. package/lib/table/src/body.min.js +1 -1
  18. package/lib/table/src/methods.js +8 -5
  19. package/lib/table/src/methods.min.js +1 -1
  20. package/lib/table/style/style.css +10 -0
  21. package/lib/table/style/style.min.css +1 -1
  22. package/lib/tools/dom.js +2 -4
  23. package/lib/tools/dom.min.js +1 -1
  24. package/lib/tools/log.js +1 -1
  25. package/lib/tools/log.min.js +1 -1
  26. package/lib/v-x-e-table/index.js +3 -1
  27. package/lib/v-x-e-table/index.min.js +1 -1
  28. package/lib/v-x-e-table/src/conf.js +1 -0
  29. package/lib/v-x-e-table/src/conf.min.js +1 -1
  30. package/lib/v-x-e-table/src/config.js +8 -2
  31. package/lib/v-x-e-table/src/config.min.js +1 -1
  32. package/lib/v-x-e-table/src/theme.js +17 -0
  33. package/lib/v-x-e-table/src/theme.min.js +1 -0
  34. package/lib/vxe-table/style/style.css +10 -0
  35. package/lib/vxe-table/style/style.min.css +1 -1
  36. package/lib/vxe-table-export-module/style/style.css +1 -0
  37. package/lib/vxe-table-export-module/style/style.min.css +1 -1
  38. package/package.json +1 -1
  39. package/packages/all.js +4 -0
  40. package/packages/custom/src/panel.js +14 -1
  41. package/packages/input/src/input.js +1 -0
  42. package/packages/table/src/body.js +3 -2
  43. package/packages/table/src/methods.js +8 -6
  44. package/packages/tools/dom.js +2 -4
  45. package/packages/v-x-e-table/index.js +3 -0
  46. package/packages/v-x-e-table/src/conf.js +1 -0
  47. package/packages/v-x-e-table/src/config.js +8 -2
  48. package/packages/v-x-e-table/src/theme.js +11 -0
  49. package/styles/export.scss +1 -0
  50. package/styles/table.scss +8 -0
  51. /package/lib/icon/style/{iconfont.1715127150277.ttf → iconfont.1715243520903.ttf} +0 -0
  52. /package/lib/icon/style/{iconfont.1715127150277.woff → iconfont.1715243520903.woff} +0 -0
  53. /package/lib/icon/style/{iconfont.1715127150277.woff2 → iconfont.1715243520903.woff2} +0 -0
  54. /package/lib/{iconfont.1715127150277.ttf → iconfont.1715243520903.ttf} +0 -0
  55. /package/lib/{iconfont.1715127150277.woff → iconfont.1715243520903.woff} +0 -0
  56. /package/lib/{iconfont.1715127150277.woff2 → iconfont.1715243520903.woff2} +0 -0
@@ -1 +1 @@
1
- .vxe-export--panel-column>ul{list-style-type:none;overflow:auto;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-export--panel-column>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.vxe-export--panel>table{width:100%;border:0;table-layout:fixed}.vxe-export--panel>table tr td{padding:0 10px}.vxe-export--panel>table tr td:nth-child(1){text-align:right;width:30%;font-weight:700;padding:8px 10px}.vxe-export--panel>table tr td:nth-child(2){width:70%}.vxe-export--panel>table tr td>.vxe-input,.vxe-export--panel>table tr td>.vxe-select{width:80%}.vxe-export--panel>table tr td>.vxe-export--panel-option-row{padding:.25em 0}.vxe-export--panel .vxe-export--panel-column{width:80%;border:1px solid #dcdfe6;margin:3px 0;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-export--panel .vxe-export--panel-column>ul>li{padding:.2em 1em .2em 1em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--2{padding-left:3.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--2 .vxe-checkbox--icon{left:1.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--3{padding-left:4.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--3 .vxe-checkbox--icon{left:2.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--4{padding-left:5.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--4 .vxe-checkbox--icon{left:3.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--5{padding-left:6.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--5 .vxe-checkbox--icon{left:4.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--6{padding-left:7.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--6 .vxe-checkbox--icon{left:5.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--7{padding-left:8.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--7 .vxe-checkbox--icon{left:6.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--8{padding-left:9.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--8 .vxe-checkbox--icon{left:7.8em}.vxe-export--panel .vxe-export--panel-column .vxe-export--panel-column-header{padding:.1em 0;background-color:#f8f8f9;font-weight:700;border-bottom:1px solid #e8eaec}.vxe-export--panel .vxe-export--panel-column .vxe-export--panel-column-body{padding:.2em 0;min-height:10em;max-height:17.6em}.vxe-export--panel .vxe-import-selected--file{padding-right:40px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-export--panel .vxe-import-selected--file>i{display:none;position:absolute;top:50%;right:15px;transform:translateY(-50%);font-size:16px;cursor:pointer}.vxe-export--panel .vxe-import-selected--file:hover{color:#409eff}.vxe-export--panel .vxe-import-selected--file:hover>i{display:block}.vxe-export--panel .vxe-import-select--file{border:1px dashed #dcdfe6;padding:6px 34px;outline:0;border-radius:4px;background-color:#fff;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.vxe-export--panel .vxe-import-select--file:focus{border-color:#409eff;box-shadow:0 0 .25em 0 #409eff}.vxe-export--panel .vxe-import-select--file:hover{color:#409eff;border-color:#409eff}.vxe-export--panel .vxe-export--panel-btns{text-align:right;padding:.25em}.vxe-export--panel-column-option .vxe-checkbox--icon{font-size:1.34em}.vxe-export--panel-column-option .vxe-checkbox--icon{color:#dcdfe6;vertical-align:middle;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-export--panel-column-option.is--checked,.vxe-export--panel-column-option.is--indeterminate{color:#409eff}.vxe-export--panel-column-option.is--checked .vxe-checkbox--icon,.vxe-export--panel-column-option.is--indeterminate .vxe-checkbox--icon{color:#409eff}.vxe-export--panel-column-option:not(.is--disabled){cursor:pointer}.vxe-export--panel-column-option:not(.is--disabled):hover .vxe-checkbox--icon{color:#409eff}.vxe-export--panel-column-option.is--disabled{color:#bfbfbf;cursor:not-allowed}.vxe-export--panel-column-option.is--disabled .vxe-checkbox--icon{color:#dcdfe6}.vxe-export--panel-column-option .vxe-checkbox--label{padding-left:.5em;vertical-align:middle}
1
+ .vxe-export--panel-column>ul{list-style-type:none;overflow:auto;margin:0;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-export--panel-column>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.vxe-export--panel>table{width:100%;border:0;table-layout:fixed}.vxe-export--panel>table tr td{padding:0 10px}.vxe-export--panel>table tr td:nth-child(1){text-align:right;width:30%;font-weight:700;padding:8px 10px}.vxe-export--panel>table tr td:nth-child(2){width:70%}.vxe-export--panel>table tr td>.vxe-input,.vxe-export--panel>table tr td>.vxe-select{width:80%}.vxe-export--panel>table tr td>.vxe-export--panel-option-row{padding:.25em 0}.vxe-export--panel .vxe-export--panel-column{width:80%;border:1px solid #dcdfe6;margin:3px 0;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-export--panel .vxe-export--panel-column>ul>li{padding:.2em 1em .2em 1em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--2{padding-left:3.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--2 .vxe-checkbox--icon{left:1.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--3{padding-left:4.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--3 .vxe-checkbox--icon{left:2.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--4{padding-left:5.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--4 .vxe-checkbox--icon{left:3.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--5{padding-left:6.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--5 .vxe-checkbox--icon{left:4.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--6{padding-left:7.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--6 .vxe-checkbox--icon{left:5.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--7{padding-left:8.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--7 .vxe-checkbox--icon{left:6.8em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--8{padding-left:9.5em}.vxe-export--panel .vxe-export--panel-column>ul>li.level--8 .vxe-checkbox--icon{left:7.8em}.vxe-export--panel .vxe-export--panel-column .vxe-export--panel-column-header{padding:.1em 0;background-color:#f8f8f9;font-weight:700;border-bottom:1px solid #e8eaec}.vxe-export--panel .vxe-export--panel-column .vxe-export--panel-column-body{padding:.2em 0;min-height:10em;max-height:17.6em}.vxe-export--panel .vxe-import-selected--file{padding-right:40px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-export--panel .vxe-import-selected--file>i{display:none;position:absolute;top:50%;right:15px;transform:translateY(-50%);font-size:16px;cursor:pointer}.vxe-export--panel .vxe-import-selected--file:hover{color:#409eff}.vxe-export--panel .vxe-import-selected--file:hover>i{display:block}.vxe-export--panel .vxe-import-select--file{border:1px dashed #dcdfe6;padding:6px 34px;outline:0;border-radius:4px;background-color:#fff;color:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.vxe-export--panel .vxe-import-select--file:focus{border-color:#409eff;box-shadow:0 0 .25em 0 #409eff}.vxe-export--panel .vxe-import-select--file:hover{color:#409eff;border-color:#409eff}.vxe-export--panel .vxe-export--panel-btns{text-align:right;padding:.25em}.vxe-export--panel-column-option .vxe-checkbox--icon{font-size:1.34em}.vxe-export--panel-column-option .vxe-checkbox--icon{color:#dcdfe6;vertical-align:middle;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-export--panel-column-option.is--checked,.vxe-export--panel-column-option.is--indeterminate{color:#409eff}.vxe-export--panel-column-option.is--checked .vxe-checkbox--icon,.vxe-export--panel-column-option.is--indeterminate .vxe-checkbox--icon{color:#409eff}.vxe-export--panel-column-option:not(.is--disabled){cursor:pointer}.vxe-export--panel-column-option:not(.is--disabled):hover .vxe-checkbox--icon{color:#409eff}.vxe-export--panel-column-option.is--disabled{color:#bfbfbf;cursor:not-allowed}.vxe-export--panel-column-option.is--disabled .vxe-checkbox--icon{color:#dcdfe6}.vxe-export--panel-column-option .vxe-checkbox--label{padding-left:.5em;vertical-align:middle}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxe-table",
3
- "version": "3.8.6-beta.0",
3
+ "version": "3.8.6-beta.2",
4
4
  "description": "一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟列表、虚拟树、懒加载、快捷菜单、数据校验、树形结构、打印导出、表单渲染、数据分页、弹窗、自定义模板、渲染器、JSON 配置式...",
5
5
  "scripts": {
6
6
  "update": "npm install --legacy-peer-deps",
package/packages/all.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import XEUtils from 'xe-utils'
2
2
  import { VXETable } from './v-x-e-table'
3
+ import { setTheme } from './v-x-e-table/src/theme'
3
4
 
4
5
  import { Filter } from './filter'
5
6
  import { Menu } from './menu'
@@ -84,6 +85,9 @@ const components = [
84
85
  export function install (Vue, options) {
85
86
  if (XEUtils.isPlainObject(options)) {
86
87
  VXETable.config(options)
88
+ if (options.theme) {
89
+ setTheme(options)
90
+ }
87
91
  }
88
92
  components.map(component => component.install(Vue))
89
93
  }
@@ -1,3 +1,4 @@
1
+ import VXETable from '../../v-x-e-table'
1
2
  import UtilTools from '../../tools/utils'
2
3
  import DomTools from '../../tools/dom'
3
4
  import GlobalConfig from '../../v-x-e-table/src/conf'
@@ -457,7 +458,19 @@ export default {
457
458
  $xetable.emitCustomEvent('reset', evnt)
458
459
  },
459
460
  resetPopupCustomEvent (evnt) {
460
- this.resetCustomEvent(evnt)
461
+ if (VXETable.modal) {
462
+ VXETable.modal.confirm({
463
+ content: GlobalConfig.i18n('vxe.custom.cstmConfirmRestore'),
464
+ className: 'vxe-table--ignore-clear',
465
+ escClosable: true
466
+ }).then(type => {
467
+ if (type === 'confirm') {
468
+ this.resetCustomEvent(evnt)
469
+ }
470
+ })
471
+ } else {
472
+ this.resetCustomEvent(evnt)
473
+ }
461
474
  },
462
475
  handleOptionCheck (column) {
463
476
  const { $xetable } = this
@@ -1995,6 +1995,7 @@ export default {
1995
1995
  }
1996
1996
  const { boundingTop, boundingLeft, visibleHeight, visibleWidth } = DomTools.getAbsolutePos(targetElem)
1997
1997
  let panelPlacement = 'bottom'
1998
+ console.log(DomTools.getAbsolutePos(targetElem))
1998
1999
  if (transfer) {
1999
2000
  let left = boundingLeft
2000
2001
  let top = boundingTop + targetHeight
@@ -15,7 +15,7 @@ function isVMScrollProcess ($xetable) {
15
15
 
16
16
  function renderLine (h, _vm, $xetable, params) {
17
17
  const { row, column } = params
18
- const { treeOpts, treeConfig, fullAllDataRowIdData } = $xetable
18
+ const { afterFullData, treeOpts, treeConfig, fullAllDataRowIdData } = $xetable
19
19
  const { slots, treeNode } = column
20
20
  const rowid = getRowid($xetable, row)
21
21
  const rest = fullAllDataRowIdData[rowid]
@@ -30,6 +30,7 @@ function renderLine (h, _vm, $xetable, params) {
30
30
  if (slots && slots.line) {
31
31
  return $xetable.callSlot(slots.line, params, h)
32
32
  }
33
+ const isFirstRow = $xetable.eqRow(afterFullData[0], row)
33
34
  if (treeConfig && treeNode && (treeOpts.showLine || treeOpts.line)) {
34
35
  return [
35
36
  h('div', {
@@ -38,7 +39,7 @@ function renderLine (h, _vm, $xetable, params) {
38
39
  h('div', {
39
40
  class: 'vxe-tree--line',
40
41
  style: {
41
- height: `${calcTreeLine(params, items, rIndex)}px`,
42
+ height: `${isFirstRow ? 1 : calcTreeLine(params, items, rIndex)}px`,
42
43
  left: `${(rLevel * treeOpts.indent) + (rLevel ? 2 - getOffsetSize($xetable) : 0) + 16}px`
43
44
  }
44
45
  })
@@ -2491,7 +2491,7 @@ const Methods = {
2491
2491
  * 全局按下事件处理
2492
2492
  */
2493
2493
  handleGlobalMousedownEvent (evnt) {
2494
- const { $el, $refs, $xegrid, $toolbar, mouseConfig, editStore, ctxMenuStore, editRules, editOpts, validOpts, filterStore, customStore, getRowNode } = this
2494
+ const { $el, $refs, $xegrid, $toolbar, mouseConfig, editStore, ctxMenuStore, editRules, editOpts, validOpts, areaOpts, filterStore, customStore, getRowNode } = this
2495
2495
  const { actived } = editStore
2496
2496
  const { ctxWrapper, filterWrapper, customWrapper, validTip } = $refs
2497
2497
  // 筛选
@@ -2572,11 +2572,13 @@ const Methods = {
2572
2572
  if (this.clearSelected) {
2573
2573
  this.clearSelected()
2574
2574
  }
2575
- if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
2576
- this.preventEvent(evnt, 'event.clearAreas', {}, () => {
2577
- this.clearCellAreas()
2578
- this.clearCopyCellArea()
2579
- })
2575
+ if (areaOpts.autoClear) {
2576
+ if (!getEventTargetNode(evnt, document.body, 'vxe-table--ignore-areas-clear').flag) {
2577
+ this.preventEvent(evnt, 'event.clearAreas', {}, () => {
2578
+ this.clearCellAreas()
2579
+ this.clearCopyCellArea()
2580
+ })
2581
+ }
2580
2582
  }
2581
2583
  }
2582
2584
  }
@@ -133,11 +133,9 @@ export const DomTools = {
133
133
  return getNodeOffset(elem, container, { left: 0, top: 0 })
134
134
  },
135
135
  getAbsolutePos (elem) {
136
- // 当主页面嵌套在iframe时,elem.getBoundingClientRect()仅计算在当前body内的边界距离,忽略了body所在的边界距离
137
- const bodyBounding = document.body.getBoundingClientRect()
138
136
  const bounding = elem.getBoundingClientRect()
139
- const boundingTop = bounding.top - bodyBounding.top
140
- const boundingLeft = bounding.left - bodyBounding.left
137
+ const boundingTop = bounding.top
138
+ const boundingLeft = bounding.left
141
139
  const { scrollTop, scrollLeft, visibleHeight, visibleWidth } = getDomNode()
142
140
  return { boundingTop, top: scrollTop + boundingTop, boundingLeft, left: scrollLeft + boundingLeft, visibleHeight, visibleWidth }
143
141
  },
@@ -7,6 +7,7 @@ import { menus } from './src/menus'
7
7
  import { formats } from './src/formats'
8
8
  import { validators } from './src/validators'
9
9
  import { config } from './src/config'
10
+ import { setTheme } from './src/theme'
10
11
  import { UtilTools } from '../tools/utils'
11
12
  import { errLog } from '../tools/log'
12
13
 
@@ -114,6 +115,8 @@ export const VXETable = {
114
115
  globalConfs
115
116
  }
116
117
 
118
+ setTheme(globalStore)
119
+
117
120
  export * from './src/interceptor'
118
121
  export * from './src/renderer'
119
122
  export * from './src/commands'
@@ -110,6 +110,7 @@ export default {
110
110
  isEsc: true
111
111
  },
112
112
  areaConfig: {
113
+ autoClear: true,
113
114
  selectCellByHeader: true
114
115
  },
115
116
  clipConfig: {
@@ -1,13 +1,19 @@
1
1
  import GlobalConfig from './conf'
2
2
  import DomZIndex from 'dom-zindex'
3
3
  import XEUtils from 'xe-utils'
4
+ import { setTheme } from './theme'
4
5
 
5
6
  /**
6
7
  * 全局参数设置
7
8
  */
8
9
  export function config (options) {
9
- if (options && options.zIndex) {
10
- DomZIndex.setCurrent(options.zIndex)
10
+ if (options) {
11
+ if (options.theme) {
12
+ setTheme(options)
13
+ }
14
+ if (options.zIndex) {
15
+ DomZIndex.setCurrent(options.zIndex)
16
+ }
11
17
  }
12
18
  return XEUtils.merge(GlobalConfig, options)
13
19
  }
@@ -0,0 +1,11 @@
1
+ import GlobalConfig from '../../v-x-e-table/src/conf'
2
+
3
+ export function setTheme (options) {
4
+ const theme = (options ? options.theme : null) || GlobalConfig.theme || 'default'
5
+ if (typeof document !== 'undefined') {
6
+ const documentElement = document.documentElement
7
+ if (documentElement) {
8
+ documentElement.setAttribute('data-vxe-table-theme', theme)
9
+ }
10
+ }
11
+ }
@@ -103,6 +103,7 @@
103
103
  outline: 0;
104
104
  border-radius: $vxe-border-radius;
105
105
  background-color: $vxe-input-background-color;
106
+ color: inherit;
106
107
  user-select: none;
107
108
  cursor: pointer;
108
109
  &:focus {
package/styles/table.scss CHANGED
@@ -33,6 +33,9 @@
33
33
  border: 0;
34
34
  }
35
35
 
36
+ .vxe-table--render-wrapper {
37
+ background-color: $vxe-table-body-background-color;
38
+ }
36
39
  .vxe-table--body-wrapper {
37
40
  scroll-behavior: auto;
38
41
  }
@@ -610,6 +613,11 @@
610
613
  user-select: none;
611
614
  }
612
615
  }
616
+ &.drag--range {
617
+ .vxe-cell--checkbox {
618
+ user-select: none;
619
+ }
620
+ }
613
621
  .vxe-header--column,
614
622
  .vxe-body--column,
615
623
  .vxe-footer--column {