vxe-pc-ui 4.16.4 → 4.16.6

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 (64) hide show
  1. package/dist/all.esm.js +50 -30
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/icon/style.css +1 -1
  5. package/es/icon-picker/src/icon-picker.js +15 -17
  6. package/es/icon-picker/style.css +3 -8
  7. package/es/icon-picker/style.min.css +1 -1
  8. package/es/list/src/list.js +21 -9
  9. package/es/menu/style.css +4 -2
  10. package/es/menu/style.min.css +1 -1
  11. package/es/style.css +1 -1
  12. package/es/style.min.css +1 -1
  13. package/es/tree/src/tree.js +12 -2
  14. package/es/ui/index.js +1 -1
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-icon-picker/style.css +3 -8
  17. package/es/vxe-icon-picker/style.min.css +1 -1
  18. package/es/vxe-menu/style.css +4 -2
  19. package/es/vxe-menu/style.min.css +1 -1
  20. package/lib/icon/style/style.css +1 -1
  21. package/lib/icon/style/style.min.css +1 -1
  22. package/lib/icon-picker/src/icon-picker.js +39 -45
  23. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  24. package/lib/icon-picker/style/style.css +3 -8
  25. package/lib/icon-picker/style/style.min.css +1 -1
  26. package/lib/index.umd.js +74 -58
  27. package/lib/index.umd.min.js +1 -1
  28. package/lib/list/src/list.js +21 -9
  29. package/lib/list/src/list.min.js +1 -1
  30. package/lib/menu/style/style.css +4 -2
  31. package/lib/menu/style/style.min.css +1 -1
  32. package/lib/style.css +1 -1
  33. package/lib/style.min.css +1 -1
  34. package/lib/tree/src/tree.js +12 -2
  35. package/lib/tree/src/tree.min.js +1 -1
  36. package/lib/ui/index.js +1 -1
  37. package/lib/ui/index.min.js +1 -1
  38. package/lib/ui/src/log.js +1 -1
  39. package/lib/ui/src/log.min.js +1 -1
  40. package/lib/vxe-icon-picker/style/style.css +3 -8
  41. package/lib/vxe-icon-picker/style/style.min.css +1 -1
  42. package/lib/vxe-menu/style/style.css +4 -2
  43. package/lib/vxe-menu/style/style.min.css +1 -1
  44. package/package.json +1 -1
  45. package/packages/icon-picker/src/icon-picker.ts +14 -16
  46. package/packages/list/src/list.ts +25 -13
  47. package/packages/tree/src/tree.ts +12 -2
  48. package/styles/components/icon-picker.scss +3 -8
  49. package/styles/components/menu.scss +4 -2
  50. package/types/components/icon-picker.d.ts +7 -3
  51. package/types/components/list.d.ts +12 -0
  52. package/types/components/tree.d.ts +12 -0
  53. /package/es/icon/{iconfont.1783654856324.ttf → iconfont.1783838735018.ttf} +0 -0
  54. /package/es/icon/{iconfont.1783654856324.woff → iconfont.1783838735018.woff} +0 -0
  55. /package/es/icon/{iconfont.1783654856324.woff2 → iconfont.1783838735018.woff2} +0 -0
  56. /package/es/{iconfont.1783654856324.ttf → iconfont.1783838735018.ttf} +0 -0
  57. /package/es/{iconfont.1783654856324.woff → iconfont.1783838735018.woff} +0 -0
  58. /package/es/{iconfont.1783654856324.woff2 → iconfont.1783838735018.woff2} +0 -0
  59. /package/lib/icon/style/{iconfont.1783654856324.ttf → iconfont.1783838735018.ttf} +0 -0
  60. /package/lib/icon/style/{iconfont.1783654856324.woff → iconfont.1783838735018.woff} +0 -0
  61. /package/lib/icon/style/{iconfont.1783654856324.woff2 → iconfont.1783838735018.woff2} +0 -0
  62. /package/lib/{iconfont.1783654856324.ttf → iconfont.1783838735018.ttf} +0 -0
  63. /package/lib/{iconfont.1783654856324.woff → iconfont.1783838735018.woff} +0 -0
  64. /package/lib/{iconfont.1783654856324.woff2 → iconfont.1783838735018.woff2} +0 -0
