zhihao-ui 1.0.2 → 1.1.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 (77) hide show
  1. package/dist/es/Button-DnpxJA88.js +22 -0
  2. package/dist/es/DatePicker-DdLVvq3M.js +57 -0
  3. package/dist/es/DetailSubTitle-BWNtw5qC.js +35 -0
  4. package/dist/es/Dialog-D9YXcRFu.js +112 -0
  5. package/dist/es/EditInfoPair-Dkj9ohlm.js +36 -0
  6. package/dist/es/FileWrapper-D9UO6aN1.js +77 -0
  7. package/dist/es/Grid-D8odZrqs.js +96 -0
  8. package/dist/es/InfoPair-BXFe3add.js +36 -0
  9. package/dist/es/Input-wPjJsk3b.js +88 -0
  10. package/dist/es/Loading-ClJhDU4h.js +22 -0
  11. package/dist/es/MessageBox-BbG8P2uz.js +100 -0
  12. package/dist/es/MoneyInput-CbCeKV_v.js +53 -0
  13. package/dist/es/PageHeadPanel-BaNhcn2t.js +32 -0
  14. package/dist/es/ToolTips-Dm28zKim.js +37 -0
  15. package/dist/es/index.js +34 -0
  16. package/dist/es/utils-amzq0_Yw.js +14 -0
  17. package/dist/es/vendor-Cv1TpEaZ.js +12409 -0
  18. package/dist/{style.css → index.css} +1 -1
  19. package/dist/types/components/Button/Button.vue.d.ts +20 -0
  20. package/dist/types/components/Button/index.d.ts +36 -0
  21. package/dist/types/components/Button/types.d.ts +7 -0
  22. package/dist/types/components/DatePicker/DatePicker.vue.d.ts +28 -0
  23. package/dist/types/components/DatePicker/index.d.ts +70 -0
  24. package/dist/types/components/DatePicker/types.d.ts +1 -0
  25. package/dist/types/components/DetailSubTitle/DetailSubTitle.vue.d.ts +30 -0
  26. package/dist/types/components/DetailSubTitle/index.d.ts +59 -0
  27. package/dist/types/components/DetailSubTitle/types.d.ts +7 -0
  28. package/dist/types/components/Dialog/Dialog.vue.d.ts +14 -0
  29. package/dist/types/components/Dialog/index.d.ts +19 -0
  30. package/dist/types/components/Dialog/types.d.ts +25 -0
  31. package/dist/types/components/EditInfoPair/EditInfoPair.vue.d.ts +30 -0
  32. package/dist/types/components/EditInfoPair/index.d.ts +59 -0
  33. package/dist/types/components/EditInfoPair/types.d.ts +1 -0
  34. package/dist/types/components/FileWrapper/FileWrapper.vue.d.ts +64 -0
  35. package/dist/types/components/FileWrapper/index.d.ts +119 -0
  36. package/dist/types/components/FileWrapper/types.d.ts +1 -0
  37. package/dist/types/components/Grid/Grid.vue.d.ts +65 -0
  38. package/dist/types/components/Grid/index.d.ts +107 -0
  39. package/dist/types/components/Grid/interface/index.d.ts +5 -0
  40. package/dist/types/components/Grid/types.d.ts +1 -0
  41. package/dist/types/components/InfoPair/InfoPair.vue.d.ts +30 -0
  42. package/dist/types/components/InfoPair/index.d.ts +59 -0
  43. package/dist/types/components/InfoPair/types.d.ts +1 -0
  44. package/dist/types/components/Input/Input.vue.d.ts +45 -0
  45. package/dist/types/components/Input/index.d.ts +72 -0
  46. package/dist/types/components/Input/types.d.ts +1 -0
  47. package/dist/types/components/InputNumber/InputNumber.vue.d.ts +33 -0
  48. package/dist/types/components/InputNumber/index.d.ts +67 -0
  49. package/dist/types/components/InputNumber/types.d.ts +1 -0
  50. package/dist/types/components/Loading/Loading.vue.d.ts +2 -0
  51. package/dist/types/components/Loading/index.d.ts +13 -0
  52. package/dist/types/components/Loading/types.d.ts +1 -0
  53. package/dist/types/components/MessageBox/MessageBox.vue.d.ts +219 -0
  54. package/dist/types/components/MessageBox/index.d.ts +343 -0
  55. package/dist/types/components/MessageBox/types.d.ts +20 -0
  56. package/dist/types/components/MoneyInput/MoneyInput.vue.d.ts +40 -0
  57. package/dist/types/components/MoneyInput/index.d.ts +67 -0
  58. package/dist/types/components/MoneyInput/types.d.ts +1 -0
  59. package/dist/types/components/PageHeadPanel/PageHeadPanel.vue.d.ts +30 -0
  60. package/dist/types/components/PageHeadPanel/index.d.ts +32 -0
  61. package/dist/types/components/PageHeadPanel/types.d.ts +1 -0
  62. package/dist/types/components/ToolTips/ToolTips.vue.d.ts +33 -0
  63. package/dist/types/components/ToolTips/index.d.ts +53 -0
  64. package/dist/types/components/ToolTips/types.d.ts +1 -0
  65. package/dist/types/components/const.d.ts +4 -0
  66. package/dist/types/components/index.d.ts +15 -0
  67. package/dist/types/components/utils.d.ts +4 -0
  68. package/dist/types/components/vitest.config.d.ts +2 -0
  69. package/dist/types/core/index.d.ts +3 -0
  70. package/dist/types/utils/index.d.ts +1 -0
  71. package/dist/types/utils/install.d.ts +6 -0
  72. package/dist/umd/index.css +1 -0
  73. package/dist/umd/index.umd.cjs +40 -0
  74. package/package.json +47 -44
  75. package/README.md +0 -14
  76. package/dist/zhihao-ui.js +0 -40
  77. package/dist/zhihao-ui.mjs +0 -14309
