vxe-pc-ui 4.10.50 → 4.11.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.
- package/es/icon/style.css +1 -1
- package/es/select/src/select.js +23 -2
- package/es/select/style.css +13 -4
- package/es/select/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tree/src/store.js +8 -0
- package/es/tree/src/tree.js +40 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-select/style.css +13 -4
- package/es/vxe-select/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +76 -8
- package/lib/index.umd.min.js +1 -1
- package/lib/select/src/select.js +25 -2
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +13 -4
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tree/src/store.js +15 -0
- package/lib/tree/src/store.min.js +1 -0
- package/lib/tree/src/tree.js +37 -1
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-select/style/style.css +13 -4
- package/lib/vxe-select/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/select/src/select.ts +26 -3
- package/packages/tree/src/store.ts +14 -0
- package/packages/tree/src/tree.ts +43 -1
- package/styles/components/select.scss +13 -3
- package/types/components/gantt-plugins/extend-gantt-chart.d.ts +19 -0
- package/types/components/select.d.ts +6 -0
- package/types/components/tree.d.ts +24 -0
- /package/es/icon/{iconfont.1765343568078.ttf → iconfont.1765466150452.ttf} +0 -0
- /package/es/icon/{iconfont.1765343568078.woff → iconfont.1765466150452.woff} +0 -0
- /package/es/icon/{iconfont.1765343568078.woff2 → iconfont.1765466150452.woff2} +0 -0
- /package/es/{iconfont.1765343568078.ttf → iconfont.1765466150452.ttf} +0 -0
- /package/es/{iconfont.1765343568078.woff → iconfont.1765466150452.woff} +0 -0
- /package/es/{iconfont.1765343568078.woff2 → iconfont.1765466150452.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1765343568078.ttf → iconfont.1765466150452.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1765343568078.woff → iconfont.1765466150452.woff} +0 -0
- /package/lib/icon/style/{iconfont.1765343568078.woff2 → iconfont.1765466150452.woff2} +0 -0
- /package/lib/{iconfont.1765343568078.ttf → iconfont.1765466150452.ttf} +0 -0
- /package/lib/{iconfont.1765343568078.woff → iconfont.1765466150452.woff} +0 -0
- /package/lib/{iconfont.1765343568078.woff2 → iconfont.1765466150452.woff2} +0 -0
|
@@ -3,6 +3,7 @@ import { defineVxeComponent } from '../../ui/src/comp'
|
|
|
3
3
|
import { VxeUI, getI18n, createEvent, getIcon, getConfig, useSize, globalEvents, globalResize, renderEmptyElement } from '../../ui'
|
|
4
4
|
import { calcTreeLine, enNodeValue, deNodeValue } from './util'
|
|
5
5
|
import { errLog } from '../../ui/src/log'
|
|
6
|
+
import { getCrossTreeDragNodeInfo } from './store'
|
|
6
7
|
import XEUtils from 'xe-utils'
|
|
7
8
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
9
|
import { toCssUnit, isScale, getPaddingTopBottomSize, addClass, removeClass, getTpImg, hasControlKey, getEventTargetNode } from '../../ui/src/dom'
|
|
@@ -50,6 +51,11 @@ function createInternalData (): TreeInternalData {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
// let crossTreeDragNodeObj: {
|
|
55
|
+
// $oldTree: VxeTreeConstructor & VxeTreePrivateMethods
|
|
56
|
+
// $newTree: (VxeTreeConstructor & VxeTreePrivateMethods) | null
|
|
57
|
+
// } | null = null
|
|
58
|
+
|
|
53
59
|
export default defineVxeComponent({
|
|
54
60
|
name: 'VxeTree',
|
|
55
61
|
props: {
|
|
@@ -200,6 +206,8 @@ export default defineVxeComponent({
|
|
|
200
206
|
const refDragNodeLineElem = ref<HTMLDivElement>()
|
|
201
207
|
const refDragTipElem = ref<HTMLDivElement>()
|
|
202
208
|
|
|
209
|
+
const crossTreeDragNodeInfo = getCrossTreeDragNodeInfo()
|
|
210
|
+
|
|
203
211
|
const reactData = reactive<TreeReactData>({
|
|
204
212
|
parentHeight: 0,
|
|
205
213
|
customHeight: 0,
|
|
@@ -1749,11 +1757,17 @@ export default defineVxeComponent({
|
|
|
1749
1757
|
}
|
|
1750
1758
|
}
|
|
1751
1759
|
|
|
1760
|
+
const clearCrossTreeDragStatus = () => {
|
|
1761
|
+
// crossTreeDragNodeObj = null
|
|
1762
|
+
crossTreeDragNodeInfo.node = null
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1752
1765
|
const clearDragStatus = () => {
|
|
1753
1766
|
const { dragNode } = reactData
|
|
1754
1767
|
if (dragNode) {
|
|
1755
|
-
clearNodeDropOrigin()
|
|
1756
1768
|
hideDropTip()
|
|
1769
|
+
clearNodeDropOrigin()
|
|
1770
|
+
clearCrossTreeDragStatus()
|
|
1757
1771
|
reactData.dragNode = null
|
|
1758
1772
|
}
|
|
1759
1773
|
}
|
|
@@ -2093,10 +2107,12 @@ export default defineVxeComponent({
|
|
|
2093
2107
|
return errRest
|
|
2094
2108
|
}).then((rest) => {
|
|
2095
2109
|
clearNodeDragData()
|
|
2110
|
+
clearCrossTreeDragStatus()
|
|
2096
2111
|
return rest
|
|
2097
2112
|
})
|
|
2098
2113
|
}
|
|
2099
2114
|
clearNodeDragData()
|
|
2115
|
+
clearCrossTreeDragStatus()
|
|
2100
2116
|
return Promise.resolve(errRest)
|
|
2101
2117
|
}
|
|
2102
2118
|
|
|
@@ -2183,6 +2199,28 @@ export default defineVxeComponent({
|
|
|
2183
2199
|
return getNodeId(node1) === getNodeId(node2)
|
|
2184
2200
|
}
|
|
2185
2201
|
return false
|
|
2202
|
+
},
|
|
2203
|
+
handleCrossTreeNodeDragCancelEvent () {
|
|
2204
|
+
clearNodeDragData()
|
|
2205
|
+
clearCrossTreeDragStatus()
|
|
2206
|
+
},
|
|
2207
|
+
/**
|
|
2208
|
+
* 处理跨树拖拽完成
|
|
2209
|
+
*/
|
|
2210
|
+
handleCrossTreeNodeDragFinishEvent () {
|
|
2211
|
+
},
|
|
2212
|
+
/**
|
|
2213
|
+
* 处理跨树拖至新的空树
|
|
2214
|
+
*/
|
|
2215
|
+
handleCrossTreeNodeDragInsertEvent () {
|
|
2216
|
+
},
|
|
2217
|
+
/**
|
|
2218
|
+
* 处理跨树拖插入
|
|
2219
|
+
*/
|
|
2220
|
+
handleCrossTreeNodeDragoverEmptyEvent () {
|
|
2221
|
+
},
|
|
2222
|
+
hideCrossTreeNodeDropClearStatus () {
|
|
2223
|
+
hideDropTip()
|
|
2186
2224
|
}
|
|
2187
2225
|
}
|
|
2188
2226
|
|
|
@@ -2614,6 +2652,10 @@ export default defineVxeComponent({
|
|
|
2614
2652
|
})
|
|
2615
2653
|
|
|
2616
2654
|
onMounted(() => {
|
|
2655
|
+
const dragOpts = computeDragOpts.value
|
|
2656
|
+
if (dragOpts.isCrossTreeDrag) {
|
|
2657
|
+
errLog('vxe.error.notProp', ['drag-config.isCrossTreeDrag'])
|
|
2658
|
+
}
|
|
2617
2659
|
if (props.autoResize) {
|
|
2618
2660
|
const el = refElem.value
|
|
2619
2661
|
const parentEl = getParentElem()
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
.vxe-select--panel-search {
|
|
58
58
|
display: block;
|
|
59
|
+
flex-shrink: 0;
|
|
59
60
|
padding: var(--vxe-ui-layout-padding-default);
|
|
60
61
|
.vxe-select-search--input {
|
|
61
62
|
width: 100%;
|
|
@@ -63,13 +64,23 @@
|
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
.vxe-select--panel-wrapper {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
66
69
|
position: relative;
|
|
70
|
+
max-height: 18em;
|
|
67
71
|
border-radius: var(--vxe-ui-base-border-radius);
|
|
68
72
|
border: 1px solid var(--vxe-ui-base-popup-border-color);
|
|
69
73
|
box-shadow: var(--vxe-ui-base-popup-box-shadow);
|
|
70
74
|
background-color: var(--vxe-ui-layout-background-color);
|
|
71
75
|
}
|
|
72
76
|
|
|
77
|
+
.vxe-select--panel-body {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: row;
|
|
80
|
+
flex-grow: 1;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
}
|
|
83
|
+
|
|
73
84
|
.vxe-select--header-button {
|
|
74
85
|
display: flex;
|
|
75
86
|
flex-direction: row;
|
|
@@ -99,10 +110,12 @@
|
|
|
99
110
|
|
|
100
111
|
.vxe-select--panel-header,
|
|
101
112
|
.vxe-select--panel-footer {
|
|
113
|
+
flex-shrink: 0;
|
|
102
114
|
padding: 4px 0;
|
|
103
115
|
}
|
|
104
116
|
|
|
105
117
|
.vxe-select-option--wrapper {
|
|
118
|
+
flex-grow: 1;
|
|
106
119
|
position: relative;
|
|
107
120
|
overflow-x: hidden;
|
|
108
121
|
overflow-y: auto;
|
|
@@ -118,9 +131,6 @@
|
|
|
118
131
|
border: 0;
|
|
119
132
|
outline: 0;
|
|
120
133
|
}
|
|
121
|
-
.vxe-select-option--wrapper {
|
|
122
|
-
max-height: 18em;
|
|
123
|
-
}
|
|
124
134
|
.vxe-select-option {
|
|
125
135
|
position: relative;
|
|
126
136
|
padding: 0 0.6em;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { VNode } from 'vue'
|
|
2
|
+
import { VxeComponentStyleType } from '@vxe-ui/core'
|
|
1
3
|
import { VxeGanttConstructor, VxeGanttDefines } from '../gantt'
|
|
2
4
|
|
|
3
5
|
/* eslint-disable @typescript-eslint/no-empty-interface,no-use-before-define,@typescript-eslint/no-unused-vars */
|
|
@@ -14,6 +16,23 @@ export interface VxeGanttExtendChartPrivateMethods<D = any> {
|
|
|
14
16
|
row: D
|
|
15
17
|
scaleType: VxeGanttDefines.ColumnScaleType
|
|
16
18
|
}): void
|
|
19
|
+
/**
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
renderGanttTaskBarContent(params: {
|
|
23
|
+
$gantt: VxeGanttConstructor<D>
|
|
24
|
+
source: string
|
|
25
|
+
type: string
|
|
26
|
+
scaleType: VxeGanttDefines.ColumnScaleType
|
|
27
|
+
row: D
|
|
28
|
+
rowIndex: number
|
|
29
|
+
$rowIndex: number
|
|
30
|
+
_rowIndex: number
|
|
31
|
+
}, renderParams: {
|
|
32
|
+
title: string
|
|
33
|
+
vbStyle: VxeComponentStyleType
|
|
34
|
+
vpStyle: VxeComponentStyleType
|
|
35
|
+
}): VNode[]
|
|
17
36
|
}
|
|
18
37
|
|
|
19
38
|
declare module '../gantt' {
|
|
@@ -104,6 +104,11 @@ export namespace VxeSelectPropTypes {
|
|
|
104
104
|
export type OptionId = string
|
|
105
105
|
export type OptionKey = boolean
|
|
106
106
|
export type Transfer = boolean
|
|
107
|
+
export interface PopupConfig {
|
|
108
|
+
width?: number | string
|
|
109
|
+
height?: number | string
|
|
110
|
+
className?: string | ((params: { $select: VxeSelectConstructor }) => string)
|
|
111
|
+
}
|
|
107
112
|
|
|
108
113
|
export interface VirtualYConfig {
|
|
109
114
|
/**
|
|
@@ -165,6 +170,7 @@ export interface VxeSelectProps {
|
|
|
165
170
|
remoteConfig?: VxeSelectPropTypes.RemoteConfig
|
|
166
171
|
max?: VxeSelectPropTypes.Max
|
|
167
172
|
transfer?: VxeSelectPropTypes.Transfer
|
|
173
|
+
popupConfig?: VxeSelectPropTypes.PopupConfig
|
|
168
174
|
virtualYConfig?: VxeSelectPropTypes.VirtualYConfig
|
|
169
175
|
|
|
170
176
|
/**
|
|
@@ -153,6 +153,10 @@ export namespace VxeTreePropTypes {
|
|
|
153
153
|
* 需要 isCrossDrag,是否允许将自己拖拽到子级行中
|
|
154
154
|
*/
|
|
155
155
|
isSelfToChildDrag?: boolean
|
|
156
|
+
/**
|
|
157
|
+
* 是否允许在不同树之间进行拖拽
|
|
158
|
+
*/
|
|
159
|
+
isCrossTreeDrag?: boolean
|
|
156
160
|
/**
|
|
157
161
|
* 是否显示拖拽辅助状态显示
|
|
158
162
|
*/
|
|
@@ -592,6 +596,26 @@ export interface TreePrivateMethods {
|
|
|
592
596
|
* @private
|
|
593
597
|
*/
|
|
594
598
|
eqNode(node1: any, node2: any): boolean
|
|
599
|
+
/**
|
|
600
|
+
* @private
|
|
601
|
+
*/
|
|
602
|
+
handleCrossTreeNodeDragInsertEvent(evnt: DragEvent): void
|
|
603
|
+
/**
|
|
604
|
+
* @private
|
|
605
|
+
*/
|
|
606
|
+
handleCrossTreeNodeDragCancelEvent(evnt: DragEvent): void
|
|
607
|
+
/**
|
|
608
|
+
* @private
|
|
609
|
+
*/
|
|
610
|
+
handleCrossTreeNodeDragFinishEvent(evnt: DragEvent): void
|
|
611
|
+
/**
|
|
612
|
+
* @private
|
|
613
|
+
*/
|
|
614
|
+
handleCrossTreeNodeDragoverEmptyEvent(evnt: DragEvent): void
|
|
615
|
+
/**
|
|
616
|
+
* @private
|
|
617
|
+
*/
|
|
618
|
+
hideCrossTreeNodeDropClearStatus(): void
|
|
595
619
|
}
|
|
596
620
|
export interface VxeTreePrivateMethods extends TreePrivateMethods { }
|
|
597
621
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|