@aplus-frontend/ui 7.13.10 → 7.13.11
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-field/select/use-select-options.mjs +13 -12
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +56 -54
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-field/select/use-select-options.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { isArray as E } from "lodash-unified";
|
|
2
|
+
import { ref as L, watch as i } from "vue";
|
|
3
|
+
const u = "SELECTABLE_ALL_VALUE_KEY", a = (o) => {
|
|
4
|
+
const r = L(o?.options || []);
|
|
5
|
+
function e(t) {
|
|
6
|
+
!t || !E(t) || (r.value = [...t]);
|
|
6
7
|
}
|
|
7
|
-
return
|
|
8
|
+
return i(
|
|
8
9
|
() => o.options,
|
|
9
10
|
(t) => {
|
|
10
|
-
|
|
11
|
+
e(t);
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
14
|
deep: !0
|
|
14
15
|
}
|
|
15
16
|
), {
|
|
16
|
-
options:
|
|
17
|
-
updateOptions:
|
|
17
|
+
options: r,
|
|
18
|
+
updateOptions: e
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
u as SELECT_ALL_VALUE_KEY,
|
|
23
|
+
a as default,
|
|
24
|
+
a as useSelectOptions
|
|
24
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Space as
|
|
1
|
+
import { defineComponent as $, ref as V, watch as b, createElementBlock as m, openBlock as c, normalizeClass as C, unref as e, createElementVNode as a, createCommentVNode as f, toDisplayString as r, createVNode as n, withModifiers as d, withCtx as v } from "vue";
|
|
2
|
+
import { Space as x, Popconfirm as B } from "@aplus-frontend/antdv";
|
|
3
3
|
import { ApField as F } from "../../../ap-field/index.mjs";
|
|
4
4
|
import "../../../ap-form/ap-form.vue.mjs";
|
|
5
5
|
import "../../../config-provider/index.mjs";
|
|
@@ -8,99 +8,99 @@ import "../../ap-tag/index.mjs";
|
|
|
8
8
|
import { useViewInject as M } from "../hooks/use-view-provide.mjs";
|
|
9
9
|
import P from "../icons/line-delete.vue.mjs";
|
|
10
10
|
import Y from "../style/index.mjs";
|
|
11
|
-
import { SYSTEM_VIEW_KEY as
|
|
11
|
+
import { SYSTEM_VIEW_KEY as N } from "../utils/enum.mjs";
|
|
12
12
|
import { useNamespace as j } from "../../../config-provider/hooks/use-namespace.mjs";
|
|
13
13
|
import { useLocale as A } from "../../../config-provider/hooks/use-locale.mjs";
|
|
14
14
|
import O from "../../ap-tag/ap-tag.vue.mjs";
|
|
15
|
-
import
|
|
15
|
+
import h from "../../../ap-form/ap-form.vue2.mjs";
|
|
16
16
|
const U = { class: "menu-list-content-name" }, W = ["title"], q = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "menu-list-content-default"
|
|
19
|
-
}, G = { class: "menu-list-content-action-delete" }, H = { class: "menu-list-content-edit" }, ve = /* @__PURE__ */
|
|
19
|
+
}, G = { class: "menu-list-content-action-delete" }, H = { class: "menu-list-content-edit" }, ve = /* @__PURE__ */ $({
|
|
20
20
|
__name: "menu-list-content",
|
|
21
21
|
props: {
|
|
22
22
|
view: {}
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
const { b: s } = j("ap-view"),
|
|
26
|
-
currentViewKey:
|
|
27
|
-
changeCurrentViewKey:
|
|
24
|
+
setup(K) {
|
|
25
|
+
const { b: s } = j("ap-view"), k = Y("ap-view"), { token: D } = L(), { t: o } = A(), t = K, {
|
|
26
|
+
currentViewKey: S,
|
|
27
|
+
changeCurrentViewKey: g,
|
|
28
28
|
viewListCRUD: p,
|
|
29
29
|
tableKey: w,
|
|
30
30
|
menuOpen: _
|
|
31
|
-
} = M(), l =
|
|
32
|
-
|
|
33
|
-
},
|
|
31
|
+
} = M(), l = V(!1), y = V(), E = () => {
|
|
32
|
+
g(t.view.viewKey), _.value = !1;
|
|
33
|
+
}, z = () => {
|
|
34
34
|
p?.changeView?.({
|
|
35
35
|
...t.view,
|
|
36
36
|
tableKey: w,
|
|
37
37
|
isDefault: !0
|
|
38
38
|
});
|
|
39
|
-
},
|
|
39
|
+
}, I = () => {
|
|
40
40
|
p?.removeView?.({
|
|
41
41
|
tableKey: w,
|
|
42
42
|
viewKey: t.view.viewKey
|
|
43
43
|
});
|
|
44
|
-
},
|
|
45
|
-
const u = await
|
|
44
|
+
}, R = async () => {
|
|
45
|
+
const u = await y.value?.validate?.();
|
|
46
46
|
p?.changeView?.({
|
|
47
47
|
...t.view,
|
|
48
48
|
tableKey: w,
|
|
49
49
|
viewName: u?.viewName || t.view.viewName
|
|
50
50
|
}), l.value = !1;
|
|
51
51
|
};
|
|
52
|
-
return
|
|
52
|
+
return b(
|
|
53
53
|
() => _.value,
|
|
54
54
|
(u) => {
|
|
55
55
|
u && (l.value = !1);
|
|
56
56
|
}
|
|
57
|
-
), (u,
|
|
57
|
+
), (u, i) => l.value === !1 ? (c(), m("div", {
|
|
58
58
|
key: 0,
|
|
59
|
-
class:
|
|
59
|
+
class: C({
|
|
60
60
|
[e(s)()]: !0,
|
|
61
61
|
[e(s)("menu-list-content")]: !0,
|
|
62
|
-
[e(s)("menu-list-content-active")]: t.view?.viewKey === e(
|
|
63
|
-
[e(
|
|
62
|
+
[e(s)("menu-list-content-active")]: t.view?.viewKey === e(S),
|
|
63
|
+
[e(k)]: !0
|
|
64
64
|
}),
|
|
65
|
-
onClick:
|
|
65
|
+
onClick: E
|
|
66
66
|
}, [
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
a("div", U, [
|
|
68
|
+
a("span", {
|
|
69
69
|
title: t.view?.viewName
|
|
70
70
|
}, r(t.view?.viewName), 9, W)
|
|
71
71
|
]),
|
|
72
|
-
t.view?.viewKey !== e(
|
|
73
|
-
|
|
74
|
-
text: e(
|
|
72
|
+
t.view?.viewKey !== e(N) && t.view?.isDefault ? (c(), m("div", q, [
|
|
73
|
+
n(e(O), {
|
|
74
|
+
text: e(o)("ap.apView.default"),
|
|
75
75
|
size: "small",
|
|
76
|
-
color: e(
|
|
76
|
+
color: e(D).colorPrimary
|
|
77
77
|
}, null, 8, ["text", "color"])
|
|
78
78
|
])) : f("", !0),
|
|
79
|
-
t.view?.viewKey !== e(
|
|
79
|
+
t.view?.viewKey !== e(N) ? (c(), m("div", {
|
|
80
80
|
key: 1,
|
|
81
81
|
class: "menu-list-content-action",
|
|
82
|
-
onClick:
|
|
82
|
+
onClick: i[1] || (i[1] = d(() => {
|
|
83
83
|
}, ["stop"]))
|
|
84
84
|
}, [
|
|
85
|
-
|
|
85
|
+
n(e(x), { size: 8 }, {
|
|
86
86
|
default: v(() => [
|
|
87
|
-
|
|
87
|
+
a("div", {
|
|
88
88
|
class: "menu-list-content-action-text",
|
|
89
|
-
onClick:
|
|
90
|
-
}, r(e(
|
|
89
|
+
onClick: i[0] || (i[0] = d((T) => l.value = !0, ["stop"]))
|
|
90
|
+
}, r(e(o)("ap.apView.rename")), 1),
|
|
91
91
|
t.view?.isDefault ? f("", !0) : (c(), m("div", {
|
|
92
92
|
key: 0,
|
|
93
93
|
class: "menu-list-content-action-text",
|
|
94
|
-
onClick:
|
|
95
|
-
}, r(e(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
title: e(
|
|
99
|
-
"ok-text": e(
|
|
100
|
-
onConfirm:
|
|
94
|
+
onClick: z
|
|
95
|
+
}, r(e(o)("ap.apView.setDefault")), 1)),
|
|
96
|
+
a("div", G, [
|
|
97
|
+
n(e(B), {
|
|
98
|
+
title: e(o)("ap.apView.deleteTip"),
|
|
99
|
+
"ok-text": e(o)("ap.apView.ok"),
|
|
100
|
+
onConfirm: I
|
|
101
101
|
}, {
|
|
102
102
|
default: v(() => [
|
|
103
|
-
|
|
103
|
+
n(P)
|
|
104
104
|
]),
|
|
105
105
|
_: 1
|
|
106
106
|
}, 8, ["title", "ok-text"])
|
|
@@ -111,33 +111,35 @@ const U = { class: "menu-list-content-name" }, W = ["title"], q = {
|
|
|
111
111
|
])) : f("", !0)
|
|
112
112
|
], 2)) : (c(), m("div", {
|
|
113
113
|
key: 1,
|
|
114
|
-
class:
|
|
114
|
+
class: C([e(s)("menu-list-content"), e(s)("menu-list-content-edit"), e(k)]),
|
|
115
|
+
onClick: i[3] || (i[3] = d(() => {
|
|
116
|
+
}, ["stop"]))
|
|
115
117
|
}, [
|
|
116
|
-
|
|
118
|
+
n(h, {
|
|
117
119
|
ref_key: "formRef",
|
|
118
|
-
ref:
|
|
120
|
+
ref: y,
|
|
119
121
|
"initial-values": {
|
|
120
122
|
viewName: t.view?.viewName
|
|
121
123
|
}
|
|
122
124
|
}, {
|
|
123
125
|
default: v(() => [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
a("div", H, [
|
|
127
|
+
n(e(x), { size: 8 }, {
|
|
126
128
|
default: v(() => [
|
|
127
|
-
|
|
129
|
+
n(h.FormItem, { name: "viewName" }, {
|
|
128
130
|
default: v(() => [
|
|
129
|
-
|
|
131
|
+
n(e(F).Text, { maxlength: 20 })
|
|
130
132
|
]),
|
|
131
133
|
_: 1
|
|
132
134
|
}),
|
|
133
|
-
|
|
135
|
+
a("div", {
|
|
134
136
|
class: "menu-list-content-action-text",
|
|
135
|
-
onClick:
|
|
136
|
-
}, r(e(
|
|
137
|
-
|
|
137
|
+
onClick: R
|
|
138
|
+
}, r(e(o)("ap.apView.save")), 1),
|
|
139
|
+
a("div", {
|
|
138
140
|
class: "menu-list-content-action-text",
|
|
139
|
-
onClick:
|
|
140
|
-
}, r(e(
|
|
141
|
+
onClick: i[2] || (i[2] = (T) => l.value = !1)
|
|
142
|
+
}, r(e(o)("ap.apView.cancel")), 1)
|
|
141
143
|
]),
|
|
142
144
|
_: 1
|
|
143
145
|
})
|
package/es/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.13.
|
|
1
|
+
declare const _default: "7.13.11";
|
|
2
2
|
export default _default;
|
package/es/src/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("lodash-unified"),r=require("vue"),n="SELECTABLE_ALL_VALUE_KEY",s=t=>{const o=r.ref(t?.options||[]);function u(e){!e||!i.isArray(e)||(o.value=[...e])}return r.watch(()=>t.options,e=>{u(e)},{deep:!0}),{options:o,updateOptions:u}};exports.SELECT_ALL_VALUE_KEY=n;exports.default=s;exports.useSelectOptions=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),E=require("../../../ap-field/index.js");require("../../../ap-form/ap-form.vue.js");require("../../../config-provider/index.js");const h=require("../../../config-provider/hooks/use-token.js");require("../../ap-tag/index.js");const S=require("../hooks/use-view-provide.js"),q=require("../icons/line-delete.vue.js"),g=require("../style/index.js"),m=require("../utils/enum.js"),D=require("../../../config-provider/hooks/use-namespace.js"),K=require("../../../config-provider/hooks/use-locale.js"),B=require("../../ap-tag/ap-tag.vue.js"),f=require("../../../ap-form/ap-form.vue2.js"),T={class:"menu-list-content-name"},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("@aplus-frontend/antdv"),E=require("../../../ap-field/index.js");require("../../../ap-form/ap-form.vue.js");require("../../../config-provider/index.js");const h=require("../../../config-provider/hooks/use-token.js");require("../../ap-tag/index.js");const S=require("../hooks/use-view-provide.js"),q=require("../icons/line-delete.vue.js"),g=require("../style/index.js"),m=require("../utils/enum.js"),D=require("../../../config-provider/hooks/use-namespace.js"),K=require("../../../config-provider/hooks/use-locale.js"),B=require("../../ap-tag/ap-tag.vue.js"),f=require("../../../ap-form/ap-form.vue2.js"),T={class:"menu-list-content-name"},M=["title"],z={key:0,class:"menu-list-content-default"},I={class:"menu-list-content-action-delete"},b={class:"menu-list-content-edit"},P=e.defineComponent({__name:"menu-list-content",props:{view:{}},setup(w){const{b:a}=D.useNamespace("ap-view"),c=g.default("ap-view"),{token:p}=h.useToken(),{t:i}=K.useLocale(),t=w,{currentViewKey:_,changeCurrentViewKey:V,viewListCRUD:r,tableKey:s,menuOpen:d}=S.useViewInject(),o=e.ref(!1),v=e.ref(),k=()=>{V(t.view.viewKey),d.value=!1},N=()=>{r?.changeView?.({...t.view,tableKey:s,isDefault:!0})},y=()=>{r?.removeView?.({tableKey:s,viewKey:t.view.viewKey})},C=async()=>{const l=await v.value?.validate?.();r?.changeView?.({...t.view,tableKey:s,viewName:l?.viewName||t.view.viewName}),o.value=!1};return e.watch(()=>d.value,l=>{l&&(o.value=!1)}),(l,n)=>o.value===!1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(a)()]:!0,[e.unref(a)("menu-list-content")]:!0,[e.unref(a)("menu-list-content-active")]:t.view?.viewKey===e.unref(_),[e.unref(c)]:!0}),onClick:k},[e.createElementVNode("div",T,[e.createElementVNode("span",{title:t.view?.viewName},e.toDisplayString(t.view?.viewName),9,M)]),t.view?.viewKey!==e.unref(m.SYSTEM_VIEW_KEY)&&t.view?.isDefault?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(e.unref(B.default),{text:e.unref(i)("ap.apView.default"),size:"small",color:e.unref(p).colorPrimary},null,8,["text","color"])])):e.createCommentVNode("",!0),t.view?.viewKey!==e.unref(m.SYSTEM_VIEW_KEY)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"menu-list-content-action",onClick:n[1]||(n[1]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(e.unref(u.Space),{size:8},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:n[0]||(n[0]=e.withModifiers(x=>o.value=!0,["stop"]))},e.toDisplayString(e.unref(i)("ap.apView.rename")),1),t.view?.isDefault?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"menu-list-content-action-text",onClick:N},e.toDisplayString(e.unref(i)("ap.apView.setDefault")),1)),e.createElementVNode("div",I,[e.createVNode(e.unref(u.Popconfirm),{title:e.unref(i)("ap.apView.deleteTip"),"ok-text":e.unref(i)("ap.apView.ok"),onConfirm:y},{default:e.withCtx(()=>[e.createVNode(q.default)]),_:1},8,["title","ok-text"])])]),_:1})])):e.createCommentVNode("",!0)],2)):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(a)("menu-list-content"),e.unref(a)("menu-list-content-edit"),e.unref(c)]),onClick:n[3]||(n[3]=e.withModifiers(()=>{},["stop"]))},[e.createVNode(f.default,{ref_key:"formRef",ref:v,"initial-values":{viewName:t.view?.viewName}},{default:e.withCtx(()=>[e.createElementVNode("div",b,[e.createVNode(e.unref(u.Space),{size:8},{default:e.withCtx(()=>[e.createVNode(f.default.FormItem,{name:"viewName"},{default:e.withCtx(()=>[e.createVNode(e.unref(E.ApField).Text,{maxlength:20})]),_:1}),e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:C},e.toDisplayString(e.unref(i)("ap.apView.save")),1),e.createElementVNode("div",{class:"menu-list-content-action-text",onClick:n[2]||(n[2]=x=>o.value=!1)},e.toDisplayString(e.unref(i)("ap.apView.cancel")),1)]),_:1})])]),_:1},8,["initial-values"])],2))}});exports.default=P;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.13.
|
|
1
|
+
declare const _default: "7.13.11";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.13.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.13.11";exports.default=e;
|