vft 0.0.119 → 0.0.121

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 (81) hide show
  1. package/attributes.json +1 -1
  2. package/es/component.js +25 -23
  3. package/es/components/backtop/backtop.vue2.js +3 -2
  4. package/es/components/button/button.vue2.js +21 -21
  5. package/es/components/context-menu/context-menu.vue2.js +3 -2
  6. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +53 -57
  7. package/es/components/footer-layout/footer-layout.vue2.js +3 -2
  8. package/es/components/header-layout/header-layout.vue2.js +3 -2
  9. package/es/components/index.js +269 -261
  10. package/es/components/md-container/md-container.vue2.js +3 -2
  11. package/es/components/menu/menu-item.vue2.js +3 -2
  12. package/es/components/menu/sub-menu.vue2.js +3 -2
  13. package/es/components/message/message.vue2.js +12 -12
  14. package/es/components/modal/index.js +15 -0
  15. package/es/components/modal/modal.vue.js +4 -0
  16. package/es/components/modal/modal.vue2.js +92 -0
  17. package/es/components/modal/style/css.js +4 -0
  18. package/es/components/modal/style/index.js +4 -0
  19. package/es/components/modal/use/use-modal.js +95 -0
  20. package/es/components/multiple-tabs/multiple-tabs.vue2.js +15 -14
  21. package/es/components/multiple-tabs/tab-content.vue2.js +11 -12
  22. package/es/components/multiple-tabs/use/use-multiple-tabs.js +22 -23
  23. package/es/components/result/result.vue2.js +3 -2
  24. package/es/components/side-menu/side-menu.vue2.js +26 -25
  25. package/es/components/super-form/component-map.js +24 -23
  26. package/es/components/super-form/super-form-action.vue2.js +28 -29
  27. package/es/components/super-form/super-form-item.vue2.js +132 -123
  28. package/es/components/super-form/super-form.vue2.js +139 -136
  29. package/es/components/super-form/use/use-form-events.js +144 -139
  30. package/es/components/table/field.js +90 -52
  31. package/es/components/table/index.js +15 -12
  32. package/es/components/table/types.js +1 -0
  33. package/es/components/tabs/tab-nav.vue2.js +3 -2
  34. package/es/components/upload/upload-content.vue2.js +2 -2
  35. package/es/components/upload/upload.vue2.js +40 -49
  36. package/es/index.js +354 -346
  37. package/es/package.json.js +1 -1
  38. package/lib/component.cjs +1 -1
  39. package/lib/components/backtop/backtop.vue2.cjs +1 -1
  40. package/lib/components/button/button.vue2.cjs +1 -1
  41. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  42. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  43. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  44. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  45. package/lib/components/index.cjs +1 -1
  46. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  47. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  48. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  49. package/lib/components/message/message.vue2.cjs +1 -1
  50. package/lib/components/modal/index.cjs +1 -0
  51. package/lib/components/modal/modal.vue.cjs +1 -0
  52. package/lib/components/modal/modal.vue2.cjs +1 -0
  53. package/lib/components/modal/style/css.cjs +1 -0
  54. package/lib/components/modal/style/index.cjs +1 -0
  55. package/lib/components/modal/use/use-modal.cjs +1 -0
  56. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  57. package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
  58. package/lib/components/multiple-tabs/use/use-multiple-tabs.cjs +1 -1
  59. package/lib/components/result/result.vue2.cjs +1 -1
  60. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  61. package/lib/components/super-form/component-map.cjs +1 -1
  62. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  63. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  64. package/lib/components/super-form/super-form.vue2.cjs +1 -1
  65. package/lib/components/super-form/use/use-form-events.cjs +1 -1
  66. package/lib/components/table/field.cjs +1 -1
  67. package/lib/components/table/index.cjs +1 -1
  68. package/lib/components/table/types.cjs +1 -0
  69. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  70. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  71. package/lib/components/upload/upload.vue2.cjs +1 -1
  72. package/lib/index.cjs +1 -1
  73. package/lib/package.json.cjs +1 -1
  74. package/package.json +3 -3
  75. package/tags.json +1 -1
  76. package/theme-style/src/index.scss +1 -0
  77. package/theme-style/src/modal.scss +0 -0
  78. package/theme-style/vft-modal.css +0 -0
  79. package/web-types.json +1 -1
  80. /package/es/components/{table/type.js → modal/types.js} +0 -0
  81. /package/lib/components/{table/type.cjs → modal/types.cjs} +0 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent as I, toRefs as ne, useSlots as re, getCurrentInstance as le, ref as C, computed as g, h as M, createVNode as f, onMounted as ie, nextTick as ae, watch as pe, isVNode as ue } from "vue";
