qidian-vue-ui 1.2.113 → 1.2.115

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.
@@ -140,6 +140,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
140
140
  const dialogEl = containerEl.querySelector(".t-dialog");
141
141
  const headerEl = containerEl.querySelector(".t-dialog__header");
142
142
  isContainerOutsideController = new AbortController();
143
+ domOn(document, "keydown", closeImagePreviewOnEsc, {
144
+ capture: true,
145
+ signal: isContainerOutsideController.signal
146
+ });
143
147
  domOn(
144
148
  containerEl,
145
149
  "mouseleave",
@@ -278,6 +282,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
278
282
  function hide() {
279
283
  visible.value = false;
280
284
  }
285
+ function closeImagePreviewOnEsc(event) {
286
+ if (event.code !== "Escape") return;
287
+ const viewer = document.querySelector(".viewer-container.viewer-in:not(.viewer-hide)");
288
+ if (!viewer) return;
289
+ const closeBtn = viewer.querySelector('[data-viewer-action="mix"]');
290
+ closeBtn?.click();
291
+ event.preventDefault();
292
+ event.stopImmediatePropagation();
293
+ }
281
294
  const expose = { show, hide };
282
295
  watch(
283
296
  visible,
@@ -298,6 +311,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
298
311
  if (visible.value) nextTick(updateMasks);
299
312
  });
300
313
  onBeforeUnmount(() => {
314
+ isContainerOutsideController?.abort();
301
315
  updateMasks({ excludeClassName: uniqueClassName });
302
316
  });
303
317
  __expose(expose);
@@ -1,10 +1,17 @@
1
+ .qd-multi-file-viewer {
2
+ width: 100%;
3
+ height: 100%;
4
+ }
1
5
  .qd-multi-file-viewer .t-dialog {
2
6
  border: none !important;
3
7
  }
4
8
  .qd-multi-file-viewer .t-dialog__header {
5
9
  border-bottom: 1px solid var(--td-component-stroke);
6
10
  }
7
- .qd-multi-file-viewer .t-dialog__body {
11
+ .qd-multi-file-viewer .t-dialog__body,
12
+ .qd-multi-file-viewer .t-dialog:has(.t-dialog__footer) .t-dialog__body,
13
+ .qd-multi-file-viewer .t-dialog__body--fullscreen,
14
+ .qd-multi-file-viewer .t-dialog__body--fullscreen--without-footer {
8
15
  padding: 0 !important;
9
16
  }
10
17
  .qd-multi-file-viewer__body {
@@ -1,12 +1,14 @@
1
1
  export declare const qdMultiFileViewerWrapperProps: {
2
2
  readonly mode: "full-screen";
3
3
  readonly fullscreenBtn: false;
4
+ readonly confirmBtn: null;
4
5
  readonly footer: false;
5
6
  };
6
7
  export declare const qdMultiFileViewerProps: {
7
8
  readonly wrapper: () => {
8
9
  readonly mode: "full-screen";
9
10
  readonly fullscreenBtn: false;
11
+ readonly confirmBtn: null;
10
12
  readonly footer: false;
11
13
  };
12
14
  };
@@ -1,6 +1,7 @@
1
1
  const qdMultiFileViewerWrapperProps = {
2
2
  mode: "full-screen",
3
3
  fullscreenBtn: false,
4
+ confirmBtn: null,
4
5
  footer: false
5
6
  };
6
7
  const qdMultiFileViewerProps = {
@@ -336,6 +336,9 @@ p {
336
336
  .t-dialog {
337
337
  padding: var(--td-comp-paddingTB-xl) var(--td-comp-paddingLR-xl) !important;
338
338
  }
339
+ .viewer-container {
340
+ z-index: 2800 !important;
341
+ }
339
342
  .ps {
340
343
  position: relative;
341
344
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "1.2.113",
3
+ "version": "1.2.115",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",