@aplus-frontend/ui 0.6.0-beta.0 → 0.6.0-beta.1
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/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 +35 -34
- 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 +24 -23
- package/es/src/ap-grid/interface.d.ts +1 -1
- package/es/src/business/ap-view/ap-view.vue2.mjs +91 -88
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +25 -23
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +38 -38
- package/es/src/business/batch-input-group/form-item.vue.mjs +1 -0
- package/es/src/check-card/index.vue2.mjs +1 -1
- 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/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/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/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/check-card/index.vue2.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/package.json +1 -1
- 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 +3 -3
- package/theme/ap-attachment/ap-attachment.css +3 -3
- package/theme/ap-batch-action/ap-batch-action.css +3 -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 +3 -3
- package/theme/ap-download/ap-download.css +3 -3
- package/theme/ap-expand-alert/ap-expand-alert.css +3 -3
- 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 +2 -2
- package/theme/ap-grid/index.css +44 -33
- package/theme/ap-grid/index.less +17 -8
- 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 +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 +3 -3
- package/theme/ap-size-input/ap-size-input.css +3 -3
- package/theme/ap-status/ap-status.css +3 -3
- package/theme/ap-summary/index.css +3 -3
- package/theme/ap-table/ap-table-index.css +3 -3
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +3 -3
- package/theme/ap-table/ap-table.css +43 -37
- package/theme/ap-table/ap-table.less +12 -8
- 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 +43 -37
- package/theme/ap-tag/ap-tag-group.css +3 -3
- package/theme/ap-tag/ap-tag.css +3 -3
- package/theme/ap-title/ap-title.css +3 -3
- package/theme/ap-upload/index.css +3 -3
- package/theme/ap-upload/multiple-file.css +3 -3
- package/theme/ap-upload/picture.css +3 -3
- 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 +3 -3
- 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 +98 -81
- 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,18 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Y, computed as N, ref as p, createVNode as g, watch as x, createBlock as $, openBlock as j, unref as w, normalizeClass as E, withCtx as z, createElementVNode as M } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import { ApBatchActionGroup as
|
|
3
|
+
import W from "./icons/line-down.vue.mjs";
|
|
4
|
+
import { ApBatchActionGroup as q } 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
|
|
7
|
+
import { useViewProvide as H } from "./hooks/use-view-provide.mjs";
|
|
8
|
+
import { useInjectApTable as J } from "../../ap-table/context.mjs";
|
|
9
9
|
import { SYSTEM_VIEW_KEY as y } from "./utils/enum.mjs";
|
|
10
|
+
import { isValid as Q } from "@aplus-frontend/utils";
|
|
10
11
|
import { useGlobalConfig as X } from "../../config-provider/hooks/use-global-config.mjs";
|
|
11
12
|
import { useNamespace as Z } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
-
import { useLocale as
|
|
13
|
-
import
|
|
13
|
+
import { useLocale as h } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
import U from "./components/main-button-content.vue2.mjs";
|
|
14
15
|
import R from "./components/menu-list-content.vue2.mjs";
|
|
15
|
-
const
|
|
16
|
+
const ve = /* @__PURE__ */ Y({
|
|
16
17
|
__name: "ap-view",
|
|
17
18
|
props: {
|
|
18
19
|
tableKey: {},
|
|
@@ -22,25 +23,25 @@ const fe = /* @__PURE__ */ M({
|
|
|
22
23
|
default: 20
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
26
|
+
setup(F) {
|
|
27
|
+
const f = F, L = X("viewCacheOption"), {
|
|
27
28
|
b: d
|
|
28
29
|
} = Z("ap-view"), {
|
|
29
30
|
t: T
|
|
30
|
-
} =
|
|
31
|
+
} = h(), V = N(() => ({
|
|
31
32
|
viewKey: y,
|
|
32
33
|
viewName: T("ap.apView.systemView")
|
|
33
34
|
})), {
|
|
34
35
|
getSearchFormValues: k,
|
|
35
36
|
setSearchFormValues: A,
|
|
36
37
|
submit: B,
|
|
37
|
-
reset:
|
|
38
|
-
} =
|
|
38
|
+
reset: G
|
|
39
|
+
} = J(), P = p(!1), K = p(!1), r = p("system"), D = {
|
|
39
40
|
dropdownType: "dropdown",
|
|
40
|
-
content: g(
|
|
41
|
-
maxViewNum:
|
|
41
|
+
content: g(U, {
|
|
42
|
+
maxViewNum: f.maxViewNum
|
|
42
43
|
}, null)
|
|
43
|
-
},
|
|
44
|
+
}, s = p([V.value]), I = N(() => s.value.map((t) => ({
|
|
44
45
|
id: t.viewKey,
|
|
45
46
|
content: g(R, {
|
|
46
47
|
view: t
|
|
@@ -49,123 +50,125 @@ const fe = /* @__PURE__ */ M({
|
|
|
49
50
|
getSearchFormValues: k,
|
|
50
51
|
setSearchFormValues: A,
|
|
51
52
|
submit: B,
|
|
52
|
-
reset:
|
|
53
|
-
...
|
|
53
|
+
reset: G,
|
|
54
|
+
...f.saveDataSource
|
|
54
55
|
}, e = {
|
|
55
56
|
...L.value,
|
|
56
|
-
...
|
|
57
|
+
...f.viewCacheOption
|
|
57
58
|
}, _ = () => {
|
|
58
|
-
const t =
|
|
59
|
+
const t = s.value.find((a) => a.isDefault);
|
|
59
60
|
return (t == null ? void 0 : t.viewKey) ?? y;
|
|
60
|
-
},
|
|
61
|
+
}, c = {
|
|
61
62
|
getViewList: async (t) => {
|
|
62
|
-
var
|
|
63
|
+
var a;
|
|
63
64
|
try {
|
|
64
65
|
const {
|
|
65
|
-
tableKey:
|
|
66
|
-
} = t,
|
|
67
|
-
tableKey:
|
|
66
|
+
tableKey: o
|
|
67
|
+
} = t, i = await ((a = e == null ? void 0 : e.getViewList) == null ? void 0 : a.call(e, {
|
|
68
|
+
tableKey: o
|
|
68
69
|
}));
|
|
69
|
-
return
|
|
70
|
+
return s.value = [V.value, ...i ?? []], r.value = _(), s.value;
|
|
70
71
|
} catch {
|
|
71
|
-
return
|
|
72
|
+
return s.value = [V.value], r.value = y, s.value;
|
|
72
73
|
}
|
|
73
74
|
},
|
|
74
75
|
addView: async (t) => {
|
|
75
76
|
var u;
|
|
76
77
|
const {
|
|
77
|
-
tableKey:
|
|
78
|
-
viewKey:
|
|
79
|
-
viewName:
|
|
80
|
-
isDefault:
|
|
81
|
-
viewConfig:
|
|
78
|
+
tableKey: a,
|
|
79
|
+
viewKey: o,
|
|
80
|
+
viewName: i,
|
|
81
|
+
isDefault: l,
|
|
82
|
+
viewConfig: m
|
|
82
83
|
} = t;
|
|
83
84
|
await ((u = e == null ? void 0 : e.addView) == null ? void 0 : u.call(e, {
|
|
84
|
-
tableKey:
|
|
85
|
-
viewKey:
|
|
86
|
-
viewName:
|
|
87
|
-
isDefault:
|
|
88
|
-
viewConfig:
|
|
89
|
-
})),
|
|
85
|
+
tableKey: a,
|
|
86
|
+
viewKey: o,
|
|
87
|
+
viewName: i,
|
|
88
|
+
isDefault: l,
|
|
89
|
+
viewConfig: m
|
|
90
|
+
})), l && (s.value = s.value.map((v) => ({
|
|
90
91
|
...v,
|
|
91
92
|
isDefault: !1
|
|
92
|
-
}))),
|
|
93
|
-
viewKey:
|
|
94
|
-
viewName:
|
|
95
|
-
isDefault:
|
|
96
|
-
viewConfig:
|
|
97
|
-
}], r.value =
|
|
93
|
+
}))), s.value = [...s.value, {
|
|
94
|
+
viewKey: o,
|
|
95
|
+
viewName: i,
|
|
96
|
+
isDefault: l,
|
|
97
|
+
viewConfig: m
|
|
98
|
+
}], r.value = o;
|
|
98
99
|
},
|
|
99
100
|
changeView: async (t) => {
|
|
100
101
|
var v;
|
|
101
102
|
const {
|
|
102
|
-
tableKey:
|
|
103
|
-
viewKey:
|
|
104
|
-
viewName:
|
|
105
|
-
isDefault:
|
|
106
|
-
viewConfig:
|
|
103
|
+
tableKey: a,
|
|
104
|
+
viewKey: o,
|
|
105
|
+
viewName: i,
|
|
106
|
+
isDefault: l,
|
|
107
|
+
viewConfig: m
|
|
107
108
|
} = t;
|
|
108
109
|
await ((v = e == null ? void 0 : e.changeView) == null ? void 0 : v.call(e, {
|
|
109
|
-
tableKey:
|
|
110
|
-
viewKey:
|
|
111
|
-
viewName:
|
|
112
|
-
isDefault:
|
|
113
|
-
viewConfig:
|
|
114
|
-
})),
|
|
110
|
+
tableKey: a,
|
|
111
|
+
viewKey: o,
|
|
112
|
+
viewName: i,
|
|
113
|
+
isDefault: l,
|
|
114
|
+
viewConfig: m
|
|
115
|
+
})), l && (s.value = s.value.map((b) => ({
|
|
115
116
|
...b,
|
|
116
117
|
isDefault: !1
|
|
117
118
|
})));
|
|
118
|
-
const u =
|
|
119
|
-
u && (u.viewName =
|
|
119
|
+
const u = s.value.find((b) => b.viewKey === o);
|
|
120
|
+
u && (u.viewName = i, u.isDefault = l, u.viewConfig = m), r.value = o;
|
|
120
121
|
},
|
|
121
122
|
removeView: async (t) => {
|
|
122
|
-
var
|
|
123
|
+
var i;
|
|
123
124
|
const {
|
|
124
|
-
tableKey:
|
|
125
|
-
viewKey:
|
|
125
|
+
tableKey: a,
|
|
126
|
+
viewKey: o
|
|
126
127
|
} = t;
|
|
127
|
-
await ((
|
|
128
|
-
tableKey:
|
|
129
|
-
viewKey:
|
|
130
|
-
})),
|
|
128
|
+
await ((i = e == null ? void 0 : e.removeView) == null ? void 0 : i.call(e, {
|
|
129
|
+
tableKey: a,
|
|
130
|
+
viewKey: o
|
|
131
|
+
})), s.value = s.value.filter((l) => l.viewKey !== o), o === r.value && (r.value = _());
|
|
131
132
|
}
|
|
132
|
-
},
|
|
133
|
-
tableKey:
|
|
133
|
+
}, S = {
|
|
134
|
+
tableKey: f.tableKey,
|
|
134
135
|
currentViewKey: r,
|
|
135
|
-
popoverOpen:
|
|
136
|
+
popoverOpen: P,
|
|
136
137
|
menuOpen: K,
|
|
137
|
-
viewList:
|
|
138
|
-
viewListCRUD:
|
|
138
|
+
viewList: s,
|
|
139
|
+
viewListCRUD: c,
|
|
139
140
|
saveDataSource: n
|
|
140
141
|
};
|
|
141
|
-
return
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
var
|
|
145
|
-
|
|
142
|
+
return x(r, (t) => {
|
|
143
|
+
const a = s.value.find((o) => o.viewKey === t);
|
|
144
|
+
a && setTimeout(() => {
|
|
145
|
+
var o, i, l, m;
|
|
146
|
+
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));
|
|
146
147
|
});
|
|
147
|
-
}),
|
|
148
|
-
var
|
|
149
|
-
(t =
|
|
150
|
-
tableKey:
|
|
151
|
-
});
|
|
152
|
-
}
|
|
148
|
+
}), H(S), x(() => f.tableKey, (t) => {
|
|
149
|
+
var a;
|
|
150
|
+
Q(t) && ((a = c == null ? void 0 : c.getViewList) == null || a.call(c, {
|
|
151
|
+
tableKey: t
|
|
152
|
+
}));
|
|
153
|
+
}, {
|
|
154
|
+
immediate: !0
|
|
155
|
+
}), (t, a) => (j(), $(w(q), {
|
|
153
156
|
open: K.value,
|
|
154
|
-
"onUpdate:open":
|
|
155
|
-
class:
|
|
156
|
-
"button-props":
|
|
157
|
-
"menu-list":
|
|
157
|
+
"onUpdate:open": a[0] || (a[0] = (o) => K.value = o),
|
|
158
|
+
class: E([w(d)()]),
|
|
159
|
+
"button-props": D,
|
|
160
|
+
"menu-list": I.value,
|
|
158
161
|
"overlay-class-name": [w(d)("overlay")],
|
|
159
162
|
trigger: "click",
|
|
160
163
|
placement: "bottom"
|
|
161
164
|
}, {
|
|
162
|
-
icon: z(() => [
|
|
163
|
-
class:
|
|
164
|
-
}, [g(
|
|
165
|
+
icon: z(() => [M("div", {
|
|
166
|
+
class: E([w(d)("icon")])
|
|
167
|
+
}, [g(W)], 2)]),
|
|
165
168
|
_: 1
|
|
166
169
|
}, 8, ["open", "class", "menu-list", "overlay-class-name"]));
|
|
167
170
|
}
|
|
168
171
|
});
|
|
169
172
|
export {
|
|
170
|
-
|
|
173
|
+
ve as default
|
|
171
174
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as $, ref as I, computed as T, watch as Y, createBlock as D, openBlock as E, unref as e, withCtx as t, createElementVNode as
|
|
2
|
-
import { Popover as j, Tooltip as q, Space as
|
|
1
|
+
import { defineComponent as $, ref as I, computed as T, watch as Y, createBlock as D, openBlock as E, unref as e, withCtx as t, createElementVNode as c, normalizeClass as m, createVNode as a, createSlots as K, toDisplayString as p, createTextVNode as v } from "vue";
|
|
2
|
+
import { Popover as j, Tooltip as q, Space as x, 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,28 +11,30 @@ import { generateUniqueKey as A } from "../utils/uuid.mjs";
|
|
|
11
11
|
import { useLocale as P } from "../../../config-provider/hooks/use-locale.mjs";
|
|
12
12
|
import { useNamespace as R } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
13
13
|
import w from "../../../ap-form/ap-form.vue2.mjs";
|
|
14
|
-
import
|
|
14
|
+
import N from "../../../ap-button/ap-button.vue.mjs";
|
|
15
15
|
const le = /* @__PURE__ */ $({
|
|
16
16
|
__name: "main-button-content",
|
|
17
17
|
props: {
|
|
18
18
|
maxViewNum: {}
|
|
19
19
|
},
|
|
20
20
|
setup(b) {
|
|
21
|
-
const
|
|
22
|
-
get: () => r.value && f.value.length <
|
|
21
|
+
const u = b, { t: o } = P(), { b: n } = R("ap-view"), _ = I(), { tableKey: F, popoverOpen: r, viewList: f, saveDataSource: s, viewListCRUD: V } = S(), y = T({
|
|
22
|
+
get: () => r.value && f.value.length < u.maxViewNum + 1,
|
|
23
23
|
set: (l) => {
|
|
24
|
-
f.value.length <
|
|
24
|
+
f.value.length < u.maxViewNum + 1 && (r.value = l);
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
Y(r, (l) => {
|
|
28
28
|
var i;
|
|
29
29
|
l && ((i = _.value) == null || i.resetFields());
|
|
30
30
|
});
|
|
31
|
-
const
|
|
32
|
-
var g,
|
|
33
|
-
const { viewName: i, isDefault: d } = l, C = A(), z =
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const k = async (l) => {
|
|
32
|
+
var g, h;
|
|
33
|
+
const { viewName: i, isDefault: d } = l, C = A(), z = {
|
|
34
|
+
searchForm: ((g = s == null ? void 0 : s.getSearchFormValues) == null ? void 0 : g.call(s)) ?? {}
|
|
35
|
+
};
|
|
36
|
+
await ((h = V.addView) == null ? void 0 : h.call(V, {
|
|
37
|
+
tableKey: F,
|
|
36
38
|
viewKey: C,
|
|
37
39
|
viewName: i,
|
|
38
40
|
isDefault: d,
|
|
@@ -50,7 +52,7 @@ const le = /* @__PURE__ */ $({
|
|
|
50
52
|
}
|
|
51
53
|
}, {
|
|
52
54
|
content: t(() => [
|
|
53
|
-
|
|
55
|
+
c("div", {
|
|
54
56
|
class: m([e(n)("main-content-popover")])
|
|
55
57
|
}, [
|
|
56
58
|
a(w, {
|
|
@@ -61,13 +63,13 @@ const le = /* @__PURE__ */ $({
|
|
|
61
63
|
isDefault: !0,
|
|
62
64
|
viewName: `${e(o)("ap.apView.newView")} ${e(O)().format("YYYY-MM-DD").toString()}`
|
|
63
65
|
},
|
|
64
|
-
onFinish:
|
|
66
|
+
onFinish: k
|
|
65
67
|
}, {
|
|
66
68
|
default: t(() => [
|
|
67
|
-
|
|
69
|
+
c("div", {
|
|
68
70
|
class: m([e(n)("main-content-popover-title-content")])
|
|
69
71
|
}, [
|
|
70
|
-
|
|
72
|
+
c("div", {
|
|
71
73
|
class: m([e(n)("main-content-popover-title-content-title")])
|
|
72
74
|
}, p(e(o)("ap.apView.saveNewView")), 3),
|
|
73
75
|
a(w.FormItem, {
|
|
@@ -103,9 +105,9 @@ const le = /* @__PURE__ */ $({
|
|
|
103
105
|
class: m([e(n)("main-content-popover-btn")])
|
|
104
106
|
}, {
|
|
105
107
|
default: t(() => [
|
|
106
|
-
a(e(
|
|
108
|
+
a(e(x), { size: 8 }, {
|
|
107
109
|
default: t(() => [
|
|
108
|
-
a(e(
|
|
110
|
+
a(e(N), {
|
|
109
111
|
size: "small",
|
|
110
112
|
onClick: i[0] || (i[0] = (d) => r.value = !1)
|
|
111
113
|
}, {
|
|
@@ -114,7 +116,7 @@ const le = /* @__PURE__ */ $({
|
|
|
114
116
|
]),
|
|
115
117
|
_: 1
|
|
116
118
|
}),
|
|
117
|
-
a(e(
|
|
119
|
+
a(e(N), {
|
|
118
120
|
type: "primary",
|
|
119
121
|
size: "small",
|
|
120
122
|
"html-type": "submit"
|
|
@@ -136,27 +138,27 @@ const le = /* @__PURE__ */ $({
|
|
|
136
138
|
], 2)
|
|
137
139
|
]),
|
|
138
140
|
default: t(() => [
|
|
139
|
-
|
|
141
|
+
c("div", {
|
|
140
142
|
class: m({
|
|
141
143
|
[e(n)("main-content")]: !0,
|
|
142
|
-
[e(n)("main-content-disabled")]: e(f).length >=
|
|
144
|
+
[e(n)("main-content-disabled")]: e(f).length >= u.maxViewNum + 1
|
|
143
145
|
})
|
|
144
146
|
}, [
|
|
145
147
|
a(e(q), { placement: "bottom" }, K({
|
|
146
148
|
default: t(() => [
|
|
147
|
-
a(e(
|
|
149
|
+
a(e(x), { size: 4 }, {
|
|
148
150
|
default: t(() => [
|
|
149
151
|
a(L, {
|
|
150
152
|
class: m([e(n)("icon")])
|
|
151
153
|
}, null, 8, ["class"]),
|
|
152
|
-
|
|
154
|
+
c("div", null, p(e(o)("ap.apView.saveView")), 1)
|
|
153
155
|
]),
|
|
154
156
|
_: 1
|
|
155
157
|
})
|
|
156
158
|
]),
|
|
157
159
|
_: 2
|
|
158
160
|
}, [
|
|
159
|
-
e(f).length >=
|
|
161
|
+
e(f).length >= u.maxViewNum + 1 ? {
|
|
160
162
|
name: "title",
|
|
161
163
|
fn: t(() => [
|
|
162
164
|
v(p(e(o)("ap.apView.maxTip")), 1)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as A, ref as
|
|
1
|
+
import { defineComponent as A, ref as E, watch as G, createElementBlock as u, openBlock as p, normalizeClass as M, unref as e, createElementVNode as s, createCommentVNode as k, toDisplayString as v, createVNode as a, withModifiers as O, withCtx as f } from "vue";
|
|
2
2
|
import "../../../config-provider/index.mjs";
|
|
3
3
|
import { useViewInject as P } from "../hooks/use-view-provide.mjs";
|
|
4
|
-
import { SYSTEM_VIEW_KEY as
|
|
5
|
-
import { Space as
|
|
4
|
+
import { SYSTEM_VIEW_KEY as b } from "../utils/enum.mjs";
|
|
5
|
+
import { Space as z, Popconfirm as W } from "@aplus-frontend/antdv";
|
|
6
6
|
import q from "../icons/line-delete.vue.mjs";
|
|
7
7
|
import "../../../ap-tag/index.mjs";
|
|
8
8
|
import "../../../ap-form/ap-form.vue.mjs";
|
|
@@ -11,7 +11,7 @@ import { useNamespace as J } from "../../../config-provider/hooks/use-namespace.
|
|
|
11
11
|
import { useLocale as Q } from "../../../config-provider/hooks/use-locale.mjs";
|
|
12
12
|
import { useGlobalConfig as X } from "../../../config-provider/hooks/use-global-config.mjs";
|
|
13
13
|
import Z from "../../../ap-tag/ap-tag.vue.mjs";
|
|
14
|
-
import
|
|
14
|
+
import C from "../../../ap-form/ap-form.vue2.mjs";
|
|
15
15
|
const D = { class: "menu-list-content-name" }, R = ["title"], L = {
|
|
16
16
|
key: 0,
|
|
17
17
|
class: "menu-list-content-default"
|
|
@@ -20,80 +20,80 @@ const D = { class: "menu-list-content-name" }, R = ["title"], L = {
|
|
|
20
20
|
props: {
|
|
21
21
|
view: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const { b: d } = J("ap-view"), { t: l } = Q(), i =
|
|
23
|
+
setup($) {
|
|
24
|
+
const { b: d } = J("ap-view"), { t: l } = Q(), i = $, I = {
|
|
25
25
|
aplus: "#2ed1a3",
|
|
26
26
|
admin: "#34b77c"
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, T = X("uiMode"), { currentViewKey: y, viewListCRUD: t, tableKey: w, menuOpen: V } = P(), c = E(!1), x = E(), B = () => {
|
|
28
|
+
y.value = i.view.viewKey, V.value = !1;
|
|
29
29
|
}, F = () => {
|
|
30
30
|
var n;
|
|
31
31
|
(n = t == null ? void 0 : t.changeView) == null || n.call(t, {
|
|
32
32
|
...i.view,
|
|
33
|
-
tableKey:
|
|
33
|
+
tableKey: w,
|
|
34
34
|
isDefault: !0
|
|
35
35
|
});
|
|
36
36
|
}, Y = () => {
|
|
37
37
|
var n;
|
|
38
38
|
(n = t == null ? void 0 : t.removeView) == null || n.call(t, {
|
|
39
|
-
tableKey:
|
|
39
|
+
tableKey: w,
|
|
40
40
|
viewKey: i.view.viewKey
|
|
41
41
|
});
|
|
42
42
|
}, j = async () => {
|
|
43
43
|
var o, m, r;
|
|
44
|
-
const n = await ((m = (o =
|
|
44
|
+
const n = await ((m = (o = x.value) == null ? void 0 : o.validate) == null ? void 0 : m.call(o));
|
|
45
45
|
(r = t == null ? void 0 : t.changeView) == null || r.call(t, {
|
|
46
46
|
...i.view,
|
|
47
|
-
tableKey:
|
|
47
|
+
tableKey: w,
|
|
48
48
|
viewName: (n == null ? void 0 : n.viewName) || i.view.viewName
|
|
49
49
|
}), c.value = !1;
|
|
50
50
|
};
|
|
51
51
|
return G(
|
|
52
|
-
() =>
|
|
52
|
+
() => V.value,
|
|
53
53
|
(n) => {
|
|
54
54
|
n && (c.value = !1);
|
|
55
55
|
}
|
|
56
56
|
), (n, o) => {
|
|
57
|
-
var m, r,
|
|
58
|
-
return c.value === !1 ? (
|
|
57
|
+
var m, r, N, h, K, S, g;
|
|
58
|
+
return c.value === !1 ? (p(), u("div", {
|
|
59
59
|
key: 0,
|
|
60
|
-
class:
|
|
60
|
+
class: M({
|
|
61
61
|
[e(d)("menu-list-content")]: !0,
|
|
62
|
-
[e(d)("menu-list-content-active")]: ((m = i.view) == null ? void 0 : m.viewKey) === e(
|
|
62
|
+
[e(d)("menu-list-content-active")]: ((m = i.view) == null ? void 0 : m.viewKey) === e(y)
|
|
63
63
|
}),
|
|
64
64
|
onClick: B
|
|
65
65
|
}, [
|
|
66
66
|
s("div", D, [
|
|
67
67
|
s("span", {
|
|
68
68
|
title: (r = i.view) == null ? void 0 : r.viewName
|
|
69
|
-
},
|
|
69
|
+
}, v((N = i.view) == null ? void 0 : N.viewName), 9, R)
|
|
70
70
|
]),
|
|
71
|
-
((
|
|
71
|
+
((h = i.view) == null ? void 0 : h.viewKey) !== e(b) && ((K = i.view) != null && K.isDefault) ? (p(), u("div", L, [
|
|
72
72
|
a(e(Z), {
|
|
73
73
|
text: e(l)("ap.apView.default"),
|
|
74
74
|
size: "small",
|
|
75
|
-
color:
|
|
75
|
+
color: I[e(T) ?? "aplus"]
|
|
76
76
|
}, null, 8, ["text", "color"])
|
|
77
|
-
])) :
|
|
78
|
-
((
|
|
77
|
+
])) : k("", !0),
|
|
78
|
+
((S = i.view) == null ? void 0 : S.viewKey) !== e(b) ? (p(), u("div", {
|
|
79
79
|
key: 1,
|
|
80
80
|
class: "menu-list-content-action",
|
|
81
81
|
onClick: o[1] || (o[1] = O(() => {
|
|
82
82
|
}, ["stop"]))
|
|
83
83
|
}, [
|
|
84
|
-
a(e(
|
|
84
|
+
a(e(z), { size: 8 }, {
|
|
85
85
|
default: f(() => {
|
|
86
|
-
var
|
|
86
|
+
var _;
|
|
87
87
|
return [
|
|
88
88
|
s("div", {
|
|
89
89
|
class: "menu-list-content-action-text",
|
|
90
90
|
onClick: o[0] || (o[0] = (te) => c.value = !0)
|
|
91
|
-
},
|
|
92
|
-
(
|
|
91
|
+
}, v(e(l)("ap.apView.rename")), 1),
|
|
92
|
+
(_ = i.view) != null && _.isDefault ? k("", !0) : (p(), u("div", {
|
|
93
93
|
key: 0,
|
|
94
94
|
class: "menu-list-content-action-text",
|
|
95
95
|
onClick: F
|
|
96
|
-
},
|
|
96
|
+
}, v(e(l)("ap.apView.setDefault")), 1)),
|
|
97
97
|
s("div", U, [
|
|
98
98
|
a(e(W), {
|
|
99
99
|
title: e(l)("ap.apView.deleteTip"),
|
|
@@ -110,23 +110,23 @@ const D = { class: "menu-list-content-name" }, R = ["title"], L = {
|
|
|
110
110
|
}),
|
|
111
111
|
_: 1
|
|
112
112
|
})
|
|
113
|
-
])) :
|
|
114
|
-
], 2)) : (
|
|
113
|
+
])) : k("", !0)
|
|
114
|
+
], 2)) : (p(), u("div", {
|
|
115
115
|
key: 1,
|
|
116
|
-
class:
|
|
116
|
+
class: M([e(d)("menu-list-content"), e(d)("menu-list-content-edit")])
|
|
117
117
|
}, [
|
|
118
|
-
a(
|
|
118
|
+
a(C, {
|
|
119
119
|
ref_key: "formRef",
|
|
120
|
-
ref:
|
|
120
|
+
ref: x,
|
|
121
121
|
"initial-values": {
|
|
122
|
-
viewName: (
|
|
122
|
+
viewName: (g = i.view) == null ? void 0 : g.viewName
|
|
123
123
|
}
|
|
124
124
|
}, {
|
|
125
125
|
default: f(() => [
|
|
126
126
|
s("div", ee, [
|
|
127
|
-
a(e(
|
|
127
|
+
a(e(z), { size: 8 }, {
|
|
128
128
|
default: f(() => [
|
|
129
|
-
a(
|
|
129
|
+
a(C.FormItem, { name: "viewName" }, {
|
|
130
130
|
default: f(() => [
|
|
131
131
|
a(e(H).Text, { maxlength: 20 })
|
|
132
132
|
]),
|
|
@@ -135,11 +135,11 @@ const D = { class: "menu-list-content-name" }, R = ["title"], L = {
|
|
|
135
135
|
s("div", {
|
|
136
136
|
class: "menu-list-content-action-text",
|
|
137
137
|
onClick: j
|
|
138
|
-
},
|
|
138
|
+
}, v(e(l)("ap.apView.save")), 1),
|
|
139
139
|
s("div", {
|
|
140
140
|
class: "menu-list-content-action-text",
|
|
141
|
-
onClick: o[2] || (o[2] = (
|
|
142
|
-
},
|
|
141
|
+
onClick: o[2] || (o[2] = (_) => c.value = !1)
|
|
142
|
+
}, v(e(l)("ap.apView.cancel")), 1)
|
|
143
143
|
]),
|
|
144
144
|
_: 1
|
|
145
145
|
})
|
|
@@ -75,7 +75,7 @@ const K = ["src"], oe = /* @__PURE__ */ I({
|
|
|
75
75
|
const e = o(n);
|
|
76
76
|
return {
|
|
77
77
|
...e.style || {},
|
|
78
|
-
"--check-card-indicator-size": `${e.indicatorSize ||
|
|
78
|
+
"--check-card-indicator-size": `${e.indicatorSize || 14}px`
|
|
79
79
|
};
|
|
80
80
|
}), h = d(() => {
|
|
81
81
|
const e = a.title;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
const o = {
|
|
2
|
-
borderRadius: 4
|
|
2
|
+
borderRadius: 4,
|
|
3
|
+
fontSize: 12,
|
|
4
|
+
sizeStep: 4,
|
|
5
|
+
lineHeight: 1.5,
|
|
6
|
+
lineHeightSM: 1.6,
|
|
7
|
+
wireframe: !1,
|
|
8
|
+
sizeUnit: 3
|
|
3
9
|
}, r = {
|
|
4
10
|
...o,
|
|
5
11
|
// 主色
|
|
@@ -33,7 +39,7 @@ const o = {
|
|
|
33
39
|
controlItemBgActive: "#F5F9FF",
|
|
34
40
|
controlItemBgActiveHover: "#EAF2FF",
|
|
35
41
|
colorBorderSecondary: "#E9EDF3"
|
|
36
|
-
},
|
|
42
|
+
}, e = {
|
|
37
43
|
...o,
|
|
38
44
|
// 主色
|
|
39
45
|
colorPrimary: "#34B77C",
|
|
@@ -69,6 +75,6 @@ const o = {
|
|
|
69
75
|
colorBorderSecondary: "#E9E9E9"
|
|
70
76
|
};
|
|
71
77
|
export {
|
|
72
|
-
|
|
78
|
+
e as adminToken,
|
|
73
79
|
r as aplusToken
|
|
74
80
|
};
|