@chewel611/naive-ui-plus 0.0.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.
Files changed (129) hide show
  1. package/README.md +73 -0
  2. package/dist/index.js +1377 -0
  3. package/dist/index.umd.cjs +1 -0
  4. package/dist/style.css +1 -0
  5. package/es/_virtual/_plugin-vue_export-helper.js +9 -0
  6. package/es/application/PApplication.d.ts +23 -0
  7. package/es/application/PApplication.vue.js +53 -0
  8. package/es/application/PApplication.vue2.js +4 -0
  9. package/es/application/index.d.ts +33 -0
  10. package/es/application/index.js +6 -0
  11. package/es/components.d.ts +5 -0
  12. package/es/components.js +12 -0
  13. package/es/index.d.ts +9 -0
  14. package/es/index.js +24 -0
  15. package/es/languages/PLanguage.d.ts +2 -0
  16. package/es/languages/PLanguage.vue.js +69 -0
  17. package/es/languages/PLanguage.vue2.js +4 -0
  18. package/es/languages/index.d.ts +16 -0
  19. package/es/languages/index.js +7 -0
  20. package/es/languages/store.d.ts +137 -0
  21. package/es/languages/store.js +53 -0
  22. package/es/languages/typing.d.ts +14 -0
  23. package/es/layout/PLayout.css +1 -0
  24. package/es/layout/PLayout.d.ts +2 -0
  25. package/es/layout/PLayout.vue.js +7 -0
  26. package/es/layout/PLayout.vue2.js +80 -0
  27. package/es/layout/content/PContent.d.ts +7 -0
  28. package/es/layout/content/PContent.vue.js +27 -0
  29. package/es/layout/content/PContent.vue2.js +4 -0
  30. package/es/layout/content/PTabs.css +1 -0
  31. package/es/layout/content/PTabs.d.ts +5 -0
  32. package/es/layout/content/PTabs.vue.js +7 -0
  33. package/es/layout/content/PTabs.vue2.js +281 -0
  34. package/es/layout/header/PHeader.css +1 -0
  35. package/es/layout/header/PHeader.d.ts +2 -0
  36. package/es/layout/header/PHeader.vue.js +7 -0
  37. package/es/layout/header/PHeader.vue2.js +188 -0
  38. package/es/layout/index.d.ts +15 -0
  39. package/es/layout/index.js +6 -0
  40. package/es/layout/layout.d.ts +21002 -0
  41. package/es/layout/layout.js +74 -0
  42. package/es/layout/sider/PLogo.css +1 -0
  43. package/es/layout/sider/PLogo.d.ts +2 -0
  44. package/es/layout/sider/PLogo.vue.js +7 -0
  45. package/es/layout/sider/PLogo.vue2.js +23 -0
  46. package/es/layout/sider/PMenus.d.ts +2 -0
  47. package/es/layout/sider/PMenus.vue.js +90 -0
  48. package/es/layout/sider/PMenus.vue2.js +4 -0
  49. package/es/modal/PModal.d.ts +4173 -0
  50. package/es/modal/PModal.vue.js +106 -0
  51. package/es/modal/PModal.vue2.js +4 -0
  52. package/es/modal/index.d.ts +2116 -0
  53. package/es/modal/index.js +6 -0
  54. package/es/modal/typing.d.ts +12 -0
  55. package/es/table/PTable.d.ts +37 -0
  56. package/es/table/PTable.vue.js +384 -0
  57. package/es/table/PTable.vue2.js +4 -0
  58. package/es/table/index.d.ts +61 -0
  59. package/es/table/index.js +6 -0
  60. package/es/table/typing.d.ts +41 -0
  61. package/es/typing.d.ts +5 -0
  62. package/es/utils/install.d.ts +2 -0
  63. package/es/utils/install.js +9 -0
  64. package/es/utils/plus.d.ts +6 -0
  65. package/es/utils/resolver.d.ts +7 -0
  66. package/es/utils/storage.d.ts +7 -0
  67. package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
  68. package/lib/application/PApplication.d.ts +23 -0
  69. package/lib/application/PApplication.vue.cjs +1 -0
  70. package/lib/application/PApplication.vue2.cjs +1 -0
  71. package/lib/application/index.cjs +1 -0
  72. package/lib/application/index.d.ts +33 -0
  73. package/lib/components.cjs +1 -0
  74. package/lib/components.d.ts +5 -0
  75. package/lib/index.cjs +1 -0
  76. package/lib/index.d.ts +9 -0
  77. package/lib/languages/PLanguage.d.ts +2 -0
  78. package/lib/languages/PLanguage.vue.cjs +1 -0
  79. package/lib/languages/PLanguage.vue2.cjs +1 -0
  80. package/lib/languages/index.cjs +1 -0
  81. package/lib/languages/index.d.ts +16 -0
  82. package/lib/languages/store.cjs +1 -0
  83. package/lib/languages/store.d.ts +137 -0
  84. package/lib/languages/typing.d.ts +14 -0
  85. package/lib/layout/PLayout.css +1 -0
  86. package/lib/layout/PLayout.d.ts +2 -0
  87. package/lib/layout/PLayout.vue.cjs +1 -0
  88. package/lib/layout/PLayout.vue2.cjs +1 -0
  89. package/lib/layout/content/PContent.d.ts +7 -0
  90. package/lib/layout/content/PContent.vue.cjs +1 -0
  91. package/lib/layout/content/PContent.vue2.cjs +1 -0
  92. package/lib/layout/content/PTabs.css +1 -0
  93. package/lib/layout/content/PTabs.d.ts +5 -0
  94. package/lib/layout/content/PTabs.vue.cjs +1 -0
  95. package/lib/layout/content/PTabs.vue2.cjs +1 -0
  96. package/lib/layout/header/PHeader.css +1 -0
  97. package/lib/layout/header/PHeader.d.ts +2 -0
  98. package/lib/layout/header/PHeader.vue.cjs +1 -0
  99. package/lib/layout/header/PHeader.vue2.cjs +1 -0
  100. package/lib/layout/index.cjs +1 -0
  101. package/lib/layout/index.d.ts +15 -0
  102. package/lib/layout/layout.cjs +1 -0
  103. package/lib/layout/layout.d.ts +21002 -0
  104. package/lib/layout/sider/PLogo.css +1 -0
  105. package/lib/layout/sider/PLogo.d.ts +2 -0
  106. package/lib/layout/sider/PLogo.vue.cjs +1 -0
  107. package/lib/layout/sider/PLogo.vue2.cjs +1 -0
  108. package/lib/layout/sider/PMenus.d.ts +2 -0
  109. package/lib/layout/sider/PMenus.vue.cjs +1 -0
  110. package/lib/layout/sider/PMenus.vue2.cjs +1 -0
  111. package/lib/modal/PModal.d.ts +4173 -0
  112. package/lib/modal/PModal.vue.cjs +1 -0
  113. package/lib/modal/PModal.vue2.cjs +1 -0
  114. package/lib/modal/index.cjs +1 -0
  115. package/lib/modal/index.d.ts +2116 -0
  116. package/lib/modal/typing.d.ts +12 -0
  117. package/lib/table/PTable.d.ts +37 -0
  118. package/lib/table/PTable.vue.cjs +1 -0
  119. package/lib/table/PTable.vue2.cjs +1 -0
  120. package/lib/table/index.cjs +1 -0
  121. package/lib/table/index.d.ts +61 -0
  122. package/lib/table/typing.d.ts +41 -0
  123. package/lib/typing.d.ts +5 -0
  124. package/lib/utils/install.cjs +1 -0
  125. package/lib/utils/install.d.ts +2 -0
  126. package/lib/utils/plus.d.ts +6 -0
  127. package/lib/utils/resolver.d.ts +7 -0
  128. package/lib/utils/storage.d.ts +7 -0
  129. package/package.json +103 -0