1
+ import { defineComponent as I, toRefs as re, useSlots as ne, getCurrentInstance as le, ref as C, computed as g, h as M, createVNode as f, onMounted as ie, nextTick as ae, watch as pe, isVNode as ue } from "vue";
2
2
  import "../divider/index.js";
3
3
  import { VftIcon as se } from "../icon/index.js";
4
4
  import "../avatar/index.js";
@@ -76,6 +76,7 @@ import "../autocomplete/index.js";
76
76
  import "../super-form/index.js";
77
77
  import "../progress/index.js";
78
78
  import "../upload/index.js";
79
+ import "../modal/index.js";
79
80
  import "../md-container/index.js";
80
81
  import "../md-comment/index.js";
81
82
  import "../md-tabs/index.js";
@@ -101,7 +102,7 @@ function Ce(b) {
101
102
  }
102
103
  const Me = I({
103
104
  name: "vft-side-menu"
104
- }), po = /* @__PURE__ */ I({
105
+ }), uo = /* @__PURE__ */ I({
105
106
  ...Me,
106
107
  props: {
107
108
  isFixedLeft: {
@@ -172,7 +173,7 @@ const Me = I({
172
173
  uniqueOpened: P,
173
174
  defaultOpeneds: x,
174
175
  openMenuCollapse: H
175
- } = ne(t), l = re(), B = le(), _ = C(), a = g(() => ({
176
+ } = re(t), l = ne(), B = le(), _ = C(), a = g(() => ({
176
177
  path: "path",
177
178
  children: "children",
178
179
  title: "title",
@@ -186,12 +187,12 @@ const Me = I({
186
187
  !e || (o = e.meta) != null && o.hideSide && !t.useRouterJump || (_.value = e.path);
187
188
  });
188
189
  const U = (e) => {
189
- var n;
190
+ var r;
190
191
  const o = e.e;
191
192
  if (t.autoScrollActiveDom && o) {
192
- const p = fe(t.autoScrollActiveDom) ? t.autoScrollActiveDom : 0, r = o.target;
193
- (n = y.value) != null && n.menu && r && setTimeout(() => {
194
- y.value.menu.scrollTop = y.value.menu.scrollTop + (r.getBoundingClientRect().top - y.value.menu.getBoundingClientRect().top) + p;
193
+ const p = fe(t.autoScrollActiveDom) ? t.autoScrollActiveDom : 0, n = o.target;
194
+ (r = y.value) != null && r.menu && n && setTimeout(() => {
195
+ y.value.menu.scrollTop = y.value.menu.scrollTop + (n.getBoundingClientRect().top - y.value.menu.getBoundingClientRect().top) + p;
195
196
  }, 300);
196
197
  }
197
198
  c("subMenuClick", e);
@@ -200,8 +201,8 @@ const Me = I({
200
201
  }, Z = (e) => {
201
202
  c("menuItemMouseleave", e);
202
203
  }, T = (e, o) => {
203
- const n = e[a.value.path], p = e[a.value.title], r = e == null ? void 0 : e[a.value.children], m = e == null ? void 0 : e[a.value.index], s = e == null ? void 0 : e[a.value.icon], d = !!(e != null && e[a.value.disabled]), v = t.disabledJudgeTurnOver ? !d : d, N = m || n || o + p;
204
- return r != null && r.length ? M(
204
+ const r = e[a.value.path], p = e[a.value.title], n = e == null ? void 0 : e[a.value.children], m = e == null ? void 0 : e[a.value.index], s = e == null ? void 0 : e[a.value.icon], d = !!(e != null && e[a.value.disabled]), v = t.disabledJudgeTurnOver ? !d : d, N = m || r || o + p;
205
+ return n != null && n.length ? M(
205
206
  // @ts-ignore
206
207
  ce,
207
208
  {
@@ -215,7 +216,7 @@ const Me = I({
215
216
  popperClass: u.e("popper")
216
217
  },
217
218
  {
218
- default: () => r == null ? void 0 : r.map((i, X) => {
219
+ default: () => n == null ? void 0 : n.map((i, X) => {
219
220
  var V;
220
221
  const w = i[a.value.path], W = i[a.value.index], ee = i[a.value.icon], te = i[a.value.title], A = !!i[a.value.disabled], oe = t.disabledJudgeTurnOver ? !A : A;
221
222
  return (V = i == null ? void 0 : i[a.value.children]) != null && V.length ? T(i, X) : (
@@ -239,10 +240,10 @@ const Me = I({
239
240
  }
240
241
  ) : M(j, {
241
242
  ...e,
242
- key: m || n,
243
- index: m || n,
243
+ key: m || r,
244
+ index: m || r,
244
245
  title: p,
245
- route: n,
246
+ route: r,
246
247
  icon: s,
247
248
  disabled: t.openDisabled && v,
248
249
  onMouseenter: () => F(e),
@@ -260,7 +261,7 @@ const Me = I({
260
261
  } : {},
261
262
  height: `calc(100% - ${t.menuTopBottomHeight}px)`
262
263
  })), z = g(() => {
263
- var o, n;
264
+ var o, r;
264
265
  let e;
265
266
  return M(f(de, {
266
267
  ref: y,
@@ -268,25 +269,25 @@ const Me = I({
268
269
  onOpen: U,
269
270
  defaultActive: (S == null ? void 0 : S.value) || _.value,
270
271
  defaultOpeneds: x == null ? void 0 : x.value,
271
- class: [u.e("con"), (o = t.dragOption) != null && o.dragClassName ? u.e((n = t.dragOption) == null ? void 0 : n.dragClassName) : ""],
272
+ class: [u.e("con"), (o = t.dragOption) != null && o.dragClassName ? u.e((r = t.dragOption) == null ? void 0 : r.dragClassName) : ""],
272
273
  style: $.value,
273
274
  collapse: H.value ? h.value : !1,
274
275
  uniqueOpened: P.value,
275
276
  collapseTransition: !1
276
- }, Ce(e = t.menus.map((p, r) => T(p, r))) ? e : {
277
+ }, Ce(e = t.menus.map((p, n) => T(p, n))) ? e : {
277
278
  default: () => [e]
278
279
  }));
279
280
  }), D = B.appContext.config.globalProperties.$router;
280
281
  async function Y(e) {
281
- var o, n, p;
282
+ var o, r, p;
282
283
  if (t.useRouterJump) {
283
284
  const {
284
- go: r
285
+ go: n
285
286
  } = ge(D), m = e.route;
286
287
  let s = e.route;
287
288
  e.indexPath.some((v) => me(v)) && (s = e.indexPath.slice(-2).join("/"));
288
- const d = (p = (n = (o = D.getRoutes().filter((v) => v.path === s)) == null ? void 0 : o[0]) == null ? void 0 : n.meta) == null ? void 0 : p.linkTarget;
289
- r(d ? {
289
+ const d = (p = (r = (o = D.getRoutes().filter((v) => v.path === s)) == null ? void 0 : o[0]) == null ? void 0 : r.meta) == null ? void 0 : p.linkTarget;
290
+ n(d ? {
290
291
  url: m,
291
292
  winOpenOpt: {
292
293
  target: d
@@ -297,10 +298,10 @@ const Me = I({
297
298
  }
298
299
  ie(() => {
299
300
  ae(() => {
300
- var e, o, n;
301
+ var e, o, r;
301
302
  if ((e = t.dragOption) != null && e.dragClassName) {
302
- const p = (n = document.querySelectorAll("." + u.e((o = t.dragOption) == null ? void 0 : o.dragClassName))) == null ? void 0 : n[0], {
303
- initSortable: r
303
+ const p = (r = document.querySelectorAll("." + u.e((o = t.dragOption) == null ? void 0 : o.dragClassName))) == null ? void 0 : r[0], {
304
+ initSortable: n
304
305
  } = be(p, {
305
306
  draggable: ".vft-menu-item",
306
307
  onEnd: (m) => {
@@ -312,7 +313,7 @@ const Me = I({
312
313
  },
313
314
  ...t.dragOption
314
315
  });
315
- r();
316
+ n();
316
317
  }
317
318
  });
318
319
  });
@@ -359,5 +360,5 @@ const Me = I({
359
360
  }
360
361
  });
361
362
  export {
362
- po as default
363
+ uo as default
363
364
  };
@@ -25,7 +25,7 @@ import "../descriptions/index.js";
25
25
  import "../full-screen/index.js";
26
26
  import "../icon-text/index.js";
27
27
  import "../image/index.js";
28
- import { VftInput as r } from "../input/index.js";
28
+ import { VftInput as e } from "../input/index.js";
29
29
  import "../link/index.js";
30
30
  import "../pagination/index.js";
31
31
  import "../tag/index.js";
@@ -61,7 +61,7 @@ import "../col/index.js";
61
61
  import "../row/index.js";
62
62
  import "../horizontal-menu/index.js";
63
63
  import { VftTimePicker as I } from "../time-picker/index.js";
64
- import { VftDatePicker as e } from "../date-picker/index.js";
64
+ import { VftDatePicker as r } from "../date-picker/index.js";
65
65
  import "../check-tag/index.js";
66
66
  import "../tree/index.js";
67
67
  import "../skeleton/index.js";
@@ -76,6 +76,7 @@ import "../autocomplete/index.js";
76
76
  import "./index.js";
77
77
  import "../progress/index.js";
78
78
  import "../upload/index.js";
79
+ import "../modal/index.js";
79
80
  import "../md-container/index.js";
80
81
  import "../md-comment/index.js";
81
82
  import "../md-tabs/index.js";
@@ -91,10 +92,10 @@ import "@vueuse/core";
91
92
  import "../../utils/ns-cover.js";
92
93
  var T = /* @__PURE__ */ ((t) => (t.INPUT = "input", t.INPUT_NUMBER = "input-number", t.INPUT_NUMBER_STEP = "input-number-step", t.PASSWORD = "password", t.TEXTAREA = "textarea", t.DIVIDER = "divider", t.SELECT = "select", t.RADIO = "radio", t.RADIO_SINGLE = "radio_single", t.RADIO_BUTTON = "radio-button", t.CHECKBOX = "checkbox", t.CHECKBOX_SINGLE = "checkbox_single", t.CHECKBOX_BUTTON = "checkbox-button", t.SWITCH = "switch", t.TIME_PICKER = "time-picker", t.YEAR_PICKER = "year", t.MONTH_PICKER = "month", t.DATE_PICKER = "date", t.DATES_PICKER = "dates", t.DATETIME_PICKER = "datetime", t.WEEK_PICKER = "week", t.DATETIMERANGE_PICKER = "datetimerange", t.DATERANGE_PICKER = "daterange", t.MONTHRANGE_PICKER = "monthrange", t))(T || {});
93
94
  const i = /* @__PURE__ */ new Map();
94
- i.set("input", r);
95
- i.set("password", r);
96
- i.set("textarea", r);
97
- i.set("input-number", r);
95
+ i.set("input", e);
96
+ i.set("password", e);
97
+ i.set("textarea", e);
98
+ i.set("input-number", e);
98
99
  i.set("input-number-step", R);
99
100
  i.set("switch", n);
100
101
  i.set("select", c);
@@ -106,27 +107,27 @@ i.set("checkbox_single", s);
106
107
  i.set("checkbox-button", o);
107
108
  i.set("divider", m);
108
109
  i.set("time-picker", I);
109
- i.set("year", e);
110
- i.set("month", e);
111
- i.set("date", e);
112
- i.set("dates", e);
113
- i.set("datetime", e);
114
- i.set("week", e);
115
- i.set("datetimerange", e);
116
- i.set("daterange", e);
117
- i.set("monthrange", e);
118
- function Ct(t, a) {
110
+ i.set("year", r);
111
+ i.set("month", r);
112
+ i.set("date", r);
113
+ i.set("dates", r);
114
+ i.set("datetime", r);
115
+ i.set("week", r);
116
+ i.set("datetimerange", r);
117
+ i.set("daterange", r);
118
+ i.set("monthrange", r);
119
+ function Ft(t, a) {
119
120
  i.set(t, a);
120
121
  }
121
- function Ft(t) {
122
+ function ti(t) {
122
123
  i.delete(t);
123
124
  }
124
- const ti = (t) => [
125
+ const ii = (t) => [
125
126
  "datetimerange",
126
127
  "daterange",
127
128
  "monthrange"
128
129
  /* MONTHRANGE_PICKER */
129
- ].includes(t), ii = (t) => [
130
+ ].includes(t), ri = (t) => [
130
131
  "input",
131
132
  "input-number",
132
133
  "password",
@@ -146,10 +147,10 @@ const ti = (t) => [
146
147
  ].includes(t);
147
148
  export {
148
149
  T as FormCompEnum,
149
- Ct as add,
150
+ Ft as add,
150
151
  i as componentMap,
151
- Ft as del,
152
+ ti as del,
152
153
  ei as isDatePicker,
153
- ii as isInput,
154
- ti as isRangePicker
154
+ ri as isInput,
155
+ ii as isRangePicker
155
156
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, computed as p, openBlock as e, createBlock as n, unref as t, normalizeProps as k, guardReactiveProps as y, withCtx as m, createVNode as h, normalizeClass as v, mergeProps as u, createTextVNode as a, toDisplayString as l, createCommentVNode as c, renderSlot as f } from "vue";
1
+ import { defineComponent as k, computed as p, openBlock as e, createBlock as n, unref as t, normalizeProps as y, guardReactiveProps as g, withCtx as i, createVNode as v, normalizeClass as h, mergeProps as a, createTextVNode as u, toDisplayString as c, createCommentVNode as l, renderSlot as f } from "vue";
2
2
  import { useNamespace as R } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
@@ -83,6 +83,7 @@ import "../autocomplete/index.js";
83
83
  import "./index.js";
84
84
  import "../progress/index.js";
85
85
  import "../upload/index.js";
86
+ import "../modal/index.js";
86
87
  import "../md-container/index.js";
87
88
  import "../md-comment/index.js";
88
89
  import "../md-tabs/index.js";
@@ -90,7 +91,7 @@ import "../md-vue-playground/index.js";
90
91
  import "../md-code-demo/index.js";
91
92
  import "../md-code-tabs/index.js";
92
93
  import "../message/index.js";
93
- const Bo = /* @__PURE__ */ g({
94
+ const bo = /* @__PURE__ */ k({
94
95
  __name: "super-form-action",
95
96
  props: {
96
97
  showResetButton: { type: Boolean },
@@ -101,54 +102,52 @@ const Bo = /* @__PURE__ */ g({
101
102
  commonButtonOptions: {},
102
103
  actionRowOptions: {}
103
104
  },
104
- setup(i) {
105
- const r = R("form-action");
106
- console.log(i.showCommonButton);
107
- const {
105
+ setup(r) {
106
+ const m = R("form-action"), {
108
107
  resetAction: d,
109
108
  submitAction: w
110
109
  } = T(), C = p(() => ({
111
110
  justify: "end",
112
- ...i.actionRowOptions
113
- })), b = p(() => Object.assign({ btnText: "重置" }, i.resetButtonOptions)), s = p(() => Object.assign({ btnText: "确认" }, i.submitButtonOptions)), O = p(() => Object.assign({ btnText: "取消" }, i.commonButtonOptions));
114
- return (o, S) => (e(), n(t(x), k(y(C.value)), {
115
- default: m(() => [
116
- h(t(V), {
117
- class: v([{ "submit-block": s.value.block }, t(r).b()])
111
+ ...r.actionRowOptions
112
+ })), b = p(() => Object.assign({ btnText: "重置" }, r.resetButtonOptions)), s = p(() => Object.assign({ btnText: "确认" }, r.submitButtonOptions)), O = p(() => Object.assign({ btnText: "取消" }, r.commonButtonOptions));
113
+ return (o, S) => (e(), n(t(x), y(g(C.value)), {
114
+ default: i(() => [
115
+ v(t(V), {
116
+ class: h([{ "submit-block": s.value.block }, t(m).b()])
118
117
  }, {
119
- default: m(() => [
120
- o.showCommonButton ? (e(), n(t(B), u({ key: 0 }, O.value, {
121
- class: t(r).e("common")
118
+ default: i(() => [
119
+ o.showCommonButton ? (e(), n(t(B), a({ key: 0 }, O.value, {
120
+ class: t(m).e("common")
122
121
  }), {
123
- default: m(() => [
124
- a(l(O.value.btnText), 1)
122
+ default: i(() => [
123
+ u(c(O.value.btnText), 1)
125
124
  ]),
126
125
  _: 1
127
- }, 16, ["class"])) : c("", !0),
126
+ }, 16, ["class"])) : l("", !0),
128
127
  f(o.$slots, "resetBefore"),
129
- o.showResetButton ? (e(), n(t(B), u({
128
+ o.showResetButton ? (e(), n(t(B), a({
130
129
  key: 1,
131
130
  type: "warning"
132
131
  }, b.value, {
133
132
  onClick: t(d),
134
- class: t(r).e("reset")
133
+ class: t(m).e("reset")
135
134
  }), {
136
- default: m(() => [
137
- a(l(b.value.btnText), 1)
135
+ default: i(() => [
136
+ u(c(b.value.btnText), 1)
138
137
  ]),
139
138
  _: 1
140
- }, 16, ["onClick", "class"])) : c("", !0),
139
+ }, 16, ["onClick", "class"])) : l("", !0),
141
140
  f(o.$slots, "submitBefore"),
142
- o.showSubmitButton ? (e(), n(t(B), u({
141
+ o.showSubmitButton ? (e(), n(t(B), a({
143
142
  key: 2,
144
143
  type: "primary",
145
- class: t(r).e("submit")
144
+ class: t(m).e("submit")
146
145
  }, s.value, { onClick: t(w) }), {
147
- default: m(() => [
148
- a(l(s.value.btnText), 1)
146
+ default: i(() => [
147
+ u(c(s.value.btnText), 1)
149
148
  ]),
150
149
  _: 1
151
- }, 16, ["class", "onClick"])) : c("", !0),
150
+ }, 16, ["class", "onClick"])) : l("", !0),
152
151
  f(o.$slots, "submitAfter")
153
152
  ]),
154
153
  _: 3
@@ -159,5 +158,5 @@ const Bo = /* @__PURE__ */ g({
159
158
  }
160
159
  });
161
160
  export {
162
- Bo as default
161
+ bo as default
163
162
  };