ninemoon-ui 0.2.2 → 0.2.3

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.
@@ -1,5 +1,5 @@
1
- import { openBlock, createElementBlock, createElementVNode, defineComponent, ref, watch, Fragment, createVNode, createCommentVNode, renderSlot, createBlock, Teleport, Transition, withCtx, normalizeStyle, withDirectives, withModifiers, normalizeClass, unref } from "vue";
2
- import { _ as _export_sfc, b as createDraggableDirective, d as createWheelDirective, z as zIndexManager } from "../index/index.js";
1
+ import { openBlock, createElementBlock, createElementVNode, defineComponent, ref, watch, Fragment, createVNode, createCommentVNode, renderSlot, createBlock, Teleport, unref, Transition, withCtx, withDirectives, normalizeStyle, withModifiers, normalizeClass } from "vue";
2
+ import { _ as _export_sfc, b as createDraggableDirective, d as createWheelDirective, z as zIndexManager, s as selector } from "../index/index.js";
3
3
  import { d as delIcon } from "../delete/delete.js";
4
4
  const _sfc_main$3 = {};
5
5
  const _hoisted_1$3 = {
@@ -50,10 +50,9 @@ function _sfc_render(_ctx, _cache) {
50
50
  const turnRightIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
51
51
  const _hoisted_1 = { class: "relative inline-block h-full w-full" };
52
52
  const _hoisted_2 = ["src"];
53
- const _hoisted_3 = { key: 0 };
54
- const _hoisted_4 = { class: "pointer-events-none fixed top-0 right-0 left-0 bottom-0 text-center" };
55
- const _hoisted_5 = { class: "pointer-events-auto absolute top-0 left-0 z-10 flex w-full items-center bg-black bg-opacity-10" };
56
- const _hoisted_6 = ["src"];
53
+ const _hoisted_3 = { class: "pointer-events-none fixed top-0 right-0 left-0 bottom-0 text-center" };
54
+ const _hoisted_4 = { class: "pointer-events-auto absolute top-0 left-0 z-10 flex w-full items-center bg-black bg-opacity-10" };
55
+ const _hoisted_5 = ["src"];
57
56
  const _sfc_main = /* @__PURE__ */ defineComponent({
58
57
  __name: "image",
59
58
  props: {
@@ -64,7 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
63
  emits: ["openPreview", "closePreview"],
65
64
  setup(__props, { emit: __emit }) {
66
65
  const draggableConfig = {
67
- throttleWait: 16,
66
+ throttleWait: 10,
68
67
  onDrag: (pos) => {
69
68
  transX.value = pos.x;
70
69
  transY.value = pos.y;
@@ -131,18 +130,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
131
130
  ])) : createCommentVNode("", true),
132
131
  renderSlot(_ctx.$slots, "default")
133
132
  ]),
134
- (openBlock(), createBlock(Teleport, { to: "body" }, [
133
+ (openBlock(), createBlock(Teleport, {
134
+ to: `#${unref(selector)}`
135
+ }, [
135
136
  createVNode(Transition, { name: "opacity" }, {
136
137
  default: withCtx(() => [
137
- showBig.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
138
+ showBig.value ? withDirectives((openBlock(), createElementBlock("div", {
139
+ key: 0,
140
+ style: normalizeStyle({ "z-index": currentZIndex.value })
141
+ }, [
138
142
  createElementVNode("div", {
139
143
  class: "pointer-events-auto fixed top-0 right-0 left-0 bottom-0 bg-black bg-opacity-30",
140
- style: normalizeStyle({ "z-index": currentZIndex.value }),
141
- key: "1",
142
144
  onClick: hidenPreview
143
- }, null, 4),
144
- withDirectives((openBlock(), createElementBlock("div", _hoisted_4, [
145
- createElementVNode("div", _hoisted_5, [
145
+ }),
146
+ createElementVNode("div", _hoisted_3, [
147
+ createElementVNode("div", _hoisted_4, [
146
148
  createElementVNode("button", {
147
149
  type: "button",
148
150
  class: "flex h-10 w-10 items-center justify-center text-white",
@@ -178,18 +180,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
178
180
  style: normalizeStyle({
179
181
  transform: `scale3d(${scaleNumber.value}, ${scaleNumber.value}, 1) rotate(${rotateNumber.value}deg)`
180
182
  })
181
- }, null, 14, _hoisted_6)
183
+ }, null, 14, _hoisted_5)
182
184
  ], 4)), [
183
185
  [unref(vMove), showBig.value]
184
186
  ])
185
- ])), [
186
- [unref(vWheel), showBig.value]
187
187
  ])
188
- ])) : createCommentVNode("", true)
188
+ ], 4)), [
189
+ [unref(vWheel), showBig.value]
190
+ ]) : createCommentVNode("", true)
189
191
  ]),
190
192
  _: 1
191
193
  })
192
- ]))
194
+ ], 8, ["to"]))
193
195
  ], 64);
194
196
  };
195
197
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninemoon-ui",
3
3
  "private": false,
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
5
  "author": "zhuboy",
6
6
  "keywords": [
7
7
  "vue3",