ninemoon-ui 0.0.27 → 0.1.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/dist/components/alert/alert.d.ts +3 -11
- package/dist/components/alert/alertcomponent.vue.d.ts +22 -11
- package/dist/components/badge/badge.vue.d.ts +2 -0
- package/dist/components/carousel/carousel.vue.d.ts +29 -3
- package/dist/components/{tree/tree.vue.d.ts → carousel/clickbutton.vue.d.ts} +6 -19
- package/dist/components/check/checkbox.vue.d.ts +24 -16
- package/dist/components/check/checkgroup.vue.d.ts +15 -3
- package/dist/components/date/datepicker.vue.d.ts +28 -6
- package/dist/components/date/datepickerRange.vue.d.ts +15 -4
- package/dist/components/form/form.vue.d.ts +7 -20
- package/dist/components/form/formlabel.vue.d.ts +3 -3
- package/dist/components/form/type.d.ts +11 -0
- package/dist/components/icon/add.vue.d.ts +2 -0
- package/dist/components/icon/alertTip.vue.d.ts +2 -0
- package/dist/components/icon/arrow.vue.d.ts +2 -0
- package/dist/components/icon/calendar.vue.d.ts +2 -0
- package/dist/components/icon/close.vue.d.ts +2 -0
- package/dist/components/icon/dateArrow.vue.d.ts +2 -0
- package/dist/components/icon/dateArrowplus.vue.d.ts +2 -0
- package/dist/components/icon/delete.vue.d.ts +2 -0
- package/dist/components/icon/ellipsis.vue.d.ts +2 -0
- package/dist/components/icon/errTip.vue.d.ts +2 -0
- package/dist/components/icon/eye.vue.d.ts +2 -0
- package/dist/components/icon/infoTip.vue.d.ts +2 -0
- package/dist/components/icon/minus.vue.d.ts +2 -0
- package/dist/components/icon/successTip.vue.d.ts +2 -0
- package/dist/components/icon/turnleft.vue.d.ts +2 -0
- package/dist/components/icon/turnright.vue.d.ts +2 -0
- package/dist/components/icon/warnTip.vue.d.ts +2 -0
- package/dist/components/input/input.vue.d.ts +13 -8
- package/dist/components/loadding/loadcomponent.vue.d.ts +24 -4
- package/dist/components/loadding/loadding.d.ts +12 -19
- package/dist/components/menu/menu.vue.d.ts +13 -3
- package/dist/components/message/message.d.ts +68 -14
- package/dist/components/message/messagecomponent.vue.d.ts +5 -13
- package/dist/components/numberInput/numberinput.vue.d.ts +3 -3
- package/dist/components/pagination/pagination.vue.d.ts +24 -0
- package/dist/components/popover/poparrow.d.ts +55 -0
- package/dist/components/popover/popover.vue.d.ts +10 -4
- package/dist/components/radio/radiobox.vue.d.ts +24 -16
- package/dist/components/radio/radiogroup.vue.d.ts +15 -3
- package/dist/components/scrollBar/movebar.vue.d.ts +2 -2
- package/dist/components/scrollBar/scrollBar.vue.d.ts +12 -16
- package/dist/components/scrollloading/scrolllead.d.ts +18 -11
- package/dist/components/select/select.vue.d.ts +15 -1
- package/dist/components/select/selectoption.vue.d.ts +18 -6
- package/dist/components/switch/switch.vue.d.ts +14 -14
- package/dist/components/table/table.vue.d.ts +20 -9
- package/dist/components/table/tableItem.vue.d.ts +10 -4
- package/dist/components/tabs/tabs.vue.d.ts +14 -1
- package/dist/dialog.css +9 -0
- package/dist/directives/arrowKeys.d.ts +10 -0
- package/dist/directives/drag.d.ts +20 -0
- package/dist/directives/escape.d.ts +7 -0
- package/dist/directives/outsideclick.d.ts +14 -0
- package/dist/directives/watchwindow.d.ts +13 -0
- package/dist/directives/wheel.d.ts +12 -0
- package/dist/directives/whitespaceclick.d.ts +12 -0
- package/dist/index.css +1186 -873
- package/dist/index.d.ts +831 -401
- package/dist/index.es.js +22 -23
- package/dist/index.umd.js +4019 -3764
- package/dist/js/arrow/arrow.js +17 -0
- package/dist/js/badge/badge.js +9 -16
- package/dist/js/calendar/calendar.js +87 -0
- package/dist/js/carousel/carousel.js +101 -117
- package/dist/js/carousel/carouselitem.js +1 -7
- package/dist/js/check/checkbox.js +38 -4
- package/dist/js/check/checkgroup.js +40 -51
- package/dist/js/date/datepicker.js +146 -150
- package/dist/js/date/datepickerRange.js +265 -354
- package/dist/js/dateArrowplus/dateArrowplus.js +25 -0
- package/dist/js/delete/delete.js +19 -0
- package/dist/js/dialog/dialog.js +41 -57
- package/dist/js/form/form.js +30 -38
- package/dist/js/form/formlabel.js +99 -130
- package/dist/js/image/image.js +199 -149
- package/dist/js/index/index.js +605 -507
- package/dist/js/input/input.js +60 -43
- package/dist/js/menu/menu.js +47 -20
- package/dist/js/numberInput/numberinput.js +52 -60
- package/dist/js/pagination/pagination.js +125 -156
- package/dist/js/popover/popover.js +238 -134
- package/dist/js/radio/radiobox.js +37 -4
- package/dist/js/radio/radiogroup.js +15 -51
- package/dist/js/scrollBar/scrollBar.js +100 -56
- package/dist/js/select/select.js +155 -70
- package/dist/js/select/selectoption.js +45 -4
- package/dist/js/shapeFlag/shapeFlag.js +17 -0
- package/dist/js/switch/switch.js +14 -14
- package/dist/js/table/table.js +165 -111
- package/dist/js/table/tableItem.js +1 -1
- package/dist/js/tabs/tabs.js +57 -59
- package/dist/js/upload/upload.js +8 -23
- package/dist/tabs.css +3 -3
- package/dist/types/shapeFlag.d.ts +13 -0
- package/dist/{components/utils → utils}/tool.d.ts +11 -4
- package/package.json +1 -1
- package/dist/badge.css +0 -27
- package/dist/carousel.css +0 -13
- package/dist/checkgroup.css +0 -41
- package/dist/datepickerRange.css +0 -79
- package/dist/image.css +0 -8
- package/dist/js/getcalendar/getcalendar.js +0 -48
- package/dist/js/tree/tree.js +0 -72
- package/dist/js/tree/treeleaf.js +0 -116
- package/dist/radiogroup.css +0 -44
- package/dist/scrollBar.css +0 -37
- package/dist/select.css +0 -20
package/dist/js/image/image.js
CHANGED
|
@@ -1,10 +1,158 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as throttle } from "../index/index.js";
|
|
3
|
-
|
|
1
|
+
import { openBlock, createElementBlock, createElementVNode, defineComponent, ref, watch, Fragment, createVNode, createCommentVNode, renderSlot, createBlock, Teleport, Transition, withCtx, withDirectives, withModifiers, normalizeStyle, normalizeClass, unref } from "vue";
|
|
2
|
+
import { _ as _export_sfc, t as throttle } from "../index/index.js";
|
|
3
|
+
import { d as delIcon } from "../delete/delete.js";
|
|
4
|
+
const _sfc_main$3 = {};
|
|
5
|
+
const _hoisted_1$3 = {
|
|
6
|
+
viewBox: "64 64 896 896",
|
|
7
|
+
focusable: "false",
|
|
8
|
+
"data-icon": "eye",
|
|
9
|
+
width: "1em",
|
|
10
|
+
height: "1em",
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
"aria-hidden": "true"
|
|
13
|
+
};
|
|
14
|
+
function _sfc_render$2(_ctx, _cache) {
|
|
15
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$3, _cache[0] || (_cache[0] = [
|
|
16
|
+
createElementVNode("path", { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" }, null, -1)
|
|
17
|
+
]));
|
|
18
|
+
}
|
|
19
|
+
const EyeIcon = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2]]);
|
|
20
|
+
const _sfc_main$2 = {};
|
|
21
|
+
const _hoisted_1$2 = {
|
|
22
|
+
viewBox: "64 64 896 896",
|
|
23
|
+
focusable: "false",
|
|
24
|
+
width: "1em",
|
|
25
|
+
height: "1em",
|
|
26
|
+
fill: "currentColor",
|
|
27
|
+
"aria-hidden": "true"
|
|
28
|
+
};
|
|
29
|
+
function _sfc_render$1(_ctx, _cache) {
|
|
30
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [
|
|
31
|
+
createElementVNode("path", { d: "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" }, null, -1),
|
|
32
|
+
createElementVNode("path", { d: "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" }, null, -1)
|
|
33
|
+
]));
|
|
34
|
+
}
|
|
35
|
+
const turnLeftIcon = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1]]);
|
|
36
|
+
const _sfc_main$1 = {};
|
|
37
|
+
const _hoisted_1$1 = {
|
|
38
|
+
viewBox: "64 64 896 896",
|
|
39
|
+
width: "1em",
|
|
40
|
+
height: "1em",
|
|
41
|
+
fill: "currentColor",
|
|
42
|
+
"aria-hidden": "true"
|
|
43
|
+
};
|
|
44
|
+
function _sfc_render(_ctx, _cache) {
|
|
45
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
|
|
46
|
+
createElementVNode("path", { d: "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" }, null, -1),
|
|
47
|
+
createElementVNode("path", { d: "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" }, null, -1)
|
|
48
|
+
]));
|
|
49
|
+
}
|
|
50
|
+
const turnRightIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
|
|
51
|
+
const DEFAULT_THROTTLE_WAIT = 60;
|
|
52
|
+
const createDraggableDirective = (options) => {
|
|
53
|
+
const config = {
|
|
54
|
+
throttleWait: DEFAULT_THROTTLE_WAIT,
|
|
55
|
+
resetOnEnd: false,
|
|
56
|
+
onDrag: () => {
|
|
57
|
+
},
|
|
58
|
+
// default implementation
|
|
59
|
+
...options
|
|
60
|
+
};
|
|
61
|
+
const bindEvents = (el, binding) => {
|
|
62
|
+
if (el.__draggable_handlers__)
|
|
63
|
+
return;
|
|
64
|
+
let startX = 0;
|
|
65
|
+
let startY = 0;
|
|
66
|
+
let initialX = 0;
|
|
67
|
+
let initialY = 0;
|
|
68
|
+
const handleMove = throttle((e) => {
|
|
69
|
+
e.preventDefault();
|
|
70
|
+
const deltaX = e.pageX - startX;
|
|
71
|
+
const deltaY = e.pageY - startY;
|
|
72
|
+
config.onDrag({
|
|
73
|
+
x: deltaX + initialX,
|
|
74
|
+
y: deltaY + initialY
|
|
75
|
+
});
|
|
76
|
+
}, config.throttleWait);
|
|
77
|
+
const handleDown = (e) => {
|
|
78
|
+
var _a;
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
const rect = el.getBoundingClientRect();
|
|
81
|
+
initialX = rect.left + window.scrollX;
|
|
82
|
+
initialY = rect.top + window.scrollY;
|
|
83
|
+
startX = e.pageX;
|
|
84
|
+
startY = e.pageY;
|
|
85
|
+
(_a = config.onDragStart) == null ? void 0 : _a.call(config, { x: initialX, y: initialY });
|
|
86
|
+
window.addEventListener("mousemove", handleMove);
|
|
87
|
+
window.addEventListener("mouseup", handleUp);
|
|
88
|
+
};
|
|
89
|
+
const handleUp = () => {
|
|
90
|
+
var _a;
|
|
91
|
+
window.removeEventListener("mousemove", handleMove);
|
|
92
|
+
window.removeEventListener("mouseup", handleUp);
|
|
93
|
+
if (config.resetOnEnd) {
|
|
94
|
+
config.onDrag({ x: initialX, y: initialY });
|
|
95
|
+
}
|
|
96
|
+
(_a = config.onDragEnd) == null ? void 0 : _a.call(config, { x: initialX, y: initialY });
|
|
97
|
+
};
|
|
98
|
+
el.__draggable_handlers__ = {
|
|
99
|
+
move: handleMove,
|
|
100
|
+
up: handleUp
|
|
101
|
+
};
|
|
102
|
+
el.addEventListener("mousedown", handleDown);
|
|
103
|
+
};
|
|
104
|
+
const unbindEvents = (el) => {
|
|
105
|
+
if (el.__draggable_handlers__) {
|
|
106
|
+
window.removeEventListener("mousemove", el.__draggable_handlers__.move);
|
|
107
|
+
window.removeEventListener("mouseup", el.__draggable_handlers__.up);
|
|
108
|
+
delete el.__draggable_handlers__;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
mounted(el, binding) {
|
|
113
|
+
bindEvents(el);
|
|
114
|
+
},
|
|
115
|
+
beforeUnmount(el) {
|
|
116
|
+
unbindEvents(el);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
const createWheelDirective = (options) => {
|
|
121
|
+
const config = {
|
|
122
|
+
onWheel: () => {
|
|
123
|
+
},
|
|
124
|
+
...options
|
|
125
|
+
};
|
|
126
|
+
const bindEvents = (el, binding) => {
|
|
127
|
+
const wheelHandler = (e) => {
|
|
128
|
+
e.preventDefault();
|
|
129
|
+
config.onWheel(e);
|
|
130
|
+
};
|
|
131
|
+
el._wheel_handlers_ = {
|
|
132
|
+
wheel: wheelHandler
|
|
133
|
+
};
|
|
134
|
+
el.addEventListener("wheel", wheelHandler);
|
|
135
|
+
};
|
|
136
|
+
const unbindEvents = (el) => {
|
|
137
|
+
if (el._wheel_handlers_) {
|
|
138
|
+
el.removeEventListener("wheel", el._wheel_handlers_.wheel);
|
|
139
|
+
delete el._wheel_handlers_;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
return {
|
|
143
|
+
mounted(el, binding) {
|
|
144
|
+
bindEvents(el);
|
|
145
|
+
},
|
|
146
|
+
beforeUnmount(el) {
|
|
147
|
+
unbindEvents(el);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
const _hoisted_1 = { class: "relative inline-block h-full w-full" };
|
|
4
152
|
const _hoisted_2 = ["src"];
|
|
5
153
|
const _hoisted_3 = { key: 0 };
|
|
6
|
-
const _hoisted_4 = { class: "
|
|
7
|
-
const _hoisted_5 = { class: "
|
|
154
|
+
const _hoisted_4 = { class: "pointer-events-none fixed top-0 right-0 left-0 bottom-0 z-1000 text-center" };
|
|
155
|
+
const _hoisted_5 = { class: "pointer-events-auto absolute top-0 left-0 z-10 flex w-full items-center bg-black bg-opacity-10" };
|
|
8
156
|
const _hoisted_6 = ["src"];
|
|
9
157
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
158
|
__name: "image",
|
|
@@ -15,80 +163,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
163
|
},
|
|
16
164
|
emits: ["openPreview", "closePreview"],
|
|
17
165
|
setup(__props, { emit: __emit }) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} else {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
el._vueWheel_ = documentHandler;
|
|
29
|
-
document.addEventListener("wheel", el._vueWheel_);
|
|
166
|
+
const draggableConfig = {
|
|
167
|
+
throttleWait: 16,
|
|
168
|
+
onDrag: (pos) => {
|
|
169
|
+
transX.value = pos.x;
|
|
170
|
+
transY.value = pos.y;
|
|
171
|
+
ImgIsMoving.value = true;
|
|
30
172
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
delete el._vueWheel_;
|
|
173
|
+
onDragEnd: () => {
|
|
174
|
+
ImgIsMoving.value = false;
|
|
34
175
|
}
|
|
35
176
|
};
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const distanceX = e.pageX - mouseX;
|
|
43
|
-
const distanceY = e.pageY - mouseY;
|
|
44
|
-
binding.value && binding.value(distanceX + originBoxX, distanceY + originBoxY);
|
|
45
|
-
}
|
|
46
|
-
function downHandle(e) {
|
|
47
|
-
e.preventDefault();
|
|
48
|
-
originBoxX = el.offsetLeft + transX.value;
|
|
49
|
-
originBoxY = el.offsetTop + transY.value;
|
|
50
|
-
mouseX = e.pageX;
|
|
51
|
-
mouseY = e.pageY;
|
|
52
|
-
ImgIsMoving.value = true;
|
|
53
|
-
el._vueMove_ = throttle(setMoveHandle, 60);
|
|
54
|
-
window.addEventListener("mousemove", el._vueMove_);
|
|
55
|
-
}
|
|
56
|
-
function upHandle() {
|
|
57
|
-
ImgIsMoving.value = false;
|
|
58
|
-
if (el._vueMove_) {
|
|
59
|
-
window.removeEventListener("mousemove", el._vueMove_);
|
|
60
|
-
}
|
|
61
|
-
nextTick(() => {
|
|
62
|
-
if (scaleNumber.value === 1) {
|
|
63
|
-
transX.value = 0;
|
|
64
|
-
transY.value = 0;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
el._vueDown_ = downHandle;
|
|
69
|
-
el._vueUp_ = upHandle;
|
|
70
|
-
el.addEventListener("mousedown", el._vueDown_);
|
|
71
|
-
el.addEventListener("mouseup", el._vueUp_);
|
|
72
|
-
window.addEventListener("mouseup", el._vueUp_);
|
|
73
|
-
},
|
|
74
|
-
beforeUnmount(el) {
|
|
75
|
-
if (el._vueDown_) {
|
|
76
|
-
document.removeEventListener("mousedown", el._vueDown_);
|
|
77
|
-
delete el._vueDown_;
|
|
78
|
-
}
|
|
79
|
-
if (el._vueUp_) {
|
|
80
|
-
document.removeEventListener("mouseup", el._vueUp_);
|
|
81
|
-
window.removeEventListener("mouseup", el._vueUp_);
|
|
82
|
-
delete el._vueUp_;
|
|
177
|
+
const wheelConfig = {
|
|
178
|
+
onWheel: (e) => {
|
|
179
|
+
if (e.deltaY > 0) {
|
|
180
|
+
scaleNumber.value = scaleNumber.value > 1 ? scaleNumber.value - 1 : 1;
|
|
181
|
+
} else {
|
|
182
|
+
scaleNumber.value += 1;
|
|
83
183
|
}
|
|
84
184
|
}
|
|
85
185
|
};
|
|
186
|
+
const vMove = createDraggableDirective(draggableConfig);
|
|
187
|
+
const vWheel = createWheelDirective(wheelConfig);
|
|
188
|
+
const emit = __emit;
|
|
189
|
+
const ImgIsMoving = ref(false);
|
|
86
190
|
const showBig = ref(false);
|
|
87
191
|
watch(showBig, (val) => {
|
|
88
192
|
if (val === true) {
|
|
89
|
-
document.body.classList.add("
|
|
193
|
+
document.body.classList.add("overflow-hidden");
|
|
90
194
|
} else {
|
|
91
|
-
document.body.classList.remove("
|
|
195
|
+
document.body.classList.remove("overflow-hidden");
|
|
92
196
|
}
|
|
93
197
|
});
|
|
94
198
|
const showPreview = () => {
|
|
@@ -103,21 +207,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
207
|
transY.value = 0;
|
|
104
208
|
rotateNumber.value = 0;
|
|
105
209
|
};
|
|
106
|
-
const scaleNumber = ref(1);
|
|
107
|
-
const rotateNumber = ref(0);
|
|
108
|
-
const wheelHandle = (e) => {
|
|
109
|
-
if (e.deltaY > 0) {
|
|
110
|
-
scaleNumber.value = scaleNumber.value > 1 ? scaleNumber.value - 1 : 1;
|
|
111
|
-
} else {
|
|
112
|
-
scaleNumber.value += 1;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
const moveHandle = (x, y) => {
|
|
116
|
-
transX.value = x;
|
|
117
|
-
transY.value = y;
|
|
118
|
-
};
|
|
119
210
|
const transX = ref(0);
|
|
120
211
|
const transY = ref(0);
|
|
212
|
+
const scaleNumber = ref(1);
|
|
213
|
+
const rotateNumber = ref(0);
|
|
121
214
|
const leftRotate = () => {
|
|
122
215
|
rotateNumber.value -= 90;
|
|
123
216
|
};
|
|
@@ -128,26 +221,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
128
221
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
129
222
|
createElementVNode("div", _hoisted_1, [
|
|
130
223
|
createElementVNode("img", {
|
|
131
|
-
class: "
|
|
224
|
+
class: "w-full align-middle",
|
|
132
225
|
src: _ctx.src
|
|
133
226
|
}, null, 8, _hoisted_2),
|
|
134
227
|
_ctx.preview ? (openBlock(), createElementBlock("div", {
|
|
135
228
|
key: 0,
|
|
136
229
|
onClick: showPreview,
|
|
137
|
-
class: "
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
focusable: "false",
|
|
142
|
-
"data-icon": "eye",
|
|
143
|
-
width: "1em",
|
|
144
|
-
height: "1em",
|
|
145
|
-
fill: "currentColor",
|
|
146
|
-
"aria-hidden": "true"
|
|
147
|
-
}, [
|
|
148
|
-
createElementVNode("path", { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" })
|
|
149
|
-
], -1)
|
|
150
|
-
]))) : createCommentVNode("", true),
|
|
230
|
+
class: "absolute top-0 right-0 left-0 bottom-0 flex cursor-pointer items-center justify-center bg-black bg-opacity-50 text-white opacity-0 transition-opacity hover:opacity-100"
|
|
231
|
+
}, [
|
|
232
|
+
createVNode(EyeIcon)
|
|
233
|
+
])) : createCommentVNode("", true),
|
|
151
234
|
renderSlot(_ctx.$slots, "default")
|
|
152
235
|
]),
|
|
153
236
|
(openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
@@ -155,7 +238,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
155
238
|
default: withCtx(() => [
|
|
156
239
|
showBig.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
157
240
|
createElementVNode("div", {
|
|
158
|
-
class: "
|
|
241
|
+
class: "pointer-events-auto fixed top-0 right-0 left-0 bottom-0 z-1000 bg-black bg-opacity-30",
|
|
159
242
|
key: "1",
|
|
160
243
|
onClick: hidenPreview
|
|
161
244
|
}),
|
|
@@ -163,77 +246,45 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
163
246
|
createElementVNode("div", _hoisted_5, [
|
|
164
247
|
createElementVNode("button", {
|
|
165
248
|
type: "button",
|
|
166
|
-
class: "
|
|
249
|
+
class: "flex h-10 w-10 items-center justify-center text-white",
|
|
167
250
|
onClick: hidenPreview
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
focusable: "false",
|
|
172
|
-
"data-icon": "close",
|
|
173
|
-
width: "1em",
|
|
174
|
-
height: "1em",
|
|
175
|
-
fill: "currentColor",
|
|
176
|
-
"aria-hidden": "true"
|
|
177
|
-
}, [
|
|
178
|
-
createElementVNode("path", { d: "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" })
|
|
179
|
-
], -1)
|
|
180
|
-
])),
|
|
251
|
+
}, [
|
|
252
|
+
createVNode(delIcon)
|
|
253
|
+
]),
|
|
181
254
|
createElementVNode("button", {
|
|
182
255
|
type: "button",
|
|
183
|
-
class: "
|
|
256
|
+
class: "flex h-10 w-10 items-center justify-center text-white",
|
|
184
257
|
onClick: withModifiers(leftRotate, ["stop"])
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
focusable: "false",
|
|
189
|
-
"data-icon": "rotate-left",
|
|
190
|
-
width: "1em",
|
|
191
|
-
height: "1em",
|
|
192
|
-
fill: "currentColor",
|
|
193
|
-
"aria-hidden": "true"
|
|
194
|
-
}, [
|
|
195
|
-
createElementVNode("path", { d: "M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z" }),
|
|
196
|
-
createElementVNode("path", { d: "M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z" })
|
|
197
|
-
], -1)
|
|
198
|
-
])),
|
|
258
|
+
}, [
|
|
259
|
+
createVNode(turnLeftIcon)
|
|
260
|
+
]),
|
|
199
261
|
createElementVNode("button", {
|
|
200
262
|
type: "button",
|
|
201
|
-
class: "
|
|
263
|
+
class: "flex h-10 w-10 items-center justify-center text-white",
|
|
202
264
|
onClick: withModifiers(rightRotate, ["stop"])
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
focusable: "false",
|
|
207
|
-
"data-icon": "rotate-right",
|
|
208
|
-
width: "1em",
|
|
209
|
-
height: "1em",
|
|
210
|
-
fill: "currentColor",
|
|
211
|
-
"aria-hidden": "true"
|
|
212
|
-
}, [
|
|
213
|
-
createElementVNode("path", { d: "M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z" }),
|
|
214
|
-
createElementVNode("path", { d: "M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z" })
|
|
215
|
-
], -1)
|
|
216
|
-
]))
|
|
265
|
+
}, [
|
|
266
|
+
createVNode(turnRightIcon)
|
|
267
|
+
])
|
|
217
268
|
]),
|
|
218
269
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
219
|
-
class: "
|
|
270
|
+
class: "absolute top-0 right-0 left-0 bottom-0 transition-transform before:inline-block before:w-[1px] before:h-1/2 before:-mr-px before:content-['']",
|
|
220
271
|
style: normalizeStyle({ transform: `translate3d(${transX.value}px, ${transY.value}px, 0px)` })
|
|
221
272
|
}, [
|
|
222
273
|
createElementVNode("img", {
|
|
223
274
|
src: _ctx.src,
|
|
224
275
|
class: normalizeClass([{
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
}, "
|
|
276
|
+
"cursor-grab": !ImgIsMoving.value,
|
|
277
|
+
"cursor-grabbing": ImgIsMoving.value
|
|
278
|
+
}, "pointer-events-auto inline max-h-full max-w-full select-none transition-transform duration-300"]),
|
|
228
279
|
style: normalizeStyle({
|
|
229
280
|
transform: `scale3d(${scaleNumber.value}, ${scaleNumber.value}, 1) rotate(${rotateNumber.value}deg)`
|
|
230
281
|
})
|
|
231
282
|
}, null, 14, _hoisted_6)
|
|
232
283
|
], 4)), [
|
|
233
|
-
[vMove
|
|
284
|
+
[unref(vMove)]
|
|
234
285
|
])
|
|
235
286
|
])), [
|
|
236
|
-
[vWheel
|
|
287
|
+
[unref(vWheel)]
|
|
237
288
|
])
|
|
238
289
|
])) : createCommentVNode("", true)
|
|
239
290
|
]),
|
|
@@ -244,7 +295,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
244
295
|
};
|
|
245
296
|
}
|
|
246
297
|
});
|
|
247
|
-
const image_vue_vue_type_style_index_0_lang = "";
|
|
248
298
|
export {
|
|
249
299
|
_sfc_main as default
|
|
250
300
|
};
|