ModalHeader.js 2.1 KB

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