vxe-table 3.8.21 → 3.8.23

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 (189) hide show
  1. package/helper/vetur/attributes.json +1 -1966
  2. package/helper/vetur/tags.json +1 -648
  3. package/lib/button/src/button.js +4 -2
  4. package/lib/button/src/button.min.js +1 -1
  5. package/lib/button/style/style.css +11 -0
  6. package/lib/button/style/style.min.css +1 -1
  7. package/lib/button-group/style/style.css +1 -0
  8. package/lib/checkbox/style/style.css +1 -0
  9. package/lib/checkbox-group/style/style.css +1 -0
  10. package/lib/colgroup/style/style.css +1 -0
  11. package/lib/column/style/style.css +1 -0
  12. package/lib/custom/src/panel.js +157 -71
  13. package/lib/custom/src/panel.min.js +1 -1
  14. package/lib/custom/style/style.css +19 -34
  15. package/lib/custom/style/style.min.css +1 -1
  16. package/lib/edit/style/style.css +1 -0
  17. package/lib/export/src/export-panel.js +7 -1
  18. package/lib/export/src/export-panel.min.js +1 -1
  19. package/lib/export/style/style.css +1 -0
  20. package/lib/filter/style/style.css +1 -0
  21. package/lib/form/src/form.js +0 -3
  22. package/lib/form/src/form.min.js +1 -1
  23. package/lib/form/style/style.css +1 -0
  24. package/lib/form-gather/style/style.css +1 -0
  25. package/lib/form-item/style/style.css +1 -0
  26. package/lib/grid/style/style.css +2 -0
  27. package/lib/grid/style/style.min.css +1 -1
  28. package/lib/icon/style/style.css +4 -2
  29. package/lib/icon/style/style.min.css +4 -2
  30. package/lib/index.css +1 -1
  31. package/lib/index.umd.js +4561 -4261
  32. package/lib/index.umd.min.js +1 -1
  33. package/lib/input/src/input.js +9 -2
  34. package/lib/input/src/input.min.js +1 -1
  35. package/lib/input/style/style.css +4 -3
  36. package/lib/input/style/style.min.css +1 -1
  37. package/lib/keyboard/style/style.css +1 -0
  38. package/lib/list/style/style.css +1 -0
  39. package/lib/loading/style/style.css +1 -0
  40. package/lib/locale/lang/en-US.js +201 -9
  41. package/lib/locale/lang/en-US.min.js +1 -1
  42. package/lib/locale/lang/en-US.umd.js +201 -9
  43. package/lib/locale/lang/es-ES.js +202 -10
  44. package/lib/locale/lang/es-ES.min.js +1 -1
  45. package/lib/locale/lang/es-ES.umd.js +202 -10
  46. package/lib/locale/lang/ja-JP.js +214 -22
  47. package/lib/locale/lang/ja-JP.min.js +1 -1
  48. package/lib/locale/lang/ja-JP.umd.js +214 -22
  49. package/lib/locale/lang/pt-BR.js +201 -9
  50. package/lib/locale/lang/pt-BR.min.js +1 -1
  51. package/lib/locale/lang/pt-BR.umd.js +201 -9
  52. package/lib/locale/lang/zh-CN.js +196 -4
  53. package/lib/locale/lang/zh-CN.min.js +1 -1
  54. package/lib/locale/lang/zh-CN.umd.js +196 -4
  55. package/lib/locale/lang/zh-HK.min.js +1 -1
  56. package/lib/locale/lang/zh-HK.umd.js +200 -8
  57. package/lib/locale/lang/zh-MO.min.js +1 -1
  58. package/lib/locale/lang/zh-MO.umd.js +200 -8
  59. package/lib/locale/lang/zh-TC.js +200 -8
  60. package/lib/locale/lang/zh-TC.min.js +1 -1
  61. package/lib/locale/lang/zh-TC.umd.js +200 -8
  62. package/lib/locale/lang/zh-TW.min.js +1 -1
  63. package/lib/locale/lang/zh-TW.umd.js +200 -8
  64. package/lib/menu/src/panel.js +24 -8
  65. package/lib/menu/src/panel.min.js +1 -1
  66. package/lib/menu/style/style.css +11 -27
  67. package/lib/menu/style/style.min.css +1 -1
  68. package/lib/modal/style/style.css +4 -0
  69. package/lib/modal/style/style.min.css +1 -1
  70. package/lib/optgroup/style/style.css +1 -0
  71. package/lib/option/style/style.css +1 -0
  72. package/lib/pager/src/pager.js +29 -25
  73. package/lib/pager/src/pager.min.js +1 -1
  74. package/lib/pager/style/style.css +2 -19
  75. package/lib/pager/style/style.min.css +1 -1
  76. package/lib/pulldown/style/style.css +3 -1
  77. package/lib/pulldown/style/style.min.css +1 -1
  78. package/lib/radio/style/style.css +1 -0
  79. package/lib/radio-button/style/style.css +1 -0
  80. package/lib/radio-group/style/style.css +1 -0
  81. package/lib/select/src/select.js +5 -4
  82. package/lib/select/src/select.min.js +1 -1
  83. package/lib/select/style/style.css +2 -0
  84. package/lib/select/style/style.min.css +1 -1
  85. package/lib/style.css +1 -1
  86. package/lib/style.min.css +1 -1
  87. package/lib/switch/style/style.css +1 -0
  88. package/lib/table/src/header.js +4 -3
  89. package/lib/table/src/header.min.js +1 -1
  90. package/lib/table/src/methods.js +33 -46
  91. package/lib/table/src/methods.min.js +1 -1
  92. package/lib/table/style/style.css +17 -10
  93. package/lib/table/style/style.min.css +1 -1
  94. package/lib/textarea/style/style.css +1 -0
  95. package/lib/toolbar/style/style.css +1 -0
  96. package/lib/tools/log.js +1 -1
  97. package/lib/tools/log.min.js +1 -1
  98. package/lib/tooltip/style/style.css +1 -0
  99. package/lib/v-x-e-table/index.js +1 -1
  100. package/lib/v-x-e-table/index.min.js +1 -1
  101. package/lib/v-x-e-table/src/conf.js +1 -0
  102. package/lib/v-x-e-table/src/conf.min.js +1 -1
  103. package/lib/v-x-e-table/style/style.css +3 -1
  104. package/lib/v-x-e-table/style/style.min.css +1 -1
  105. package/lib/validator/style/style.css +1 -0
  106. package/lib/vxe-button/style/style.css +11 -0
  107. package/lib/vxe-button/style/style.min.css +1 -1
  108. package/lib/vxe-button-group/style/style.css +1 -0
  109. package/lib/vxe-checkbox/style/style.css +1 -0
  110. package/lib/vxe-checkbox-group/style/style.css +1 -0
  111. package/lib/vxe-colgroup/style/style.css +1 -0
  112. package/lib/vxe-column/style/style.css +1 -0
  113. package/lib/vxe-form/style/style.css +1 -0
  114. package/lib/vxe-form-gather/style/style.css +1 -0
  115. package/lib/vxe-form-item/style/style.css +1 -0
  116. package/lib/vxe-grid/style/style.css +2 -0
  117. package/lib/vxe-grid/style/style.min.css +1 -1
  118. package/lib/vxe-icon/style/style.css +3 -1
  119. package/lib/vxe-icon/style/style.min.css +1 -1
  120. package/lib/vxe-input/style/style.css +4 -3
  121. package/lib/vxe-input/style/style.min.css +1 -1
  122. package/lib/vxe-list/style/style.css +1 -0
  123. package/lib/vxe-loading/style/style.css +1 -0
  124. package/lib/vxe-modal/style/style.css +4 -0
  125. package/lib/vxe-modal/style/style.min.css +1 -1
  126. package/lib/vxe-optgroup/style/style.css +1 -0
  127. package/lib/vxe-option/style/style.css +1 -0
  128. package/lib/vxe-pager/style/style.css +2 -19
  129. package/lib/vxe-pager/style/style.min.css +1 -1
  130. package/lib/vxe-pulldown/style/style.css +3 -1
  131. package/lib/vxe-pulldown/style/style.min.css +1 -1
  132. package/lib/vxe-radio/style/style.css +1 -0
  133. package/lib/vxe-radio-button/style/style.css +1 -0
  134. package/lib/vxe-radio-group/style/style.css +1 -0
  135. package/lib/vxe-select/style/style.css +2 -0
  136. package/lib/vxe-select/style/style.min.css +1 -1
  137. package/lib/vxe-switch/style/style.css +1 -0
  138. package/lib/vxe-table/style/style.css +17 -10
  139. package/lib/vxe-table/style/style.min.css +1 -1
  140. package/lib/vxe-table-custom-module/style/style.css +19 -34
  141. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  142. package/lib/vxe-table-edit-module/style/style.css +1 -0
  143. package/lib/vxe-table-export-module/style/style.css +1 -0
  144. package/lib/vxe-table-filter-module/style/style.css +1 -0
  145. package/lib/vxe-table-keyboard-module/style/style.css +1 -0
  146. package/lib/vxe-table-menu-module/style/style.css +11 -27
  147. package/lib/vxe-table-menu-module/style/style.min.css +1 -1
  148. package/lib/vxe-table-validator-module/style/style.css +1 -0
  149. package/lib/vxe-textarea/style/style.css +1 -0
  150. package/lib/vxe-toolbar/style/style.css +1 -0
  151. package/lib/vxe-tooltip/style/style.css +1 -0
  152. package/package.json +1 -1
  153. package/packages/button/src/button.js +4 -3
  154. package/packages/custom/src/panel.js +167 -85
  155. package/packages/export/src/export-panel.js +11 -3
  156. package/packages/form/src/form.js +0 -3
  157. package/packages/input/src/input.js +9 -2
  158. package/packages/locale/lang/en-US.js +201 -9
  159. package/packages/locale/lang/es-ES.js +202 -10
  160. package/packages/locale/lang/ja-JP.js +214 -22
  161. package/packages/locale/lang/pt-BR.js +201 -9
  162. package/packages/locale/lang/zh-CN.js +196 -4
  163. package/packages/locale/lang/zh-TC.js +200 -8
  164. package/packages/menu/src/panel.js +38 -10
  165. package/packages/pager/src/pager.js +24 -21
  166. package/packages/select/src/select.js +5 -4
  167. package/packages/table/src/header.js +4 -3
  168. package/packages/table/src/methods.js +28 -38
  169. package/packages/v-x-e-table/src/conf.js +1 -0
  170. package/styles/button.scss +10 -0
  171. package/styles/custom.scss +23 -37
  172. package/styles/grid.scss +1 -0
  173. package/styles/input.scss +3 -3
  174. package/styles/menu.scss +21 -39
  175. package/styles/modal.scss +3 -0
  176. package/styles/old-icon.scss +1 -1
  177. package/styles/pager.scss +1 -19
  178. package/styles/pulldown.scss +2 -1
  179. package/styles/select.scss +1 -0
  180. package/styles/table.scss +14 -8
  181. package/styles/variable.scss +5 -1
  182. package/types/module/menu.d.ts +40 -3
  183. package/types/v-x-e-table/renderer.d.ts +6 -1
  184. /package/lib/icon/style/{iconfont.1724212116436.ttf → iconfont.1724894779531.ttf} +0 -0
  185. /package/lib/icon/style/{iconfont.1724212116436.woff → iconfont.1724894779531.woff} +0 -0
  186. /package/lib/icon/style/{iconfont.1724212116436.woff2 → iconfont.1724894779531.woff2} +0 -0
  187. /package/lib/{iconfont.1724212116436.ttf → iconfont.1724894779531.ttf} +0 -0
  188. /package/lib/{iconfont.1724212116436.woff → iconfont.1724894779531.woff} +0 -0
  189. /package/lib/{iconfont.1724212116436.woff2 → iconfont.1724894779531.woff2} +0 -0
