ModalHeader.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. import { resolveComponent as i, openBlock as t, createElementBlock as f, createBlock as o, withCtx as e, createVNode as n, createCommentVNode as g, createElementVNode as u, toDisplayString as d } from "vue";
  2. import { y as S, B as v } from "./index2.js";
  3. const k = { class: "modal-custom-header" }, w = { style: { color: "var(--s-text-color)" } }, B = { style: { color: "var(--s-text-color)" } }, D = /* @__PURE__ */ Object.assign({ name: "SModalHeader" }, {
  4. __name: "ModalHeader",
  5. props: {
  6. width: {
  7. type: [String, Number],
  8. default: "40%"
  9. },
  10. showFullScreen: {
  11. type: Boolean,
  12. default: !0
  13. }
  14. },
  15. emits: ["fullScreen", "reduction"],
  16. setup(l, { emit: m }) {
  17. const c = m;
  18. function _() {
  19. c("fullScreen");
  20. }
  21. function p() {
  22. c("reduction");
  23. }
  24. return (a, b) => {
  25. const y = i("BorderOutlined"), r = v, s = S, h = i("SwitcherOutlined");
  26. return t(), f("div", k, [
  27. l.width != "100vw" ? (t(), o(s, {
  28. key: 0,
  29. color: "var(--s-bg-color-container)",
  30. placement: "bottom",
  31. mouseEnterDelay: 1.5,
  32. mouseLeaveDelay: 0.5
  33. }, {
  34. title: e(() => [
  35. u("span", w, d(a.$l("全屏")), 1)
  36. ]),
  37. default: e(() => [
  38. l.showFullScreen ? (t(), o(r, {
  39. key: 0,
  40. type: "text",
  41. class: "ant-modal-close",
  42. style: { "margin-right": "30px" },
  43. onClick: _
  44. }, {
  45. default: e(() => [
  46. n(y)
  47. ]),
  48. _: 1
  49. })) : g("", !0)
  50. ]),
  51. _: 1
  52. })) : (t(), o(s, {
  53. key: 1,
  54. color: "var(--s-bg-color-container)",
  55. placement: "bottom",
  56. mouseEnterDelay: 3,
  57. mouseLeaveDelay: 3
  58. }, {
  59. title: e(() => [
  60. u("span", B, d(a.$l("还原")), 1)
  61. ]),
  62. default: e(() => [
  63. n(r, {
  64. type: "text",
  65. class: "ant-modal-close",
  66. style: { "margin-right": "30px" },
  67. onClick: p
  68. }, {
  69. default: e(() => [
  70. n(h, { class: "toggle-icon" })
  71. ]),
  72. _: 1
  73. })
  74. ]),
  75. _: 1
  76. }))
  77. ]);
  78. };
  79. }
  80. });
  81. export {
  82. D as default
  83. };