vxe-pc-ui 4.9.0 → 4.9.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 (59) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/modal/src/modal.js +5 -2
  3. package/es/split/src/split-pane.js +3 -3
  4. package/es/split/src/split.js +244 -141
  5. package/es/split/style.css +82 -45
  6. package/es/split/style.min.css +1 -1
  7. package/es/style.css +1 -1
  8. package/es/style.min.css +1 -1
  9. package/es/tabs/src/tabs.js +6 -3
  10. package/es/ui/index.js +1 -1
  11. package/es/ui/src/log.js +1 -1
  12. package/es/upload/src/upload.js +7 -2
  13. package/es/vxe-split/style.css +82 -45
  14. package/es/vxe-split/style.min.css +1 -1
  15. package/lib/icon/style/style.css +1 -1
  16. package/lib/icon/style/style.min.css +1 -1
  17. package/lib/index.umd.js +270 -166
  18. package/lib/index.umd.min.js +1 -1
  19. package/lib/modal/src/modal.js +5 -2
  20. package/lib/modal/src/modal.min.js +1 -1
  21. package/lib/split/src/split-pane.js +3 -3
  22. package/lib/split/src/split-pane.min.js +1 -1
  23. package/lib/split/src/split.js +247 -154
  24. package/lib/split/src/split.min.js +1 -1
  25. package/lib/split/style/style.css +82 -45
  26. package/lib/split/style/style.min.css +1 -1
  27. package/lib/style.css +1 -1
  28. package/lib/style.min.css +1 -1
  29. package/lib/tabs/src/tabs.js +6 -3
  30. package/lib/tabs/src/tabs.min.js +1 -1
  31. package/lib/ui/index.js +1 -1
  32. package/lib/ui/index.min.js +1 -1
  33. package/lib/ui/src/log.js +1 -1
  34. package/lib/ui/src/log.min.js +1 -1
  35. package/lib/upload/src/upload.js +7 -2
  36. package/lib/upload/src/upload.min.js +1 -1
  37. package/lib/vxe-split/style/style.css +82 -45
  38. package/lib/vxe-split/style/style.min.css +1 -1
  39. package/package.json +1 -1
  40. package/packages/modal/src/modal.ts +6 -2
  41. package/packages/split/src/split-pane.ts +4 -3
  42. package/packages/split/src/split.ts +243 -142
  43. package/packages/tabs/src/tabs.ts +7 -3
  44. package/packages/upload/src/upload.ts +8 -2
  45. package/styles/components/split.scss +109 -88
  46. package/types/components/split-pane.d.ts +11 -2
  47. package/types/components/split.d.ts +26 -22
  48. /package/es/icon/{iconfont.1756083805751.ttf → iconfont.1756133787659.ttf} +0 -0
  49. /package/es/icon/{iconfont.1756083805751.woff → iconfont.1756133787659.woff} +0 -0
  50. /package/es/icon/{iconfont.1756083805751.woff2 → iconfont.1756133787659.woff2} +0 -0
  51. /package/es/{iconfont.1756083805751.ttf → iconfont.1756133787659.ttf} +0 -0
  52. /package/es/{iconfont.1756083805751.woff → iconfont.1756133787659.woff} +0 -0
  53. /package/es/{iconfont.1756083805751.woff2 → iconfont.1756133787659.woff2} +0 -0
  54. /package/lib/icon/style/{iconfont.1756083805751.ttf → iconfont.1756133787659.ttf} +0 -0
  55. /package/lib/icon/style/{iconfont.1756083805751.woff → iconfont.1756133787659.woff} +0 -0
  56. /package/lib/icon/style/{iconfont.1756083805751.woff2 → iconfont.1756133787659.woff2} +0 -0
  57. /package/lib/{iconfont.1756083805751.ttf → iconfont.1756133787659.ttf} +0 -0
  58. /package/lib/{iconfont.1756083805751.woff → iconfont.1756133787659.woff} +0 -0
  59. /package/lib/{iconfont.1756083805751.woff2 → iconfont.1756133787659.woff2} +0 -0