@@ -2,6 +2,7 @@
2
2
  /*size*/
3
3
  /*icon*/
4
4
  /*color*/
5
+ /*layout*/
5
6
  /*input/radio/checkbox*/
6
7
  /*popup*/
7
8
  /*table*/
@@ -2,6 +2,7 @@
2
2
  /*size*/
3
3
  /*icon*/
4
4
  /*color*/
5
+ /*layout*/
5
6
  /*input/radio/checkbox*/
6
7
  /*popup*/
7
8
  /*table*/
@@ -3,6 +3,7 @@
3
3
  /*size*/
4
4
  /*icon*/
5
5
  /*color*/
6
+ /*layout*/
6
7
  /*input/radio/checkbox*/
7
8
  /*popup*/
8
9
  /*table*/
@@ -2,6 +2,7 @@
2
2
  /*size*/
3
3
  /*icon*/
4
4
  /*color*/
5
+ /*layout*/
5
6
  /*input/radio/checkbox*/
6
7
  /*popup*/
7
8
  /*table*/
@@ -3,6 +3,7 @@
3
3
  /*size*/
4
4
  /*icon*/
5
5
  /*color*/
6
+ /*layout*/
6
7
  /*input/radio/checkbox*/
7
8
  /*popup*/
8
9
  /*table*/
