@aplus-frontend/ui 6.32.0 → 6.34.0

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 (78) hide show
  1. package/es/index.mjs +39 -37
  2. package/es/src/ag-grid/components/tooltip/index.vue.d.ts +6 -0
  3. package/es/src/ag-grid/components/tooltip/index.vue.mjs +4 -0
  4. package/es/src/ag-grid/components/tooltip/index.vue2.mjs +29 -0
  5. package/es/src/ag-grid/editable/form-item.vue.d.ts +16 -0
  6. package/es/src/ag-grid/editable/form-item.vue.mjs +215 -0
  7. package/es/src/ag-grid/editable/form-item.vue2.mjs +4 -0
  8. package/es/src/ag-grid/hooks/use-columns-def.d.ts +1 -0
  9. package/es/src/ag-grid/hooks/use-columns-def.mjs +94 -87
  10. package/es/src/ag-grid/hooks/use-editable-api.mjs +39 -39
  11. package/es/src/ag-grid/hooks/use-editable-form-item-api.d.ts +2 -1
  12. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +174 -0
  13. package/es/src/ag-grid/index.d.ts +2 -1
  14. package/es/src/ag-grid/index.mjs +1 -0
  15. package/es/src/ag-grid/index.vue.mjs +109 -111
  16. package/es/src/ap-download/ap-download.vue.mjs +31 -25
  17. package/es/src/ap-drawer/interface.d.ts +5 -0
  18. package/es/src/ap-drawer/utils/createDrawer.mjs +22 -19
  19. package/es/src/ap-modal/index.d.ts +1 -0
  20. package/es/src/ap-modal/index.mjs +29 -27
  21. package/es/src/ap-modal/interface.d.ts +5 -0
  22. package/es/src/ap-modal/utils/confirm.mjs +35 -34
  23. package/es/src/ap-modal/utils/createModal.mjs +39 -37
  24. package/es/src/ap-modal/utils/util.d.ts +3 -0
  25. package/es/src/ap-modal/utils/util.mjs +8 -2
  26. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +21 -18
  27. package/es/src/business/ap-view/ap-view.vue2.mjs +20 -18
  28. package/es/src/business/ap-view/interface.d.ts +4 -0
  29. package/es/src/config-provider/config-provider.mjs +32 -24
  30. package/es/src/index.mjs +15 -13
  31. package/es/src/version.d.ts +1 -1
  32. package/es/src/version.mjs +1 -1
  33. package/lib/index.js +1 -1
  34. package/lib/src/ag-grid/components/tooltip/index.vue.d.ts +6 -0
  35. package/lib/src/ag-grid/components/tooltip/index.vue.js +1 -0
  36. package/lib/src/ag-grid/components/tooltip/index.vue2.js +1 -0
  37. package/lib/src/ag-grid/editable/form-item.vue.d.ts +16 -0
  38. package/lib/src/ag-grid/editable/form-item.vue.js +1 -0
  39. package/lib/src/ag-grid/editable/form-item.vue2.js +1 -0
  40. package/lib/src/ag-grid/hooks/use-columns-def.d.ts +1 -0
  41. package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
  42. package/lib/src/ag-grid/hooks/use-editable-api.js +1 -1
  43. package/lib/src/ag-grid/hooks/use-editable-form-item-api.d.ts +2 -1
  44. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -0
  45. package/lib/src/ag-grid/index.d.ts +2 -1
  46. package/lib/src/ag-grid/index.js +1 -1
  47. package/lib/src/ag-grid/index.vue.js +1 -1
  48. package/lib/src/ap-download/ap-download.vue.js +1 -1
  49. package/lib/src/ap-drawer/interface.d.ts +5 -0
  50. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  51. package/lib/src/ap-modal/index.d.ts +1 -0
  52. package/lib/src/ap-modal/index.js +1 -1
  53. package/lib/src/ap-modal/interface.d.ts +5 -0
  54. package/lib/src/ap-modal/utils/confirm.js +1 -1
  55. package/lib/src/ap-modal/utils/createModal.js +1 -1
  56. package/lib/src/ap-modal/utils/util.d.ts +3 -0
  57. package/lib/src/ap-modal/utils/util.js +1 -1
  58. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  59. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  60. package/lib/src/business/ap-view/interface.d.ts +4 -0
  61. package/lib/src/config-provider/config-provider.js +1 -1
  62. package/lib/src/index.js +1 -1
  63. package/lib/src/version.d.ts +1 -1
  64. package/lib/src/version.js +1 -1
  65. package/package.json +1 -1
  66. package/theme/ag-grid/index.css +7 -2
  67. package/theme/ag-grid/index.less +6 -1
  68. package/theme/ap-form/ap-form-item.css +1 -1
  69. package/theme/ap-form/ap-form-item.less +1 -1
  70. package/theme/ap-form/index.css +1 -1
  71. package/theme/ap-form/search-form.css +1 -1
  72. package/theme/ap-grid/index.css +1 -1
  73. package/theme/ap-table/ap-table.css +1 -1
  74. package/theme/ap-table-modal/index.css +1 -1
  75. package/theme/css-var.css +2 -0
  76. package/theme/css-var.less +4 -0
  77. package/theme/editable-table/index.css +1 -1
  78. package/theme/index.css +9 -2
