@aplus-frontend/ui 0.6.8 → 6.10.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-descriptions/formatter/index.d.ts +5 -0
- package/es/src/ap-descriptions/formatter/index.mjs +39 -38
- package/es/src/ap-descriptions/interface.d.ts +7 -1
- package/es/src/ap-field/rate/index.vue.d.ts +1 -1
- package/es/src/ap-form/interface.d.ts +6 -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 +39 -0
- 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-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/usePageListApGrid.mjs +23 -30
- 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-descriptions/formatter/index.d.ts +5 -0
- package/lib/src/ap-descriptions/formatter/index.js +1 -1
- package/lib/src/ap-descriptions/interface.d.ts +7 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
- package/lib/src/ap-form/interface.d.ts +6 -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-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-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/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 +24 -0
- package/theme/ap-grid/index.less +8 -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 +24 -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
|
@@ -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;
|
|
@@ -4,31 +4,31 @@ import { ref as R } from "vue";
|
|
|
4
4
|
import { useKeepAliveFlag as w } from "./useKeepAliveFlag.mjs";
|
|
5
5
|
import { useTableRefresh as V } from "./useTableRefresh.mjs";
|
|
6
6
|
function E(s) {
|
|
7
|
-
const
|
|
7
|
+
const t = R(null), {
|
|
8
8
|
isShowRowSelection: f = !0,
|
|
9
9
|
clearSelectionOnRequest: d = !0,
|
|
10
10
|
transformSearchFormValues: a,
|
|
11
11
|
api: l,
|
|
12
12
|
tableRefresh: m = !0,
|
|
13
13
|
virtual: p,
|
|
14
|
-
clearDataOnDeactivated:
|
|
15
|
-
...
|
|
14
|
+
clearDataOnDeactivated: v = !0,
|
|
15
|
+
...S
|
|
16
16
|
} = s || {};
|
|
17
17
|
let n = null;
|
|
18
18
|
const u = () => {
|
|
19
19
|
var e, r;
|
|
20
|
-
(r = (e =
|
|
20
|
+
(r = (e = t.value) == null ? void 0 : e.rowSelection) == null || r.clearAll();
|
|
21
21
|
};
|
|
22
22
|
V({
|
|
23
23
|
...b(m),
|
|
24
|
-
apTableRef:
|
|
24
|
+
apTableRef: t
|
|
25
25
|
});
|
|
26
26
|
const c = () => {
|
|
27
27
|
var e;
|
|
28
|
-
(e =
|
|
29
|
-
},
|
|
28
|
+
(e = t.value) == null || e.submit();
|
|
29
|
+
}, h = () => {
|
|
30
30
|
var e;
|
|
31
|
-
(e =
|
|
31
|
+
(e = t.value) == null || e.reset();
|
|
32
32
|
}, { isDeactivated: g } = w({
|
|
33
33
|
afterDeactivated: c
|
|
34
34
|
});
|
|
@@ -38,33 +38,26 @@ function E(s) {
|
|
|
38
38
|
scroll: { x: "100%", y: "100%" },
|
|
39
39
|
columnResizable: !0,
|
|
40
40
|
request: l ? async (e) => {
|
|
41
|
-
if (g() &&
|
|
41
|
+
if (g() && v)
|
|
42
42
|
return {
|
|
43
43
|
data: [],
|
|
44
44
|
total: 0
|
|
45
45
|
};
|
|
46
46
|
n = e.sort;
|
|
47
47
|
const r = a ? a(e) : e;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
} catch (t) {
|
|
56
|
-
return console.error(t), {
|
|
57
|
-
data: [],
|
|
58
|
-
total: 0
|
|
59
|
-
};
|
|
60
|
-
}
|
|
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
|
+
};
|
|
61
54
|
} : void 0,
|
|
62
55
|
rowSelection: f ? {
|
|
63
56
|
fixed: "left",
|
|
64
57
|
columnWidth: 38
|
|
65
58
|
} : void 0,
|
|
66
59
|
ref(e) {
|
|
67
|
-
|
|
60
|
+
t.value = e;
|
|
68
61
|
},
|
|
69
62
|
virtual: i(
|
|
70
63
|
{
|
|
@@ -76,19 +69,19 @@ function E(s) {
|
|
|
76
69
|
// 新UI规范,需要都添加分割线
|
|
77
70
|
card: !0
|
|
78
71
|
},
|
|
79
|
-
|
|
72
|
+
S
|
|
80
73
|
), {
|
|
81
74
|
reload: c,
|
|
82
|
-
reset:
|
|
75
|
+
reset: h,
|
|
83
76
|
getSearchFormValues: (e = !0) => {
|
|
84
|
-
var
|
|
85
|
-
const r = ((
|
|
77
|
+
var o;
|
|
78
|
+
const r = ((o = t.value) == null ? void 0 : o.getSearchFormValues(!!e)) || {};
|
|
86
79
|
return a ? a(r) : r;
|
|
87
80
|
},
|
|
88
|
-
getApGridInstance: () =>
|
|
81
|
+
getApGridInstance: () => t.value,
|
|
89
82
|
getSearchFormValuesAndSorted: (e = !0) => {
|
|
90
|
-
var
|
|
91
|
-
const r = ((
|
|
83
|
+
var o;
|
|
84
|
+
const r = ((o = t.value) == null ? void 0 : o.getSearchFormValues(!!e)) || {};
|
|
92
85
|
return r.sort = n && F(n), a ? a(r) : r;
|
|
93
86
|
},
|
|
94
87
|
clearSelection: u
|
|
@@ -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';
|
|
@@ -1,59 +1,55 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { ApAttachment as
|
|
1
|
+
import { default as m } from "./ap-table-modal/index.mjs";
|
|
2
|
+
import { ApAttachment as f } from "./ap-attachment/index.mjs";
|
|
3
3
|
import { ApBatchAction as a } from "./ap-batch-action/index.mjs";
|
|
4
4
|
import { ApBatchActionGroup as i } from "./ap-batch-action-group/index.mjs";
|
|
5
|
-
import { ApButtonGroup as
|
|
6
|
-
import { ApCard as
|
|
7
|
-
import { ApExpandAlert as
|
|
8
|
-
import { ApExportGroup as
|
|
9
|
-
import { ApImage as
|
|
5
|
+
import { ApButtonGroup as l } from "./ap-button-group/index.mjs";
|
|
6
|
+
import { ApCard as c } from "./ap-card/index.mjs";
|
|
7
|
+
import { ApExpandAlert as S } from "./ap-expand-alert/index.mjs";
|
|
8
|
+
import { ApExportGroup as I } from "./ap-export-group/index.mjs";
|
|
9
|
+
import { ApImage as b } from "./ap-image/index.mjs";
|
|
10
10
|
import { ApInputRadio as y } from "./ap-input-radio/index.mjs";
|
|
11
|
-
import { ApLabel as
|
|
12
|
-
import { ApLadder as
|
|
13
|
-
import { ApSelectLayout as
|
|
14
|
-
import { ApStatus as
|
|
15
|
-
import { ApTitle as
|
|
11
|
+
import { ApLabel as T, ApLabelGroup as C } from "./ap-label/index.mjs";
|
|
12
|
+
import { ApLadder as R } from "./ap-ladder/index.mjs";
|
|
13
|
+
import { ApSelectLayout as v } from "./ap-select-layout/index.mjs";
|
|
14
|
+
import { ApStatus as z, ApStatusGroup as D } from "./ap-status/index.mjs";
|
|
15
|
+
import { ApTitle as K } from "./ap-title/index.mjs";
|
|
16
16
|
import "./hooks/index.mjs";
|
|
17
|
-
import { ApSummary as
|
|
17
|
+
import { ApSummary as P } from "./ap-summary/index.mjs";
|
|
18
18
|
import { ApAppendix as j } from "./ap-appendix/index.mjs";
|
|
19
|
-
import { ApExtensionSelect as q, ApGroupSearch as F, ApPopoverSelect as J } from "./ap-group-search/index.mjs";
|
|
20
19
|
import "./ap-upload-file/index.mjs";
|
|
21
20
|
import "./batch-input-group/index.mjs";
|
|
22
|
-
import { ApSizeInput as
|
|
23
|
-
import { ApProductInfo as
|
|
24
|
-
import { ApCopy as
|
|
25
|
-
import { ApView as
|
|
26
|
-
import { ApRadioGroup as
|
|
27
|
-
import { ApKeepAlive as
|
|
28
|
-
import { ApTransformDataHelper as
|
|
21
|
+
import { ApSizeInput as q } from "./ap-size-input/index.mjs";
|
|
22
|
+
import { ApProductInfo as J } from "./ap-product-info/index.mjs";
|
|
23
|
+
import { ApCopy as O } from "./ap-copy/index.mjs";
|
|
24
|
+
import { ApView as U } from "./ap-view/index.mjs";
|
|
25
|
+
import { ApRadioGroup as X } from "./ap-radio-group/index.mjs";
|
|
26
|
+
import { ApKeepAlive as Z } from "./ap-keep-alive/index.mjs";
|
|
27
|
+
import { ApTransformDataHelper as $ } from "../utils/ap-trans-data/index.mjs";
|
|
29
28
|
export {
|
|
30
29
|
j as ApAppendix,
|
|
31
|
-
|
|
30
|
+
f as ApAttachment,
|
|
32
31
|
a as ApBatchAction,
|
|
33
32
|
i as ApBatchActionGroup,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
F as ApGroupSearch,
|
|
41
|
-
L as ApImage,
|
|
33
|
+
l as ApButtonGroup,
|
|
34
|
+
c as ApCard,
|
|
35
|
+
O as ApCopy,
|
|
36
|
+
S as ApExpandAlert,
|
|
37
|
+
I as ApExportGroup,
|
|
38
|
+
b as ApImage,
|
|
42
39
|
y as ApInputRadio,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
J as
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
Z as ApView
|
|
40
|
+
Z as ApKeepAlive,
|
|
41
|
+
T as ApLabel,
|
|
42
|
+
C as ApLabelGroup,
|
|
43
|
+
R as ApLadder,
|
|
44
|
+
J as ApProductInfo,
|
|
45
|
+
X as ApRadioGroup,
|
|
46
|
+
v as ApSelectLayout,
|
|
47
|
+
q as ApSizeInput,
|
|
48
|
+
z as ApStatus,
|
|
49
|
+
D as ApStatusGroup,
|
|
50
|
+
P as ApSummary,
|
|
51
|
+
m as ApTableModal,
|
|
52
|
+
K as ApTitle,
|
|
53
|
+
$ as ApTransformDataHelper,
|
|
54
|
+
U as ApView
|
|
59
55
|
};
|
package/es/src/index.d.ts
CHANGED