@duxweb/dvha-pro 1.0.32 → 1.0.33

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/dist/cjs/components/chart/echart.cjs +1 -1
  2. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  3. package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
  4. package/dist/cjs/components/data/selectModal.cjs +1 -1
  5. package/dist/cjs/components/designEditor/components/grid.cjs +1 -1
  6. package/dist/cjs/components/designEditor/editor/setting.cjs +1 -1
  7. package/dist/cjs/components/form/drawerForm.cjs +1 -1
  8. package/dist/cjs/components/form/modalForm.cjs +1 -1
  9. package/dist/cjs/components/form/pageForm.cjs +1 -1
  10. package/dist/cjs/components/form/pageTabForm.cjs +1 -1
  11. package/dist/cjs/components/form/settingForm.cjs +1 -1
  12. package/dist/cjs/components/formEditor/base/base.cjs +1 -1
  13. package/dist/cjs/components/formEditor/base/setting.cjs +1 -1
  14. package/dist/cjs/components/formEditor/components/cascader.cjs +1 -1
  15. package/dist/cjs/components/formEditor/components/cascaderAsync.cjs +1 -1
  16. package/dist/cjs/components/formEditor/components/checkbox.cjs +1 -1
  17. package/dist/cjs/components/formEditor/components/color.cjs +1 -1
  18. package/dist/cjs/components/formEditor/components/date.cjs +1 -1
  19. package/dist/cjs/components/formEditor/components/dynamicInput.cjs +1 -1
  20. package/dist/cjs/components/formEditor/components/dynamicTags.cjs +1 -1
  21. package/dist/cjs/components/formEditor/components/editor.cjs +1 -1
  22. package/dist/cjs/components/formEditor/components/input.cjs +1 -1
  23. package/dist/cjs/components/formEditor/components/inputNumber.cjs +1 -1
  24. package/dist/cjs/components/formEditor/components/mentionAsync.cjs +1 -1
  25. package/dist/cjs/components/formEditor/components/radio.cjs +1 -1
  26. package/dist/cjs/components/formEditor/components/region.cjs +1 -1
  27. package/dist/cjs/components/formEditor/components/select.cjs +1 -1
  28. package/dist/cjs/components/formEditor/components/selectAsync.cjs +1 -1
  29. package/dist/cjs/components/formEditor/components/sider.cjs +1 -1
  30. package/dist/cjs/components/formEditor/components/switch.cjs +1 -1
  31. package/dist/cjs/components/formEditor/components/time.cjs +1 -1
  32. package/dist/cjs/components/formEditor/components/transferAsync.cjs +1 -1
  33. package/dist/cjs/components/formEditor/components/treeSelect.cjs +1 -1
  34. package/dist/cjs/components/formEditor/components/treeSelectAsync.cjs +1 -1
  35. package/dist/cjs/components/formEditor/editor.cjs +1 -1
  36. package/dist/cjs/components/formEditor/renderer.cjs +1 -1
  37. package/dist/cjs/components/icon/icon.cjs +1 -1
  38. package/dist/cjs/components/layout/list.cjs +1 -1
  39. package/dist/cjs/components/layout/table.cjs +1 -1
  40. package/dist/cjs/components/level/level.cjs +1 -1
  41. package/dist/cjs/components/posterEditor/pages/RightPanel.cjs +1 -1
  42. package/dist/cjs/components/posterEditor/posterEditor.cjs +1 -1
  43. package/dist/cjs/components/table/table.cjs +1 -1
  44. package/dist/cjs/components/upload/file.cjs +1 -1
  45. package/dist/cjs/components/upload/image.cjs +1 -1
  46. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  47. package/dist/cjs/components/upload/manager.cjs +1 -1
  48. package/dist/cjs/config/echart.cjs +1 -1
  49. package/dist/cjs/hooks/dialog.cjs +1 -1
  50. package/dist/cjs/hooks/drawer.cjs +1 -1
  51. package/dist/cjs/hooks/modal.cjs +1 -1
  52. package/dist/cjs/hooks/table/image.cjs +1 -1
  53. package/dist/cjs/hooks/table/media.cjs +1 -1
  54. package/dist/cjs/pages/layout/global.cjs +1 -1
  55. package/dist/cjs/pages/layout/page.cjs +1 -1
  56. package/dist/cjs/pages/login.cjs +1 -1
  57. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  58. package/dist/cjs/pages/menu/button.cjs +1 -1
  59. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  60. package/dist/cjs/pages/menu/main.cjs +1 -1
  61. package/dist/cjs/pages/menu/mobile.cjs +1 -1
  62. package/dist/cjs/pages/page404.cjs +1 -1
  63. package/dist/cjs/pages/pageStatus.cjs +1 -1
  64. package/dist/cjs/theme/uno.css.cjs +1 -1
  65. package/dist/esm/components/chart/echart.js +16 -2
  66. package/dist/esm/components/crop/imageCrop.js +26 -12
  67. package/dist/esm/components/data/dynamicSelect.js +33 -19
  68. package/dist/esm/components/data/selectModal.js +41 -27
  69. package/dist/esm/components/designEditor/components/grid.js +39 -25
  70. package/dist/esm/components/designEditor/editor/setting.js +36 -22
  71. package/dist/esm/components/form/drawerForm.js +32 -18
  72. package/dist/esm/components/form/modalForm.js +31 -17
  73. package/dist/esm/components/form/pageForm.js +40 -26
  74. package/dist/esm/components/form/pageTabForm.js +30 -16
  75. package/dist/esm/components/form/settingForm.js +32 -18
  76. package/dist/esm/components/formEditor/base/base.js +29 -15
  77. package/dist/esm/components/formEditor/base/setting.js +21 -7
  78. package/dist/esm/components/formEditor/components/cascader.js +65 -51
  79. package/dist/esm/components/formEditor/components/cascaderAsync.js +95 -81
  80. package/dist/esm/components/formEditor/components/checkbox.js +43 -29
  81. package/dist/esm/components/formEditor/components/color.js +34 -20
  82. package/dist/esm/components/formEditor/components/date.js +51 -37
  83. package/dist/esm/components/formEditor/components/dynamicInput.js +42 -28
  84. package/dist/esm/components/formEditor/components/dynamicTags.js +39 -25
  85. package/dist/esm/components/formEditor/components/editor.js +23 -9
  86. package/dist/esm/components/formEditor/components/input.js +66 -52
  87. package/dist/esm/components/formEditor/components/inputNumber.js +37 -23
  88. package/dist/esm/components/formEditor/components/mentionAsync.js +60 -46
  89. package/dist/esm/components/formEditor/components/radio.js +28 -14
  90. package/dist/esm/components/formEditor/components/region.js +37 -23
  91. package/dist/esm/components/formEditor/components/select.js +16 -2
  92. package/dist/esm/components/formEditor/components/selectAsync.js +72 -58
  93. package/dist/esm/components/formEditor/components/sider.js +40 -26
  94. package/dist/esm/components/formEditor/components/switch.js +33 -19
  95. package/dist/esm/components/formEditor/components/time.js +60 -46
  96. package/dist/esm/components/formEditor/components/transferAsync.js +49 -35
  97. package/dist/esm/components/formEditor/components/treeSelect.js +54 -40
  98. package/dist/esm/components/formEditor/components/treeSelectAsync.js +74 -60
  99. package/dist/esm/components/formEditor/editor.js +16 -2
  100. package/dist/esm/components/formEditor/renderer.js +28 -14
  101. package/dist/esm/components/icon/icon.js +23 -9
  102. package/dist/esm/components/layout/list.js +69 -55
  103. package/dist/esm/components/layout/table.js +37 -23
  104. package/dist/esm/components/level/level.js +37 -23
  105. package/dist/esm/components/posterEditor/pages/RightPanel.js +46 -32
  106. package/dist/esm/components/posterEditor/posterEditor.js +26 -12
  107. package/dist/esm/components/table/table.js +21 -7
  108. package/dist/esm/components/upload/file.js +16 -2
  109. package/dist/esm/components/upload/image.js +42 -28
  110. package/dist/esm/components/upload/manage/item.js +24 -10
  111. package/dist/esm/components/upload/manager.js +16 -2
  112. package/dist/esm/config/echart.js +1 -1
  113. package/dist/esm/hooks/dialog.js +16 -2
  114. package/dist/esm/hooks/drawer.js +16 -2
  115. package/dist/esm/hooks/modal.js +16 -2
  116. package/dist/esm/hooks/table/image.js +20 -6
  117. package/dist/esm/hooks/table/media.js +20 -6
  118. package/dist/esm/pages/layout/global.js +52 -37
  119. package/dist/esm/pages/layout/page.js +26 -12
  120. package/dist/esm/pages/login.js +33 -19
  121. package/dist/esm/pages/menu/avatar.js +46 -32
  122. package/dist/esm/pages/menu/button.js +22 -8
  123. package/dist/esm/pages/menu/cmd.js +51 -37
  124. package/dist/esm/pages/menu/main.js +42 -28
  125. package/dist/esm/pages/menu/mobile.js +16 -2
  126. package/dist/esm/pages/page404.js +14 -0
  127. package/dist/esm/pages/pageStatus.js +18 -4
  128. package/dist/esm/theme/uno.css.js +1 -1
  129. package/package.json +5 -3