@@ -0,0 +1,106 @@
1
+ import { useMessage as k, NModal as w, NSpace as S, NButton as $ } from "naive-ui";
2
+ import { defineComponent as h, ref as r, createBlock as B, openBlock as N, unref as M, mergeProps as T, createSlots as V, withCtx as o, renderSlot as u, createElementVNode as x, toDisplayString as i, createVNode as c, createTextVNode as p } from "vue";
3
+ const F = {
4
+ class: "w-full cursor-move",
5
+ id: "basic-modal-bar"
6
+ }, U = /* @__PURE__ */ h({
7
+ __name: "PModal",
8
+ props: {
9
+ saveBtnText: { default: "保 存" },
10
+ closable: { type: Boolean, default: !1 },
11
+ preset: { default: "dialog" },
12
+ title: { default: "操作" },
13
+ onSave: {},
14
+ onClose: {}
15
+ },
16
+ setup(m, { expose: v }) {
17
+ const f = k(), s = m, y = r(null), a = r(!1), l = r(!1), g = async () => {
18
+ a.value = !0;
19
+ try {
20
+ s.onSave && await s.onSave() && t();
21
+ } catch (e) {
22
+ console.error(e), f.error("操作失败, 详情F12请查看控制台日志");
23
+ } finally {
24
+ a.value = !1;
25
+ }
26
+ }, t = () => {
27
+ l.value = !1, a.value = !1;
28
+ }, _ = async () => {
29
+ try {
30
+ s.onClose ? await s.onClose() && t() : t();
31
+ } catch (e) {
32
+ console.error(e), f.error("取消失败, 详情F12请查看控制台日志");
33
+ }
34
+ };
35
+ return v({
36
+ open: () => {
37
+ a.value = !1, l.value = !0;
38
+ },
39
+ close: () => {
40
+ l.value = !1, a.value = !1;
41
+ }
42
+ }), (e, n) => {
43
+ const d = $, C = S;
44
+ return N(), B(M(w), T({
45
+ ref_key: "$modal",
46
+ ref: y,
47
+ preset: "dialog",
48
+ show: l.value,
49
+ "onUpdate:show": n[0] || (n[0] = (b) => l.value = b)
50
+ }, e.$attrs, {
51
+ draggable: !0,
52
+ closable: !1,
53
+ "close-on-esc": !1,
54
+ "mask-closable": !1,
55
+ style: { width: "800px" },
56
+ onClose: t
57
+ }), V({
58
+ header: o(() => [
59
+ x("div", F, i(e.title), 1)
60
+ ]),
61
+ default: o(() => [
62
+ u(e.$slots, "default")
63
+ ]),
64
+ _: 2
65
+ }, [
66
+ e.$slots.action ? {
67
+ name: "action",
68
+ fn: o(() => [
69
+ u(e.$slots, "action")
70
+ ]),
71
+ key: "1"
72
+ } : {
73
+ name: "action",
74
+ fn: o(() => [
75
+ c(C, null, {
76
+ default: o(() => [
77
+ c(d, {
78
+ type: "primary",
79
+ loading: a.value,
80
+ onClick: g
81
+ }, {
82
+ default: o(() => [
83
+ p(i(e.saveBtnText), 1)
84
+ ]),
85
+ _: 1
86
+ }, 8, ["loading"]),
87
+ c(d, { onClick: _ }, {
88
+ default: o(() => n[1] || (n[1] = [
89
+ p("取 消", -1)
90
+ ])),
91
+ _: 1,
92
+ __: [1]
93
+ })
94
+ ]),
95
+ _: 1
96
+ })
97
+ ]),
98
+ key: "0"
99
+ }
100
+ ]), 1040, ["show"]);
101
+ };
102
+ }
103
+ });
104
+ export {
105
+ U as default
106
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./PModal.vue.js";
2
+ export {
3
+ f as default
4
+ };