vxe-pc-ui 3.16.4 → 3.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 (52) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/icon-picker/src/icon-picker.js +11 -13
  3. package/es/icon-picker/style.css +3 -8
  4. package/es/icon-picker/style.min.css +1 -1
  5. package/es/list/src/list.js +24 -8
  6. package/es/style.css +1 -1
  7. package/es/style.min.css +1 -1
  8. package/es/tree/src/tree.js +13 -1
  9. package/es/ui/index.js +1 -1
  10. package/es/ui/src/log.js +1 -1
  11. package/es/vxe-icon-picker/style.css +3 -8
  12. package/es/vxe-icon-picker/style.min.css +1 -1
  13. package/lib/icon/style/style.css +1 -1
  14. package/lib/icon/style/style.min.css +1 -1
  15. package/lib/icon-picker/src/icon-picker.js +34 -37
  16. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  17. package/lib/icon-picker/style/style.css +3 -8
  18. package/lib/icon-picker/style/style.min.css +1 -1
  19. package/lib/index.umd.js +73 -48
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/list/src/list.js +24 -8
  22. package/lib/list/src/list.min.js +1 -1
  23. package/lib/style.css +1 -1
  24. package/lib/style.min.css +1 -1
  25. package/lib/tree/src/tree.js +13 -1
  26. package/lib/tree/src/tree.min.js +1 -1
  27. package/lib/ui/index.js +1 -1
  28. package/lib/ui/index.min.js +1 -1
  29. package/lib/ui/src/log.js +1 -1
  30. package/lib/ui/src/log.min.js +1 -1
  31. package/lib/vxe-icon-picker/style/style.css +3 -8
  32. package/lib/vxe-icon-picker/style/style.min.css +1 -1
  33. package/package.json +1 -1
  34. package/packages/icon-picker/src/icon-picker.ts +10 -12
  35. package/packages/list/src/list.ts +30 -12
  36. package/packages/tree/src/tree.ts +15 -1
  37. package/styles/components/icon-picker.scss +3 -8
  38. package/types/components/icon-picker.d.ts +7 -3
  39. package/types/components/list.d.ts +12 -0
  40. package/types/components/tree.d.ts +12 -0
  41. /package/es/icon/{iconfont.1783654852960.ttf → iconfont.1783838609874.ttf} +0 -0
  42. /package/es/icon/{iconfont.1783654852960.woff → iconfont.1783838609874.woff} +0 -0
  43. /package/es/icon/{iconfont.1783654852960.woff2 → iconfont.1783838609874.woff2} +0 -0
  44. /package/es/{iconfont.1783654852960.ttf → iconfont.1783838609874.ttf} +0 -0
  45. /package/es/{iconfont.1783654852960.woff → iconfont.1783838609874.woff} +0 -0
  46. /package/es/{iconfont.1783654852960.woff2 → iconfont.1783838609874.woff2} +0 -0
  47. /package/lib/icon/style/{iconfont.1783654852960.ttf → iconfont.1783838609874.ttf} +0 -0
  48. /package/lib/icon/style/{iconfont.1783654852960.woff → iconfont.1783838609874.woff} +0 -0
  49. /package/lib/icon/style/{iconfont.1783654852960.woff2 → iconfont.1783838609874.woff2} +0 -0
  50. /package/lib/{iconfont.1783654852960.ttf → iconfont.1783838609874.ttf} +0 -0
  51. /package/lib/{iconfont.1783654852960.woff → iconfont.1783838609874.woff} +0 -0
  52. /package/lib/{iconfont.1783654852960.woff2 → iconfont.1783838609874.woff2} +0 -0
@@ -583,7 +583,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
583
583
  const el = $xeList.$refs.refElem as HTMLDivElement