@@ -1,4 +1,4 @@
1
- import { createVNode as n, defineComponent as u, computed as m, isVNode as g } from "vue";
1
+ import { createVNode as n, defineComponent as u, computed as d, isVNode as g } from "vue";
2
2
  import { useI18n as f } from "@duxweb/dvha-core";
3
3
  import { useVModel as h } from "@vueuse/core";
4
4
  import v from "clsx";
@@ -30,6 +30,20 @@ import "vee-validate";
30
30
  import "@vee-validate/i18n";
31
31
  import "colorizr";
32
32
  import "echarts";
33
+ import "highlight.js/lib/core";
34
+ import "highlight.js/lib/languages/bash";
35
+ import "highlight.js/lib/languages/css";
36
+ import "highlight.js/lib/languages/go";
37
+ import "highlight.js/lib/languages/java";
38
+ import "highlight.js/lib/languages/javascript";
39
+ import "highlight.js/lib/languages/json";
40
+ import "highlight.js/lib/languages/markdown";
41
+ import "highlight.js/lib/languages/php";
42
+ import "highlight.js/lib/languages/python";
43
+ import "highlight.js/lib/languages/shell";
44
+ import "highlight.js/lib/languages/sql";
45
+ import "highlight.js/lib/languages/typescript";
46
+ import "highlight.js/lib/languages/xml";
33
47
  import "@ant-design/colors";