@@ -292,6 +292,10 @@ export default defineVxeComponent({
292
292
  emit(type, createEvent(evnt, { $tabs: $xeTabs }, params))
293
293
  }
294
294
 
295
+ const emitModel = (value: any) => {
296
+ emit('update:modelValue', value)
297
+ }
298
+
295
299
  const addInitName = (name: VxeTabsPropTypes.ModelValue, evnt: Event | null) => {
296
300
  const { initNames } = reactData
297
301
  if (name && !initNames.includes(name)) {
@@ -327,7 +331,7 @@ export default defineVxeComponent({
327
331
  if (!validVal) {
328
332
  activeName = list[0].name
329
333
  addInitName(activeName, null)
330
- emit('update:modelValue', activeName)
334
+ emitModel(activeName)
331
335
  }
332
336
  }
333
337
  reactData.activeName = activeName
@@ -350,7 +354,7 @@ export default defineVxeComponent({
350
354
  ).then((status) => {
351
355
  if (status) {
352
356
  reactData.activeName = name
353
- emit('update:modelValue', value)
357
+ emitModel(value)
354
358
  addInitName(name, evnt)
355
359
  dispatchEvent('change', { value, name, oldName: activeName, newName: name, option: item }, evnt)
356
360
  dispatchEvent('tab-change', { value, name, oldName: activeName, newName: name, option: item }, evnt)
@@ -550,7 +554,7 @@ export default defineVxeComponent({
550
554
  const name = item.name
551
555
  const value = name
552
556
  reactData.activeName = name
553
- emit('update:modelValue', value)
557
+ emitModel(value)
554
558
  addInitName(name, null)
555
559
  }
556
560
  }
@@ -453,6 +453,10 @@ export default defineVxeComponent({
453
453
  emit(type, createEvent(evnt, { $upload: $xeUpload }, params))
454
454
  }
455
455
 
456
+ const emitModel = (value: any) => {
457
+ emit('update:modelValue', value)
458
+ }
459
+
456
460
  const handleChange = (value: VxeUploadDefines.FileObjItem[]) => {
457
461
  const { singleMode, urlMode } = props
458
462
  const urlProp = computeUrlProp.value
@@ -464,13 +468,15 @@ export default defineVxeComponent({
464
468
  if (url) {
465
469
  const urlObj = XEUtils.parseUrl(url)
466
470
  if (!urlObj.searchQuery[nameProp]) {
467
- return `${url}${url.indexOf('?') === -1 ? '?' : '&'}${nameProp}=${encodeURIComponent(item[nameProp] || '')}`
471
+ if (url.indexOf('blob:') === -1) {
472
+ return `${url}${url.indexOf('?') === -1 ? '?' : '&'}${nameProp}=${encodeURIComponent(item[nameProp] || '')}`
473
+ }
468
474
  }
469
475
  }
470
476
  return url
471
477
  })
472
478
  }
473
- emit('update:modelValue', singleMode ? (restList[0] || null) : restList)
479
+ emitModel(singleMode ? (restList[0] || null) : restList)
474
480
  }
475
481
 
476
482
  const getThumbnailFileUrl = (item: VxeUploadDefines.FileObjItem) => {
@@ -118,6 +118,7 @@
118
118
  }
119
119
 
120
120
  .vxe-split-pane-handle {
121
+ display: flex;
121
122
  position: relative;
122
123
  flex-shrink: 0;
123
124
  user-select: none;
@@ -143,18 +144,22 @@
143
144
  background-color: var(--vxe-ui-split-handle-bar-hover-background-color);
144
145
  }
145
146
  }
146
- .vxe-split-pane-action-btn {
147
+
148
+ .vxe-split-pane-action-btn-wrapper {
147
149
  position: absolute;
150
+ display: flex;
151
+ top: 50%;
152
+ left: 50%;
153
+ transform: translate(-50%, -50%);
154
+ z-index: 2;
155
+ }
156
+ .vxe-split-pane-action-btn {
148
157
  display: flex;
149
158
  flex-direction: row;
150
159
  align-items: center;
151
160
  justify-content: center;
152
161
  font-size: 0.5em;
153
162
  border-radius: var(--vxe-ui-base-border-radius);
154
- top: 50%;
155
- left: 50%;
156
- transform: translate(-50%, -50%);
157
- z-index: 2;
158
163
  color: var(--vxe-ui-layout-background-color);
159
164
  background-color: var(--vxe-ui-split-handle-button-background-color);
160
165
  border: 1px solid var(--vxe-ui-input-border-color);
@@ -165,7 +170,86 @@
165
170
  background-color: var(--vxe-ui-font-primary-color);
166
171
  }
167
172
  &:active {
168
- transform: translate(-50%, -50%) scale(0.9);
173
+ transform: scale(0.9);
174
+ }
175
+ }
176
+ .vxe-split-pane-handle {
177
+ &.is--horizontal {
178
+ flex-direction: row;
179
+ &.is--border {
180
+ border-width: 1px 0 1px 0;
181
+ }
182
+ .vxe-split-pane-action-btn-wrapper {
183
+ flex-direction: column;
184
+ & div {
185
+ margin-top: 1em;
186
+ &:first-child {
187
+ margin-top: 0;
188
+ }
189
+ }
190
+ }
191
+ .vxe-split-pane-handle-bar {
192
+ width: var(--vxe-ui-split-handle-bar-horizontal-width);
193
+ height: 100%;
194
+ }
195
+ .vxe-split-pane-action-btn {
196
+ width: var(--vxe-ui-split-handle-bar-horizontal-width);
197
+ height: var(--vxe-ui-split-handle-bar-horizontal-height);
198
+ }
199
+ }
200
+ &.is--vertical {
201
+ flex-direction: column;
202
+ &.is--border {
203
+ border-width: 0 1px 0 1px;
204
+ }
205
+ .vxe-split-pane-action-btn-wrapper {
206
+ flex-direction: row;
207
+ & div {
208
+ margin-left: 1em;
209
+ &:first-child {
210
+ margin-left: 0;
211
+ }
212
+ }
213
+ }
214
+ .vxe-split-pane-handle-bar {
215
+ height: var(--vxe-ui-split-handle-bar-vertical-height);
216
+ width: 100%;
217
+ }
218
+ .vxe-split-pane-action-btn {
219
+ width: var(--vxe-ui-split-handle-bar-vertical-width);
220
+ height: var(--vxe-ui-split-handle-bar-vertical-height);
221
+ }
222
+ }
223
+ &.is--resize {
224
+ &.is-resize--immediate {
225
+ &.is--horizontal {
226
+ .vxe-split-pane-handle-bar {
227
+ cursor: w-resize;
228
+ }
229
+ }
230
+ &.is--vertical {
231
+ .vxe-split-pane-handle-bar {
232
+ cursor: n-resize;
233
+ }
234
+ }
235
+ & > .vxe-split-pane-handle-bar {
236
+ &:active {
237
+ background-color: var(--vxe-ui-font-primary-color);
238
+ }
239
+ }
240
+ }
241
+ &.is-resize--lazy {
242
+ &.is--horizontal {
243
+ .vxe-split-pane-handle-bar {
244
+ cursor: col-resize;
245
+ }
246
+ }
247
+ &.is--vertical {
248
+ .vxe-split-pane-handle-bar {
249
+ cursor: row-resize;
250
+ }
251
+ }
252
+ }
169
253
  }
170
254
  }
171
255
 
@@ -173,17 +257,23 @@
173
257
  display: flex;
174
258
  position: relative;
175
259
  overflow: hidden;
260
+ &.is--fill {
261
+ flex-grow: 1;
262
+ }
176
263
  &.is--hidden {
177
- width: 0;
264
+ &.is--horizontal {
265
+ width: 0;
266
+ }
267
+ &.is--vertical {
268
+ height: 0;
269
+ }
178
270
  }
179
271
  &.is--padding {
180
272
  & > .vxe-split-pane--wrapper {
181
273
  padding: var(--vxe-ui-layout-padding-default);
182
274
  }
183
275
  }
184
- &.is--fill {
185
- flex-grow: 1;
186
- }
276
+ &.is--hidden,
187
277
  &.is--width,
188
278
  &.is--height {
189
279
  flex-shrink: 0;
@@ -193,84 +283,15 @@
193
283
  border: 1px solid var(--vxe-ui-base-popup-border-color);
194
284
  }
195
285
  }
196
- &.is--resize {
197
- &.is--expand {
198
- &.is-resize--immediate {
199
- &.is--horizontal {
200
- & > .vxe-split-pane-handle {
201
- .vxe-split-pane-handle-bar {
202
- cursor: w-resize;
203
- }
204
- }
205
- }
206
- &.is--vertical {
207
- & > .vxe-split-pane-handle {
208
- .vxe-split-pane-handle-bar {
209
- cursor: n-resize;
210
- }
211
- }
212
- }
213
- & > .vxe-split-pane-handle {
214
- & > .vxe-split-pane-handle-bar {
215
- &:active {
216
- background-color: var(--vxe-ui-font-primary-color);
217
- }
218
- }
219
- }
220
- }
221
- &.is-resize--lazy {
222
- &.is--horizontal {
223
- & > .vxe-split-pane-handle {
224
- .vxe-split-pane-handle-bar {
225
- cursor: col-resize;
226
- }
227
- }
228
- }
229
- &.is--vertical {
230
- & > .vxe-split-pane-handle {
231
- .vxe-split-pane-handle-bar {
232
- cursor: row-resize;
233
- }
234
- }
235
- }
236
- }
237
- }
238
- }
239
- &.is--horizontal {
240
- flex-direction: row;
241
- & > .vxe-split-pane-handle {
242
- .vxe-split-pane-handle-bar {
243
- width: var(--vxe-ui-split-handle-bar-horizontal-width);
244
- height: 100%;
245
- }
246
- .vxe-split-pane-action-btn {
247
- width: var(--vxe-ui-split-handle-bar-horizontal-width);
248
- height: var(--vxe-ui-split-handle-bar-horizontal-height);
249
- }
250
- }
251
- &.is--border {
252
- & > .vxe-split-pane-handle {
253
- border-width: 1px 0 1px 0;
254
- }
255
- }
256
- }
257
- &.is--vertical {
258
- flex-direction: column;
259
- & > .vxe-split-pane-handle {
260
- .vxe-split-pane-handle-bar {
261
- height: var(--vxe-ui-split-handle-bar-vertical-height);
262
- width: 100%;
263
- }
264
- .vxe-split-pane-action-btn {
265
- width: var(--vxe-ui-split-handle-bar-vertical-width);
266
- height: var(--vxe-ui-split-handle-bar-vertical-height);
267
- }
268
- }
269
- &.is--border {
270
- & > .vxe-split-pane-handle {
271
- border-width: 0 1px 0 1px;
272
- }
273
- }
286
+ }
287
+
288
+ .vxe-split--render-vars {
289
+ width: 0;
290
+ height: 0;
291
+ overflow: hidden;
292
+ .vxe-split--handle-bar-info {
293
+ width: var(--vxe-ui-split-handle-bar-horizontal-width);
294
+ height: var(--vxe-ui-split-handle-bar-vertical-height);
274
295
  }
275
296
  }
276
297
 
@@ -28,6 +28,11 @@ export namespace VxeSplitPanePropTypes {
28
28
  export type Height = string | number
29
29
  export type MinWidth = string | number
30
30
  export type MinHeight = string | number
31
+
32
+ /**
33
+ * 已废弃
34
+ * @deprecated
35
+ */
31
36
  export type ShowAction = boolean
32
37
  }
33
38
 
@@ -37,11 +42,15 @@ export interface VxeSplitPaneProps {
37
42
  height?: VxeSplitPanePropTypes.Height
38
43
  minWidth?: VxeSplitPanePropTypes.MinWidth
39
44
  minHeight?: VxeSplitPanePropTypes.MinHeight
40
- showAction?: VxeSplitPanePropTypes.ShowAction
41
-
42
45
  slots?: {
43
46
  default?: string | ((params: VxeSplitPaneSlotTypes.DefaultSlotParams) => VxeComponentSlotType | VxeComponentSlotType[])
44
47
  }
48
+
49
+ /**
50
+ * 已废弃
51
+ * @deprecated
52
+ */
53
+ showAction?: VxeSplitPanePropTypes.ShowAction
45
54
  }
46
55
 
47
56
  export interface SplitItemPrivateComputed {
@@ -59,10 +59,13 @@ export namespace VxeSplitPropTypes {
59
59
  */
60
60
  trigger?: 'click' | 'dblclick' | '' | null
61
61
  /**
62
- * 折叠方向
63
- * 支持向前和向后折叠
62
+ * 显示往向前折叠按钮
64
63
  */
65
- direction?: 'prev' | 'next' | '' | null
64
+ showPrevButton?: boolean
65
+ /**
66
+ * 显示往向后折叠按钮
67
+ */
68
+ showNextButton?: boolean
66
69
  /**
67
70
  * 自定义展开图标
68
71
  */
@@ -71,6 +74,13 @@ export namespace VxeSplitPropTypes {
71
74
  * 自定义关闭图标
72
75
  */
73
76
  closeIcon?: string
77
+
78
+ /**
79
+ * 折叠方向
80
+ * 支持向前和向后折叠
81
+ * @deprecated
82
+ */
83
+ direction?: 'prev' | 'next' | '' | null
74
84
  }
75
85
  }
76
86
 
@@ -125,13 +135,14 @@ export interface SplitPrivateComputed {
125
135
  computeItemOpts: ComputedRef<VxeSplitPropTypes.ItemConfig>
126
136
  computeBarOpts: ComputedRef<VxeSplitPropTypes.BarConfig>
127
137
  computeActionOpts: ComputedRef<VxeSplitPropTypes.ActionConfig>
128
- computeIsFoldNext: ComputedRef<boolean>
129
138
  }
130
139
  export interface VxeSplitPrivateComputed extends SplitPrivateComputed { }
131
140
 
132
141
  export interface SplitReactData {
133
142
  staticItems: VxeSplitDefines.PaneConfig[]
134
143
  itemList: VxeSplitDefines.PaneConfig[]
144
+ barWidth: number
145
+ barHeight: number
135
146
  }
136
147
 
137
148
  export interface SplitInternalData {
@@ -179,7 +190,6 @@ export namespace VxeSplitDefines {
179
190
 
180
191
  export interface PaneConfig extends VxeSplitPaneProps {
181
192
  id: string
182
- isVisible: boolean
183
193
  isExpand: boolean
184
194
  renderWidth: number
185
195
  foldWidth: number
@@ -190,34 +200,29 @@ export namespace VxeSplitDefines {
190
200
  }
191
201
 
192
202
  export interface ActionClickEventParams extends SplitEventParams {
193
- item: PaneConfig
194
- name: VxeSplitPanePropTypes.Name
203
+ prevItem: PaneConfig
204
+ nextItem: PaneConfig
195
205
  }
196
206
  export interface ActionDblclickEventParams extends ActionClickEventParams {}
197
207
  export interface ToggleExpandEventParams extends SplitEventParams {
198
- item: PaneConfig
199
- name: VxeSplitPanePropTypes.Name
200
- targetItem: PaneConfig
201
- targetName: VxeSplitPanePropTypes.Name
208
+ prevItem: PaneConfig
209
+ nextItem: PaneConfig
202
210
  expanded: boolean
211
+ item: PaneConfig
203
212
  }
204
213
  export interface ResizeStartEventParams extends SplitEventParams {
205
- item: PaneConfig
206
- name: VxeSplitPanePropTypes.Name
214
+ prevItem: PaneConfig
215
+ nextItem: PaneConfig
207
216
  }
208
217
  export interface ResizeDragEventParams extends SplitEventParams {
209
- item: PaneConfig
210
- name: VxeSplitPanePropTypes.Name
211
- offsetHeight: number
212
- resizeHeight: number
213
- offsetWidth: number
214
- resizeWidth: number
218
+ prevItem: PaneConfig
219
+ nextItem: PaneConfig
215
220
  }
216
221
  export interface ResizeEndEventParams extends SplitEventParams {
217
222
  item: PaneConfig
218
223
  name: VxeSplitPanePropTypes.Name
219
- resizeHeight: number
220
- resizeWidth: number
224
+ offsetHeight: number
225
+ offsetWidth: number
221
226
  }
222
227
  }
223
228
 
@@ -259,7 +264,6 @@ export interface VxeSplitSlots {
259
264
  */
260
265
  [key: string]: ((params: {
261
266
  name: VxeSplitPanePropTypes.Name
262
- isVisible: boolean
263
267
  isExpand: boolean
264
268
  }) => any) | undefined
265
269