@@ -51,46 +52,29 @@
51
52
  }
52
53
 
53
54
  .vxe-context-menu--link {
54
- display: block;
55
- padding: 0 2.5em;
56
- width: 178px;
55
+ display: flex;
56
+ flex-direction: row;
57
+ width: 198px;
57
58
  line-height: 26px;
59
+ padding: 0 0.8em;
58
60
  color: #606266;
59
61
  cursor: pointer;
60
62
  }
61
63
  .vxe-context-menu--link .vxe-context-menu--link-prefix,
62
64
  .vxe-context-menu--link .vxe-context-menu--link-suffix {
63
- position: absolute;
64
- top: 5px;
65
- margin-right: 5px;
66
- font-size: 16px;
67
- }
68
- .vxe-context-menu--link .vxe-context-menu--link-prefix {
69
- left: 5px;
70
- }
71
- .vxe-context-menu--link .vxe-context-menu--link-suffix {
72
- right: 5px;
73
- }
74
- .vxe-context-menu--link .vxe-context-menu--link-suffix.suffix--haschild {
75
- top: 8px;
76
- }
77
- .vxe-context-menu--link .vxe-context-menu--link-suffix.suffix--haschild:before {
78
- position: absolute;
79
- content: "";
80
- border: 4px solid transparent;
81
- border-left-color: #727272;
65
+ min-width: 2em;
66
+ flex-shrink: 0;
67
+ text-align: center;
68
+ padding: 0 0.2em;
82
69
  }
83
70
  .vxe-context-menu--link .vxe-context-menu--link-content {
84
- display: block;
71
+ flex-grow: 1;
72
+ padding: 0 0.2em;
85
73
  overflow: hidden;
86
74
  text-overflow: ellipsis;
87
75
  white-space: nowrap;
88
76
  }
89
77
 
90
- .vxe-table--context-menu-clild-wrapper .vxe-context-menu--link {
91
- padding: 0 2em 0 2.5em;
92
- }
93
-
94
78
  .vxe-context-menu--option-wrapper,