@@ -0,0 +1,100 @@
1
+ import { defineComponent as k, useModel as P, ref as m, openBlock as n, createBlock as p, mergeProps as r, withCtx as u, createElementBlock as w, toDisplayString as V, createCommentVNode as v, resolveDynamicComponent as M, normalizeProps as C, unref as c, createVNode as h, mergeModels as g } from "vue";
2
+ import { f as F, b as I, e as z } from "./vendor-Cv1TpEaZ.js";
3
+ import { z as E } from "./Dialog-D9YXcRFu.js";
4
+ import { _ } from "./Button-DnpxJA88.js";
5
+ import { w as A } from "./utils-amzq0_Yw.js";
6
+ const D = {
7
+ key: 0,
8
+ class: "tips"
9
+ }, T = /* @__PURE__ */ k({
10
+ name: "zh-message-box",
11
+ __name: "MessageBox",
12
+ props: /* @__PURE__ */ g({
13
+ title: {},
14
+ subtitle: {},
15
+ tip: {},
16
+ placeholder: {},
17
+ formItemProps: {},
18
+ formProps: {},
19
+ inputProps: {},
20
+ closeOnClickModal: { type: Boolean },
21
+ callBack: { type: Function },
22
+ onAction: { type: Function },
23
+ onVanish: { type: Function },
24
+ submitText: {},
25
+ render: { type: Function },
26
+ maxlength: {},
27
+ renderProps: {}
28
+ }, {
29
+ visible: { type: Boolean, default: !0 },
30
+ visibleModifiers: {}
31
+ }),
32
+ emits: /* @__PURE__ */ g(["action", "vanish"], ["update:visible"]),
33
+ setup(d, { emit: y }) {
34
+ const t = d, i = y, l = P(d, "visible"), f = m(), s = m({
35
+ textarea: ""
36
+ }), x = m({
37
+ textarea: [{ validator: (e, a, o) => {
38
+ a || o(t.placeholder), o();
39
+ }, trigger: ["blur", "change"] }]
40
+ }), b = async () => {
41
+ var e;
42
+ t.placeholder ? (e = f.value) == null || e.validate(async (a) => {
43
+ if (a)
44
+ try {
45
+ if (t.callBack) {
46
+ const o = await t.callBack(s.value.textarea);
47
+ console.log(o);
48
+ }
49
+ i("action", "submit"), l.value = !1;
50
+ } catch (o) {
51
+ console.log(o);
52
+ }
53
+ }) : (i("action", "submit"), l.value = !1);
54
+ }, B = () => {
55
+ i("action", "cancel"), l.value = !1;
56
+ };
57
+ return (e, a) => (n(), p(E, r({
58
+ modelValue: l.value,
59
+ "onUpdate:modelValue": a[1] || (a[1] = (o) => l.value = o),
60
+ width: "544"
61
+ }, t, {
62
+ onSubmit: b,
63
+ onClose: B
64
+ }), {
65
+ default: u(() => [
66
+ e.tip ? (n(), w("div", D, V(e.tip), 1)) : v("", !0),
67
+ e.render ? (n(), p(M(e.render), C(r({ key: 1 }, t.renderProps)), null, 16)) : e.placeholder ? (n(), p(c(F), r({
68
+ key: 2,
69
+ ref_key: "formRef",
70
+ ref: f,
71
+ model: s.value,
72
+ rules: x.value
73
+ }, t.formProps), {
74
+ default: u(() => [
75
+ h(c(I), r({ prop: "textarea" }, t.formItemProps), {
76
+ default: u(() => [
77
+ h(c(z), r({
78
+ modelValue: s.value.textarea,
79
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => s.value.textarea = o),
80
+ style: { width: "100%" },
81
+ rows: 4,
82
+ type: "textarea",
83
+ placeholder: e.placeholder,
84
+ maxlength: t.maxlength || 100,
85
+ "show-word-limit": ""
86
+ }, e.inputProps), null, 16, ["modelValue", "placeholder", "maxlength"])
87
+ ]),
88
+ _: 1
89
+ }, 16)
90
+ ]),
91
+ _: 1
92
+ }, 16, ["model", "rules"])) : v("", !0)
93
+ ]),
94
+ _: 1
95
+ }, 16, ["modelValue"]));
96
+ }
97
+ }), N = /* @__PURE__ */ _(T, [["__scopeId", "data-v-1903b5ef"]]), q = A(N);
98
+ export {
99
+ q as Z
100
+ };
@@ -0,0 +1,53 @@
1
+ import { defineComponent as d, useModel as i, computed as f, ref as v, openBlock as c, createBlock as y, unref as V, withCtx as n, createVNode as b, mergeProps as I, createSlots as M, renderList as g, renderSlot as w, normalizeProps as B, guardReactiveProps as N, mergeModels as m } from "vue";
2
+ import { v as k, d as P } from "./DatePicker-DdLVvq3M.js";
3
+ import { g as T } from "./vendor-Cv1TpEaZ.js";
4
+ import { I as _ } from "./Input-wPjJsk3b.js";
5
+ import { _ as $ } from "./Button-DnpxJA88.js";
6
+ import { w as z } from "./utils-amzq0_Yw.js";
7
+ const C = /* @__PURE__ */ d({
8
+ name: "zh-money-input",
9
+ __name: "MoneyInput",
10
+ props: /* @__PURE__ */ m({
11
+ style: {},
12
+ class: {},
13
+ showTooltip: { type: Boolean, default: !0 }
14
+ }, {
15
+ modelValue: {},
16
+ modelModifiers: {}
17
+ }),
18
+ emits: /* @__PURE__ */ m(["update:modelValue"], ["update:modelValue"]),
19
+ setup(s, { emit: U }) {
20
+ const a = s, e = i(s, "modelValue"), u = f(() => {
21
+ if (e.value)
22
+ return k(e.value) && Number(e.value) >= 1e3 ? P(Number(e.value)) : "";
23
+ }), r = v(!1);
24
+ return (t, o) => (c(), y(V(T), {
25
+ effect: "dark",
26
+ content: u.value,
27
+ placement: "top",
28
+ visible: t.showTooltip && r.value && !!u.value
29
+ }, {
30
+ default: n(() => [
31
+ b(_, I(t.$attrs, {
32
+ modelValue: e.value,
33
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => e.value = l),
34
+ style: a.style,
35
+ class: a.class,
36
+ onFocus: o[1] || (o[1] = () => r.value = !0),
37
+ onBlur: o[2] || (o[2] = () => r.value = !1)
38
+ }), M({ _: 2 }, [
39
+ g(Object.keys(t.$slots), (l) => ({
40
+ name: l,
41
+ fn: n((p) => [
42
+ w(t.$slots, l, B(N(p)), void 0, !0)
43
+ ])
44
+ }))
45
+ ]), 1040, ["modelValue", "style", "class"])
46
+ ]),
47
+ _: 3
48
+ }, 8, ["content", "visible"]));
49
+ }
50
+ }), S = /* @__PURE__ */ $(C, [["__scopeId", "data-v-d97e0edf"]]), L = z(S);
51
+ export {
52
+ L as Z
53
+ };
@@ -0,0 +1,32 @@
1
+ import { defineComponent as i, toRefs as m, openBlock as h, createElementBlock as u, createElementVNode as e, toDisplayString as s, unref as a, renderSlot as f } from "vue";
2
+ import { _ as g } from "./Button-DnpxJA88.js";
3
+ import { w as v } from "./utils-amzq0_Yw.js";
4
+ const P = { class: "page-head" }, x = { class: "left-wrap" }, b = { class: "page-name" }, S = { class: "value" }, w = { class: "other-inform" }, H = { class: "label" }, k = { class: "value mg-r-24" }, B = { class: "status" }, E = /* @__PURE__ */ i({
5
+ name: "zh-page-head-panel",
6
+ __name: "PageHeadPanel",
7
+ props: {
8
+ dataSource: {}
9
+ },
10
+ setup(o) {
11
+ const n = o, { name: l, no: c, status: d, extendLabel: r, extendValue: p } = m(n.dataSource);
12
+ return (_, t) => (h(), u("div", P, [
13
+ e("div", x, [
14
+ e("span", b, s(a(l)), 1),
15
+ e("div", null, [
16
+ t[0] || (t[0] = e("span", { class: "label mg-l-16" }, "编号", -1)),
17
+ e("span", S, s(a(c)), 1)
18
+ ])
19
+ ]),
20
+ e("div", w, [
21
+ f(_.$slots, "extend", {}, () => [
22
+ e("span", H, s(a(r)), 1),
23
+ e("span", k, s(a(p)), 1)
24
+ ], !0),
25
+ e("span", B, s(a(d)), 1)
26
+ ])
27
+ ]));
28
+ }
29
+ }), I = /* @__PURE__ */ g(E, [["__scopeId", "data-v-cecdddb2"]]), z = v(I);
30
+ export {
31
+ z as Z
32
+ };
@@ -0,0 +1,37 @@
1
+ import { defineComponent as p, openBlock as r, createBlock as l, unref as s, withCtx as a, renderSlot as c, createElementVNode as i } from "vue";
2
+ import { g as m } from "./vendor-Cv1TpEaZ.js";
3
+ import { _ as f } from "./Button-DnpxJA88.js";
4
+ import { w as d } from "./utils-amzq0_Yw.js";
5
+ const u = /* @__PURE__ */ p({
6
+ name: "zh-tool-tips",
7
+ __name: "ToolTips",
8
+ props: {
9
+ placement: {
10
+ type: String,
11
+ default: "top"
12
+ },
13
+ content: {
14
+ type: String,
15
+ default: "top"
16
+ }
17
+ },
18
+ setup(e) {
19
+ const t = e;
20
+ return (n, o) => (r(), l(s(m), {
21
+ class: "box-item",
22
+ effect: "dark",
23
+ content: t.content,
24
+ placement: t.placement
25
+ }, {
26
+ default: a(() => [
27
+ c(n.$slots, "default", {}, () => [
28
+ o[0] || (o[0] = i("i", { class: "iconfont icon-Frame2" }, null, -1))
29
+ ], !0)
30
+ ]),
31
+ _: 3
32
+ }, 8, ["content", "placement"]));
33
+ }
34
+ }), _ = /* @__PURE__ */ f(u, [["__scopeId", "data-v-93c79d22"]]), k = d(_);
35
+ export {
36
+ k as Z
37
+ };
@@ -0,0 +1,34 @@
1
+ import { m as o } from "./utils-amzq0_Yw.js";
2
+ import { Z as r } from "./Button-DnpxJA88.js";
3
+ import { Z as m } from "./DatePicker-DdLVvq3M.js";
4
+ import { Z as a } from "./DetailSubTitle-BWNtw5qC.js";
5
+ import { Z as t } from "./Dialog-D9YXcRFu.js";
6
+ import { Z } from "./EditInfoPair-Dkj9ohlm.js";
7
+ import { Z as i } from "./FileWrapper-D9UO6aN1.js";
8
+ import { Z as s } from "./Grid-D8odZrqs.js";
9
+ import { Z as p } from "./InfoPair-BXFe3add.js";
10
+ import { Z as e, a as f } from "./Input-wPjJsk3b.js";
11
+ import { Z as h } from "./Loading-ClJhDU4h.js";
12
+ import { Z as n } from "./MessageBox-BbG8P2uz.js";
13
+ import { Z as l } from "./MoneyInput-CbCeKV_v.js";
14
+ import { Z as u } from "./PageHeadPanel-BaNhcn2t.js";
15
+ import { Z as I } from "./ToolTips-Dm28zKim.js";
16
+ const d = [r, m, a, t, Z, i, s, p, e, f, h, n, l, u, I], L = o(d);
17
+ export {
18
+ r as ZhButton,
19
+ m as ZhDatePicker,
20
+ a as ZhDetailSubTitle,
21
+ t as ZhDialog,
22
+ Z as ZhEditInfoPair,
23
+ i as ZhFileWrapper,
24
+ s as ZhGrid,
25
+ p as ZhInfoPair,
26
+ e as ZhInput,
27
+ f as ZhInputNumber,
28
+ h as ZhLoading,
29
+ n as ZhMessageBox,
30
+ l as ZhMoneyInput,
31
+ u as ZhPageHeadPanel,
32
+ I as ZhToolTips,
33
+ L as default
34
+ };
@@ -0,0 +1,14 @@
1
+ import { i as t } from "./vendor-Cv1TpEaZ.js";
2
+ function n(a) {
3
+ return (s) => t(a, (r) => {
4
+ s.use(r);
5
+ });
6
+ }
7
+ const e = (a) => (a.install = (l) => {
8
+ const s = (a == null ? void 0 : a.name) || "UnnamedComponent";
9
+ l.component(s, a);
10
+ }, a);
11
+ export {
12
+ n as m,
13
+ e as w
14
+ };