584
584
  if (el) {
585
585
  const parentEl = el.parentElement
586
- reactData.parentHeight = parentEl ? parentEl.clientHeight : 0
586
+ let parentHeight = 0
587
+ if (parentEl) {
588
+ const parentStyle = getComputedStyle(parentEl)
589
+ parentHeight = parentEl.clientHeight - Math.ceil(XEUtils.toNumber(parentStyle.paddingLeft) + XEUtils.toNumber(parentStyle.paddingRight))
590
+ }
591
+ reactData.parentHeight = parentHeight
587
592
  $xeList.updateHeight()
588
593
  if (el.clientWidth && el.clientHeight) {
589
594
  return $xeList.computeScrollLoad()
@@ -837,7 +842,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
837
842
  $xeList.emitCheckboxMode(value)
838
843
  return $xeList.updateCheckboxStatus()
839
844
  },
840
- getCheckboxRows () {
845
+ getCheckboxRecords () {
841
846
  const $xeList = this
842
847
  const reactData = $xeList.reactData
843
848
  const internalData = $xeList.internalData
@@ -854,6 +859,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
854
859
  }
855
860
  return rowList
856
861
  },
862
+ getCheckboxRows () {
863
+ const $xeList = this
864
+
865
+ return $xeList.getCheckboxRecords()
866
+ },
857
867
  getCheckboxRowKeys () {
858
868
  const $xeList = this
859
869
  const reactData = $xeList.reactData
@@ -1689,6 +1699,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
1689
1699
  const rowid = $xeList.getRowId(row)
1690
1700
  return !!reactData.removeRowFlag && !!internalData.removeRowMaps[rowid]
1691
1701
  },
1702
+ getRecordset () {
1703
+ const $xeList = this
1704
+
1705
+ return {
1706
+ insertRecords: $xeList.getInsertRecords(),
1707
+ removeRecords: $xeList.getRemoveRecords()
1708
+ }
1709
+ },
1692
1710
  handleCrossListRowDragCancelEvent () {
1693
1711
  const $xeList = this
1694
1712
 
@@ -2078,6 +2096,16 @@ export default /* define-vxe-component start */ defineVxeComponent({
2078
2096
  }
2079
2097
 
2080
2098
  const ctVNs: VNode[] = []
2099
+ if (showRadio) {
2100
+ ctVNs.push(
2101
+ $xeList.renderRadio(h, row, rowid, isRadioChecked)
2102
+ )
2103
+ }
2104
+ if (showCheckbox) {
2105
+ ctVNs.push(
2106
+ $xeList.renderCheckbox(h, row, rowid, isCheckboxChecked)
2107
+ )
2108
+ }
2081
2109
  let isDragDisabled = false
2082
2110
  if (isDrag && keyField && (!visibleMethod || visibleMethod(rowParams))) {
2083
2111
  const handleOns: {
@@ -2109,16 +2137,6 @@ export default /* define-vxe-component start */ defineVxeComponent({
2109
2137
  ])
2110
2138
  )
2111
2139
  }
2112
- if (showRadio) {
2113
- ctVNs.push(
2114
- $xeList.renderRadio(h, row, rowid, isRadioChecked)
2115
- )
2116
- }
2117
- if (showCheckbox) {
2118
- ctVNs.push(
2119
- $xeList.renderCheckbox(h, row, rowid, isCheckboxChecked)
2120
- )
2121
- }
2122
2140
  ctVNs.push(
2123
2141
  h('div', {
2124
2142
  key: 'ct5',
@@ -2099,6 +2099,14 @@ export default /* define-vxe-component start */ defineVxeComponent({
2099
2099
  }
2100
2100
  return $xeTree.$nextTick()
2101
2101
  },
2102
+ getRecordset () {
2103
+ const $xeTree = this
2104
+
2105
+ return {
2106
+ insertRecords: $xeTree.getInsertRecords(),
2107
+ removeRecords: $xeTree.getRemoveRecords()
2108
+ }
2109
+ },
2102
2110
  handleContextmenuEvent (evnt: MouseEvent, node: any) {
2103
2111
  const $xeTree = this
2104
2112
  const props = $xeTree
@@ -2618,6 +2626,11 @@ export default /* define-vxe-component start */ defineVxeComponent({
2618
2626
  },
2619
2627
  getCheckboxNodes () {
2620
2628
  const $xeTree = this
2629
+
2630
+ return $xeTree.getCheckboxRecords()
2631
+ },
2632
+ getCheckboxRecords () {
2633
+ const $xeTree = this
2621
2634
  const internalData = $xeTree.internalData
2622
2635
 
2623
2636
  const { nodeMaps, selectCheckboxMaps } = internalData
@@ -3544,9 +3557,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
3544
3557
  ])
3545
3558
  ]
3546
3559
  : []),
3547
- $xeTree.renderDragIcon(h, node, nodeid),
3548
3560
  $xeTree.renderRadio(h, node, nodeid, isExistChild, nLevel, isRadioChecked),
3549
3561
  $xeTree.renderCheckbox(h, node, nodeid, isExistChild, nLevel, isCheckboxChecked, isIndeterminate),
3562
+ $xeTree.renderDragIcon(h, node, nodeid),
3550
3563
  h('div', {
3551
3564
  class: 'vxe-tree--node-item-inner'
3552
3565
  }, [
@@ -3892,6 +3905,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
3892
3905
  internalData.resizeObserver = resizeObserver
3893
3906
  }
3894
3907
 
3908
+ $xeTree.recalculate()
3895
3909
  globalEvents.on($xeTree, 'resize', $xeTree.handleGlobalResizeEvent)
3896
3910
  },
3897
3911
  beforeDestroy () {
@@ -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
  }
@@ -61,11 +61,15 @@ export namespace VxeIconPickerPropTypes {
61
61
  trigger?: 'default' | 'icon' | 'manual' | '' | null
62
62
  transfer?: boolean
63
63
  /**
64
- * 分块显示多少个图标
64
+ * 每行显示出多少个图标,如果设置了 chunkWidth 则该参数无效
65
65
  */
66
66
  chunkSize?: number
67
67
  /**
68
- * 图标展示方式,支持分块和列表
68
+ * 每个图标的宽度
69
+ */
70
+ chunkWidth?: number | string
71
+ /**
72
+ * 宽度
69
73
  */
70
74
  width?: number | string
71
75
  height?: number | string
@@ -115,7 +119,7 @@ export interface IconPickerReactData {
115
119
  isAniVisible: boolean
116
120
  isActivated: boolean
117
121
  searchValue: string
118
- iconGroups: VxeIconPickerDefines.IconItemObj[][]
122
+ iconList: VxeIconPickerDefines.IconItemObj[]
119
123
  }
120
124
 
121
125
  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
 
@@ -537,6 +537,10 @@ export interface TreeMethods<D = any> {
537
537
  * 只对 show-checkbox 有效,获取复选框的节点
538
538
  */
539
539
  getCheckboxNodes(): D[]
540
+ /**
541
+ * 只对 show-checkbox 有效,获取复选框的节点
542
+ */
543
+ getCheckboxRecords(): D[]
540
544
  /**
541
545
  * 用于 showCheckbox,手动清空复选框的
542
546
  */
@@ -717,6 +721,14 @@ export interface TreeMethods<D = any> {
717
721
  * 手动关闭工具提示
718
722
  */
719
723
  closeTooltip(): Promise<void>
724
+ /**
725
+ * 获取列表数据集
726
+ * 获取新增、删除的数据
727
+ */
728
+ getRecordset(): {
729
+ insertRecords: D[]
730
+ removeRecords: D[]
731
+ }
720
732
  }
721
733
  export interface VxeTreeMethods<D = any> extends TreeMethods<D> { }
722
734