34
48
  import "@unocss/preset-icons/browser";
35
49
  import "@unocss/preset-typography";
@@ -60,12 +74,12 @@ const C = /* @__PURE__ */ u({
60
74
  onChildren: Function
61
75
  },
62
76
  setup(o) {
63
- const r = m(() => o.options?.col || 2), e = m(() => {
64
- const t = [...o.children || []], i = r.value;
65
- for (; t.length < i; )
77
+ const r = d(() => o.options?.col || 2), i = d(() => {
78
+ const t = [...o.children || []], e = r.value;
79
+ for (; t.length < e; )
66
80
  t.push([]);
67
- for (let l = 0; l < i; l++)
68
- Array.isArray(t[l]) || (t[l] = []);
81
+ for (let p = 0; p < e; p++)
82
+ Array.isArray(t[p]) || (t[p] = []);
69
83
  return t;
70
84
  });
71
85
  return () => {
@@ -73,18 +87,18 @@ const C = /* @__PURE__ */ u({
73
87
  return n(b, {
74
88
  cols: r.value,
75
89
  spac: o.options?.spac
76
- }, x(t = e.value.map((i, l) => {
77
- const d = i;
90
+ }, x(t = i.value.map((e, p) => {
91
+ const m = e;
78
92
  return n("div", {
79
- key: l,
93
+ key: p,
80
94
  class: v({
81
- "rounded border border-dashed border-accented": !d?.length
95
+ "rounded border border-dashed border-accented": !m?.length
82
96
  })
83
97
  }, [n(E, {
84
- modelValue: d,
98
+ modelValue: m,
85
99
  onUpdate: (s) => {
86
- const p = [...e.value];
87
- p[l] = s, o.onChildren?.(p);
100
+ const l = [...i.value];
101
+ l[p] = s, o.onChildren?.(l);
88
102
  }
89
103
  }, null)]);
90
104
  })) ? t : {
@@ -107,33 +121,33 @@ const C = /* @__PURE__ */ u({
107
121
  emit: r
108
122
  }) {
109
123
  const {
110
- t: e
124
+ t: i
111
125
  } = f(), t = h(o, "value", r);
112
126
  return () => n(y, {
113
- title: e("components.designEditor.grid.title"),
127
+ title: i("components.designEditor.grid.title"),
114
128
  icon: "i-tabler:grid-4x4"
115
129
  }, {
116
130
  default: () => [n(a, {
117
- label: e("components.designEditor.grid.columns"),
131
+ label: i("components.designEditor.grid.columns"),
118
132
  path: "col"
119
133
  }, {
120
134
  default: () => [n(c, {
121
135
  value: t.value.col,
122
- "onUpdate:value": (i) => t.value.col = i,
136
+ "onUpdate:value": (e) => t.value.col = e,
123
137
  min: 1,
124
138
  max: 12,
125
- placeholder: e("components.designEditor.grid.columnsPlaceholder")
139
+ placeholder: i("components.designEditor.grid.columnsPlaceholder")
126
140
  }, null)]
127
141
  }), n(a, {
128
- label: e("components.designEditor.grid.spacing"),
142
+ label: i("components.designEditor.grid.spacing"),
129
143
  path: "spac"
130
144
  }, {
131
145
  default: () => [n(c, {
132
146
  value: t.value.spac,
133
- "onUpdate:value": (i) => t.value.spac = i,
147
+ "onUpdate:value": (e) => t.value.spac = e,
134
148
  min: 0,
135
149
  max: 100,
136
- placeholder: e("components.designEditor.grid.spacingPlaceholder")
150
+ placeholder: i("components.designEditor.grid.spacingPlaceholder")
137
151
  }, null)]
138
152
  })]
139
153
  });
@@ -142,10 +156,10 @@ const C = /* @__PURE__ */ u({
142
156
  function j(o) {
143
157
  const {
144
158
  children: r,
145
- convertToJsonSchema: e
159
+ convertToJsonSchema: i
146
160
  } = o || {};
147
161
  let t = [];
148
- return r?.length && e && (t = r.flatMap((i) => Array.isArray(i) ? e(i) : [])), {
162
+ return r?.length && i && (t = r.flatMap((e) => Array.isArray(e) ? i(e) : [])), {
149
163
  tag: "dux-grid",
150
164
  attrs: {
151
165
  cols: o?.options?.col || 2,
@@ -154,7 +168,7 @@ function j(o) {
154
168
  children: t
155
169
  };
156
170
  }
157
- function Et(o) {
171
+ function Dt(o) {
158
172
  return {
159
173
  name: "dux-grid",
160
174
  icon: "i-tabler:grid-4x4",
@@ -171,5 +185,5 @@ function Et(o) {
171
185
  };
172
186
  }
173
187
  export {
174
- Et as duxFormEditorGrid
188
+ Dt as duxFormEditorGrid
175
189
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as m, inject as l, computed as p, createVNode as e } from "vue";
1
+ import { defineComponent as m, inject as l, computed as p, createVNode as o } from "vue";
2
2
  import "clsx";
3
3
  import "naive-ui";
4
4
  import "vue-echarts";
@@ -29,6 +29,20 @@ import "vue-draggable-plus";
29
29
  import "@vee-validate/i18n";
30
30
  import "colorizr";
31
31
  import "echarts";
32
+ import "highlight.js/lib/core";
33
+ import "highlight.js/lib/languages/bash";
34
+ import "highlight.js/lib/languages/css";
35
+ import "highlight.js/lib/languages/go";
36
+ import "highlight.js/lib/languages/java";
37
+ import "highlight.js/lib/languages/javascript";
38
+ import "highlight.js/lib/languages/json";
39
+ import "highlight.js/lib/languages/markdown";
40
+ import "highlight.js/lib/languages/php";
41
+ import "highlight.js/lib/languages/python";
42
+ import "highlight.js/lib/languages/shell";
43
+ import "highlight.js/lib/languages/sql";
44
+ import "highlight.js/lib/languages/typescript";
45
+ import "highlight.js/lib/languages/xml";
32
46
  import "@ant-design/colors";
33
47
  import "@unocss/preset-icons/browser";
34
48
  import "@unocss/preset-typography";
@@ -44,48 +58,48 @@ import { DuxFormLayout as a } from "../../form/formLayout.js";
44
58
  import "@iconify-json/tabler/icons.json";
45
59
  import "../../posterEditor/elements/index.js";
46
60
  import "fabric";
47
- const ot = /* @__PURE__ */ m({
61
+ const gt = /* @__PURE__ */ m({
48
62
  name: "WidgetEditorSetting",
49
63
  props: {
50
64
  actionRender: Function
51
65
  },
52
- setup(r) {
53
- const t = l("editor.use"), o = p(() => t?.getData(t.selected.value)), n = p(() => t?.components.value?.find((i) => i.name === o.value?.name));
54
- return () => e("div", {
66
+ setup(e) {
67
+ const t = l("editor.use"), i = p(() => t?.getData(t.selected.value)), n = p(() => t?.components.value?.find((r) => r.name === i.value?.name));
68
+ return () => o("div", {
55
69
  class: "flex-none p-2 max-w-full w-220px overflow-y-auto bg-default",
56
- key: o.value?.key
70
+ key: i.value?.key
57
71
  }, [n.value?.setting?.({
58
- value: o.value?.options,
59
- "update:modelValue": (i) => {
60
- o?.value && (o.value.options = i);
72
+ value: i.value?.options,
73
+ "update:modelValue": (r) => {
74
+ i?.value && (i.value.options = r);
61
75
  }
62
- }) || e("div", {
76
+ }) || o("div", {
63
77
  class: "flex flex-col gap-2 h-full"
64
- }, [e("div", {
78
+ }, [o("div", {
65
79
  class: "flex-1 min-h-0"
66
80
  }, [t?.settingPage?.component?.({
67
81
  value: t.value.value.config,
68
- "update:modelValue": (i) => {
69
- t.value.value.config = i;
82
+ "update:modelValue": (r) => {
83
+ t.value.value.config = r;
70
84
  }
71
- })]), r?.actionRender?.(t)])]);
85
+ })]), e?.actionRender?.(t)])]);
72
86
  }
73
- }), it = /* @__PURE__ */ m({
87
+ }), xt = /* @__PURE__ */ m({
74
88
  name: "WidgetEditorSettingCard",
75
89
  props: {
76
90
  title: String,
77
91
  icon: String
78
92
  },
79
- setup(r, {
93
+ setup(e, {
80
94
  slots: t
81
95
  }) {
82
- return () => e("div", {
96
+ return () => o("div", {
83
97
  class: "flex flex-col"
84
- }, [e("div", {
98
+ }, [o("div", {
85
99
  class: "bg-elevated rounded py-2 px-4 flex justify-center items-center gap-2"
86
- }, [e("div", null, [r.title])]), e("div", {
100
+ }, [o("div", null, [e.title])]), o("div", {
87
101
  class: "py-4 flex-1"
88
- }, [e(a, {
102
+ }, [o(a, {
89
103
  labelPlacement: "top"
90
104
  }, {
91
105
  default: () => [t.default?.()]
@@ -93,6 +107,6 @@ const ot = /* @__PURE__ */ m({
93
107
  }
94
108
  });
95
109
  export {
96
- ot as WidgetEditorSetting,
97
- it as WidgetEditorSettingCard
110
+ gt as WidgetEditorSetting,
111
+ xt as WidgetEditorSettingCard
98
112
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, computed as v, toRef as C, createVNode as e, Fragment as F, mergeProps as x, isVNode as D } from "vue";
1
+ import { defineComponent as b, computed as v, toRef as C, createVNode as i, Fragment as F, mergeProps as x, isVNode as D } from "vue";
2
2
  import { useI18n as E, useInvalidate as N, useExtendForm as h } from "@duxweb/dvha-core";
3
3
  import { useMessage as j, NButton as p, NScrollbar as w } from "naive-ui";
4
4
  import "clsx";
@@ -29,6 +29,20 @@ import "vue-draggable-plus";
29
29
  import "@vee-validate/i18n";
30
30
  import "colorizr";
31
31
  import "echarts";
32
+ import "highlight.js/lib/core";
33
+ import "highlight.js/lib/languages/bash";
34
+ import "highlight.js/lib/languages/css";
35
+ import "highlight.js/lib/languages/go";
36
+ import "highlight.js/lib/languages/java";
37
+ import "highlight.js/lib/languages/javascript";
38
+ import "highlight.js/lib/languages/json";
39
+ import "highlight.js/lib/languages/markdown";
40
+ import "highlight.js/lib/languages/php";
41
+ import "highlight.js/lib/languages/python";
42
+ import "highlight.js/lib/languages/shell";
43
+ import "highlight.js/lib/languages/sql";
44
+ import "highlight.js/lib/languages/typescript";
45
+ import "highlight.js/lib/languages/xml";
32
46
  import "@ant-design/colors";
33
47
  import "@unocss/preset-icons/browser";
34
48
  import "@unocss/preset-typography";
@@ -48,7 +62,7 @@ import "fabric";
48
62
  function s(t) {
49
63
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !D(t);
50
64
  }
51
- const Ot = /* @__PURE__ */ b({
65
+ const Ht = /* @__PURE__ */ b({
52
66
  name: "DuxDrawerForm",
53
67
  props: {
54
68
  id: {
@@ -88,7 +102,7 @@ const Ot = /* @__PURE__ */ b({
88
102
  } = E(), l = v(() => {
89
103
  const {
90
104
  onClose: o,
91
- onSuccess: i,
105
+ onSuccess: e,
92
106
  onError: P,
93
107
  action: _,
94
108
  title: k,
@@ -98,10 +112,10 @@ const Ot = /* @__PURE__ */ b({
98
112
  ...S
99
113
  } = t;
100
114
  return S;
101
- }), u = C(t, "data", {}), n = j(), {
115
+ }), u = C(t, "data", {}), m = j(), {
102
116
  invalidate: d
103
117
  } = N(), {
104
- isLoading: m,
118
+ isLoading: n,
105
119
  onSubmit: f,
106
120
  onReset: g,
107
121
  isEdit: y
@@ -111,42 +125,42 @@ const Ot = /* @__PURE__ */ b({
111
125
  form: u,
112
126
  action: t.action,
113
127
  onError: (o) => {
114
- n.error(o.message || r("components.form.error")), t.onError?.(o);
128
+ m.error(o.message || r("components.form.error")), t.onError?.(o);
115
129
  },
116
130
  onSuccess: (o) => {
117
- n.success(r("components.form.success")), t.onSuccess?.(o), t.onClose?.(), t.invalidate && d(t.invalidate);
131
+ m.success(r("components.form.success")), t.onSuccess?.(o), t.onClose?.(), t.invalidate && d(t.invalidate);
118
132
  }
119
133
  });
120
- return () => e(O, {
134
+ return () => i(O, {
121
135
  scrollbar: !1,
122
136
  title: t?.title || (y.value ? r("components.form.edit") : r("components.form.create")),
123
137
  onClose: t?.onClose
124
138
  }, {
125
- default: () => e(w, null, {
126
- default: () => [e(a, x({
139
+ default: () => i(w, null, {
140
+ default: () => [i(a, x({
127
141
  class: "p-4"
128
142
  }, l.value), {
129
143
  default: () => [c?.default?.()]
130
144
  })]
131
145
  }),
132
146
  footer: () => {
133
- let o, i;
134
- return e(F, null, [e(p, {
147
+ let o, e;
148
+ return i(F, null, [i(p, {
135
149
  onClick: g,
136
- loading: m.value
150
+ loading: n.value
137
151
  }, s(o = r("components.button.reset")) ? o : {
138
152
  default: () => [o]
139
- }), e(p, {
153
+ }), i(p, {
140
154
  type: "primary",
141
- loading: m.value,
155
+ loading: n.value,
142
156
  onClick: () => f()
143
- }, s(i = r("components.button.submit")) ? i : {
144
- default: () => [i]
157
+ }, s(e = r("components.button.submit")) ? e : {
158
+ default: () => [e]
145
159
  })]);
146
160
  }
147
161
  });
148
162
  }
149
163
  });
150
164
  export {
151
- Ot as DuxDrawerForm
165
+ Ht as DuxDrawerForm
152
166
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, computed as v, toRef as C, createVNode as e, Fragment as F, isVNode as x } from "vue";
1
+ import { defineComponent as b, computed as v, toRef as C, createVNode as r, Fragment as F, isVNode as x } from "vue";
2
2
  import { useI18n as E, useInvalidate as h, useExtendForm as j } from "@duxweb/dvha-core";
3
3
  import { useMessage as D, NButton as p } from "naive-ui";
4
4
  import "clsx";
@@ -30,6 +30,20 @@ import "vue-draggable-plus";
30
30
  import "@vee-validate/i18n";
31
31
  import "colorizr";
32
32
  import "echarts";
33
+ import "highlight.js/lib/core";
34
+ import "highlight.js/lib/languages/bash";
35
+ import "highlight.js/lib/languages/css";
36
+ import "highlight.js/lib/languages/go";
37
+ import "highlight.js/lib/languages/java";
38
+ import "highlight.js/lib/languages/javascript";
39
+ import "highlight.js/lib/languages/json";
40
+ import "highlight.js/lib/languages/markdown";
41
+ import "highlight.js/lib/languages/php";
42
+ import "highlight.js/lib/languages/python";
43
+ import "highlight.js/lib/languages/shell";
44
+ import "highlight.js/lib/languages/sql";
45
+ import "highlight.js/lib/languages/typescript";
46
+ import "highlight.js/lib/languages/xml";
33
47
  import "@ant-design/colors";
34
48
  import "@unocss/preset-icons/browser";
35
49
  import "@unocss/preset-typography";
@@ -48,7 +62,7 @@ import "fabric";
48
62
  function c(t) {
49
63
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
50
64
  }
51
- const Mt = /* @__PURE__ */ b({
65
+ const At = /* @__PURE__ */ b({
52
66
  name: "DuxModalForm",
53
67
  props: {
54
68
  id: {
@@ -88,7 +102,7 @@ const Mt = /* @__PURE__ */ b({
88
102
  } = E(), u = v(() => {
89
103
  const {
90
104
  onClose: o,
91
- onSuccess: r,
105
+ onSuccess: e,
92
106
  onError: N,
93
107
  action: O,
94
108
  title: _,
@@ -98,10 +112,10 @@ const Mt = /* @__PURE__ */ b({
98
112
  ...S
99
113
  } = t;
100
114
  return S;
101
- }), l = C(t, "data", {}), n = D(), {
115
+ }), l = C(t, "data", {}), m = D(), {
102
116
  invalidate: d
103
117
  } = h(), {
104
- isLoading: m,
118
+ isLoading: n,
105
119
  onSubmit: f,
106
120
  onReset: g,
107
121
  isEdit: y
@@ -111,37 +125,37 @@ const Mt = /* @__PURE__ */ b({
111
125
  form: l,
112
126
  action: t.action,
113
127
  onError: (o) => {
114
- n.error(o.message || i("components.form.error")), t.onError?.(o);
128
+ m.error(o.message || i("components.form.error")), t.onError?.(o);
115
129
  },
116
130
  onSuccess: (o) => {
117
- t.invalidate && d(t.invalidate), n.success(i("components.form.success")), t.onSuccess?.(o), t.onClose?.();
131
+ t.invalidate && d(t.invalidate), m.success(i("components.form.success")), t.onSuccess?.(o), t.onClose?.();
118
132
  }
119
133
  });
120
- return () => e(M, {
134
+ return () => r(M, {
121
135
  title: t?.title || (y.value ? i("components.form.edit") : i("components.form.create")),
122
136
  onClose: t?.onClose
123
137
  }, {
124
- default: () => e(a, u.value, {
138
+ default: () => r(a, u.value, {
125
139
  default: () => [s?.default?.()]
126
140
  }),
127
141
  footer: () => {
128
- let o, r;
129
- return e(F, null, [e(p, {
142
+ let o, e;
143
+ return r(F, null, [r(p, {
130
144
  onClick: g,
131
- loading: m.value
145
+ loading: n.value
132
146
  }, c(o = i("components.button.reset")) ? o : {
133
147
  default: () => [o]
134
- }), e(p, {
148
+ }), r(p, {
135
149
  type: "primary",
136
- loading: m.value,
150
+ loading: n.value,
137
151
  onClick: () => f()
138
- }, c(r = i("components.button.submit")) ? r : {
139
- default: () => [r]
152
+ }, c(e = i("components.button.submit")) ? e : {
153
+ default: () => [e]
140
154
  })]);
141
155
  }
142
156
  });
143
157
  }
144
158
  });
145
159
  export {
146
- Mt as DuxModalForm
160
+ At as DuxModalForm
147
161
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as f, toRef as b, createVNode as e } from "vue";
1
+ import { defineComponent as f, toRef as b, createVNode as o } from "vue";
2
2
  import { useI18n as g, useTabStore as y, useInvalidate as S, useExtendForm as x } from "@duxweb/dvha-core";
3
- import { useMessage as v, NButton as l, NScrollbar as h } from "naive-ui";
3
+ import { useMessage as v, NButton as p, NScrollbar as h } from "naive-ui";
4
4
  import { useRouter as E } from "vue-router";
5
5
  import "@overlastic/vue";
6
6
  import { DuxCard as F } from "../card/card.js";
@@ -37,6 +37,20 @@ import "pinia";
37
37
  import "@vee-validate/i18n";
38
38
  import "colorizr";
39
39
  import "echarts";
40
+ import "highlight.js/lib/core";
41
+ import "highlight.js/lib/languages/bash";
42
+ import "highlight.js/lib/languages/css";
43
+ import "highlight.js/lib/languages/go";
44
+ import "highlight.js/lib/languages/java";
45
+ import "highlight.js/lib/languages/javascript";
46
+ import "highlight.js/lib/languages/json";
47
+ import "highlight.js/lib/languages/markdown";
48
+ import "highlight.js/lib/languages/php";
49
+ import "highlight.js/lib/languages/python";
50
+ import "highlight.js/lib/languages/shell";
51
+ import "highlight.js/lib/languages/sql";
52
+ import "highlight.js/lib/languages/typescript";
53
+ import "highlight.js/lib/languages/xml";
40
54
  import "@ant-design/colors";
41
55
  import "@unocss/preset-icons/browser";
42
56
  import "@unocss/preset-typography";
@@ -46,7 +60,7 @@ import "@vee-validate/i18n/dist/locale/zh_CN.json";
46
60
  import "vue-command-palette";
47
61
  import { DuxPage as C } from "../../pages/page.js";
48
62
  import "../../pages/page404.js";
49
- const vt = /* @__PURE__ */ f({
63
+ const zt = /* @__PURE__ */ f({
50
64
  name: "DuxPageForm",
51
65
  props: {
52
66
  id: {
@@ -82,63 +96,63 @@ const vt = /* @__PURE__ */ f({
82
96
  }
83
97
  },
84
98
  setup(t, {
85
- slots: m
99
+ slots: n
86
100
  }) {
87
101
  const {
88
102
  t: i
89
- } = g(), p = b(t, "data", {}), a = v(), s = E(), n = y(), {
103
+ } = g(), l = b(t, "data", {}), a = v(), s = E(), m = y(), {
90
104
  invalidate: c
91
- } = S(), o = x({
105
+ } = S(), e = x({
92
106
  id: t.id,
93
107
  path: t.path,
94
- form: p,
108
+ form: l,
95
109
  action: t.action,
96
110
  onError: (r) => {
97
111
  a.error(r.message || i("components.form.error")), t.onError?.(r);
98
112
  },
99
113
  onSuccess: (r) => {
100
- a.success(i("components.form.success")), t.onSuccess?.(r), !o.isEdit.value && n.current && n.delTab(n.current, (d) => s.push(d.path || "")), t.invalidate && c(t.invalidate);
114
+ a.success(i("components.form.success")), t.onSuccess?.(r), !e.isEdit.value && m.current && m.delTab(m.current, (d) => s.push(d.path || "")), t.invalidate && c(t.invalidate);
101
115
  }
102
- }), u = n.tabs.find((r) => r.path === n.current);
103
- return () => e(C, {
116
+ }), u = m.tabs.find((r) => r.path === m.current);
117
+ return () => o(C, {
104
118
  card: !1,
105
119
  scrollbar: !1
106
120
  }, {
107
- default: () => [e(F, {
108
- title: t?.title || u?.label || (o.isEdit.value ? i("components.form.edit") : i("components.form.create")),
121
+ default: () => [o(F, {
122
+ title: t?.title || u?.label || (e.isEdit.value ? i("components.form.edit") : i("components.form.create")),
109
123
  description: t?.description,
110
124
  class: "h-full flex flex-col",
111
125
  contentClass: "flex-1 min-h-0",
112
126
  contentSize: "none",
113
127
  "header-bordered": !0
114
128
  }, {
115
- default: () => e(h, null, {
116
- default: () => [e(P, {
129
+ default: () => o(h, null, {
130
+ default: () => [o(P, {
117
131
  labelPlacement: t.labelPlacement,
118
132
  class: "p-4"
119
133
  }, {
120
- default: () => [m?.default?.(o)]
134
+ default: () => [n?.default?.(e)]
121
135
  })]
122
136
  }),
123
- headerExtra: () => e("div", {
137
+ headerExtra: () => o("div", {
124
138
  class: "flex gap-6 items-center"
125
- }, [m?.actions?.(o), e("div", {
139
+ }, [n?.actions?.(e), o("div", {
126
140
  class: "flex gap-2"
127
- }, [e(l, {
128
- onClick: () => o.onReset(),
129
- loading: o.isLoading.value
141
+ }, [o(p, {
142
+ onClick: () => e.onReset(),
143
+ loading: e.isLoading.value
130
144
  }, {
131
145
  default: () => i("components.button.reset"),
132
- icon: () => e("i", {
146
+ icon: () => o("i", {
133
147
  class: "i-tabler:refresh"
134
148
  }, null)
135
- }), e(l, {
149
+ }), o(p, {
136
150
  type: "primary",
137
- onClick: () => o.onSubmit(),
138
- loading: o.isLoading.value
151
+ onClick: () => e.onSubmit(),
152
+ loading: e.isLoading.value
139
153
  }, {
140
154
  default: () => i("components.button.submit"),
141
- icon: () => e("i", {
155
+ icon: () => o("i", {
142
156
  class: "i-tabler:device-floppy"
143
157
  }, null)
144
158
  })])])
@@ -147,5 +161,5 @@ const vt = /* @__PURE__ */ f({
147
161
  }
148
162
  });
149
163
  export {
150
- vt as DuxPageForm
164
+ zt as DuxPageForm
151
165
  };