@@ -1,12 +1,13 @@
1
- import { Modal as c } from "@aplus-frontend/antdv";
1
+ import { Modal as m } from "@aplus-frontend/antdv";
2
2
  import "./utils/index.mjs";
3
- import { omit as m } from "lodash-unified";
4
- import t, { withWarn as f, withInfo as a, withSuccess as s, withError as l, withConfirm as u } from "./utils/confirm.mjs";
5
- import i from "./utils/destroyFns.mjs";
3
+ import { omit as a } from "lodash-unified";
4
+ import t, { withWarn as c, withInfo as f, withSuccess as l, withError as s, withConfirm as p } from "./utils/confirm.mjs";
5
+ import e from "./utils/destroyFns.mjs";
6
+ import { setModalGlobalAppContext as u } from "./utils/util.mjs";
6
7
  import "./interface.mjs";
7
- import { createModal as p } from "./utils/createModal.mjs";
8
- import { createModalStream as d } from "./utils/createModalStream.mjs";
9
- const o = m(c, [
8
+ import { createModal as d } from "./utils/createModal.mjs";
9
+ import { createModalStream as w } from "./utils/createModalStream.mjs";
10
+ const r = a(m, [
10
11
  "confirm",
11
12
  "warning",
12
13
  "warn",
@@ -14,32 +15,33 @@ const o = m(c, [
14
15
  "success",
15
16
  "info"
16
17
  ]);
17
- o.createModal = p;
18
- o.createModalStream = d;
19
- function e(n) {
20
- return t(f(n));
18
+ r.createModal = d;
19
+ r.createModalStream = w;
20
+ function i(n) {
21
+ return t(c(n));
21
22
  }
22
- o.info = function(r) {
23
- return t(a(r));
23
+ r.info = function(o) {
24
+ return t(f(o));
24
25
  };
25
- o.success = function(r) {
26
- return t(s(r));
26
+ r.success = function(o) {
27
+ return t(l(o));
27
28
  };
28
- o.error = function(r) {
29
- return t(l(r));
29
+ r.error = function(o) {
30
+ return t(s(o));
30
31
  };
31
- o.warning = e;
32
- o.warn = e;
33
- o.confirm = function(r) {
34
- return t(u(r));
32
+ r.warning = i;
33
+ r.warn = i;
34
+ r.confirm = function(o) {
35
+ return t(p(o));
35
36
  };
36
- o.destroyAll = function() {
37
- for (; i.length; ) {
38
- const r = i.pop();
39
- r && r();
37
+ r.destroyAll = function() {
38
+ for (; e.length; ) {
39
+ const o = e.pop();
40
+ o && o();
40
41
  }
41
42
  };
42
- o.name = "ApModal";
43
+ r.setModalGlobalAppContext = u;
44
+ r.name = "ApModal";
43
45
  export {
44
- o as ApModal
46
+ r as ApModal
45
47
  };
@@ -1,5 +1,6 @@
1
1
  import { ModalProps, ModalFuncProps } from '@aplus-frontend/antdv';
2
2
  import { ModalFunc, ModalStaticFunctions } from '@aplus-frontend/antdv/lib/modal/confirm';
3
+ import { AppContext } from 'vue';
3
4
  export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer' | 'icon'> & Partial<{
4
5
  /**
5
6
  * 点击取消回调
@@ -29,6 +30,10 @@ export type CreateModalFuncProps<ContentRecord = any> = Omit<ModalProps, 'open'
29
30
  * 自适应高度
30
31
  */
31
32
  wrapperOffset: boolean | number;
33
+ /**
34
+ * 弹窗的上下文,一般用于获取全局注册组件、vuex 等内容
35
+ */
36
+ appContext: AppContext;
32
37
  }>;
33
38
  export type CreateModalFuncReturn = {
34
39
  /**
@@ -1,76 +1,77 @@
1
- import { render as s, cloneVNode as h, createVNode as a, mergeProps as m } from "vue";
2
- import P from "@aplus-frontend/antdv/es/modal/ConfirmDialog";
3
- import { omit as b } from "lodash-unified";
1
+ import { render as s, cloneVNode as h, createVNode as p, mergeProps as m } from "vue";
2
+ import b from "@aplus-frontend/antdv/es/modal/ConfirmDialog";
3
+ import { omit as P } from "lodash-unified";
4
4
  import "../../config-provider/index.mjs";
5
5
  import { getConfirmLocale as w } from "@aplus-frontend/antdv/es/modal/locale";
6
6
  import { globalConfigForApi as v } from "@aplus-frontend/antdv/es/config-provider";
7
7
  import c from "./destroyFns.mjs";
8
+ import { getModalGlobalAppContext as A } from "./util.mjs";
8
9
  import { globalConfigCached as D, ConfigProvider as F } from "../../config-provider/config-provider.mjs";
9
- const A = (e) => {
10
+ const G = (e) => {
10
11
  const f = document.createDocumentFragment();
11
12
  let n = {
12
- ...b(e, ["parentContext", "appContext"]),
13
+ ...P(e, ["parentContext", "appContext"]),
13
14
  close: l,
14
15
  open: !0,
15
16
  centered: !0
16
17
  }, i = null;
17
- function x(...t) {
18
+ function x(...o) {
18
19
  i && (s(null, f), i = null);
19
- const r = t.some((o) => o && o.triggerCancel);
20
+ const r = o.some((t) => t && t.triggerCancel);
20
21
  e.onCancel && r && e.onCancel(() => {
21
- }, ...t.slice(1));
22
- for (let o = 0; o < c.length; o++)
23
- if (c[o] === l) {
24
- c.splice(o, 1);
22
+ }, ...o.slice(1));
23
+ for (let t = 0; t < c.length; t++)
24
+ if (c[t] === l) {
25
+ c.splice(t, 1);
25
26
  break;
26
27
  }
27
28
  }
28
- function l(...t) {
29
+ function l(...o) {
29
30
  n = {
30
31
  ...n,
31
32
  open: !1,
32
33
  afterClose: () => {
33
- typeof e.afterClose == "function" && e.afterClose(), x.apply(this, t);
34
+ typeof e.afterClose == "function" && e.afterClose(), x.apply(this, o);
34
35
  }
35
- }, n.visible && delete n.visible, p(n);
36
+ }, n.visible && delete n.visible, a(n);
36
37
  }
37
- function p(t) {
38
- typeof t == "function" ? n = t(n) : n = {
38
+ function a(o) {
39
+ typeof o == "function" ? n = o(n) : n = {
39
40
  ...n,
40
- ...t
41
+ ...o
41
42
  }, i && s(h(i, {
42
43
  ...n
43
44
  }), f);
44
45
  }
45
- const d = (t) => {
46
+ const d = (o) => {
46
47
  const r = {
47
48
  ...v,
48
49
  ...D.value
49
- }, o = r.prefixCls, u = t.prefixCls || `${o}-modal`, g = r.iconPrefixCls, C = w();
50
- return a(F, m(r, {
51
- prefixCls: o
50
+ }, t = r.prefixCls, u = o.prefixCls || `${t}-modal`, y = r.iconPrefixCls, C = w();
51
+ return p(F, m(r, {
52
+ prefixCls: t
52
53
  }), {
53
- default: () => [a(P, m(t, {
54
- rootPrefixCls: o,
54
+ default: () => [p(b, m(o, {
55
+ rootPrefixCls: t,
55
56
  prefixCls: u,
56
- iconPrefixCls: g,
57
+ iconPrefixCls: y,
57
58
  locale: C,
58
- cancelText: t.cancelText || C.cancelText
59
+ cancelText: o.cancelText || C.cancelText
59
60
  }), null)]
60
61
  });
61
62
  };
62
- function y(t) {
63
- const r = a(d, {
64
- ...t
63
+ function g(o) {
64
+ const r = A(), t = p(d, {
65
+ ...o
65
66
  });
66
- return r.appContext = e.parentContext || e.appContext || r.appContext, s(r, f), r;
67
+ return t.appContext = e.appContext || r || t.appContext, s(t, f), t;
67
68
  }
68
- return i = y(n), c.push(l), {
69
+ return i = g(n), c.push(l), {
69
70
  destroy: l,
70
- update: p
71
+ update: a
71
72
  };
72
73
  };
73
- function E(e) {
74
+ function M(e) {
74
75
  return {
75
76
  ...e,
76
77
  type: "warning"
@@ -101,10 +102,10 @@ function z(e) {
101
102
  };
102
103
  }
103
104
  export {
104
- A as default,
105
+ G as default,
105
106
  z as withConfirm,
106
107
  q as withError,
107
108
  S as withInfo,
108
109
  j as withSuccess,
109
- E as withWarn
110
+ M as withWarn
110
111
  };
@@ -1,45 +1,45 @@
1
- import { render as m, defineComponent as y, createVNode as d, mergeProps as x, h as k } from "vue";
2
- import { Modal as w } from "@aplus-frontend/antdv";
3
- import { ConfigProvider as P, globalConfigCached as l } from "../../config-provider/config-provider.mjs";
4
- import { omit as b } from "lodash-unified";
5
- import { isNumeric as N } from "@aplus-frontend/utils";
1
+ import { render as m, defineComponent as b, createVNode as l, mergeProps as k, h as w } from "vue";
2
+ import { Modal as P } from "@aplus-frontend/antdv";
3
+ import { ConfigProvider as N, globalConfigCached as f } from "../../config-provider/config-provider.mjs";
4
+ import { omit as L } from "lodash-unified";
5
+ import { isNumeric as M } from "@aplus-frontend/utils";
6
6
  import "../../config-provider/index.mjs";
7
- import { getContainerDom as f } from "./util.mjs";
8
- import { getTopWindow as L } from "../../utils/index.mjs";
9
- import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
10
- const q = (s) => {
11
- let o, n;
7
+ import { getContainerDom as u, getModalGlobalAppContext as A } from "./util.mjs";
8
+ import { getTopWindow as E } from "../../utils/index.mjs";
9
+ import { useNamespace as T } from "../../config-provider/hooks/use-namespace.mjs";
10
+ const z = (p) => {
11
+ let o, t;
12
12
  const {
13
13
  destroyOnClose: a = !0,
14
- wrapperOffset: t = !1
15
- } = s, {
16
- b: p
17
- } = E("ap-modal");
14
+ wrapperOffset: n = !1
15
+ } = p, {
16
+ b: s
17
+ } = T("ap-modal");
18
18
  function i() {
19
19
  o && o(!1), setTimeout(() => {
20
20
  m(null, r), r.parentElement?.removeChild(r);
21
21
  }, 500);
22
22
  }
23
- function u() {
23
+ function h() {
24
24
  o && o(!0);
25
25
  }
26
26
  function c() {
27
27
  o && o(!1);
28
28
  }
29
- function h(e) {
30
- n && n(e);
29
+ function C(e) {
30
+ t && t(e);
31
31
  }
32
- const C = /* @__PURE__ */ y({
32
+ const g = /* @__PURE__ */ b({
33
33
  data() {
34
34
  return {
35
35
  open: a,
36
- props: s
36
+ props: p
37
37
  };
38
38
  },
39
39
  created() {
40
40
  o = (e) => {
41
41
  this.open = e;
42
- }, n = (e) => {
42
+ }, t = (e) => {
43
43
  this.props = {
44
44
  ...this.props,
45
45
  ...e
@@ -56,54 +56,56 @@ const q = (s) => {
56
56
  },
57
57
  async handleOk() {
58
58
  try {
59
- if (n({
59
+ if (t({
60
60
  confirmLoading: !0
61
61
  }), this.props?.onOk) {
62
62
  const e = this.props?.content?.component?.exposed ?? void 0;
63
63
  await this.props.onOk(e);
64
64
  }
65
- n({
65
+ t({
66
66
  confirmLoading: !1
67
67
  }), a ? i() : c();
68
68
  } catch {
69
- n({
69
+ t({
70
70
  confirmLoading: !1
71
71
  });
72
72
  }
73
73
  }
74
74
  },
75
75
  render() {
76
- const e = b(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
77
- return d(P, l.value, {
78
- default: () => [d(w, x({
76
+ const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
77
+ return l(N, f.value, {
78
+ default: () => [l(P, k({
79
79
  class: {
80
- [p()]: !0,
81
- [p("wrapper")]: t
80
+ [s()]: !0,
81
+ [s("wrapper")]: n
82
82
  },
83
83
  open: this.open,
84
84
  onCancel: this.handleCancel,
85
85
  onOk: this.handleOk,
86
86
  centered: !0
87
87
  }, e), {
88
- default: () => [d("div", {
88
+ default: () => [l("div", {
89
89
  class: {
90
- [p("body-wrapper")]: t
90
+ [s("body-wrapper")]: n
91
91
  },
92
- style: t === !1 ? {} : {
93
- maxHeight: `calc(100vh - ${(t === !0 ? 100 : N(t) ? Number(t) : 100) * 2}px)`
92
+ style: n === !1 ? {} : {
93
+ maxHeight: `calc(100vh - ${(n === !0 ? 100 : M(n) ? Number(n) : 100) * 2}px)`
94
94
  }
95
95
  }, [this.props?.content])]
96
96
  })]
97
97
  });
98
98
  }
99
- }), g = f(l?.value?.getPopupContainer), O = f(s.getContainer), v = g || O || L().document.body, r = document.createElement("div");
100
- return v.appendChild(r), m(k(C), r), {
99
+ }), x = u(f?.value?.getPopupContainer), v = u(p.getContainer), O = x || v || E().document.body, r = document.createElement("div");
100
+ O.appendChild(r);
101
+ const d = w(g), y = A();
102
+ return d.appContext = p.appContext || y || d.appContext, m(d, r), {
101
103
  destroy: i,
102
- update: h,
103
- open: u,
104
+ update: C,
105
+ open: h,
104
106
  close: c
105
107
  };
106
108
  };
107
109
  export {
108
- q as createModal
110
+ z as createModal
109
111
  };
@@ -1 +1,4 @@
1
+ import { AppContext } from 'vue';
1
2
  export declare const getContainerDom: (params?: HTMLElement | Element | (() => HTMLElement | Element)) => Element | undefined;
3
+ export declare const setModalGlobalAppContext: (appContext: AppContext) => void;
4
+ export declare const getModalGlobalAppContext: () => AppContext;
@@ -1,4 +1,10 @@
1
- const n = (t) => typeof t == "function" ? t?.() : t;
1
+ const e = (t) => typeof t == "function" ? t?.() : t;
2
+ let o;
3
+ const n = (t) => {
4
+ o = t;
5
+ }, l = () => o;
2
6
  export {
3
- n as getContainerDom
7
+ e as getContainerDom,
8
+ l as getModalGlobalAppContext,
9
+ n as setModalGlobalAppContext
4
10
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as x, computed as u, ref as O, createElementBlock as A, openBlock as r, mergeProps as T, unref as e, renderSlot as c, createCommentVNode as k, createVNode as p, withCtx as d, createElementVNode as n, normalizeClass as i, createBlock as C, Fragment as S, renderList as V, createSlots as D, createTextVNode as j, toDisplayString as P } from "vue";
1
+ import { defineComponent as x, computed as u, ref as O, createElementBlock as A, openBlock as r, mergeProps as T, unref as e, renderSlot as c, createCommentVNode as N, createVNode as p, withCtx as d, createElementVNode as n, normalizeClass as i, createBlock as k, Fragment as S, renderList as V, createSlots as D, createTextVNode as j, toDisplayString as P } from "vue";
2
2
  import G from "./icons/file-icon.vue.mjs";
3
- import { Tooltip as M, TypographyText as U, Empty as F } from "@aplus-frontend/antdv";
3
+ import { Tooltip as M, TypographyText as U, Empty as $ } from "@aplus-frontend/antdv";
4
4
  import { IconVariantDownload as z } from "@aplus-frontend/icon";
5
5
  import { LoadingOutlined as R } from "@ant-design/icons-vue";
6
6
  import "../ap-title/ApTitle.vue.mjs";
@@ -9,7 +9,7 @@ import "../../config-provider/index.mjs";
9
9
  import { getFileInfo as q } from "./utils/index.mjs";
10
10
  import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
11
11
  import { useLocale as J } from "../../config-provider/hooks/use-locale.mjs";
12
- import { useGlobalConfig as $ } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import { useGlobalConfig as h } from "../../config-provider/hooks/use-global-config.mjs";
13
13
  import K from "../ap-title/ApTitle.vue2.mjs";
14
14
  import Q from "../../ap-download/ap-download.vue.mjs";
15
15
  const W = ["onClick"], fe = /* @__PURE__ */ x({
@@ -23,13 +23,16 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
23
23
  column: { default: 2 },
24
24
  isFileAreaBorder: { type: Boolean, default: !1 }
25
25
  },
26
- setup(h) {
27
- const { b: w, e: l, em: N } = H("ap-appendix"), { t: v } = J(), a = h, E = $("apUpload"), _ = $(
26
+ setup(w) {
27
+ const { b: E, e: l, em: C } = H("ap-appendix"), { t: v } = J(), a = w, _ = h("apUpload"), F = h(
28
28
  "downloadCenterTriggerConfig"
29
29
  ), f = u(
30
- () => q(a?.needName, a?.fileList ?? [])
30
+ () => q(
31
+ a?.needName ?? _?.value?.needName,
32
+ a?.fileList ?? []
33
+ )
31
34
  ), B = u(
32
- () => a.getOssAccess || E.value?.getOssAccess
35
+ () => a.getOssAccess || _.value?.getOssAccess
33
36
  ), g = u(
34
37
  () => !(Array.isArray(f.value) && f.value.length)
35
38
  ), o = O([]), I = u(() => a.title || v("ap.apAppendix.appendix"));
@@ -37,12 +40,12 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
37
40
  if (!(o.value.findIndex((t) => t === m) > -1)) {
38
41
  o.value = [...o.value, m];
39
42
  try {
40
- if (_.value?.trigger) {
43
+ if (F.value?.trigger) {
41
44
  let t = [s].map((L) => ({
42
45
  objectName: L.path,
43
46
  fileName: L.fileName
44
47
  }));
45
- await _.value?.trigger(t);
48
+ await F.value?.trigger(t);
46
49
  }
47
50
  } finally {
48
51
  o.value = o.value.filter((t) => t !== m);
@@ -50,7 +53,7 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
50
53
  }
51
54
  }
52
55
  return (s, m) => (r(), A("div", T({
53
- class: [e(w)()]
56
+ class: [e(E)()]
54
57
  }, {
55
58
  ...s.$attrs
56
59
  }, {
@@ -75,7 +78,7 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
75
78
  c(s.$slots, "titleDownloadAllBtn", {
76
79
  fileList: a.fileList
77
80
  }, () => [
78
- g.value ? k("", !0) : (r(), C(Q, {
81
+ g.value ? N("", !0) : (r(), k(Q, {
79
82
  key: 0,
80
83
  class: i([e(l)("download-all")]),
81
84
  text: e(v)("ap.apAppendix.downloadAll"),
@@ -93,14 +96,14 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
93
96
  _: 3
94
97
  }, 8, ["title", "help-message"])
95
98
  ]),
96
- g.value ? k("", !0) : c(s.$slots, "fileArea", {
99
+ g.value ? N("", !0) : c(s.$slots, "fileArea", {
97
100
  key: 0,
98
101
  fileList: a.fileList
99
102
  }, () => [
100
103
  n("div", {
101
104
  class: i({
102
105
  [e(l)("file-area")]: !0,
103
- [e(N)("file-area", "border")]: !!a.isFileAreaBorder
106
+ [e(C)("file-area", "border")]: !!a.isFileAreaBorder
104
107
  })
105
108
  }, [
106
109
  n("div", {
@@ -110,7 +113,7 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
110
113
  key: t,
111
114
  class: i({
112
115
  [e(l)("file-area-content-item")]: !0,
113
- [e(N)("file-area-content-item", "loading")]: o.value.includes(t)
116
+ [e(C)("file-area-content-item", "loading")]: o.value.includes(t)
114
117
  })
115
118
  }, [
116
119
  p(e(M), null, D({
@@ -125,7 +128,7 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
125
128
  n("div", {
126
129
  class: i([e(l)("file-area-content-item-icon")])
127
130
  }, [
128
- o.value.includes(t) ? (r(), C(e(R), { key: 0 })) : (r(), C(G, { key: 1 }))
131
+ o.value.includes(t) ? (r(), k(e(R), { key: 0 })) : (r(), k(G, { key: 1 }))
129
132
  ], 2),
130
133
  n("div", {
131
134
  class: i([e(l)("file-area-content-item-file-name")])
@@ -158,12 +161,12 @@ const W = ["onClick"], fe = /* @__PURE__ */ x({
158
161
  n("div", {
159
162
  class: i([e(l)("empty-content")])
160
163
  }, [
161
- p(e(F), {
162
- image: e(F).PRESENTED_IMAGE_SIMPLE
164
+ p(e($), {
165
+ image: e($).PRESENTED_IMAGE_SIMPLE
163
166
  }, null, 8, ["image"])
164
167
  ], 2)
165
168
  ], 2)
166
- ]) : k("", !0)
169
+ ]) : N("", !0)
167
170
  ], 16));
168
171
  }
169
172
  });
@@ -34,12 +34,13 @@ const Ke = /* @__PURE__ */ $({
34
34
  manual: {
35
35
  type: Boolean,
36
36
  default: !1
37
- }
37
+ },
38
+ emptyData: {}
38
39
  },
39
40
  setup(F, {
40
41
  expose: N
41
42
  }) {
42
- const o = F, _ = te("viewCacheOption"), {
43
+ const s = F, _ = te("viewCacheOption"), {
43
44
  b: V
44
45
  } = ae("ap-view"), {
45
46
  t: I
@@ -60,7 +61,7 @@ const Ke = /* @__PURE__ */ $({
60
61
  const W = {
61
62
  dropdownType: "dropdown",
62
63
  content: K(se, {
63
- maxViewNum: o.maxViewNum
64
+ maxViewNum: s.maxViewNum
64
65
  }, null)
65
66
  }, i = p([d.value]), j = C(() => i.value.map((t) => ({
66
67
  id: t.viewKey,
@@ -76,18 +77,19 @@ const Ke = /* @__PURE__ */ $({
76
77
  getSearchFormSorterItems: k,
77
78
  setSearchFormSorterItems: A,
78
79
  resetSearchFormSorterItems: P,
79
- ...o.saveDataSource
80
+ ...s.saveDataSource
80
81
  }, v = {
81
82
  ..._.value,
82
- ...o.viewCacheOption
83
- }, g = () => o.isDefaultSystemView ? u : (o.isFirstDefaultSystemView || b) && c ? u : i.value.find((a) => a.isDefault)?.viewKey ?? u, l = (t) => {
83
+ ...s.viewCacheOption
84
+ }, g = () => s.isDefaultSystemView ? u : (s.isFirstDefaultSystemView || b) && c ? u : i.value.find((a) => a.isDefault)?.viewKey ?? u, l = (t) => {
84
85
  w.value = t;
85
86
  const a = i.value.find((e) => e.viewKey === w.value);
86
87
  a && setTimeout(() => {
87
- a.viewKey === u ? c ? o.manual || r?.submitWith?.() : o.manual || (r?.resetSearchFormSorterItems?.(), r?.reset?.()) : (r?.setSearchFormValues?.({
88
+ a.viewKey === u ? c ? s.manual || r?.submitWith?.() : s.manual || (r?.resetSearchFormSorterItems?.(), r?.reset?.()) : (r?.setSearchFormValues?.({
88
89
  ...Object.fromEntries(Object.keys(r?.getSearchFormValues?.() ?? {}).map((e) => [e, void 0])) ?? {},
89
- ...r?.getSearchFormSorterItems?.()?.reduce((e, s) => (a.viewConfig?.searchForm?.[s.name] && (e[s.name] = a.viewConfig?.searchForm?.[s.name]), e), {}) ?? {}
90
- }), r?.setSearchFormSorterItems?.(a.viewConfig?.sorterItems ?? []), c ? o.manual || r?.submitWith?.() : r?.submit?.()), c = !1;
90
+ ...s?.emptyData ?? {},
91
+ ...r?.getSearchFormSorterItems?.()?.reduce((e, o) => (a.viewConfig?.searchForm?.[o.name] && (e[o.name] = a.viewConfig?.searchForm?.[o.name]), e), {}) ?? {}
92
+ }), r?.setSearchFormSorterItems?.(a.viewConfig?.sorterItems ?? []), c ? s.manual || r?.submitWith?.() : r?.submit?.()), c = !1;
91
93
  });
92
94
  }, D = {
93
95
  getViewList: async (t) => {
@@ -106,14 +108,14 @@ const Ke = /* @__PURE__ */ $({
106
108
  const {
107
109
  tableKey: a,
108
110
  viewKey: e,
109
- viewName: s,
111
+ viewName: o,
110
112
  isDefault: n,
111
113
  viewConfig: f
112
114
  } = t;
113
115
  await v?.addView?.({
114
116
  tableKey: a,
115
117
  viewKey: e,
116
- viewName: s,
118
+ viewName: o,
117
119
  isDefault: n,
118
120
  viewConfig: f
119
121
  }), n && (i.value = i.value.map((m) => ({
@@ -121,7 +123,7 @@ const Ke = /* @__PURE__ */ $({
121
123
  isDefault: !1
122
124
  }))), i.value = [...i.value, {
123
125
  viewKey: e,
124
- viewName: s,
126
+ viewName: o,
125
127
  isDefault: n,
126
128
  viewConfig: f
127
129
  }], l(e);
@@ -130,14 +132,14 @@ const Ke = /* @__PURE__ */ $({
130
132
  const {
131
133
  tableKey: a,
132
134
  viewKey: e,
133
- viewName: s,
135
+ viewName: o,
134
136
  isDefault: n,
135
137
  viewConfig: f
136
138
  } = t;
137
139
  await v?.changeView?.({
138
140
  tableKey: a,
139
141
  viewKey: e,
140
- viewName: s,
142
+ viewName: o,
141
143
  isDefault: n,
142
144
  viewConfig: f
143
145
  }), n && (i.value = i.value.map((h) => ({
@@ -145,7 +147,7 @@ const Ke = /* @__PURE__ */ $({
145
147
  isDefault: !1
146
148
  })));
147
149
  const m = i.value.find((h) => h.viewKey === e);
148
- m && (m.viewName = s, m.isDefault = n, m.viewConfig = f), l(e);
150
+ m && (m.viewName = o, m.isDefault = n, m.viewConfig = f), l(e);
149
151
  },
150
152
  removeView: async (t) => {
151
153
  const {
@@ -155,10 +157,10 @@ const Ke = /* @__PURE__ */ $({
155
157
  await v?.removeView?.({
156
158
  tableKey: a,
157
159
  viewKey: e
158
- }), i.value = i.value.filter((s) => s.viewKey !== e), e === w.value && l(g());
160
+ }), i.value = i.value.filter((o) => o.viewKey !== e), e === w.value && l(g());
159
161
  }
160
162
  }, G = {
161
- tableKey: o.tableKey,
163
+ tableKey: s.tableKey,
162
164
  currentViewKey: w,
163
165
  changeCurrentViewKey: l,
164
166
  popoverOpen: T,
@@ -167,7 +169,7 @@ const Ke = /* @__PURE__ */ $({
167
169
  viewListCRUD: D,
168
170
  saveDataSource: r
169
171
  };
170
- return X(G), U(() => o.tableKey, (t) => {
172
+ return X(G), U(() => s.tableKey, (t) => {
171
173
  ee(t) && (c = !0, D?.getViewList?.({
172
174
  tableKey: t
173
175
  }));
@@ -82,6 +82,10 @@ export interface ApViewProps {
82
82
  * 是否手动发起第一次网络请求,默认为 false
83
83
  */
84
84
  manual?: boolean;
85
+ /**
86
+ * 表单项为空时的状态数据,适用于为空时其值不为undefined的情况
87
+ */
88
+ emptyData?: Recordable;
85
89
  }
86
90
  export interface ApViewExpose {
87
91
  setFirstDefaultSystemView: (value: boolean) => void;