95
79
  .vxe-table--context-menu-clild-wrapper {
96
80
  margin: 0;
@@ -1 +1 @@
1
- @charset "UTF-8";.vxe-table--context-menu-wrapper{display:none}.vxe-table--context-menu-wrapper.is--visible{display:block}.vxe-table--context-menu-clild-wrapper,.vxe-table--context-menu-wrapper{position:absolute;top:0;left:0;font-size:12px;border:1px solid #dadce0;box-shadow:3px 3px 4px -2px rgba(0,0,0,.6);padding:0 1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#606266;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;background-color:#fff}.vxe-context-menu--link{display:block;padding:0 2.5em;width:178px;line-height:26px;color:#606266;cursor:pointer}.vxe-context-menu--link .vxe-context-menu--link-prefix,.vxe-context-menu--link .vxe-context-menu--link-suffix{position:absolute;top:5px;margin-right:5px;font-size:16px}.vxe-context-menu--link .vxe-context-menu--link-prefix{left:5px}.vxe-context-menu--link .vxe-context-menu--link-suffix{right:5px}.vxe-context-menu--link .vxe-context-menu--link-suffix.suffix--haschild{top:8px}.vxe-context-menu--link .vxe-context-menu--link-suffix.suffix--haschild:before{position:absolute;content:"";border:4px solid transparent;border-left-color:#727272}.vxe-context-menu--link .vxe-context-menu--link-content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-table--context-menu-clild-wrapper .vxe-context-menu--link{padding:0 2em 0 2.5em}.vxe-context-menu--option-wrapper,.vxe-table--context-menu-clild-wrapper{margin:0;padding:0;list-style-type:none;border-bottom:1px solid #e8eaed}.vxe-context-menu--option-wrapper li,.vxe-table--context-menu-clild-wrapper li{position:relative;margin:1px 0;border:1px solid transparent}.vxe-context-menu--option-wrapper li:last-child,.vxe-table--context-menu-clild-wrapper li:last-child{border:0}.vxe-context-menu--option-wrapper li.link--active,.vxe-table--context-menu-clild-wrapper li.link--active{background-color:#c5c5c5;border-color:#c5c5c5}.vxe-context-menu--option-wrapper li.link--active>.vxe-context-menu--link,.vxe-table--context-menu-clild-wrapper li.link--active>.vxe-context-menu--link{color:#2b2b2b}.vxe-context-menu--option-wrapper li.link--disabled>.vxe-context-menu--link,.vxe-table--context-menu-clild-wrapper li.link--disabled>.vxe-context-menu--link{color:#bfbfbf;cursor:no-drop}.vxe-context-menu--option-wrapper li.link--disabled.link--active,.vxe-table--context-menu-clild-wrapper li.link--disabled.link--active{border-color:#c0c1c2;background-color:#eee}.vxe-context-menu--option-wrapper li.link--disabled.link--active:hover,.vxe-table--context-menu-clild-wrapper li.link--disabled.link--active:hover{background-color:inherit}.vxe-table--context-menu-clild-wrapper{display:none;top:0;left:100%}.vxe-table--context-menu-clild-wrapper.is--show{display:block}
1
+ @charset "UTF-8";.vxe-table--context-menu-wrapper{display:none}.vxe-table--context-menu-wrapper.is--visible{display:block}.vxe-table--context-menu-clild-wrapper,.vxe-table--context-menu-wrapper{position:absolute;top:0;left:0;font-size:12px;border:1px solid #dadce0;box-shadow:3px 3px 4px -2px rgba(0,0,0,.6);padding:0 1px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#606266;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;background-color:#fff}.vxe-context-menu--link{display:flex;flex-direction:row;width:198px;line-height:26px;padding:0 .8em;color:#606266;cursor:pointer}.vxe-context-menu--link .vxe-context-menu--link-prefix,.vxe-context-menu--link .vxe-context-menu--link-suffix{min-width:2em;flex-shrink:0;text-align:center;padding:0 .2em}.vxe-context-menu--link .vxe-context-menu--link-content{flex-grow:1;padding:0 .2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vxe-context-menu--option-wrapper,.vxe-table--context-menu-clild-wrapper{margin:0;padding:0;list-style-type:none;border-bottom:1px solid #e8eaed}.vxe-context-menu--option-wrapper li,.vxe-table--context-menu-clild-wrapper li{position:relative;margin:1px 0;border:1px solid transparent}.vxe-context-menu--option-wrapper li:last-child,.vxe-table--context-menu-clild-wrapper li:last-child{border:0}.vxe-context-menu--option-wrapper li.link--active,.vxe-table--context-menu-clild-wrapper li.link--active{background-color:#c5c5c5;border-color:#c5c5c5}.vxe-context-menu--option-wrapper li.link--active>.vxe-context-menu--link,.vxe-table--context-menu-clild-wrapper li.link--active>.vxe-context-menu--link{color:#2b2b2b}.vxe-context-menu--option-wrapper li.link--disabled>.vxe-context-menu--link,.vxe-table--context-menu-clild-wrapper li.link--disabled>.vxe-context-menu--link{color:#bfbfbf;cursor:no-drop}.vxe-context-menu--option-wrapper li.link--disabled.link--active,.vxe-table--context-menu-clild-wrapper li.link--disabled.link--active{border-color:#c0c1c2;background-color:#eee}.vxe-context-menu--option-wrapper li.link--disabled.link--active:hover,.vxe-table--context-menu-clild-wrapper li.link--disabled.link--active:hover{background-color:inherit}.vxe-table--context-menu-clild-wrapper{display:none;top:0;left:100%}.vxe-table--context-menu-clild-wrapper.is--show{display:block}
@@ -2,6 +2,7 @@
2
2
  /*size*/
3
3
  /*icon*/
4
4
  /*color*/
5
+ /*layout*/
5
6
  /*input/radio/checkbox*/
6
7
  /*popup*/
7
8
  /*table*/
@@ -2,6 +2,7 @@
2
2
  /*size*/
3
3
  /*icon*/
4
4
  /*color*/
5
+ /*layout*/
5
6
  /*input/radio/checkbox*/
6
7
  /*popup*/
7
8
  /*table*/
@@ -2,6 +2,7 @@
2
2
  /*size*/
3
3
  /*icon*/
4
4
  /*color*/
5
+ /*layout*/
5
6
  /*input/radio/checkbox*/
6
7
  /*popup*/
7
8
  /*table*/
@@ -2,6 +2,7 @@
2
2
  /*size*/
3
3
  /*icon*/
4
4
  /*color*/
5
+ /*layout*/
5
6
  /*input/radio/checkbox*/
6
7
  /*popup*/
7
8
  /*table*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxe-table",
3
- "version": "3.8.21",
3
+ "version": "3.8.23",
4
4
  "description": "一个基于 vue 的 PC 端表单/表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印导出、自定义模板、渲染器、JSON 配置式...",
5
5
  "scripts": {
6
6
  "update": "npm install --legacy-peer-deps",
@@ -24,6 +24,7 @@ export default {
24
24
  disabled: Boolean,
25
25
  loading: Boolean,
26
26
  trigger: { type: String, default: () => GlobalConfig.button.trigger },
27
+ align: String,
27
28
  destroyOnClose: Boolean,
28
29
  className: [String, Function],
29
30
  popupClassName: [String, Function],
@@ -112,7 +113,7 @@ export default {
112
113
  GlobalEvent.off(this, 'mousedown')
113
114
  },
114
115
  render (h) {
115
- const { $scopedSlots, className, popupClassName, trigger, title, inited, type, destroyOnClose, isFormBtn, btnMode, btnStatus, btnRound, btnCircle, vSize, name, disabled, loading, visiblePanel, animatVisible, panelPlacement } = this
116
+ const { $scopedSlots, className, popupClassName, trigger, align, title, inited, type, destroyOnClose, isFormBtn, btnMode, btnStatus, btnRound, btnCircle, vSize, name, disabled, loading, visiblePanel, animatVisible, panelPlacement } = this
116
117
  const downsSlot = $scopedSlots.dropdowns
117
118
  const btnOns = {}
118
119
  const panelOns = {}
@@ -132,7 +133,7 @@ export default {
132
133
  }, [
133
134
  h('button', {
134
135
  ref: 'xBtn',
135
- class: ['vxe-button', `type--${btnMode}`, {
136
+ class: ['vxe-button', `type--${btnMode}`, align ? `align--${align}` : '', {
136
137
  [`size--${vSize}`]: vSize,
137
138
  [`theme--${btnStatus}`]: btnStatus,
138
139
  'is--round': btnRound,
@@ -178,7 +179,7 @@ export default {
178
179
  ] : null)
179
180
  ]) : h('button', {
180
181
  ref: 'xBtn',
181
- class: ['vxe-button', `type--${btnMode}`, className ? (XEUtils.isFunction(className) ? className({ $button: this }) : className) : '', {
182
+ class: ['vxe-button', `type--${btnMode}`, align ? `align--${align}` : '', className ? (XEUtils.isFunction(className) ? className({ $button: this }) : className) : '', {
182
183
  [`size--${vSize}`]: vSize,
183
184
  [`theme--${btnStatus}`]: btnStatus,
184
185
  'is--round': btnRound,
@@ -3,6 +3,7 @@ import UtilTools from '../../tools/utils'
3
3
  import DomTools from '../../tools/dom'
4
4
  import GlobalConfig from '../../v-x-e-table/src/conf'
5
5
  import XEUtils from 'xe-utils'
6
+ import VxeButtonComponent from '../../button/src/button'
6
7
 
7
8
  const { formatText } = UtilTools
8
9
  const { addClass, removeClass } = DomTools
@@ -24,7 +25,7 @@ function updateDropHint (_vm, evnt) {
24
25
  }
25
26
 
26
27
  const renderSimplePanel = (h, _vm) => {
27
- const { _e, $xetable, customStore } = _vm
28
+ const { _e, $xetable, customStore, dragColumn } = _vm
28
29
  const { customColumnList, customOpts, isMaxFixedColumn } = $xetable
29
30
  const { maxHeight } = customStore
30
31
  const { checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, trigger, placement } = customOpts
@@ -43,6 +44,7 @@ const renderSimplePanel = (h, _vm) => {
43
44
  const isColGroup = column.children && column.children.length
44
45
  const colTitle = formatText(column.getTitle(), 1)
45
46
  const isDisabled = checkMethod ? !checkMethod({ column }) : false
47
+ const isHidden = !isChecked
46
48
  colVNs.push(
47
49
  h('li', {
48
50
  key: column.id,
@@ -50,6 +52,7 @@ const renderSimplePanel = (h, _vm) => {
50
52
  colid: column.id
51
53
  },
52
54
  class: ['vxe-table-custom--option', `level--${column.level}`, {
55
+ 'is--hidden': isHidden,
53
56
  'is--group': isColGroup
54
57
  }],
55
58
  on: {
@@ -84,11 +87,13 @@ const renderSimplePanel = (h, _vm) => {
84
87
  class: 'vxe-table-custom--sort-option'
85
88
  }, [
86
89
  h('span', {
87
- class: 'vxe-table-custom--sort-btn',
90
+ class: ['vxe-table-custom--sort-btn', {
91
+ 'is--disabled': isHidden
92
+ }],
88
93
  attrs: {
89
94
  title: GlobalConfig.i18n('vxe.custom.setting.sortHelpTip')
90
95
  },
91
- on: {
96
+ on: isHidden ? {} : {
92
97
  mousedown: _vm.sortMousedownEvent,
93
98
  mouseup: _vm.sortMouseupEvent
94
99
  }
@@ -99,22 +104,30 @@ const renderSimplePanel = (h, _vm) => {
99
104
  ])
100
105
  ])
101
106
  : _e(),
102
- h('div', {
103
- class: 'vxe-table-custom--checkbox-label',
104
- attrs: {
105
- title: colTitle
106
- }
107
- }, colTitle),
107
+ column.type === 'html'
108
+ ? h('div', {
109
+ key: '1',
110
+ class: 'vxe-table-custom--checkbox-label',
111
+ domProps: {
112
+ innerHTML: colTitle
113
+ }
114
+ }) : h('div', {
115
+ key: '0',
116
+ class: 'vxe-table-custom--checkbox-label',
117
+ attrs: {
118
+ title: colTitle
119
+ }
120
+ }, colTitle),
108
121
  !parent && allowFixed
109
122
  ? h('div', {
110
123
  class: 'vxe-table-custom--fixed-option'
111
124
  }, [
112
- h('span', {
113
- class: ['vxe-table-custom--fixed-left-option', column.renderFixed === 'left' ? GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_LEFT, {
114
- 'is--checked': column.renderFixed === 'left',
115
- 'is--disabled': isMaxFixedColumn && !column.renderFixed
116
- }],
117
- attrs: {
125
+ h(VxeButtonComponent, {
126
+ props: {
127
+ mode: 'text',
128
+ icon: column.renderFixed === 'left' ? GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_LEFT,
129
+ status: column.renderFixed === 'left' ? 'primary' : '',
130
+ disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
118
131
  title: GlobalConfig.i18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft')
119
132
  },
120
133
  on: {
@@ -123,16 +136,15 @@ const renderSimplePanel = (h, _vm) => {
123
136
  }
124
137
  }
125
138
  }),
126
- h('span', {
127
- class: ['vxe-table-custom--fixed-right-option', column.renderFixed === 'right' ? GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_RIGHT, {
128
- 'is--checked': column.renderFixed === 'right',
129
- 'is--disabled': isMaxFixedColumn && !column.renderFixed
130
- }],
131
- attrs: {
139
+ h(VxeButtonComponent, {
140
+ props: {
141
+ mode: 'text',
142
+ icon: column.renderFixed === 'right' ? GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : GlobalConfig.icon.TOOLBAR_TOOLS_FIXED_RIGHT,
143
+ status: column.renderFixed === 'right' ? 'primary' : '',
144
+ disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
132
145
  title: GlobalConfig.i18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight')
133
146
  },
134
147
  on: {
135
-
136
148
  click: () => {
137
149
  _vm.changeFixedOption(column, 'right')
138
150
  }
@@ -174,7 +186,7 @@ const renderSimplePanel = (h, _vm) => {
174
186
  title: GlobalConfig.i18n('vxe.table.allTitle')
175
187
  },
176
188
  on: {
177
- click: _vm.allCustomEvent
189
+ click: _vm.allOptionEvent
178
190
  }
179
191
  }, [
180
192
  h('span', {
@@ -203,32 +215,52 @@ const renderSimplePanel = (h, _vm) => {
203
215
  h('div', {
204
216
  ref: 'dragHintElemRef',
205
217
  class: 'vxe-table-custom-popup--drag-hint'
206
- }, GlobalConfig.i18n('vxe.custom.cstmDragTarget', [_vm.dragColumn ? _vm.dragColumn.getTitle() : '']))
218
+ }, GlobalConfig.i18n('vxe.custom.cstmDragTarget', [dragColumn && dragColumn.type !== 'html' ? dragColumn.getTitle() : '']))
207
219
  ]),
208
220
  customOpts.showFooter
209
221
  ? h('div', {
210
222
  class: 'vxe-table-custom--footer'
211
223
  }, [
212
- h('button', {
213
- class: 'btn--reset',
224
+ h(VxeButtonComponent, {
225
+ props: {
226
+ mode: 'text',
227
+ content: customOpts.resetButtonText || GlobalConfig.i18n('vxe.table.customRestore')
228
+ },
214
229
  on: {
215
230
  click: _vm.resetCustomEvent
216
231
  }
217
- }, customOpts.resetButtonText || GlobalConfig.i18n('vxe.table.customRestore')),
232
+ }),
218
233
  customOpts.immediate
219
- ? _e()
220
- : h('button', {
221
- class: 'btn--cancel',
234
+ ? h(VxeButtonComponent, {
235
+ props: {
236
+ mode: 'text',
237
+ content: customOpts.closeButtonText || GlobalConfig.i18n('vxe.table.customClose')
238
+ },
239
+ on: {
240
+ click: _vm.cancelCloseEvent
241
+ }
242
+ })
243
+ : h(VxeButtonComponent, {
244
+ props: {
245
+ mode: 'text',
246
+ content: customOpts.resetButtonText || GlobalConfig.i18n('vxe.table.customCancel')
247
+ },
222
248
  on: {
223
249
  click: _vm.cancelCustomEvent
224
250
  }
225
- }, customOpts.resetButtonText || GlobalConfig.i18n('vxe.table.customCancel')),
226
- h('button', {
227
- class: 'btn--confirm',
228
- on: {
229
- click: _vm.confirmCustomEvent
230
- }
231
- }, customOpts.confirmButtonText || GlobalConfig.i18n('vxe.table.customConfirm'))
251
+ }),
252
+ customOpts.immediate
253
+ ? _e()
254
+ : h(VxeButtonComponent, {
255
+ props: {
256
+ mode: 'text',
257
+ status: 'primary',
258
+ content: customOpts.confirmButtonText || GlobalConfig.i18n('vxe.table.customConfirm')
259
+ },
260
+ on: {
261
+ click: _vm.confirmCustomEvent
262
+ }
263
+ })
232
264
  ])
233
265
  : null
234
266
  ]
@@ -250,6 +282,7 @@ const renderPopupPanel = (h, _vm) => {
250
282
  const colTitle = formatText(column.getTitle(), 1)
251
283
  const isColGroup = column.children && column.children.length
252
284
  const isDisabled = checkMethod ? !checkMethod({ column }) : false
285
+ const isHidden = !isChecked
253
286
  trVNs.push(
254
287
  h('tr', {
255
288
  key: column.id,
@@ -296,11 +329,13 @@ const renderPopupPanel = (h, _vm) => {
296
329
  }, [
297
330
  column.level === 1
298
331
  ? h('span', {
299
- class: 'vxe-table-custom-popup--column-sort-btn',
332
+ class: ['vxe-table-custom-popup--column-sort-btn', {
333
+ 'is--disabled': isHidden
334
+ }],
300
335
  attrs: {
301
336
  title: GlobalConfig.i18n('vxe.custom.setting.sortHelpTip')
302
337
  },
303
- on: {
338
+ on: isHidden ? {} : {
304
339
  mousedown: _vm.sortMousedownEvent,
305
340
  mouseup: _vm.sortMouseupEvent
306
341
  }
@@ -315,22 +350,31 @@ const renderPopupPanel = (h, _vm) => {
315
350
  h('td', {
316
351
  class: 'vxe-table-custom-popup--column-item col--name'
317
352
  }, [
318
- h('div', {
319
- class: 'vxe-table-custom-popup--name',
320
- attrs: {
321
- title: colTitle
322
- }
323
- }, colTitle)
353
+ column.type === 'html'
354
+ ? h('div', {
355
+ key: '1',
356
+ class: 'vxe-table-custom-popup--name',
357
+ domProps: {
358
+ innerHTML: colTitle
359
+ }
360
+ }) : h('div', {
361
+ key: '0',
362
+ class: 'vxe-table-custom-popup--name',
363
+ attrs: {
364
+ title: colTitle
365
+ }
366
+ }, colTitle)
324
367
  ]),
325
368
  allowResizable
326
369
  ? h('td', {
327
370
  class: 'vxe-table-custom-popup--column-item col--resizable'
328
371
  }, [
329
- !isChecked || (column.children && column.children.length)
372
+ column.children && column.children.length
330
373
  ? h('span', '-')
331
374
  : h('vxe-input', {
332
375
  props: {
333
376
  type: 'integer',
377
+ disabled: isHidden,
334
378
  value: column.renderResizeWidth
335
379
  },
336
380
  on: {
@@ -352,19 +396,17 @@ const renderPopupPanel = (h, _vm) => {
352
396
  value: column.renderFixed || '',
353
397
  type: 'button',
354
398
  size: 'mini',
399
+ disabled: isHidden,
355
400
  options: [
356
- { label: GlobalConfig.i18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isMaxFixedColumn },
357
- { label: GlobalConfig.i18n('vxe.custom.setting.fixedUnset'), value: '' },
358
- { label: GlobalConfig.i18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isMaxFixedColumn }
401
+ { label: GlobalConfig.i18n('vxe.custom.setting.fixedLeft'), value: 'left', disabled: isHidden || isMaxFixedColumn },
402
+ { label: GlobalConfig.i18n('vxe.custom.setting.fixedUnset'), value: '', disabled: isHidden },
403
+ { label: GlobalConfig.i18n('vxe.custom.setting.fixedRight'), value: 'right', disabled: isHidden || isMaxFixedColumn }
359
404
  ]
360
405
  },
361
406
  on: {
362
407
  input (value) {
363
408
  column.renderFixed = value
364
409
  }
365
- // onChange () {
366
- // changePopupFixedOption(column)
367
- // }
368
410
  }
369
411
  })
370
412
  ])
@@ -453,7 +495,7 @@ const renderPopupPanel = (h, _vm) => {
453
495
  title: GlobalConfig.i18n('vxe.table.allTitle')
454
496
  },
455
497
  on: {
456
- click: _vm.allCustomEvent
498
+ click: _vm.allOptionEvent
457
499
  }
458
500
 
459
501
  }, [
@@ -514,7 +556,7 @@ const renderPopupPanel = (h, _vm) => {
514
556
  return h('div', {
515
557
  class: 'vxe-table-custom-popup--footer'
516
558
  }, [
517
- h('vxe-button', {
559
+ h(VxeButtonComponent, {
518
560
  props: {
519
561
  content: customOpts.resetButtonText || GlobalConfig.i18n('vxe.custom.cstmRestore')
520
562
  },
@@ -522,7 +564,7 @@ const renderPopupPanel = (h, _vm) => {
522
564
  click: _vm.resetCustomEvent
523
565
  }
524
566
  }),
525
- h('vxe-button', {
567
+ h(VxeButtonComponent, {
526
568
  props: {
527
569
  content: customOpts.resetButtonText || GlobalConfig.i18n('vxe.custom.cstmCancel')
528
570
  },
@@ -530,7 +572,7 @@ const renderPopupPanel = (h, _vm) => {
530
572
  click: _vm.cancelCustomEvent
531
573
  }
532
574
  }),
533
- h('vxe-button', {
575
+ h(VxeButtonComponent, {
534
576
  props: {
535
577
  status: 'primary',
536
578
  content: customOpts.confirmButtonText || GlobalConfig.i18n('vxe.custom.cstmConfirm')
@@ -621,6 +663,11 @@ export default {
621
663
  $xetable.emitCustomEvent('confirm', evnt)
622
664
  $xetable.saveCustomStore('confirm')
623
665
  },
666
+ cancelCloseEvent ({ $event }) {
667
+ const { $xetable } = this
668
+ $xetable.closeCustom()
669
+ $xetable.emitCustomEvent('cancel', $event)
670
+ },
624
671
  cancelCustomEvent (evnt) {
625
672
  const { $xetable } = this
626
673
  const { customStore, customOpts, customColumnList } = $xetable
@@ -701,49 +748,73 @@ export default {
701
748
  const { $xetable } = this
702
749
  const { customOpts } = $xetable
703
750
  const isChecked = !column.renderVisible
704
- XEUtils.eachTree([column], (item) => {
705
- item.renderVisible = isChecked
706
- item.halfVisible = false
707
- })
708
- this.handleOptionCheck(column)
709
751
  if (customOpts.immediate) {
752
+ XEUtils.eachTree([column], (item) => {
753
+ item.visible = isChecked
754
+ item.renderVisible = isChecked
755
+ item.halfVisible = false
756
+ })
710
757
  $xetable.handleCustom()
711
758
  $xetable.saveCustomStore('update:visible')
759
+ } else {
760
+ XEUtils.eachTree([column], (item) => {
761
+ item.renderVisible = isChecked
762
+ item.halfVisible = false
763
+ })
712
764
  }
765
+ this.handleOptionCheck(column)
713
766
  $xetable.checkCustomStatus()
714
767
  },
715
768
  changeFixedOption (column, colFixed) {
716
769
  const { $xetable } = this
717
- const { isMaxFixedColumn } = $xetable
718
- if (column.renderFixed === colFixed) {
719
- column.renderFixed = ''
720
- // $xeTable.clearColumnFixed(column)
770
+ const { isMaxFixedColumn, customOpts } = $xetable
771
+ if (customOpts.immediate) {
772
+ if (column.renderFixed === colFixed) {
773
+ column.fixed = ''
774
+ column.renderFixed = ''
775
+ } else {
776
+ if (!isMaxFixedColumn || column.renderFixed) {
777
+ column.fixed = colFixed
778
+ column.renderFixed = colFixed
779
+ }
780
+ }
781
+ $xetable.handleCustom()
782
+ $xetable.saveCustomStore('update:fixed')
721
783
  } else {
722
- if (!isMaxFixedColumn || column.renderFixed) {
723
- column.renderFixed = colFixed
724
- // $xeTable.setColumnFixed(column, colFixed)
784
+ if (column.renderFixed === colFixed) {
785
+ column.renderFixed = ''
786
+ } else {
787
+ if (!isMaxFixedColumn || column.renderFixed) {
788
+ column.renderFixed = colFixed
789
+ }
725
790
  }
726
791
  }
727
792
  },
728
- // changePopupFixedOption (column) {
729
- // const { $xetable } = this
730
- // const { isMaxFixedColumn } = $xetable
731
- // if (!isMaxFixedColumn) {
732
- // $xetable.setColumnFixed(column, column.fixed)
733
- // }
734
- // },
735
- allCustomEvent () {
793
+ allOptionEvent () {
736
794
  const { $xetable, customStore } = this
737
- const { customOpts, customColumnList } = $xetable
795
+ const { customColumnList, customOpts } = $xetable
738
796
  const { checkMethod } = customOpts
739
797
  const isAll = !customStore.isAll
740
- XEUtils.eachTree(customColumnList, (column) => {
741
- if (!checkMethod || checkMethod({ column })) {
742
- column.renderVisible = isAll
743
- column.halfVisible = false
744
- }
745
- })
746
- customStore.isAll = isAll
798
+ if (customOpts.immediate) {
799
+ XEUtils.eachTree(customColumnList, (column) => {
800
+ if (!checkMethod || checkMethod({ column })) {
801
+ column.visible = isAll
802
+ column.renderVisible = isAll
803
+ column.halfVisible = false
804
+ }
805
+ })
806
+ customStore.isAll = isAll
807
+ $xetable.handleCustom()
808
+ $xetable.saveCustomStore('update:visible')
809
+ } else {
810
+ XEUtils.eachTree(customColumnList, (column) => {
811
+ if (!checkMethod || checkMethod({ column })) {
812
+ column.renderVisible = isAll
813
+ column.halfVisible = false
814
+ }
815
+ })
816
+ customStore.isAll = isAll
817
+ }
747
818
  $xetable.checkCustomStatus()
748
819
  },
749
820
  sortMousedownEvent (evnt) {
@@ -777,7 +848,7 @@ export default {
777
848
  },
778
849
  sortDragendEvent (evnt) {
779
850
  const { $xetable, prevDropTrEl } = this
780
- const { customColumnList } = $xetable
851
+ const { customColumnList, customOpts } = $xetable
781
852
  const trEl = evnt.currentTarget
782
853
  const dragHintEl = this.$refs.dragHintElemRef
783
854
  if (prevDropTrEl) {
@@ -813,6 +884,17 @@ export default {
813
884
  }
814
885
  removeClass(trEl, 'active--drag-target')
815
886
  removeClass(trEl, 'active--drag-origin')
887
+
888
+ if (customOpts.immediate) {
889
+ XEUtils.eachTree(customColumnList, (column, index, items, path, parent) => {
890
+ if (!parent) {
891
+ const sortIndex = index + 1
892
+ column.renderSortNumber = sortIndex
893
+ }
894
+ })
895
+ $xetable.handleCustom()
896
+ $xetable.saveCustomStore('update:sort')
897
+ }
816
898
  },
817
899
  sortDragoverEvent (evnt) {
818
900
  const { $xetable, prevDropTrEl } = this