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