@@ -420,7 +420,12 @@ export default defineVxeComponent({
420
420
  const el = refElem.value
421
421
  if (el) {
422
422
  const parentEl = el.parentElement
423
- reactData.parentHeight = parentEl ? parentEl.clientHeight : 0
423
+ let parentHeight = 0
424
+ if (parentEl) {
425
+ const parentStyle = getComputedStyle(parentEl)
426
+ parentHeight = parentEl.clientHeight - Math.ceil(XEUtils.toNumber(parentStyle.paddingLeft) + XEUtils.toNumber(parentStyle.paddingRight))
427
+ }
428
+ reactData.parentHeight = parentHeight
424
429
  updateHeight()
425
430
  if (el.clientWidth && el.clientHeight) {
426
431
  return computeScrollLoad()
@@ -1164,7 +1169,7 @@ export default defineVxeComponent({
1164
1169
  return updateCheckboxStatus()
1165
1170
  }
1166
1171
 
1167
- const getCheckboxRows = () => {
1172
+ const getCheckboxRecords = () => {
1168
1173
  const { updateCheckboxFlag } = reactData
1169
1174
  const { selectCheckboxMaps } = internalData
1170
1175
  const rowList: string[] = []
@@ -1517,7 +1522,8 @@ export default defineVxeComponent({
1517
1522
  clearRadioRow,
1518
1523
  setCheckboxRow,
1519
1524
  setCheckboxRowByKey,
1520
- getCheckboxRows,
1525
+ getCheckboxRecords,
1526
+ getCheckboxRows: getCheckboxRecords,
1521
1527
  getCheckboxRowKeys,
1522
1528
  clearCheckboxRow,
1523
1529
  setAllCheckboxRow,
@@ -1616,6 +1622,12 @@ export default defineVxeComponent({
1616
1622
  isRemoveByRow (row) {
1617
1623
  const rowid = getRowId(row)
1618
1624
  return !!reactData.removeRowFlag && !!internalData.removeRowMaps[rowid]
1625
+ },
1626
+ getRecordset () {
1627
+ return {
1628
+ insertRecords: $xeList.getInsertRecords(),
1629
+ removeRecords: $xeList.getRemoveRecords()
1630
+ }
1619
1631
  }
1620
1632
  }
1621
1633
 
@@ -1930,6 +1942,16 @@ export default defineVxeComponent({
1930
1942
  }
1931
1943
 
1932
1944
  const ctVNs: VNode[] = []
1945
+ if (showRadio) {
1946
+ ctVNs.push(
1947
+ renderRadio(row, rowid, isRadioChecked)
1948
+ )
1949
+ }
1950
+ if (showCheckbox) {
1951
+ ctVNs.push(
1952
+ renderCheckbox(row, rowid, isCheckboxChecked)
1953
+ )
1954
+ }
1933
1955
  let isDragDisabled = false
1934
1956
  if (isDrag && keyField && (!visibleMethod || visibleMethod(rowParams))) {
1935
1957
  const handleOns: {
@@ -1961,16 +1983,6 @@ export default defineVxeComponent({
1961
1983
  ])
1962
1984
  )
1963
1985
  }
1964
- if (showRadio) {
1965
- ctVNs.push(
1966
- renderRadio(row, rowid, isRadioChecked)
1967
- )
1968
- }
1969
- if (showCheckbox) {
1970
- ctVNs.push(
1971
- renderCheckbox(row, rowid, isCheckboxChecked)
1972
- )
1973
- }
1974
1986
  ctVNs.push(
1975
1987
  h('div', {
1976
1988
  key: 'ct5',
@@ -1819,6 +1819,9 @@ export default defineVxeComponent({
1819
1819
  return nodeKeys
1820
1820
  },
1821
1821
  getCheckboxNodes () {
1822
+ return $xeTree.getCheckboxRecords()
1823
+ },
1824
+ getCheckboxRecords () {
1822
1825
  const { nodeMaps, selectCheckboxMaps } = internalData
1823
1826
  const list: any[] = []
1824
1827
  XEUtils.each(selectCheckboxMaps, (item, nodeid) => {
@@ -2223,7 +2226,13 @@ export default defineVxeComponent({
2223
2226
  const nodeid = getNodeId(node)
2224
2227
  return !!reactData.removeNodeFlag && !!internalData.removeNodeMaps[nodeid]
2225
2228
  },
2226
- closeTooltip
2229
+ closeTooltip,
2230
+ getRecordset () {
2231
+ return {
2232
+ insertRecords: $xeTree.getInsertRecords(),
2233
+ removeRecords: $xeTree.getRemoveRecords()
2234
+ }
2235
+ }
2227
2236
  }
2228
2237
 
2229
2238
  const handleNodeDragEndClearStatus = () => {
@@ -3210,9 +3219,9 @@ export default defineVxeComponent({
3210
3219
  ])
3211
3220
  ]
3212
3221
  : []),
3213
- renderDragIcon(node, nodeid),
3214
3222
  renderRadio(node, nodeid, isExistChild, nLevel, isRadioChecked),
3215
3223
  renderCheckbox(node, nodeid, isExistChild, nLevel, isCheckboxChecked, isIndeterminate),
3224
+ renderDragIcon(node, nodeid),
3216
3225
  h('div', {
3217
3226
  class: 'vxe-tree--node-item-inner'
3218
3227
  }, [
@@ -3517,6 +3526,7 @@ export default defineVxeComponent({
3517
3526
  internalData.resizeObserver = resizeObserver
3518
3527
  }
3519
3528
 
3529
+ recalculate()
3520
3530
  globalEvents.on($xeTree, 'resize', handleGlobalResizeEvent)
3521
3531
  })
3522
3532
 
@@ -122,12 +122,6 @@
122
122
  }
123
123
  }
124
124
 
125
- .vxe-ico-picker--all-list {
126
- display: flex;
127
- flex-direction: row;
128
- flex-wrap: wrap;
129
- }
130
-
131
125
  .vxe-ico-picker--list-wrapper {
132
126
  overflow-x: hidden;
133
127
  overflow-y: auto;
@@ -138,12 +132,12 @@
138
132
  .vxe-ico-picker--list {
139
133
  display: flex;
140
134
  flex-direction: row;
135
+ flex-wrap: wrap;
141
136
  }
142
137
  .vxe-ico-picker--item {
143
138
  display: flex;
144
139
  flex-direction: column;
145
- min-width: 4.8em;
146
- width: var(--vxe-ui-icon-picker-item-width, 4.8em);
140
+ width: var(--vxe-ui-icon-picker-item-width, 25%);
147
141
  padding: var(--vxe-ui-layout-padding-half);
148
142
  .vxe-ico-picker--item-inner {
149
143
  padding: 0.2em;
@@ -206,6 +200,7 @@
206
200
  font-size: var(--vxe-ui-ico-picker-current-font-size);
207
201
  color: var(--vxe-ui-font-color);
208
202
  text-align: left;
203
+ width: 20em;
209
204
  &:not(.is--transfer) {
210
205
  min-width: 100%;
211
206
  }
@@ -114,7 +114,9 @@
114
114
  }
115
115
 
116
116
  .vxe-menu--item-group {
117
- display: none;
117
+ max-height: 0;
118
+ overflow: hidden;
119
+ transition: max-height 0.3s ease-in-out;
118
120
  }
119
121
  .vxe-menu--item-wrapper {
120
122
  &.is--active {
@@ -130,7 +132,7 @@
130
132
  }
131
133
  &.is--expand {
132
134
  & > .vxe-menu--item-group {
133
- display: block;
135
+ max-height: 1000px;
134
136
  }
135
137
  }
136
138
  }
@@ -68,11 +68,15 @@ export namespace VxeIconPickerPropTypes {
68
68
  trigger?: 'default' | 'icon' | 'manual' | '' | null
69
69
  transfer?: boolean
70
70
  /**
71
- * 分块显示多少个图标
71
+ * 每行显示出多少个图标,如果设置了 chunkWidth 则该参数无效
72
72
  */
73
73
  chunkSize?: number
74
74
  /**
75
- * 图标展示方式,支持分块和列表
75
+ * 每个图标的宽度
76
+ */
77
+ chunkWidth?: number | string
78
+ /**
79
+ * 宽度
76
80
  */
77
81
  width?: number | string
78
82
  height?: number | string
@@ -122,7 +126,7 @@ export interface IconPickerReactData {
122
126
  isAniVisible: boolean
123
127
  isActivated: boolean
124
128
  searchValue: string
125
- iconGroups: VxeIconPickerDefines.IconItemObj[][]
129
+ iconList: VxeIconPickerDefines.IconItemObj[]
126
130
  }
127
131
 
128
132
  export interface IconPickerInternalData {
@@ -440,6 +440,10 @@ export interface ListMethods<D = any> {
440
440
  * 只对 show-checkbox 有效,根据主键设置复选框
441
441
  */
442
442
  setCheckboxRowByKey(rowKeys: string | number | null | undefined | (string | number | null | undefined)[], checked: boolean): Promise<void>
443
+ /**
444
+ * 只对 show-checkbox 有效,获取复选框已选的行
445
+ */
446
+ getCheckboxRecords(): D[]
443
447
  /**
444
448
  * 只对 show-checkbox 有效,获取复选框已选的行
445
449
  */
@@ -492,6 +496,14 @@ export interface ListMethods<D = any> {
492
496
  * 判断数据是否被删除
493
497
  */
494
498
  isRemoveByRow(row: any | null): boolean
499
+ /**
500
+ * 获取列表数据集
501
+ * 获取新增、删除的数据
502
+ */
503
+ getRecordset(): {
504
+ insertRecords: D[]
505
+ removeRecords: D[]
506
+ }
495
507
  }
496
508
  export interface VxeListMethods<D = any> extends ListMethods<D> { }
497
509
 
@@ -544,6 +544,10 @@ export interface TreeMethods<D = any> {
544
544
  * 只对 show-checkbox 有效,获取复选框的节点
545
545
  */
546
546
  getCheckboxNodes(): D[]
547
+ /**
548
+ * 只对 show-checkbox 有效,获取复选框的节点
549
+ */
550
+ getCheckboxRecords(): D[]
547
551
  /**
548
552
  * 用于 showCheckbox,手动清空复选框的
549
553
  */
@@ -724,6 +728,14 @@ export interface TreeMethods<D = any> {
724
728
  * 手动关闭工具提示
725
729
  */
726
730
  closeTooltip(): Promise<void>
731
+ /**
732
+ * 获取列表数据集
733
+ * 获取新增、删除的数据
734
+ */
735
+ getRecordset(): {
736
+ insertRecords: D[]
737
+ removeRecords: D[]
738
+ }
727
739
  }
728
740
  export interface VxeTreeMethods<D = any> extends TreeMethods<D> { }
729
741