@aplus-frontend/ui 0.6.7 → 6.9.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 (166) hide show
  1. package/es/index.mjs +187 -193
  2. package/es/src/ap-field/rate/index.vue.d.ts +1 -1
  3. package/es/src/ap-form/interface.d.ts +10 -5
  4. package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +42 -36
  5. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +5 -0
  6. package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +24 -0
  7. package/es/src/ap-form/search-form/index.vue.d.ts +1 -0
  8. package/es/src/ap-form/search-form/index.vue.mjs +53 -48
  9. package/es/src/ap-grid/hooks/use-row-selection.mjs +57 -62
  10. package/es/src/ap-grid/utils/renderer.mjs +9 -9
  11. package/es/src/business/ap-label/ApLabel.d.ts +1 -1
  12. package/es/src/business/ap-label/index.d.ts +3 -3
  13. package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +1 -1
  14. package/es/src/business/ap-radio-group/index.d.ts +3 -3
  15. package/es/src/business/ap-summary/interface.d.ts +1 -1
  16. package/es/src/business/ap-view/ap-view.vue.d.ts +1 -0
  17. package/es/src/business/ap-view/ap-view.vue2.mjs +122 -118
  18. package/es/src/business/ap-view/index.d.ts +3 -0
  19. package/es/src/business/ap-view/interface.d.ts +4 -0
  20. package/es/src/business/hooks/useKeepAliveFlag.d.ts +14 -0
  21. package/es/src/business/hooks/useKeepAliveFlag.mjs +18 -0
  22. package/es/src/business/hooks/usePageListApGrid.d.ts +4 -0
  23. package/es/src/business/hooks/usePageListApGrid.mjs +52 -48
  24. package/es/src/business/index.d.ts +0 -1
  25. package/es/src/business/index.mjs +42 -46
  26. package/es/src/index.d.ts +0 -1
  27. package/es/src/index.mjs +274 -281
  28. package/es/src/locale/lang/en.mjs +0 -7
  29. package/es/src/locale/lang/zh-cn.mjs +0 -7
  30. package/es/src/path-map.mjs +0 -2
  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/ap-field/rate/index.vue.d.ts +1 -1
  35. package/lib/src/ap-form/interface.d.ts +10 -5
  36. package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
  37. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +5 -0
  38. package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -0
  39. package/lib/src/ap-form/search-form/index.vue.d.ts +1 -0
  40. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  41. package/lib/src/ap-grid/hooks/use-row-selection.js +1 -1
  42. package/lib/src/ap-grid/utils/renderer.js +1 -1
  43. package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
  44. package/lib/src/business/ap-label/index.d.ts +3 -3
  45. package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +1 -1
  46. package/lib/src/business/ap-radio-group/index.d.ts +3 -3
  47. package/lib/src/business/ap-summary/interface.d.ts +1 -1
  48. package/lib/src/business/ap-view/ap-view.vue.d.ts +1 -0
  49. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  50. package/lib/src/business/ap-view/index.d.ts +3 -0
  51. package/lib/src/business/ap-view/interface.d.ts +4 -0
  52. package/lib/src/business/hooks/useKeepAliveFlag.d.ts +14 -0
  53. package/lib/src/business/hooks/useKeepAliveFlag.js +1 -0
  54. package/lib/src/business/hooks/usePageListApGrid.d.ts +4 -0
  55. package/lib/src/business/hooks/usePageListApGrid.js +1 -1
  56. package/lib/src/business/index.d.ts +0 -1
  57. package/lib/src/business/index.js +1 -1
  58. package/lib/src/index.d.ts +0 -1
  59. package/lib/src/index.js +1 -1
  60. package/lib/src/locale/lang/en.js +1 -1
  61. package/lib/src/locale/lang/zh-cn.js +1 -1
  62. package/lib/src/path-map.js +1 -1
  63. package/lib/src/version.d.ts +1 -1
  64. package/lib/src/version.js +1 -1
  65. package/package.json +5 -10
  66. package/theme/ap-form/index.css +16 -0
  67. package/theme/ap-form/search-form.css +16 -0
  68. package/theme/ap-form/search-form.less +16 -0
  69. package/theme/ap-grid/index.css +20 -0
  70. package/theme/ap-grid/index.less +4 -0
  71. package/theme/ap-table/ap-table.css +16 -0
  72. package/theme/ap-table-modal/index.css +16 -0
  73. package/theme/editable-table/index.css +16 -0
  74. package/theme/index.css +20 -0
  75. package/es/src/ap-info-layout/ApInfoLayout.vue.d.ts +0 -73
  76. package/es/src/ap-info-layout/ApInfoLayout.vue.mjs +0 -46
  77. package/es/src/ap-info-layout/ApInfoLayout.vue2.mjs +0 -4
  78. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +0 -29
  79. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +0 -4
  80. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +0 -41
  81. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +0 -30
  82. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +0 -4
  83. package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.mjs +0 -71
  84. package/es/src/ap-info-layout/index.d.ts +0 -3
  85. package/es/src/ap-info-layout/index.mjs +0 -2
  86. package/es/src/ap-info-layout/interface.d.ts +0 -10
  87. package/es/src/ap-info-layout/interface.mjs +0 -1
  88. package/es/src/ap-info-layout/style/css.d.ts +0 -0
  89. package/es/src/ap-info-layout/style/css.js +0 -1
  90. package/es/src/ap-info-layout/style/index.d.ts +0 -0
  91. package/es/src/ap-info-layout/style/index.js +0 -1
  92. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +0 -35
  93. package/es/src/business/ap-group-search/ap-group-search.vue.mjs +0 -4
  94. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +0 -202
  95. package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +0 -14
  96. package/es/src/business/ap-group-search/extension-select/index.vue.mjs +0 -4
  97. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +0 -135
  98. package/es/src/business/ap-group-search/extension-select/style/css.d.ts +0 -0
  99. package/es/src/business/ap-group-search/extension-select/style/css.js +0 -1
  100. package/es/src/business/ap-group-search/extension-select/style/index.d.ts +0 -0
  101. package/es/src/business/ap-group-search/extension-select/style/index.js +0 -1
  102. package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +0 -3
  103. package/es/src/business/ap-group-search/images/icon-down.vue.mjs +0 -28
  104. package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +0 -3
  105. package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +0 -45
  106. package/es/src/business/ap-group-search/index.d.ts +0 -1536
  107. package/es/src/business/ap-group-search/index.mjs +0 -14
  108. package/es/src/business/ap-group-search/interface.d.ts +0 -11
  109. package/es/src/business/ap-group-search/interface.mjs +0 -1
  110. package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +0 -424
  111. package/es/src/business/ap-group-search/popover-select/index.vue.mjs +0 -4
  112. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +0 -193
  113. package/es/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
  114. package/es/src/business/ap-group-search/popover-select/style/css.js +0 -1
  115. package/es/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
  116. package/es/src/business/ap-group-search/popover-select/style/index.js +0 -1
  117. package/es/src/business/ap-group-search/style/css.d.ts +0 -0
  118. package/es/src/business/ap-group-search/style/css.js +0 -1
  119. package/es/src/business/ap-group-search/style/index.d.ts +0 -0
  120. package/es/src/business/ap-group-search/style/index.js +0 -1
  121. package/lib/src/ap-info-layout/ApInfoLayout.vue.d.ts +0 -73
  122. package/lib/src/ap-info-layout/ApInfoLayout.vue.js +0 -1
  123. package/lib/src/ap-info-layout/ApInfoLayout.vue2.js +0 -1
  124. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +0 -29
  125. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +0 -1
  126. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +0 -1
  127. package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +0 -30
  128. package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.js +0 -1
  129. package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.js +0 -1
  130. package/lib/src/ap-info-layout/index.d.ts +0 -3
  131. package/lib/src/ap-info-layout/index.js +0 -1
  132. package/lib/src/ap-info-layout/interface.d.ts +0 -10
  133. package/lib/src/ap-info-layout/interface.js +0 -1
  134. package/lib/src/ap-info-layout/style/css.cjs +0 -1
  135. package/lib/src/ap-info-layout/style/css.d.ts +0 -0
  136. package/lib/src/ap-info-layout/style/index.cjs +0 -1
  137. package/lib/src/ap-info-layout/style/index.d.ts +0 -0
  138. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +0 -35
  139. package/lib/src/business/ap-group-search/ap-group-search.vue.js +0 -1
  140. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +0 -1
  141. package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +0 -14
  142. package/lib/src/business/ap-group-search/extension-select/index.vue.js +0 -1
  143. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +0 -1
  144. package/lib/src/business/ap-group-search/extension-select/style/css.cjs +0 -1
  145. package/lib/src/business/ap-group-search/extension-select/style/css.d.ts +0 -0
  146. package/lib/src/business/ap-group-search/extension-select/style/index.cjs +0 -1
  147. package/lib/src/business/ap-group-search/extension-select/style/index.d.ts +0 -0
  148. package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +0 -3
  149. package/lib/src/business/ap-group-search/images/icon-down.vue.js +0 -1
  150. package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +0 -3
  151. package/lib/src/business/ap-group-search/images/icon-line-select.vue.js +0 -1
  152. package/lib/src/business/ap-group-search/index.d.ts +0 -1536
  153. package/lib/src/business/ap-group-search/index.js +0 -1
  154. package/lib/src/business/ap-group-search/interface.d.ts +0 -11
  155. package/lib/src/business/ap-group-search/interface.js +0 -1
  156. package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +0 -424
  157. package/lib/src/business/ap-group-search/popover-select/index.vue.js +0 -1
  158. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +0 -2
  159. package/lib/src/business/ap-group-search/popover-select/style/css.cjs +0 -1
  160. package/lib/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
  161. package/lib/src/business/ap-group-search/popover-select/style/index.cjs +0 -1
  162. package/lib/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
  163. package/lib/src/business/ap-group-search/style/css.cjs +0 -1
  164. package/lib/src/business/ap-group-search/style/css.d.ts +0 -0
  165. package/lib/src/business/ap-group-search/style/index.cjs +0 -1
  166. package/lib/src/business/ap-group-search/style/index.d.ts +0 -0
