@aplus-frontend/ui 0.6.0-beta.0 → 0.6.0-beta.2
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/src/ap-button/ap-button.vue.mjs +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +57 -58
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/item/index.vue.mjs +33 -28
- package/es/src/ap-form/items/checkbox/index.vue.mjs +1 -0
- package/es/src/ap-form/items/date/index.vue.mjs +8 -7
- package/es/src/ap-form/items/date-range/index.vue.mjs +1 -0
- package/es/src/ap-form/items/number/index.vue.mjs +9 -8
- package/es/src/ap-form/items/radio/index.vue.mjs +1 -0
- package/es/src/ap-form/items/select/index.vue.mjs +7 -6
- package/es/src/ap-form/items/switch/index.vue.mjs +1 -0
- package/es/src/ap-form/items/text/index.vue2.mjs +8 -7
- package/es/src/ap-form/items/text/password.vue.mjs +1 -0
- package/es/src/ap-form/items/text-area/index.vue.mjs +1 -0
- package/es/src/ap-form/items/tree-select/index.vue.mjs +6 -5
- package/es/src/ap-form/render/item.vue.mjs +5 -4
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +10 -10
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +8 -8
- package/es/src/ap-form/search-form/index.vue.mjs +36 -35
- package/es/src/ap-grid/editable/form-item.vue.mjs +1 -1
- package/es/src/ap-grid/editable/index.vue.mjs +1 -1
- package/es/src/ap-grid/index.vue.mjs +149 -140
- package/es/src/ap-grid/interface.d.ts +1 -1
- package/es/src/ap-table/ap-table.vue2.mjs +206 -199
- package/es/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/es/src/ap-tag/ap-tag.vue.mjs +18 -12
- package/es/src/ap-tag/interface.d.ts +4 -0
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +11 -12
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +108 -99
- package/es/src/business/ap-export-group/index.d.ts +3 -0
- package/es/src/business/ap-export-group/interface.d.ts +7 -2
- package/es/src/business/ap-table-modal/modal-title.vue2.mjs +2 -2
- package/es/src/business/ap-view/ap-view.vue2.mjs +120 -114
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +63 -55
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +38 -38
- package/es/src/business/ap-view/interface.d.ts +4 -0
- package/es/src/business/batch-input-group/form-item.vue.mjs +1 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +2 -4
- package/es/src/check-card/index.vue2.mjs +1 -1
- package/es/src/config-provider/css-var.mjs +2 -2
- package/es/src/design-token/index.mjs +9 -3
- package/es/src/editable-table/form-item.vue.mjs +1 -1
- package/es/src/editable-table/index.vue.mjs +27 -27
- package/es/src/locale/lang/en.mjs +1 -1
- package/es/src/locale/lang/zh-cn.mjs +1 -1
- package/lib/src/ap-button/ap-button.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/render/item.vue.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-tag/ap-tag.vue.d.ts +1 -0
- package/lib/src/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/ap-tag/interface.d.ts +4 -0
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +1 -0
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/index.d.ts +3 -0
- package/lib/src/business/ap-export-group/interface.d.ts +7 -2
- package/lib/src/business/ap-table-modal/modal-title.vue2.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +4 -0
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/config-provider/css-var.js +1 -1
- package/lib/src/design-token/index.js +1 -1
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/package.json +1 -1
- package/theme/antd-global-overwrite/admin/index.css +5 -8
- package/theme/antd-global-overwrite/admin/modal.css +2 -5
- package/theme/antd-global-overwrite/admin/modal.less +3 -3
- package/theme/antd-global-overwrite/admin/table.css +3 -3
- package/theme/antd-global-overwrite/admin/table.less +3 -3
- package/theme/antd-global-overwrite/aplus/index.css +5 -8
- package/theme/antd-global-overwrite/aplus/modal.css +2 -5
- package/theme/antd-global-overwrite/aplus/modal.less +3 -3
- package/theme/antd-global-overwrite/aplus/table.css +3 -3
- package/theme/antd-global-overwrite/aplus/table.less +3 -3
- package/theme/ap-action/item-dropdown.css +5 -5
- package/theme/ap-action/item-dropdown.less +1 -1
- package/theme/ap-action/item.css +5 -5
- package/theme/ap-action/item.less +1 -1
- package/theme/ap-appendix/ap-appendix.css +7 -5
- package/theme/ap-appendix/ap-appendix.less +4 -2
- package/theme/ap-attachment/ap-attachment.css +7 -7
- package/theme/ap-attachment/ap-attachment.less +4 -4
- package/theme/ap-batch-action/ap-batch-action.css +9 -6
- package/theme/ap-batch-action/ap-batch-action.less +6 -3
- package/theme/ap-button/ap-button.css +3 -3
- package/theme/ap-card/ap-card.css +3 -3
- package/theme/ap-descriptions/ap-descriptions.css +6 -8
- package/theme/ap-descriptions/ap-descriptions.less +3 -5
- package/theme/ap-download/ap-download.css +10 -13
- package/theme/ap-download/ap-download.less +8 -11
- package/theme/ap-expand-alert/ap-expand-alert.css +4 -4
- package/theme/ap-expand-alert/ap-expand-alert.less +3 -4
- package/theme/ap-field/checkbox.css +4 -4
- package/theme/ap-field/checkbox.less +2 -1
- package/theme/ap-field/index.css +5 -5
- package/theme/ap-field/number.css +3 -3
- package/theme/ap-field/radio.css +4 -4
- package/theme/ap-field/radio.less +1 -1
- package/theme/ap-field/text-area.css +3 -3
- package/theme/ap-form/ap-form-item-group.css +3 -3
- package/theme/ap-form/ap-form-item.css +10 -8
- package/theme/ap-form/ap-form-item.less +8 -6
- package/theme/ap-form/drawer-form.css +3 -3
- package/theme/ap-form/index.css +21 -19
- package/theme/ap-form/item-text-group.css +3 -3
- package/theme/ap-form/item-text.css +3 -3
- package/theme/ap-form/modal-form.css +3 -3
- package/theme/ap-form/search-form-sorter.css +12 -12
- package/theme/ap-form/search-form-sorter.less +7 -7
- package/theme/ap-form/search-form.css +21 -19
- package/theme/ap-form/search-form.less +5 -5
- package/theme/ap-grid/editable.css +5 -5
- package/theme/ap-grid/editable.less +3 -2
- package/theme/ap-grid/index.css +43 -32
- package/theme/ap-grid/index.less +20 -9
- package/theme/ap-group-search/ap-extension-select.css +3 -3
- package/theme/ap-group-search/ap-group-search.css +3 -3
- package/theme/ap-group-search/ap-popover-select.css +3 -3
- package/theme/ap-image/ap-image.css +3 -3
- package/theme/ap-input-radio/ap-input-radio.css +3 -3
- package/theme/ap-label/ap-label.css +3 -3
- package/theme/ap-ladder/ap-ladder.css +6 -6
- package/theme/ap-ladder/ap-ladder.less +3 -3
- package/theme/ap-layout/ap-info-layout.css +3 -3
- package/theme/ap-list/index.css +4 -4
- package/theme/ap-list/index.less +2 -1
- package/theme/ap-product-info/ap-product-info.css +3 -3
- package/theme/ap-select-layout/ap-select-layout.css +11 -11
- package/theme/ap-select-layout/ap-select-layout.less +8 -8
- package/theme/ap-size-input/ap-size-input.css +3 -3
- package/theme/ap-status/ap-status.css +5 -6
- package/theme/ap-status/ap-status.less +2 -4
- package/theme/ap-summary/index.css +6 -6
- package/theme/ap-summary/index.less +3 -3
- package/theme/ap-table/ap-table-index.css +8 -8
- package/theme/ap-table/ap-table-index.less +5 -5
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +3 -3
- package/theme/ap-table/ap-table-paragraph-ellipsis.less +1 -1
- package/theme/ap-table/ap-table.css +46 -42
- package/theme/ap-table/ap-table.less +10 -9
- package/theme/ap-table/setting/index.css +7 -7
- package/theme/ap-table/setting/modal.css +5 -5
- package/theme/ap-table/setting/select-group.css +3 -3
- package/theme/ap-table/setting/sortable-item-meta.css +3 -3
- package/theme/ap-table/setting/sortable-item.css +3 -3
- package/theme/ap-table/setting/sorter.css +5 -5
- package/theme/ap-table-modal/index.css +46 -42
- package/theme/ap-tag/ap-tag-group.css +3 -3
- package/theme/ap-tag/ap-tag-group.less +2 -2
- package/theme/ap-tag/ap-tag.css +27 -18
- package/theme/ap-tag/ap-tag.less +37 -24
- package/theme/ap-title/ap-title.css +5 -5
- package/theme/ap-title/ap-title.less +2 -2
- package/theme/ap-upload/index.css +6 -6
- package/theme/ap-upload/multiple-file.css +4 -4
- package/theme/ap-upload/multiple-file.less +1 -1
- package/theme/ap-upload/picture.css +5 -5
- package/theme/ap-upload/picture.less +2 -2
- package/theme/ap-upload/single-file.css +3 -3
- package/theme/ap-upload/upload.css +3 -3
- package/theme/ap-upload-single/index.css +3 -3
- package/theme/ap-view/ap-view.css +7 -3
- package/theme/ap-view/ap-view.less +4 -0
- package/theme/batch-input-group/index.css +5 -5
- package/theme/batch-input-group/popover-input.css +3 -3
- package/theme/check-card/index.css +22 -22
- package/theme/check-card/index.less +17 -15
- package/theme/editable-table/index.css +36 -32
- package/theme/editable-table/index.less +9 -7
- package/theme/full-screen/index.css +3 -3
- package/theme/index.css +174 -147
- package/theme/mask/index.css +3 -3
- package/theme/mixins/config.less +26 -4
- package/theme/mixins/mixins.css +3 -3
- package/theme/scroll-bar/index.css +3 -3
- package/theme/scroll-view/index.css +3 -3
- package/theme/splitter/index.css +8 -8
- package/theme/text/group.css +3 -3
- package/theme/text/index.css +5 -5
- package/theme/work-order-modal/index.css +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as I, computed as _, ref as p, createVNode as g, watch as x, createBlock as S, openBlock as Y, unref as w, mergeProps as j, withCtx as z, createElementVNode as M, normalizeClass as W } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
3
|
import q from "./icons/line-down.vue.mjs";
|
|
4
4
|
import { ApBatchActionGroup as H } from "../ap-batch-action-group/index.mjs";
|
|
@@ -7,12 +7,14 @@ import "./components/menu-list-content.vue.mjs";
|
|
|
7
7
|
import { useViewProvide as J } from "./hooks/use-view-provide.mjs";
|
|
8
8
|
import { useInjectApTable as Q } from "../../ap-table/context.mjs";
|
|
9
9
|
import { SYSTEM_VIEW_KEY as y } from "./utils/enum.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { isValid as X } from "@aplus-frontend/utils";
|
|
11
|
+
import { useGlobalConfig as Z } from "../../config-provider/hooks/use-global-config.mjs";
|
|
12
|
+
import { useNamespace as h } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
13
|
import { useLocale as U } from "../../config-provider/hooks/use-locale.mjs";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
14
|
+
import R from "./components/main-button-content.vue2.mjs";
|
|
15
|
+
import C from "./components/menu-list-content.vue2.mjs";
|
|
16
|
+
const pe = /* @__PURE__ */ I({
|
|
17
|
+
name: "ApView",
|
|
16
18
|
__name: "ap-view",
|
|
17
19
|
props: {
|
|
18
20
|
tableKey: {},
|
|
@@ -22,150 +24,154 @@ const fe = /* @__PURE__ */ M({
|
|
|
22
24
|
default: 20
|
|
23
25
|
}
|
|
24
26
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
b:
|
|
28
|
-
} =
|
|
29
|
-
t:
|
|
30
|
-
} = U(),
|
|
27
|
+
setup(A) {
|
|
28
|
+
const f = A, E = Z("viewCacheOption"), {
|
|
29
|
+
b: V
|
|
30
|
+
} = h("ap-view"), {
|
|
31
|
+
t: F
|
|
32
|
+
} = U(), d = _(() => ({
|
|
31
33
|
viewKey: y,
|
|
32
|
-
viewName:
|
|
34
|
+
viewName: F("ap.apView.systemView")
|
|
33
35
|
})), {
|
|
34
|
-
getSearchFormValues:
|
|
35
|
-
setSearchFormValues:
|
|
36
|
-
submit:
|
|
37
|
-
reset:
|
|
38
|
-
} = Q(),
|
|
36
|
+
getSearchFormValues: L,
|
|
37
|
+
setSearchFormValues: P,
|
|
38
|
+
submit: T,
|
|
39
|
+
reset: k
|
|
40
|
+
} = Q(), B = p(!1), K = p(!1), r = p("system"), G = {
|
|
39
41
|
dropdownType: "dropdown",
|
|
40
|
-
content: g(h, {
|
|
41
|
-
maxViewNum: c.maxViewNum
|
|
42
|
-
}, null)
|
|
43
|
-
}, o = p([V.value]), D = N(() => o.value.map((t) => ({
|
|
44
|
-
id: t.viewKey,
|
|
45
42
|
content: g(R, {
|
|
46
|
-
|
|
43
|
+
maxViewNum: f.maxViewNum
|
|
44
|
+
}, null)
|
|
45
|
+
}, s = p([d.value]), $ = _(() => s.value.map((e) => ({
|
|
46
|
+
id: e.viewKey,
|
|
47
|
+
content: g(C, {
|
|
48
|
+
view: e
|
|
47
49
|
}, null)
|
|
48
50
|
}))), n = {
|
|
49
|
-
getSearchFormValues:
|
|
50
|
-
setSearchFormValues:
|
|
51
|
-
submit:
|
|
52
|
-
reset:
|
|
53
|
-
...
|
|
54
|
-
},
|
|
55
|
-
...
|
|
56
|
-
...
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
-
return (
|
|
60
|
-
},
|
|
61
|
-
getViewList: async (
|
|
62
|
-
var
|
|
51
|
+
getSearchFormValues: L,
|
|
52
|
+
setSearchFormValues: P,
|
|
53
|
+
submit: T,
|
|
54
|
+
reset: k,
|
|
55
|
+
...f.saveDataSource
|
|
56
|
+
}, t = {
|
|
57
|
+
...E.value,
|
|
58
|
+
...f.viewCacheOption
|
|
59
|
+
}, N = () => {
|
|
60
|
+
const e = s.value.find((a) => a.isDefault);
|
|
61
|
+
return (e == null ? void 0 : e.viewKey) ?? y;
|
|
62
|
+
}, c = {
|
|
63
|
+
getViewList: async (e) => {
|
|
64
|
+
var a;
|
|
63
65
|
try {
|
|
64
66
|
const {
|
|
65
|
-
tableKey:
|
|
66
|
-
} =
|
|
67
|
-
tableKey:
|
|
67
|
+
tableKey: o
|
|
68
|
+
} = e, i = await ((a = t == null ? void 0 : t.getViewList) == null ? void 0 : a.call(t, {
|
|
69
|
+
tableKey: o
|
|
68
70
|
}));
|
|
69
|
-
return
|
|
71
|
+
return s.value = [d.value, ...i ?? []], r.value = N(), s.value;
|
|
70
72
|
} catch {
|
|
71
|
-
return
|
|
73
|
+
return s.value = [d.value], r.value = y, s.value;
|
|
72
74
|
}
|
|
73
75
|
},
|
|
74
|
-
addView: async (
|
|
76
|
+
addView: async (e) => {
|
|
75
77
|
var u;
|
|
76
78
|
const {
|
|
77
|
-
tableKey:
|
|
78
|
-
viewKey:
|
|
79
|
-
viewName:
|
|
80
|
-
isDefault:
|
|
81
|
-
viewConfig:
|
|
82
|
-
} =
|
|
83
|
-
await ((u =
|
|
84
|
-
tableKey:
|
|
85
|
-
viewKey:
|
|
86
|
-
viewName:
|
|
87
|
-
isDefault:
|
|
88
|
-
viewConfig:
|
|
89
|
-
})),
|
|
79
|
+
tableKey: a,
|
|
80
|
+
viewKey: o,
|
|
81
|
+
viewName: i,
|
|
82
|
+
isDefault: l,
|
|
83
|
+
viewConfig: m
|
|
84
|
+
} = e;
|
|
85
|
+
await ((u = t == null ? void 0 : t.addView) == null ? void 0 : u.call(t, {
|
|
86
|
+
tableKey: a,
|
|
87
|
+
viewKey: o,
|
|
88
|
+
viewName: i,
|
|
89
|
+
isDefault: l,
|
|
90
|
+
viewConfig: m
|
|
91
|
+
})), l && (s.value = s.value.map((v) => ({
|
|
90
92
|
...v,
|
|
91
93
|
isDefault: !1
|
|
92
|
-
}))),
|
|
93
|
-
viewKey:
|
|
94
|
-
viewName:
|
|
95
|
-
isDefault:
|
|
96
|
-
viewConfig:
|
|
97
|
-
}], r.value =
|
|
94
|
+
}))), s.value = [...s.value, {
|
|
95
|
+
viewKey: o,
|
|
96
|
+
viewName: i,
|
|
97
|
+
isDefault: l,
|
|
98
|
+
viewConfig: m
|
|
99
|
+
}], r.value = o;
|
|
98
100
|
},
|
|
99
|
-
changeView: async (
|
|
101
|
+
changeView: async (e) => {
|
|
100
102
|
var v;
|
|
101
103
|
const {
|
|
102
|
-
tableKey:
|
|
103
|
-
viewKey:
|
|
104
|
-
viewName:
|
|
105
|
-
isDefault:
|
|
106
|
-
viewConfig:
|
|
107
|
-
} =
|
|
108
|
-
await ((v =
|
|
109
|
-
tableKey:
|
|
110
|
-
viewKey:
|
|
111
|
-
viewName:
|
|
112
|
-
isDefault:
|
|
113
|
-
viewConfig:
|
|
114
|
-
})),
|
|
104
|
+
tableKey: a,
|
|
105
|
+
viewKey: o,
|
|
106
|
+
viewName: i,
|
|
107
|
+
isDefault: l,
|
|
108
|
+
viewConfig: m
|
|
109
|
+
} = e;
|
|
110
|
+
await ((v = t == null ? void 0 : t.changeView) == null ? void 0 : v.call(t, {
|
|
111
|
+
tableKey: a,
|
|
112
|
+
viewKey: o,
|
|
113
|
+
viewName: i,
|
|
114
|
+
isDefault: l,
|
|
115
|
+
viewConfig: m
|
|
116
|
+
})), l && (s.value = s.value.map((b) => ({
|
|
115
117
|
...b,
|
|
116
118
|
isDefault: !1
|
|
117
119
|
})));
|
|
118
|
-
const u =
|
|
119
|
-
u && (u.viewName =
|
|
120
|
+
const u = s.value.find((b) => b.viewKey === o);
|
|
121
|
+
u && (u.viewName = i, u.isDefault = l, u.viewConfig = m), r.value = o;
|
|
120
122
|
},
|
|
121
|
-
removeView: async (
|
|
122
|
-
var
|
|
123
|
+
removeView: async (e) => {
|
|
124
|
+
var i;
|
|
123
125
|
const {
|
|
124
|
-
tableKey:
|
|
125
|
-
viewKey:
|
|
126
|
-
} =
|
|
127
|
-
await ((
|
|
128
|
-
tableKey:
|
|
129
|
-
viewKey:
|
|
130
|
-
})),
|
|
126
|
+
tableKey: a,
|
|
127
|
+
viewKey: o
|
|
128
|
+
} = e;
|
|
129
|
+
await ((i = t == null ? void 0 : t.removeView) == null ? void 0 : i.call(t, {
|
|
130
|
+
tableKey: a,
|
|
131
|
+
viewKey: o
|
|
132
|
+
})), s.value = s.value.filter((l) => l.viewKey !== o), o === r.value && (r.value = N());
|
|
131
133
|
}
|
|
132
|
-
},
|
|
133
|
-
tableKey:
|
|
134
|
+
}, D = {
|
|
135
|
+
tableKey: f.tableKey,
|
|
134
136
|
currentViewKey: r,
|
|
135
|
-
popoverOpen:
|
|
137
|
+
popoverOpen: B,
|
|
136
138
|
menuOpen: K,
|
|
137
|
-
viewList:
|
|
138
|
-
viewListCRUD:
|
|
139
|
+
viewList: s,
|
|
140
|
+
viewListCRUD: c,
|
|
139
141
|
saveDataSource: n
|
|
140
142
|
};
|
|
141
|
-
return
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
var
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
}), J(I), Y(() => {
|
|
148
|
-
var t;
|
|
149
|
-
(t = m == null ? void 0 : m.getViewList) == null || t.call(m, {
|
|
150
|
-
tableKey: c.tableKey
|
|
143
|
+
return x(r, (e) => {
|
|
144
|
+
const a = s.value.find((o) => o.viewKey === e);
|
|
145
|
+
a && setTimeout(() => {
|
|
146
|
+
var o, i, l, m;
|
|
147
|
+
a.viewKey === y ? (o = n.reset) == null || o.call(n) : ((l = n.setSearchFormValues) == null || l.call(n, ((i = a.viewConfig) == null ? void 0 : i.searchForm) ?? {}), (m = n.submit) == null || m.call(n));
|
|
151
148
|
});
|
|
152
|
-
}), (
|
|
149
|
+
}), J(D), x(() => f.tableKey, (e) => {
|
|
150
|
+
var a;
|
|
151
|
+
X(e) && ((a = c == null ? void 0 : c.getViewList) == null || a.call(c, {
|
|
152
|
+
tableKey: e
|
|
153
|
+
}));
|
|
154
|
+
}, {
|
|
155
|
+
immediate: !0
|
|
156
|
+
}), (e, a) => (Y(), S(w(H), j({
|
|
157
|
+
...e.$attrs
|
|
158
|
+
}, {
|
|
153
159
|
open: K.value,
|
|
154
|
-
"onUpdate:open":
|
|
155
|
-
class:
|
|
156
|
-
"button-props":
|
|
157
|
-
"menu-list":
|
|
158
|
-
"overlay-class-name": [w(
|
|
160
|
+
"onUpdate:open": a[0] || (a[0] = (o) => K.value = o),
|
|
161
|
+
class: [w(V)()],
|
|
162
|
+
"button-props": G,
|
|
163
|
+
"menu-list": $.value,
|
|
164
|
+
"overlay-class-name": [w(V)("overlay")],
|
|
159
165
|
trigger: "click",
|
|
160
166
|
placement: "bottom"
|
|
161
|
-
}, {
|
|
162
|
-
icon: z(() => [
|
|
163
|
-
class:
|
|
167
|
+
}), {
|
|
168
|
+
icon: z(() => [M("div", {
|
|
169
|
+
class: W([w(V)("icon")])
|
|
164
170
|
}, [g(q)], 2)]),
|
|
165
171
|
_: 1
|
|
166
|
-
},
|
|
172
|
+
}, 16, ["open", "class", "menu-list", "overlay-class-name"]));
|
|
167
173
|
}
|
|
168
174
|
});
|
|
169
175
|
export {
|
|
170
|
-
|
|
176
|
+
pe as default
|
|
171
177
|
};
|
|
@@ -1,47 +1,55 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Popover as
|
|
1
|
+
import { defineComponent as T, ref as $, computed as I, watch as Y, createBlock as E, openBlock as K, unref as e, withCtx as t, createElementVNode as c, normalizeClass as r, createVNode as a, createSlots as j, toDisplayString as p, createTextVNode as w } from "vue";
|
|
2
|
+
import { Popover as q, Tooltip as B, Space as x, Checkbox as D } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../../config-provider/index.mjs";
|
|
4
4
|
import L from "../icons/line-eye.vue.mjs";
|
|
5
5
|
import "../../../ap-form/ap-form.vue.mjs";
|
|
6
6
|
import { ApField as M } from "../../../ap-field/index.mjs";
|
|
7
7
|
import "../../../ap-button/index.mjs";
|
|
8
8
|
import O from "dayjs";
|
|
9
|
-
import { useViewInject as
|
|
10
|
-
import { generateUniqueKey as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
|
|
9
|
+
import { useViewInject as A } from "../hooks/use-view-provide.mjs";
|
|
10
|
+
import { generateUniqueKey as P } from "../utils/uuid.mjs";
|
|
11
|
+
import { cloneDeep as R } from "lodash-unified";
|
|
12
|
+
import { useLocale as U } from "../../../config-provider/hooks/use-locale.mjs";
|
|
13
|
+
import { useNamespace as G } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import v from "../../../ap-form/ap-form.vue2.mjs";
|
|
15
|
+
import N from "../../../ap-button/ap-button.vue.mjs";
|
|
16
|
+
const pe = /* @__PURE__ */ T({
|
|
16
17
|
__name: "main-button-content",
|
|
17
18
|
props: {
|
|
18
19
|
maxViewNum: {}
|
|
19
20
|
},
|
|
20
21
|
setup(b) {
|
|
21
|
-
const
|
|
22
|
-
get: () =>
|
|
23
|
-
set: (
|
|
24
|
-
f.value.length <
|
|
22
|
+
const u = b, { t: o } = U(), { b: l } = G("ap-view"), _ = $(), { tableKey: F, popoverOpen: s, viewList: f, saveDataSource: n, viewListCRUD: V } = A(), h = I({
|
|
23
|
+
get: () => s.value && f.value.length < u.maxViewNum + 1,
|
|
24
|
+
set: (m) => {
|
|
25
|
+
f.value.length < u.maxViewNum + 1 && (s.value = m);
|
|
25
26
|
}
|
|
26
27
|
});
|
|
27
|
-
Y(
|
|
28
|
+
Y(s, (m) => {
|
|
28
29
|
var i;
|
|
29
|
-
|
|
30
|
+
m && ((i = _.value) == null || i.resetFields());
|
|
30
31
|
});
|
|
31
|
-
const
|
|
32
|
-
var
|
|
33
|
-
const { viewName: i, isDefault: d } =
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const k = async (m) => {
|
|
33
|
+
var y, g;
|
|
34
|
+
const { viewName: i, isDefault: d } = m, C = P(), z = {
|
|
35
|
+
searchForm: R(
|
|
36
|
+
(y = n == null ? void 0 : n.getSearchFormValues) == null ? void 0 : y.call(
|
|
37
|
+
n,
|
|
38
|
+
!!(n != null && n.searchFormTransform)
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
};
|
|
42
|
+
await ((g = V.addView) == null ? void 0 : g.call(V, {
|
|
43
|
+
tableKey: F,
|
|
36
44
|
viewKey: C,
|
|
37
45
|
viewName: i,
|
|
38
46
|
isDefault: d,
|
|
39
47
|
viewConfig: z
|
|
40
|
-
})),
|
|
48
|
+
})), s.value = !1;
|
|
41
49
|
};
|
|
42
|
-
return (
|
|
43
|
-
open:
|
|
44
|
-
"onUpdate:open": i[1] || (i[1] = (d) =>
|
|
50
|
+
return (m, i) => (K(), E(e(q), {
|
|
51
|
+
open: h.value,
|
|
52
|
+
"onUpdate:open": i[1] || (i[1] = (d) => h.value = d),
|
|
45
53
|
placement: "bottom",
|
|
46
54
|
trigger: "click",
|
|
47
55
|
arrow: !1,
|
|
@@ -50,10 +58,10 @@ const le = /* @__PURE__ */ $({
|
|
|
50
58
|
}
|
|
51
59
|
}, {
|
|
52
60
|
content: t(() => [
|
|
53
|
-
|
|
54
|
-
class:
|
|
61
|
+
c("div", {
|
|
62
|
+
class: r([e(l)("main-content-popover")])
|
|
55
63
|
}, [
|
|
56
|
-
a(
|
|
64
|
+
a(v, {
|
|
57
65
|
ref_key: "formRef",
|
|
58
66
|
ref: _,
|
|
59
67
|
layout: "vertical",
|
|
@@ -61,23 +69,23 @@ const le = /* @__PURE__ */ $({
|
|
|
61
69
|
isDefault: !0,
|
|
62
70
|
viewName: `${e(o)("ap.apView.newView")} ${e(O)().format("YYYY-MM-DD").toString()}`
|
|
63
71
|
},
|
|
64
|
-
onFinish:
|
|
72
|
+
onFinish: k
|
|
65
73
|
}, {
|
|
66
74
|
default: t(() => [
|
|
67
|
-
|
|
68
|
-
class:
|
|
75
|
+
c("div", {
|
|
76
|
+
class: r([e(l)("main-content-popover-title-content")])
|
|
69
77
|
}, [
|
|
70
|
-
|
|
71
|
-
class:
|
|
78
|
+
c("div", {
|
|
79
|
+
class: r([e(l)("main-content-popover-title-content-title")])
|
|
72
80
|
}, p(e(o)("ap.apView.saveNewView")), 3),
|
|
73
|
-
a(
|
|
81
|
+
a(v.FormItem, {
|
|
74
82
|
name: "isDefault",
|
|
75
83
|
"value-prop-name": "checked"
|
|
76
84
|
}, {
|
|
77
85
|
default: t(() => [
|
|
78
|
-
a(e(
|
|
86
|
+
a(e(D), null, {
|
|
79
87
|
default: t(() => [
|
|
80
|
-
|
|
88
|
+
w(p(e(o)("ap.apView.setDefault")), 1)
|
|
81
89
|
]),
|
|
82
90
|
_: 1
|
|
83
91
|
})
|
|
@@ -85,7 +93,7 @@ const le = /* @__PURE__ */ $({
|
|
|
85
93
|
_: 1
|
|
86
94
|
})
|
|
87
95
|
], 2),
|
|
88
|
-
a(
|
|
96
|
+
a(v.FormItem, {
|
|
89
97
|
label: e(o)("ap.apView.viewName"),
|
|
90
98
|
name: "viewName",
|
|
91
99
|
rules: [{ required: !0, message: e(o)("ap.apView.notEmpty") }]
|
|
@@ -99,28 +107,28 @@ const le = /* @__PURE__ */ $({
|
|
|
99
107
|
]),
|
|
100
108
|
_: 1
|
|
101
109
|
}, 8, ["label", "rules"]),
|
|
102
|
-
a(
|
|
103
|
-
class:
|
|
110
|
+
a(v.FormItem, {
|
|
111
|
+
class: r([e(l)("main-content-popover-btn")])
|
|
104
112
|
}, {
|
|
105
113
|
default: t(() => [
|
|
106
|
-
a(e(
|
|
114
|
+
a(e(x), { size: 8 }, {
|
|
107
115
|
default: t(() => [
|
|
108
|
-
a(e(
|
|
116
|
+
a(e(N), {
|
|
109
117
|
size: "small",
|
|
110
|
-
onClick: i[0] || (i[0] = (d) =>
|
|
118
|
+
onClick: i[0] || (i[0] = (d) => s.value = !1)
|
|
111
119
|
}, {
|
|
112
120
|
default: t(() => [
|
|
113
|
-
|
|
121
|
+
w(p(e(o)("ap.apView.cancel")), 1)
|
|
114
122
|
]),
|
|
115
123
|
_: 1
|
|
116
124
|
}),
|
|
117
|
-
a(e(
|
|
125
|
+
a(e(N), {
|
|
118
126
|
type: "primary",
|
|
119
127
|
size: "small",
|
|
120
128
|
"html-type": "submit"
|
|
121
129
|
}, {
|
|
122
130
|
default: t(() => [
|
|
123
|
-
|
|
131
|
+
w(p(e(o)("ap.apView.save")), 1)
|
|
124
132
|
]),
|
|
125
133
|
_: 1
|
|
126
134
|
})
|
|
@@ -136,30 +144,30 @@ const le = /* @__PURE__ */ $({
|
|
|
136
144
|
], 2)
|
|
137
145
|
]),
|
|
138
146
|
default: t(() => [
|
|
139
|
-
|
|
140
|
-
class:
|
|
141
|
-
[e(
|
|
142
|
-
[e(
|
|
147
|
+
c("div", {
|
|
148
|
+
class: r({
|
|
149
|
+
[e(l)("main-content")]: !0,
|
|
150
|
+
[e(l)("main-content-disabled")]: e(f).length >= u.maxViewNum + 1
|
|
143
151
|
})
|
|
144
152
|
}, [
|
|
145
|
-
a(e(
|
|
153
|
+
a(e(B), { placement: "bottom" }, j({
|
|
146
154
|
default: t(() => [
|
|
147
|
-
a(e(
|
|
155
|
+
a(e(x), { size: 4 }, {
|
|
148
156
|
default: t(() => [
|
|
149
157
|
a(L, {
|
|
150
|
-
class:
|
|
158
|
+
class: r([e(l)("icon")])
|
|
151
159
|
}, null, 8, ["class"]),
|
|
152
|
-
|
|
160
|
+
c("div", null, p(e(o)("ap.apView.saveView")), 1)
|
|
153
161
|
]),
|
|
154
162
|
_: 1
|
|
155
163
|
})
|
|
156
164
|
]),
|
|
157
165
|
_: 2
|
|
158
166
|
}, [
|
|
159
|
-
e(f).length >=
|
|
167
|
+
e(f).length >= u.maxViewNum + 1 ? {
|
|
160
168
|
name: "title",
|
|
161
169
|
fn: t(() => [
|
|
162
|
-
|
|
170
|
+
w(p(e(o)("ap.apView.maxTip")), 1)
|
|
163
171
|
]),
|
|
164
172
|
key: "0"
|
|
165
173
|
} : void 0
|
|
@@ -171,5 +179,5 @@ const le = /* @__PURE__ */ $({
|
|
|
171
179
|
}
|
|
172
180
|
});
|
|
173
181
|
export {
|
|
174
|
-
|
|
182
|
+
pe as default
|
|
175
183
|
};
|