@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.
- package/es/index.mjs +187 -193
- package/es/src/ap-field/rate/index.vue.d.ts +1 -1
- package/es/src/ap-form/interface.d.ts +10 -5
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +42 -36
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +5 -0
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +24 -0
- package/es/src/ap-form/search-form/index.vue.d.ts +1 -0
- package/es/src/ap-form/search-form/index.vue.mjs +53 -48
- package/es/src/ap-grid/hooks/use-row-selection.mjs +57 -62
- package/es/src/ap-grid/utils/renderer.mjs +9 -9
- package/es/src/business/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/ap-label/index.d.ts +3 -3
- package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +1 -1
- package/es/src/business/ap-radio-group/index.d.ts +3 -3
- package/es/src/business/ap-summary/interface.d.ts +1 -1
- package/es/src/business/ap-view/ap-view.vue.d.ts +1 -0
- package/es/src/business/ap-view/ap-view.vue2.mjs +122 -118
- package/es/src/business/ap-view/index.d.ts +3 -0
- package/es/src/business/ap-view/interface.d.ts +4 -0
- package/es/src/business/hooks/useKeepAliveFlag.d.ts +14 -0
- package/es/src/business/hooks/useKeepAliveFlag.mjs +18 -0
- package/es/src/business/hooks/usePageListApGrid.d.ts +4 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +52 -48
- package/es/src/business/index.d.ts +0 -1
- package/es/src/business/index.mjs +42 -46
- package/es/src/index.d.ts +0 -1
- package/es/src/index.mjs +274 -281
- package/es/src/locale/lang/en.mjs +0 -7
- package/es/src/locale/lang/zh-cn.mjs +0 -7
- package/es/src/path-map.mjs +0 -2
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
- package/lib/src/ap-form/interface.d.ts +10 -5
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +5 -0
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -0
- package/lib/src/ap-form/search-form/index.vue.d.ts +1 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/hooks/use-row-selection.js +1 -1
- package/lib/src/ap-grid/utils/renderer.js +1 -1
- package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/ap-label/index.d.ts +3 -3
- package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +1 -1
- package/lib/src/business/ap-radio-group/index.d.ts +3 -3
- package/lib/src/business/ap-summary/interface.d.ts +1 -1
- package/lib/src/business/ap-view/ap-view.vue.d.ts +1 -0
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/index.d.ts +3 -0
- package/lib/src/business/ap-view/interface.d.ts +4 -0
- package/lib/src/business/hooks/useKeepAliveFlag.d.ts +14 -0
- package/lib/src/business/hooks/useKeepAliveFlag.js +1 -0
- package/lib/src/business/hooks/usePageListApGrid.d.ts +4 -0
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/business/index.d.ts +0 -1
- package/lib/src/business/index.js +1 -1
- package/lib/src/index.d.ts +0 -1
- package/lib/src/index.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -10
- package/theme/ap-form/index.css +16 -0
- package/theme/ap-form/search-form.css +16 -0
- package/theme/ap-form/search-form.less +16 -0
- package/theme/ap-grid/index.css +20 -0
- package/theme/ap-grid/index.less +4 -0
- package/theme/ap-table/ap-table.css +16 -0
- package/theme/ap-table-modal/index.css +16 -0
- package/theme/editable-table/index.css +16 -0
- package/theme/index.css +20 -0
- package/es/src/ap-info-layout/ApInfoLayout.vue.d.ts +0 -73
- package/es/src/ap-info-layout/ApInfoLayout.vue.mjs +0 -46
- package/es/src/ap-info-layout/ApInfoLayout.vue2.mjs +0 -4
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +0 -29
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.mjs +0 -4
- package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +0 -41
- package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +0 -30
- package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.mjs +0 -4
- package/es/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.mjs +0 -71
- package/es/src/ap-info-layout/index.d.ts +0 -3
- package/es/src/ap-info-layout/index.mjs +0 -2
- package/es/src/ap-info-layout/interface.d.ts +0 -10
- package/es/src/ap-info-layout/interface.mjs +0 -1
- package/es/src/ap-info-layout/style/css.d.ts +0 -0
- package/es/src/ap-info-layout/style/css.js +0 -1
- package/es/src/ap-info-layout/style/index.d.ts +0 -0
- package/es/src/ap-info-layout/style/index.js +0 -1
- package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +0 -35
- package/es/src/business/ap-group-search/ap-group-search.vue.mjs +0 -4
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +0 -202
- package/es/src/business/ap-group-search/extension-select/index.vue.d.ts +0 -14
- package/es/src/business/ap-group-search/extension-select/index.vue.mjs +0 -4
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +0 -135
- package/es/src/business/ap-group-search/extension-select/style/css.d.ts +0 -0
- package/es/src/business/ap-group-search/extension-select/style/css.js +0 -1
- package/es/src/business/ap-group-search/extension-select/style/index.d.ts +0 -0
- package/es/src/business/ap-group-search/extension-select/style/index.js +0 -1
- package/es/src/business/ap-group-search/images/icon-down.vue.d.ts +0 -3
- package/es/src/business/ap-group-search/images/icon-down.vue.mjs +0 -28
- package/es/src/business/ap-group-search/images/icon-line-select.vue.d.ts +0 -3
- package/es/src/business/ap-group-search/images/icon-line-select.vue.mjs +0 -45
- package/es/src/business/ap-group-search/index.d.ts +0 -1536
- package/es/src/business/ap-group-search/index.mjs +0 -14
- package/es/src/business/ap-group-search/interface.d.ts +0 -11
- package/es/src/business/ap-group-search/interface.mjs +0 -1
- package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +0 -424
- package/es/src/business/ap-group-search/popover-select/index.vue.mjs +0 -4
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +0 -193
- package/es/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
- package/es/src/business/ap-group-search/popover-select/style/css.js +0 -1
- package/es/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
- package/es/src/business/ap-group-search/popover-select/style/index.js +0 -1
- package/es/src/business/ap-group-search/style/css.d.ts +0 -0
- package/es/src/business/ap-group-search/style/css.js +0 -1
- package/es/src/business/ap-group-search/style/index.d.ts +0 -0
- package/es/src/business/ap-group-search/style/index.js +0 -1
- package/lib/src/ap-info-layout/ApInfoLayout.vue.d.ts +0 -73
- package/lib/src/ap-info-layout/ApInfoLayout.vue.js +0 -1
- package/lib/src/ap-info-layout/ApInfoLayout.vue2.js +0 -1
- package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.d.ts +0 -29
- package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue.js +0 -1
- package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +0 -1
- package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.d.ts +0 -30
- package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue.js +0 -1
- package/lib/src/ap-info-layout/ap-info-layout-aplus/ap-info-layout.vue2.js +0 -1
- package/lib/src/ap-info-layout/index.d.ts +0 -3
- package/lib/src/ap-info-layout/index.js +0 -1
- package/lib/src/ap-info-layout/interface.d.ts +0 -10
- package/lib/src/ap-info-layout/interface.js +0 -1
- package/lib/src/ap-info-layout/style/css.cjs +0 -1
- package/lib/src/ap-info-layout/style/css.d.ts +0 -0
- package/lib/src/ap-info-layout/style/index.cjs +0 -1
- package/lib/src/ap-info-layout/style/index.d.ts +0 -0
- package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +0 -35
- package/lib/src/business/ap-group-search/ap-group-search.vue.js +0 -1
- package/lib/src/business/ap-group-search/ap-group-search.vue2.js +0 -1
- package/lib/src/business/ap-group-search/extension-select/index.vue.d.ts +0 -14
- package/lib/src/business/ap-group-search/extension-select/index.vue.js +0 -1
- package/lib/src/business/ap-group-search/extension-select/index.vue2.js +0 -1
- package/lib/src/business/ap-group-search/extension-select/style/css.cjs +0 -1
- package/lib/src/business/ap-group-search/extension-select/style/css.d.ts +0 -0
- package/lib/src/business/ap-group-search/extension-select/style/index.cjs +0 -1
- package/lib/src/business/ap-group-search/extension-select/style/index.d.ts +0 -0
- package/lib/src/business/ap-group-search/images/icon-down.vue.d.ts +0 -3
- package/lib/src/business/ap-group-search/images/icon-down.vue.js +0 -1
- package/lib/src/business/ap-group-search/images/icon-line-select.vue.d.ts +0 -3
- package/lib/src/business/ap-group-search/images/icon-line-select.vue.js +0 -1
- package/lib/src/business/ap-group-search/index.d.ts +0 -1536
- package/lib/src/business/ap-group-search/index.js +0 -1
- package/lib/src/business/ap-group-search/interface.d.ts +0 -11
- package/lib/src/business/ap-group-search/interface.js +0 -1
- package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +0 -424
- package/lib/src/business/ap-group-search/popover-select/index.vue.js +0 -1
- package/lib/src/business/ap-group-search/popover-select/index.vue2.js +0 -2
- package/lib/src/business/ap-group-search/popover-select/style/css.cjs +0 -1
- package/lib/src/business/ap-group-search/popover-select/style/css.d.ts +0 -0
- package/lib/src/business/ap-group-search/popover-select/style/index.cjs +0 -1
- package/lib/src/business/ap-group-search/popover-select/style/index.d.ts +0 -0
- package/lib/src/business/ap-group-search/style/css.cjs +0 -1
- package/lib/src/business/ap-group-search/style/css.d.ts +0 -0
- package/lib/src/business/ap-group-search/style/index.cjs +0 -1
- 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 '
|
|
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
|
|
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
|
|
4
|
-
import { ApBatchActionGroup as
|
|
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
|
|
8
|
-
import { useInjectApTable as
|
|
9
|
-
import { SYSTEM_VIEW_KEY as
|
|
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
|
|
12
|
-
import { useNamespace as
|
|
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
|
|
15
|
-
import
|
|
16
|
-
const
|
|
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(
|
|
36
|
-
expose:
|
|
39
|
+
setup(k, {
|
|
40
|
+
expose: A
|
|
37
41
|
}) {
|
|
38
|
-
const
|
|
42
|
+
const r = k, L = me("viewCacheOption"), {
|
|
39
43
|
b: g
|
|
40
|
-
} =
|
|
41
|
-
t:
|
|
42
|
-
} = oe(), v =
|
|
43
|
-
viewKey:
|
|
44
|
-
viewName:
|
|
44
|
+
} = ne("ap-view"), {
|
|
45
|
+
t: P
|
|
46
|
+
} = oe(), v = E(() => ({
|
|
47
|
+
viewKey: V,
|
|
48
|
+
viewName: P("ap.apView.systemView")
|
|
45
49
|
})), {
|
|
46
|
-
getSearchFormValues:
|
|
47
|
-
setSearchFormValues:
|
|
48
|
-
submit:
|
|
49
|
-
reset:
|
|
50
|
-
getSearchFormSorterItems:
|
|
51
|
-
setSearchFormSorterItems:
|
|
52
|
-
resetSearchFormSorterItems:
|
|
53
|
-
} =
|
|
54
|
-
let
|
|
55
|
-
const
|
|
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(
|
|
58
|
-
maxViewNum:
|
|
61
|
+
content: N(re, {
|
|
62
|
+
maxViewNum: r.maxViewNum
|
|
59
63
|
}, null)
|
|
60
|
-
},
|
|
64
|
+
}, m = K([v.value]), H = E(() => m.value.map((t) => ({
|
|
61
65
|
id: t.viewKey,
|
|
62
|
-
content: N(
|
|
66
|
+
content: N(fe, {
|
|
63
67
|
view: t
|
|
64
68
|
}, null)
|
|
65
69
|
}))), e = {
|
|
66
|
-
getSearchFormValues:
|
|
67
|
-
setSearchFormValues:
|
|
68
|
-
submit:
|
|
69
|
-
reset:
|
|
70
|
-
getSearchFormSorterItems:
|
|
71
|
-
setSearchFormSorterItems:
|
|
72
|
-
resetSearchFormSorterItems:
|
|
73
|
-
...
|
|
74
|
-
},
|
|
75
|
-
...
|
|
76
|
-
...
|
|
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 (
|
|
79
|
-
return
|
|
80
|
-
if ((
|
|
81
|
-
return
|
|
82
|
-
const t =
|
|
83
|
-
return (t == null ? void 0 : t.viewKey) ??
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
const i =
|
|
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
|
|
89
|
-
i.viewKey ===
|
|
90
|
-
...Object.fromEntries(Object.keys(((
|
|
91
|
-
...((
|
|
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)),
|
|
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
|
-
},
|
|
98
|
+
}, w = {
|
|
95
99
|
getViewList: async (t) => {
|
|
96
100
|
var i;
|
|
97
101
|
try {
|
|
98
102
|
const {
|
|
99
|
-
tableKey:
|
|
100
|
-
} = t,
|
|
101
|
-
tableKey:
|
|
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
|
|
107
|
+
return m.value = [v.value, ...n ?? []], p(I()), m.value;
|
|
104
108
|
} catch {
|
|
105
|
-
return
|
|
109
|
+
return m.value = [v.value], p(V), m.value;
|
|
106
110
|
}
|
|
107
111
|
},
|
|
108
112
|
addView: async (t) => {
|
|
109
|
-
var
|
|
113
|
+
var f;
|
|
110
114
|
const {
|
|
111
115
|
tableKey: i,
|
|
112
|
-
viewKey:
|
|
113
|
-
viewName:
|
|
114
|
-
isDefault:
|
|
115
|
-
viewConfig:
|
|
116
|
+
viewKey: s,
|
|
117
|
+
viewName: n,
|
|
118
|
+
isDefault: o,
|
|
119
|
+
viewConfig: u
|
|
116
120
|
} = t;
|
|
117
|
-
await ((
|
|
121
|
+
await ((f = l == null ? void 0 : l.addView) == null ? void 0 : f.call(l, {
|
|
118
122
|
tableKey: i,
|
|
119
|
-
viewKey:
|
|
120
|
-
viewName:
|
|
121
|
-
isDefault:
|
|
122
|
-
viewConfig:
|
|
123
|
-
})),
|
|
124
|
-
...
|
|
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
|
-
}))),
|
|
127
|
-
viewKey:
|
|
128
|
-
viewName:
|
|
129
|
-
isDefault:
|
|
130
|
-
viewConfig:
|
|
131
|
-
}],
|
|
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
|
|
138
|
+
var a;
|
|
135
139
|
const {
|
|
136
140
|
tableKey: i,
|
|
137
|
-
viewKey:
|
|
138
|
-
viewName:
|
|
139
|
-
isDefault:
|
|
140
|
-
viewConfig:
|
|
141
|
+
viewKey: s,
|
|
142
|
+
viewName: n,
|
|
143
|
+
isDefault: o,
|
|
144
|
+
viewConfig: u
|
|
141
145
|
} = t;
|
|
142
|
-
await ((
|
|
146
|
+
await ((a = l == null ? void 0 : l.changeView) == null ? void 0 : a.call(l, {
|
|
143
147
|
tableKey: i,
|
|
144
|
-
viewKey:
|
|
145
|
-
viewName:
|
|
146
|
-
isDefault:
|
|
147
|
-
viewConfig:
|
|
148
|
-
})),
|
|
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
|
|
153
|
-
|
|
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
|
|
160
|
+
var n;
|
|
157
161
|
const {
|
|
158
162
|
tableKey: i,
|
|
159
|
-
viewKey:
|
|
163
|
+
viewKey: s
|
|
160
164
|
} = t;
|
|
161
|
-
await ((
|
|
165
|
+
await ((n = l == null ? void 0 : l.removeView) == null ? void 0 : n.call(l, {
|
|
162
166
|
tableKey: i,
|
|
163
|
-
viewKey:
|
|
164
|
-
})),
|
|
167
|
+
viewKey: s
|
|
168
|
+
})), m.value = m.value.filter((o) => o.viewKey !== s), s === d.value && p(I());
|
|
165
169
|
}
|
|
166
|
-
},
|
|
167
|
-
tableKey:
|
|
168
|
-
currentViewKey:
|
|
169
|
-
changeCurrentViewKey:
|
|
170
|
-
popoverOpen:
|
|
170
|
+
}, J = {
|
|
171
|
+
tableKey: r.tableKey,
|
|
172
|
+
currentViewKey: d,
|
|
173
|
+
changeCurrentViewKey: p,
|
|
174
|
+
popoverOpen: W,
|
|
171
175
|
menuOpen: F,
|
|
172
|
-
viewList:
|
|
173
|
-
viewListCRUD:
|
|
176
|
+
viewList: m,
|
|
177
|
+
viewListCRUD: w,
|
|
174
178
|
saveDataSource: e
|
|
175
179
|
};
|
|
176
|
-
return
|
|
180
|
+
return ie(J), Z(() => r.tableKey, (t) => {
|
|
177
181
|
var i;
|
|
178
|
-
se(t) && (
|
|
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
|
-
}),
|
|
187
|
+
}), A({
|
|
184
188
|
setFirstDefaultSystemView: (t) => {
|
|
185
189
|
_ = t;
|
|
186
190
|
}
|
|
187
|
-
}), (t, i) => (
|
|
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] = (
|
|
195
|
+
"onUpdate:open": i[0] || (i[0] = (s) => F.value = s),
|
|
192
196
|
class: [b(g)()],
|
|
193
|
-
"button-props":
|
|
194
|
-
"menu-list":
|
|
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:
|
|
200
|
-
class:
|
|
201
|
-
}, [N(
|
|
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
|
-
|
|
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
|
|
3
|
-
import { ref as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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:
|
|
12
|
-
virtual:
|
|
13
|
-
|
|
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 =
|
|
20
|
+
(r = (e = t.value) == null ? void 0 : e.rowSelection) == null || r.clearAll();
|
|
19
21
|
};
|
|
20
|
-
|
|
21
|
-
...
|
|
22
|
-
apTableRef:
|
|
23
|
-
})
|
|
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
|
-
|
|
30
|
-
|
|
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:
|
|
55
|
+
rowSelection: f ? {
|
|
46
56
|
fixed: "left",
|
|
47
57
|
columnWidth: 38
|
|
48
58
|
} : void 0,
|
|
49
59
|
ref(e) {
|
|
50
|
-
|
|
60
|
+
t.value = e;
|
|
51
61
|
},
|
|
52
|
-
virtual:
|
|
62
|
+
virtual: i(
|
|
53
63
|
{
|
|
54
64
|
oSize: 20,
|
|
55
65
|
y: 20
|
|
56
66
|
},
|
|
57
|
-
|
|
67
|
+
p
|
|
58
68
|
),
|
|
59
69
|
// 新UI规范,需要都添加分割线
|
|
60
70
|
card: !0
|
|
61
71
|
},
|
|
62
|
-
|
|
72
|
+
S
|
|
63
73
|
), {
|
|
64
|
-
reload:
|
|
65
|
-
|
|
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
|
|
74
|
-
const r = ((
|
|
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: () =>
|
|
81
|
+
getApGridInstance: () => t.value,
|
|
78
82
|
getSearchFormValuesAndSorted: (e = !0) => {
|
|
79
|
-
var
|
|
80
|
-
const r = ((
|
|
81
|
-
return r.sort = n &&
|
|
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
|
|
90
|
+
function b(s) {
|
|
87
91
|
return s === !0 ? {} : s === !1 ? {
|
|
88
92
|
refreshBefore: () => !1
|
|
89
93
|
} : s;
|
|
90
94
|
}
|
|
91
95
|
export {
|
|
92
|
-
|
|
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';
|