@@ -15,8 +15,8 @@ declare const ApRadioGroup: {
15
15
  "update:value": (value: string | number) => any;
16
16
  }, PublicProps, {
17
17
  value: string | number;
18
- options: RadioOptionType[];
19
18
  delay: number;
19
+ options: RadioOptionType[];
20
20
  optionStyle: RadioOptionStyleType;
21
21
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
22
22
  P: {};
@@ -35,8 +35,8 @@ declare const ApRadioGroup: {
35
35
  "onUpdate:value"?: ((value: string | number) => any) | undefined;
36
36
  }>, {}, {}, {}, {}, {
37
37
  value: string | number;
38
- options: RadioOptionType[];
39
38
  delay: number;
39
+ options: RadioOptionType[];
40
40
  optionStyle: RadioOptionStyleType;
41
41
  }>;
42
42
  __isFragment?: never;
@@ -55,8 +55,8 @@ declare const ApRadioGroup: {
55
55
  "update:value": (value: string | number) => any;
56
56
  }, string, {
57
57
  value: string | number;
58
- options: RadioOptionType[];
59
58
  delay: number;
59
+ options: RadioOptionType[];
60
60
  optionStyle: RadioOptionStyleType;
61
61
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
62
62
  $props: {
@@ -1,6 +1,6 @@
1
1
  import { ColumnsType } from '@aplus-frontend/antdv/es/table';
2
2
  import { AlignType, DataIndex, Key } from '@aplus-frontend/antdv/es/vc-table/interface';
3
- import { ApColumnType } from 'src/ap-table';
3
+ import { ApColumnType } from '../../ap-table';
4
4
  export type SummaryColumnType = ApColumnType[] | ColumnsType;
5
5
  export type ValueType = {
6
6
  [key in string]: any;
@@ -3,6 +3,7 @@ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOp
3
3
  declare const _default: DefineComponent<ApViewProps, {
4
4
  setFirstDefaultSystemView: (value: boolean) => void;
5
5
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApViewProps> & Readonly<{}>, {
6
+ manual: boolean;
6
7
  maxViewNum: number;
7
8
  isDefaultSystemView: boolean;
8
9
  isFirstDefaultSystemView: boolean;
@@ -1,19 +1,19 @@
1
- import { defineComponent as Q, computed as B, ref as K, createVNode as N, watch as X, createBlock as Z, openBlock as S, unref as b, mergeProps as U, withCtx as R, createElementVNode as C, normalizeClass as O } from "vue";
1
+ import { defineComponent as X, computed as E, ref as K, createVNode as N, watch as Z, createBlock as U, openBlock as R, unref as b, mergeProps as C, withCtx as S, createElementVNode as O, normalizeClass as D } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import D from "./icons/line-down.vue.mjs";
4
- import { ApBatchActionGroup as ee } from "../ap-batch-action-group/index.mjs";
3
+ import ee from "./icons/line-down.vue.mjs";
4
+ import { ApBatchActionGroup as te } from "../ap-batch-action-group/index.mjs";
5
5
  import "./components/main-button-content.vue.mjs";
6
6
  import "./components/menu-list-content.vue.mjs";
7
- import { useViewProvide as te } from "./hooks/use-view-provide.mjs";
8
- import { useInjectApTable as ie } from "../../ap-table/context.mjs";
9
- import { SYSTEM_VIEW_KEY as c } from "./utils/enum.mjs";
7
+ import { useViewProvide as ie } from "./hooks/use-view-provide.mjs";
8
+ import { useInjectApTable as le } from "../../ap-table/context.mjs";
9
+ import { SYSTEM_VIEW_KEY as V } from "./utils/enum.mjs";
10
10
  import { isValid as se } from "@aplus-frontend/utils";
11
- import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
12
- import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { useGlobalConfig as me } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import { useNamespace as ne } from "../../config-provider/hooks/use-namespace.mjs";
13
13
  import { useLocale as oe } from "../../config-provider/hooks/use-locale.mjs";
14
- import me from "./components/main-button-content.vue2.mjs";
15
- import ne from "./components/menu-list-content.vue2.mjs";
16
- const _e = /* @__PURE__ */ Q({
14
+ import re from "./components/main-button-content.vue2.mjs";
15
+ import fe from "./components/menu-list-content.vue2.mjs";
16
+ const Ie = /* @__PURE__ */ X({
17
17
  name: "ApView",
18
18
  __name: "ap-view",
19
19
  props: {
@@ -30,179 +30,183 @@ const _e = /* @__PURE__ */ Q({
30
30
  isFirstDefaultSystemView: {
31
31
  type: Boolean,
32
32
  default: !1
33
+ },
34
+ manual: {
35
+ type: Boolean,
36
+ default: !1
33
37
  }
34
38
  },
35
- setup(E, {
36
- expose: k
39
+ setup(k, {
40
+ expose: A
37
41
  }) {
38
- const a = E, A = le("viewCacheOption"), {
42
+ const r = k, L = me("viewCacheOption"), {
39
43
  b: g
40
- } = re("ap-view"), {
41
- t: L
42
- } = oe(), v = B(() => ({
43
- viewKey: c,
44
- viewName: L("ap.apView.systemView")
44
+ } = ne("ap-view"), {
45
+ t: P
46
+ } = oe(), v = E(() => ({
47
+ viewKey: V,
48
+ viewName: P("ap.apView.systemView")
45
49
  })), {
46
- getSearchFormValues: P,
47
- setSearchFormValues: T,
48
- submit: j,
49
- reset: G,
50
- getSearchFormSorterItems: $,
51
- setSearchFormSorterItems: Y,
52
- resetSearchFormSorterItems: z
53
- } = ie(), M = K(!1), F = K(!1), V = K("");
54
- let d = !1, _ = !1;
55
- const W = {
50
+ getSearchFormValues: T,
51
+ setSearchFormValues: j,
52
+ submit: G,
53
+ reset: $,
54
+ getSearchFormSorterItems: Y,
55
+ setSearchFormSorterItems: z,
56
+ resetSearchFormSorterItems: M
57
+ } = le(), W = K(!1), F = K(!1), d = K("");
58
+ let c = !1, _ = !1;
59
+ const q = {
56
60
  dropdownType: "dropdown",
57
- content: N(me, {
58
- maxViewNum: a.maxViewNum
61
+ content: N(re, {
62
+ maxViewNum: r.maxViewNum
59
63
  }, null)
60
- }, r = K([v.value]), q = B(() => r.value.map((t) => ({
64
+ }, m = K([v.value]), H = E(() => m.value.map((t) => ({
61
65
  id: t.viewKey,
62
- content: N(ne, {
66
+ content: N(fe, {
63
67
  view: t
64
68
  }, null)
65
69
  }))), e = {
66
- getSearchFormValues: P,
67
- setSearchFormValues: T,
68
- submit: j,
69
- reset: G,
70
- getSearchFormSorterItems: $,
71
- setSearchFormSorterItems: Y,
72
- resetSearchFormSorterItems: z,
73
- ...a.saveDataSource
74
- }, s = {
75
- ...A.value,
76
- ...a.viewCacheOption
70
+ getSearchFormValues: T,
71
+ setSearchFormValues: j,
72
+ submit: G,
73
+ reset: $,
74
+ getSearchFormSorterItems: Y,
75
+ setSearchFormSorterItems: z,
76
+ resetSearchFormSorterItems: M,
77
+ ...r.saveDataSource
78
+ }, l = {
79
+ ...L.value,
80
+ ...r.viewCacheOption
77
81
  }, I = () => {
78
- if (a.isDefaultSystemView)
79
- return c;
80
- if ((a.isFirstDefaultSystemView || _) && d)
81
- return c;
82
- const t = r.value.find((i) => i.isDefault);
83
- return (t == null ? void 0 : t.viewKey) ?? c;
84
- }, w = (t) => {
85
- V.value = t;
86
- const i = r.value.find((l) => l.viewKey === V.value);
82
+ if (r.isDefaultSystemView)
83
+ return V;
84
+ if ((r.isFirstDefaultSystemView || _) && c)
85
+ return V;
86
+ const t = m.value.find((i) => i.isDefault);
87
+ return (t == null ? void 0 : t.viewKey) ?? V;
88
+ }, p = (t) => {
89
+ d.value = t;
90
+ const i = m.value.find((s) => s.viewKey === d.value);
87
91
  i && setTimeout(() => {
88
- var l, o, m, f, n, u, y, x, h;
89
- i.viewKey === c ? d ? (l = e == null ? void 0 : e.submit) == null || l.call(e) : ((o = e == null ? void 0 : e.resetSearchFormSorterItems) == null || o.call(e), (m = e == null ? void 0 : e.reset) == null || m.call(e)) : ((u = e == null ? void 0 : e.setSearchFormValues) == null || u.call(e, {
90
- ...Object.fromEntries(Object.keys(((f = e == null ? void 0 : e.getSearchFormValues) == null ? void 0 : f.call(e)) ?? {}).map((J) => [J, void 0])) ?? {},
91
- ...((n = i.viewConfig) == null ? void 0 : n.searchForm) ?? {}
92
- }), (x = e == null ? void 0 : e.setSearchFormSorterItems) == null || x.call(e, ((y = i.viewConfig) == null ? void 0 : y.sorterItems) ?? []), (h = e == null ? void 0 : e.submit) == null || h.call(e)), d = !1;
92
+ var s, n, o, u, f, a, y, x, B, h;
93
+ i.viewKey === V ? c ? r.manual || (s = e == null ? void 0 : e.submit) == null || s.call(e) : ((n = e == null ? void 0 : e.resetSearchFormSorterItems) == null || n.call(e), r.manual || (o = e == null ? void 0 : e.reset) == null || o.call(e)) : ((a = e == null ? void 0 : e.setSearchFormValues) == null || a.call(e, {
94
+ ...Object.fromEntries(Object.keys(((u = e == null ? void 0 : e.getSearchFormValues) == null ? void 0 : u.call(e)) ?? {}).map((Q) => [Q, void 0])) ?? {},
95
+ ...((f = i.viewConfig) == null ? void 0 : f.searchForm) ?? {}
96
+ }), (x = e == null ? void 0 : e.setSearchFormSorterItems) == null || x.call(e, ((y = i.viewConfig) == null ? void 0 : y.sorterItems) ?? []), c ? r.manual || (B = e == null ? void 0 : e.submit) == null || B.call(e) : (h = e == null ? void 0 : e.submit) == null || h.call(e)), c = !1;
93
97
  });
94
- }, p = {
98
+ }, w = {
95
99
  getViewList: async (t) => {
96
100
  var i;
97
101
  try {
98
102
  const {
99
- tableKey: l
100
- } = t, o = await ((i = s == null ? void 0 : s.getViewList) == null ? void 0 : i.call(s, {
101
- tableKey: l
103
+ tableKey: s
104
+ } = t, n = await ((i = l == null ? void 0 : l.getViewList) == null ? void 0 : i.call(l, {
105
+ tableKey: s
102
106
  }));
103
- return r.value = [v.value, ...o ?? []], w(I()), r.value;
107
+ return m.value = [v.value, ...n ?? []], p(I()), m.value;
104
108
  } catch {
105
- return r.value = [v.value], w(c), r.value;
109
+ return m.value = [v.value], p(V), m.value;
106
110
  }
107
111
  },
108
112
  addView: async (t) => {
109
- var n;
113
+ var f;
110
114
  const {
111
115
  tableKey: i,
112
- viewKey: l,
113
- viewName: o,
114
- isDefault: m,
115
- viewConfig: f
116
+ viewKey: s,
117
+ viewName: n,
118
+ isDefault: o,
119
+ viewConfig: u
116
120
  } = t;
117
- await ((n = s == null ? void 0 : s.addView) == null ? void 0 : n.call(s, {
121
+ await ((f = l == null ? void 0 : l.addView) == null ? void 0 : f.call(l, {
118
122
  tableKey: i,
119
- viewKey: l,
120
- viewName: o,
121
- isDefault: m,
122
- viewConfig: f
123
- })), m && (r.value = r.value.map((u) => ({
124
- ...u,
123
+ viewKey: s,
124
+ viewName: n,
125
+ isDefault: o,
126
+ viewConfig: u
127
+ })), o && (m.value = m.value.map((a) => ({
128
+ ...a,
125
129
  isDefault: !1
126
- }))), r.value = [...r.value, {
127
- viewKey: l,
128
- viewName: o,
129
- isDefault: m,
130
- viewConfig: f
131
- }], w(l);
130
+ }))), m.value = [...m.value, {
131
+ viewKey: s,
132
+ viewName: n,
133
+ isDefault: o,
134
+ viewConfig: u
135
+ }], p(s);
132
136
  },
133
137
  changeView: async (t) => {
134
- var u;
138
+ var a;
135
139
  const {
136
140
  tableKey: i,
137
- viewKey: l,
138
- viewName: o,
139
- isDefault: m,
140
- viewConfig: f
141
+ viewKey: s,
142
+ viewName: n,
143
+ isDefault: o,
144
+ viewConfig: u
141
145
  } = t;
142
- await ((u = s == null ? void 0 : s.changeView) == null ? void 0 : u.call(s, {
146
+ await ((a = l == null ? void 0 : l.changeView) == null ? void 0 : a.call(l, {
143
147
  tableKey: i,
144
- viewKey: l,
145
- viewName: o,
146
- isDefault: m,
147
- viewConfig: f
148
- })), m && (r.value = r.value.map((y) => ({
148
+ viewKey: s,
149
+ viewName: n,
150
+ isDefault: o,
151
+ viewConfig: u
152
+ })), o && (m.value = m.value.map((y) => ({
149
153
  ...y,
150
154
  isDefault: !1
151
155
  })));
152
- const n = r.value.find((y) => y.viewKey === l);
153
- n && (n.viewName = o, n.isDefault = m, n.viewConfig = f), w(l);
156
+ const f = m.value.find((y) => y.viewKey === s);
157
+ f && (f.viewName = n, f.isDefault = o, f.viewConfig = u), p(s);
154
158
  },
155
159
  removeView: async (t) => {
156
- var o;
160
+ var n;
157
161
  const {
158
162
  tableKey: i,
159
- viewKey: l
163
+ viewKey: s
160
164
  } = t;
161
- await ((o = s == null ? void 0 : s.removeView) == null ? void 0 : o.call(s, {
165
+ await ((n = l == null ? void 0 : l.removeView) == null ? void 0 : n.call(l, {
162
166
  tableKey: i,
163
- viewKey: l
164
- })), r.value = r.value.filter((m) => m.viewKey !== l), l === V.value && w(I());
167
+ viewKey: s
168
+ })), m.value = m.value.filter((o) => o.viewKey !== s), s === d.value && p(I());
165
169
  }
166
- }, H = {
167
- tableKey: a.tableKey,
168
- currentViewKey: V,
169
- changeCurrentViewKey: w,
170
- popoverOpen: M,
170
+ }, J = {
171
+ tableKey: r.tableKey,
172
+ currentViewKey: d,
173
+ changeCurrentViewKey: p,
174
+ popoverOpen: W,
171
175
  menuOpen: F,
172
- viewList: r,
173
- viewListCRUD: p,
176
+ viewList: m,
177
+ viewListCRUD: w,
174
178
  saveDataSource: e
175
179
  };
176
- return te(H), X(() => a.tableKey, (t) => {
180
+ return ie(J), Z(() => r.tableKey, (t) => {
177
181
  var i;
178
- se(t) && (d = !0, (i = p == null ? void 0 : p.getViewList) == null || i.call(p, {
182
+ se(t) && (c = !0, (i = w == null ? void 0 : w.getViewList) == null || i.call(w, {
179
183
  tableKey: t
180
184
  }));
181
185
  }, {
182
186
  immediate: !0
183
- }), k({
187
+ }), A({
184
188
  setFirstDefaultSystemView: (t) => {
185
189
  _ = t;
186
190
  }
187
- }), (t, i) => (S(), Z(b(ee), U({
191
+ }), (t, i) => (R(), U(b(te), C({
188
192
  ...t.$attrs
189
193
  }, {
190
194
  open: F.value,
191
- "onUpdate:open": i[0] || (i[0] = (l) => F.value = l),
195
+ "onUpdate:open": i[0] || (i[0] = (s) => F.value = s),
192
196
  class: [b(g)()],
193
- "button-props": W,
194
- "menu-list": q.value,
197
+ "button-props": q,
198
+ "menu-list": H.value,
195
199
  "overlay-class-name": [b(g)("overlay")],
196
200
  trigger: "click",
197
201
  placement: "bottom"
198
202
  }), {
199
- icon: R(() => [C("div", {
200
- class: O([b(g)("icon")])
201
- }, [N(D)], 2)]),
203
+ icon: S(() => [O("div", {
204
+ class: D([b(g)("icon")])
205
+ }, [N(ee)], 2)]),
202
206
  _: 1
203
207
  }, 16, ["open", "class", "menu-list", "overlay-class-name"]));
204
208
  }
205
209
  });
206
210
  export {
207
- _e as default
211
+ Ie as default
208
212
  };
@@ -5,6 +5,7 @@ declare const ApView: {
5
5
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApViewProps> & Readonly<{}>, {
6
6
  setFirstDefaultSystemView: (value: boolean) => void;
7
7
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
8
+ manual: boolean;
8
9
  maxViewNum: number;
9
10
  isDefaultSystemView: boolean;
10
11
  isFirstDefaultSystemView: boolean;
@@ -18,6 +19,7 @@ declare const ApView: {
18
19
  }, Readonly< ApViewProps> & Readonly<{}>, {
19
20
  setFirstDefaultSystemView: (value: boolean) => void;
20
21
  }, {}, {}, {}, {
22
+ manual: boolean;
21
23
  maxViewNum: number;
22
24
  isDefaultSystemView: boolean;
23
25
  isFirstDefaultSystemView: boolean;
@@ -28,6 +30,7 @@ declare const ApView: {
28
30
  } & ComponentOptionsBase<Readonly< ApViewProps> & Readonly<{}>, {
29
31
  setFirstDefaultSystemView: (value: boolean) => void;
30
32
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
33
+ manual: boolean;
31
34
  maxViewNum: number;
32
35
  isDefaultSystemView: boolean;
33
36
  isFirstDefaultSystemView: boolean;
@@ -67,6 +67,10 @@ export interface ApViewProps {
67
67
  * 指定初始化默认视图为系统视图(仅初始化生效)
68
68
  */
69
69
  isFirstDefaultSystemView?: boolean;
70
+ /**
71
+ * 是否手动发起第一次网络请求,默认为 false
72
+ */
73
+ manual?: boolean;
70
74
  }
71
75
  export interface ApViewExpose {
72
76
  setFirstDefaultSystemView: (value: boolean) => void;
@@ -0,0 +1,14 @@
1
+ interface UseKeepAliveFlagOptions {
2
+ /** 状态切换到deactivated时触发 */
3
+ afterDeactivated?: () => void;
4
+ }
5
+ /**
6
+ * 获取keepAliveFlag
7
+ * @returns
8
+ */
9
+ export declare function useKeepAliveFlag(options?: UseKeepAliveFlagOptions): {
10
+ isDeactivated: () => boolean;
11
+ isActivated: () => boolean;
12
+ registerAfterDeactivated: (fn: UseKeepAliveFlagOptions["afterDeactivated"]) => void;
13
+ };
14
+ export {};
@@ -0,0 +1,18 @@
1
+ import { onActivated as v, onDeactivated as c } from "vue";
2
+ function l(a) {
3
+ let e = "notKeepAlive", t = a == null ? void 0 : a.afterDeactivated;
4
+ return v(() => {
5
+ e = "activated";
6
+ }), c(() => {
7
+ e = "deactivated", t == null || t();
8
+ }), {
9
+ isDeactivated: () => e === "deactivated",
10
+ isActivated: () => e === "activated",
11
+ registerAfterDeactivated: (i) => {
12
+ t = i;
13
+ }
14
+ };
15
+ }
16
+ export {
17
+ l as useKeepAliveFlag
18
+ };
@@ -19,6 +19,10 @@ export interface UsePageListApGrid extends ApGridProps {
19
19
  * 表格刷新相关
20
20
  */
21
21
  tableRefresh?: boolean | Omit<UseTableRefreshOption, 'apTableRef'>;
22
+ /** 是否需要在deactivated的时候清空数据
23
+ * @default true
24
+ */
25
+ clearDataOnDeactivated?: boolean;
22
26
  }
23
27
  /**
24
28
  * 集成了列表页面的ApGrid的默认配置
@@ -1,93 +1,97 @@
1
1
  import "../index.mjs";
2
- import { merge as c, cloneDeep as S } from "lodash-unified";
3
- import { ref as v } from "vue";
4
- import { useTableRefresh as g } from "./useTableRefresh.mjs";
5
- function T(s) {
6
- const o = v(null), {
7
- isShowRowSelection: i = !0,
8
- clearSelectionOnRequest: f = !0,
2
+ import { merge as i, cloneDeep as F } from "lodash-unified";
3
+ import { ref as R } from "vue";
4
+ import { useKeepAliveFlag as w } from "./useKeepAliveFlag.mjs";
5
+ import { useTableRefresh as V } from "./useTableRefresh.mjs";
6
+ function E(s) {
7
+ const t = R(null), {
8
+ isShowRowSelection: f = !0,
9
+ clearSelectionOnRequest: d = !0,
9
10
  transformSearchFormValues: a,
10
11
  api: l,
11
- tableRefresh: d = !0,
12
- virtual: m,
13
- ...p
12
+ tableRefresh: m = !0,
13
+ virtual: p,
14
+ clearDataOnDeactivated: v = !0,
15
+ ...S
14
16
  } = s || {};
15
17
  let n = null;
16
18
  const u = () => {
17
19
  var e, r;
18
- (r = (e = o.value) == null ? void 0 : e.rowSelection) == null || r.clearAll();
20
+ (r = (e = t.value) == null ? void 0 : e.rowSelection) == null || r.clearAll();
19
21
  };
20
- return g({
21
- ...R(d),
22
- apTableRef: o
23
- }), [c(
22
+ V({
23
+ ...b(m),
24
+ apTableRef: t
25
+ });
26
+ const c = () => {
27
+ var e;
28
+ (e = t.value) == null || e.submit();
29
+ }, h = () => {
30
+ var e;
31
+ (e = t.value) == null || e.reset();
32
+ }, { isDeactivated: g } = w({
33
+ afterDeactivated: c
34
+ });
35
+ return [i(
24
36
  {
25
37
  // scroll,tableLayout,columnResizable设置表格可拖动
26
38
  scroll: { x: "100%", y: "100%" },
27
39
  columnResizable: !0,
28
40
  request: l ? async (e) => {
29
- n = e.sort;
30
- const r = a ? a(e) : e;
31
- try {
32
- if (!l) throw new Error("api is not defined");
33
- const { records: t, total: h } = await l(r);
34
- return f && u(), {
35
- data: t,
36
- total: h
37
- };
38
- } catch (t) {
39
- return console.error(t), {
41
+ if (g() && v)
42
+ return {
40
43
  data: [],
41
44
  total: 0
42
45
  };
43
- }
46
+ n = e.sort;
47
+ const r = a ? a(e) : e;
48
+ if (!l) throw new Error("api is not defined");
49
+ const { records: o, total: A } = await l(r);
50
+ return d && u(), {
51
+ data: o,
52
+ total: A
53
+ };
44
54
  } : void 0,
45
- rowSelection: i ? {
55
+ rowSelection: f ? {
46
56
  fixed: "left",
47
57
  columnWidth: 38
48
58
  } : void 0,
49
59
  ref(e) {
50
- o.value = e;
60
+ t.value = e;
51
61
  },
52
- virtual: c(
62
+ virtual: i(
53
63
  {
54
64
  oSize: 20,
55
65
  y: 20
56
66
  },
57
- m
67
+ p
58
68
  ),
59
69
  // 新UI规范,需要都添加分割线
60
70
  card: !0
61
71
  },
62
- p
72
+ S
63
73
  ), {
64
- reload: () => {
65
- var e;
66
- (e = o.value) == null || e.submit();
67
- },
68
- reset: () => {
69
- var e;
70
- (e = o.value) == null || e.reset();
71
- },
74
+ reload: c,
75
+ reset: h,
72
76
  getSearchFormValues: (e = !0) => {
73
- var t;
74
- const r = ((t = o.value) == null ? void 0 : t.getSearchFormValues(!!e)) || {};
77
+ var o;
78
+ const r = ((o = t.value) == null ? void 0 : o.getSearchFormValues(!!e)) || {};
75
79
  return a ? a(r) : r;
76
80
  },
77
- getApGridInstance: () => o.value,
81
+ getApGridInstance: () => t.value,
78
82
  getSearchFormValuesAndSorted: (e = !0) => {
79
- var t;
80
- const r = ((t = o.value) == null ? void 0 : t.getSearchFormValues(!!e)) || {};
81
- return r.sort = n && S(n), a ? a(r) : r;
83
+ var o;
84
+ const r = ((o = t.value) == null ? void 0 : o.getSearchFormValues(!!e)) || {};
85
+ return r.sort = n && F(n), a ? a(r) : r;
82
86
  },
83
87
  clearSelection: u
84
88
  }];
85
89
  }
86
- function R(s) {
90
+ function b(s) {
87
91
  return s === !0 ? {} : s === !1 ? {
88
92
  refreshBefore: () => !1
89
93
  } : s;
90
94
  }
91
95
  export {
92
- T as usePageListApGrid
96
+ E as usePageListApGrid
93
97
  };
@@ -16,7 +16,6 @@ export * from './ap-title';
16
16
  export * from './hooks/index';
17
17
  export * from './ap-summary';
18
18
  export * from './ap-appendix';
19
- export * from './ap-group-search';
20
19
  export * from './ap-upload-file';
21
20
  export * from './batch-input-group';
22
21
  export * from './ap-size-input';