vxe-pc-ui 3.7.7 → 3.7.9
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/{iconfont.1752462927695.ttf → iconfont.1752551343920.ttf} +0 -0
- package/{lib/icon/style/iconfont.1752462927695.woff → es/icon/iconfont.1752551343920.woff} +0 -0
- package/es/icon/iconfont.1752551343920.woff2 +0 -0
- package/es/icon/style.css +3 -3
- package/es/icon/style.min.css +1 -1
- package/{lib/icon/style/iconfont.1752462927695.ttf → es/iconfont.1752551343920.ttf} +0 -0
- package/es/{icon/iconfont.1752462927695.woff → iconfont.1752551343920.woff} +0 -0
- package/es/iconfont.1752551343920.woff2 +0 -0
- package/es/image/src/group.js +19 -3
- package/es/image/src/image.js +23 -3
- package/es/image/src/preview.js +19 -13
- package/es/image/src/util.js +11 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-icon/style.css +3 -3
- package/es/vxe-icon/style.min.css +1 -1
- package/lib/{iconfont.1752462927695.ttf → icon/style/iconfont.1752551343920.ttf} +0 -0
- package/{es/iconfont.1752462927695.woff → lib/icon/style/iconfont.1752551343920.woff} +0 -0
- package/lib/icon/style/iconfont.1752551343920.woff2 +0 -0
- package/lib/icon/style/style.css +3 -3
- package/lib/icon/style/style.min.css +3 -3
- package/{es/iconfont.1752462927695.ttf → lib/iconfont.1752551343920.ttf} +0 -0
- package/lib/{iconfont.1752462927695.woff → iconfont.1752551343920.woff} +0 -0
- package/lib/iconfont.1752551343920.woff2 +0 -0
- package/lib/image/src/group.js +19 -3
- package/lib/image/src/group.min.js +1 -1
- package/lib/image/src/image.js +23 -3
- package/lib/image/src/image.min.js +1 -1
- package/lib/image/src/preview.js +25 -13
- package/lib/image/src/preview.min.js +1 -1
- package/lib/image/src/util.js +13 -0
- package/lib/image/src/util.min.js +1 -1
- package/lib/index.umd.js +82 -21
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +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-icon/style/style.css +3 -3
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/image/src/group.ts +20 -3
- package/packages/image/src/image.ts +25 -4
- package/packages/image/src/preview.ts +19 -13
- package/packages/image/src/util.ts +12 -1
- package/styles/components/icon.scss +3 -3
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/types/components/image-group.d.ts +23 -2
- package/types/components/image-preview.d.ts +11 -1
- package/types/components/image.d.ts +27 -3
- package/types/components/table.d.ts +4 -1
- package/es/icon/iconfont.1752462927695.woff2 +0 -0
- package/es/iconfont.1752462927695.woff2 +0 -0
- package/lib/icon/style/iconfont.1752462927695.woff2 +0 -0
- package/lib/iconfont.1752462927695.woff2 +0 -0
package/es/image/src/preview.js
CHANGED
|
@@ -231,7 +231,7 @@ export default {
|
|
|
231
231
|
reactData.offsetScale = Number(Math.max(-0.9, offsetScale - stepNum).toFixed(2));
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
|
-
|
|
234
|
+
handleChangeEvent(evnt, isNext) {
|
|
235
235
|
const $xeImagePreview = this;
|
|
236
236
|
const reactData = $xeImagePreview.reactData;
|
|
237
237
|
let activeIndex = reactData.activeIndex || 0;
|
|
@@ -252,13 +252,18 @@ export default {
|
|
|
252
252
|
activeIndex--;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
|
|
255
|
+
const imgUrl = imgList[activeIndex || 0];
|
|
256
256
|
reactData.activeIndex = activeIndex;
|
|
257
|
+
$xeImagePreview.resetStyle();
|
|
257
258
|
$xeImagePreview.emitModel(activeIndex);
|
|
259
|
+
$xeImagePreview.dispatchEvent('change', { url: imgUrl, activeIndex }, evnt);
|
|
258
260
|
},
|
|
259
|
-
|
|
261
|
+
handleRotateImgEvent(evnt, isRight) {
|
|
260
262
|
const $xeImagePreview = this;
|
|
261
263
|
const reactData = $xeImagePreview.reactData;
|
|
264
|
+
const imgList = $xeImagePreview.computeImgList;
|
|
265
|
+
const { activeIndex } = reactData;
|
|
266
|
+
const imgUrl = imgList[activeIndex || 0];
|
|
262
267
|
let offsetRotate = reactData.offsetRotate;
|
|
263
268
|
if (isRight) {
|
|
264
269
|
offsetRotate += 90;
|
|
@@ -267,6 +272,7 @@ export default {
|
|
|
267
272
|
offsetRotate -= 90;
|
|
268
273
|
}
|
|
269
274
|
reactData.offsetRotate = offsetRotate;
|
|
275
|
+
$xeImagePreview.dispatchEvent('rotate', { url: imgUrl, rotateValue: offsetRotate }, evnt);
|
|
270
276
|
},
|
|
271
277
|
handlePct11() {
|
|
272
278
|
const $xeImagePreview = this;
|
|
@@ -372,10 +378,10 @@ export default {
|
|
|
372
378
|
$xeImagePreview.handlePct11();
|
|
373
379
|
break;
|
|
374
380
|
case 'rotateLeft':
|
|
375
|
-
$xeImagePreview.
|
|
381
|
+
$xeImagePreview.handleRotateImgEvent(evnt, false);
|
|
376
382
|
break;
|
|
377
383
|
case 'rotateRight':
|
|
378
|
-
$xeImagePreview.
|
|
384
|
+
$xeImagePreview.handleRotateImgEvent(evnt, true);
|
|
379
385
|
break;
|
|
380
386
|
case 'print':
|
|
381
387
|
$xeImagePreview.handlePrintImg();
|
|
@@ -459,7 +465,7 @@ export default {
|
|
|
459
465
|
reactData.offsetLeft -= 1;
|
|
460
466
|
}
|
|
461
467
|
else {
|
|
462
|
-
$xeImagePreview.
|
|
468
|
+
$xeImagePreview.handleChangeEvent(evnt, false);
|
|
463
469
|
}
|
|
464
470
|
}
|
|
465
471
|
else if (isRightArrow) {
|
|
@@ -468,16 +474,16 @@ export default {
|
|
|
468
474
|
reactData.offsetLeft += 1;
|
|
469
475
|
}
|
|
470
476
|
else {
|
|
471
|
-
$xeImagePreview.
|
|
477
|
+
$xeImagePreview.handleChangeEvent(evnt, true);
|
|
472
478
|
}
|
|
473
479
|
}
|
|
474
480
|
else if (isR && isControlKey) {
|
|
475
481
|
evnt.preventDefault();
|
|
476
482
|
if (hasShiftKey) {
|
|
477
|
-
$xeImagePreview.
|
|
483
|
+
$xeImagePreview.handleRotateImgEvent(evnt, false);
|
|
478
484
|
}
|
|
479
485
|
else {
|
|
480
|
-
$xeImagePreview.
|
|
486
|
+
$xeImagePreview.handleRotateImgEvent(evnt, true);
|
|
481
487
|
}
|
|
482
488
|
}
|
|
483
489
|
else if (isP && isControlKey) {
|
|
@@ -588,8 +594,8 @@ export default {
|
|
|
588
594
|
? h('div', {
|
|
589
595
|
class: 'vxe-image-preview--previous-btn',
|
|
590
596
|
on: {
|
|
591
|
-
click() {
|
|
592
|
-
$xeImagePreview.
|
|
597
|
+
click(evnt) {
|
|
598
|
+
$xeImagePreview.handleChangeEvent(evnt, false);
|
|
593
599
|
}
|
|
594
600
|
}
|
|
595
601
|
}, [
|
|
@@ -602,8 +608,8 @@ export default {
|
|
|
602
608
|
? h('div', {
|
|
603
609
|
class: 'vxe-image-preview--next-btn',
|
|
604
610
|
on: {
|
|
605
|
-
click() {
|
|
606
|
-
$xeImagePreview.
|
|
611
|
+
click(evnt) {
|
|
612
|
+
$xeImagePreview.handleChangeEvent(evnt, true);
|
|
607
613
|
}
|
|
608
614
|
}
|
|
609
615
|
}, [
|
package/es/image/src/util.js
CHANGED
|
@@ -7,6 +7,7 @@ export const openPreviewImage = (options) => {
|
|
|
7
7
|
escClosable: true
|
|
8
8
|
}, options);
|
|
9
9
|
const { urlList, activeIndex } = opts;
|
|
10
|
+
const { rotate, change } = opts.events || {};
|
|
10
11
|
const modalId = XEUtils.uniqueId('image-preview');
|
|
11
12
|
VxeUI.modal.open({
|
|
12
13
|
id: modalId,
|
|
@@ -36,6 +37,16 @@ export const openPreviewImage = (options) => {
|
|
|
36
37
|
on: {
|
|
37
38
|
close() {
|
|
38
39
|
VxeUI.modal.close(modalId);
|
|
40
|
+
},
|
|
41
|
+
change(eventParams) {
|
|
42
|
+
if (change) {
|
|
43
|
+
change.call(this, eventParams);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
rotate(eventParams) {
|
|
47
|
+
if (rotate) {
|
|
48
|
+
rotate.call(this, eventParams);
|
|
49
|
+
}
|
|
39
50
|
}
|
|
40
51
|
}
|
|
41
52
|
});
|