提交 0bdd852a 编写于 作者: lxm1993's avatar lxm1993

feat: 插件升级

上级 a79322d7
......@@ -3,13 +3,13 @@ var N = (s, n, e) => n in s ? R(s, n, { enumerable: !0, configurable: !0, writab
var y = (s, n, e) => (N(s, typeof n != "symbol" ? n + "" : n, e), e);
import { PluginStaticResource as U, AppFuncCommand as j } from "@ibiz-template/runtime";
import { ListPortletController as D, AppMenuPortletController as E } from "@ibiz-template/controller";
import { ListPortletModel as z, AppMenuPortletModel as B, DefectModelError as G } from "@ibiz-template/model";
import { ListPortletModel as z, AppMenuPortletModel as B } from "@ibiz-template/model";
import { useNamespace as k, useListController as O } from "@ibiz-template/vue-util";
import { defineComponent as L, ref as f, getCurrentInstance as C, onMounted as I, h as t, watch as J, onUnmounted as H } from "vue";
import { Tooltip as w, Button as A, Icon as F } from "view-design";
import { CounterService as K } from "@ibiz-template/service";
import { defineComponent as L, ref as f, getCurrentInstance as C, onMounted as I, h as t, watch as G, onUnmounted as J } from "vue";
import { Tooltip as P, Button as A, Icon as F } from "view-design";
import { CounterService as H } from "@ibiz-template/service";
const g = new U(import.meta.url);
const Q = L({
const K = L({
name: "AppPortalListPortlet",
props: {
modelData: {
......@@ -52,7 +52,7 @@ const Q = L({
on: {
click: () => this.openPage(s.url)
}
}, [t(w, {
}, [t(P, {
attrs: {
content: s.tip,
disabled: !s.tip
......@@ -68,9 +68,9 @@ const Q = L({
})])]))]);
}
});
class V {
class Q {
constructor() {
y(this, "component", Q);
y(this, "component", K);
}
async createController(n, e, p) {
const l = new D(
......@@ -96,8 +96,8 @@ const T = L({
setup(s, {
emit: n
}) {
var S;
const e = k("func-drawer"), p = g.dir("/assets/img/placeholder.svg"), l = "\u672A\u5206\u7C7B", h = f([]), c = f([]), i = f(!1), m = (S = C()) == null ? void 0 : S.proxy, b = () => {
var M;
const e = k("func-drawer"), p = g.dir("/assets/img/placeholder.svg"), l = "\u672A\u5206\u7C7B", h = f([]), c = f([]), i = f(!1), m = (M = C()) == null ? void 0 : M.proxy, b = () => {
ibiz.net.post("/appfuncs/fetchpersonfuncsetting", {
page: 0,
size: 1e3,
......@@ -133,7 +133,7 @@ const T = L({
}), b());
})), i.value = !i.value;
};
J(() => s.isShowDrawer, (o) => {
G(() => s.isShowDrawer, (o) => {
o && b();
});
const d = (o) => {
......@@ -149,16 +149,16 @@ const T = L({
if (o.preventDefault(), i.value && o.dataTransfer) {
const a = Number(o.dataTransfer.getData("originIndex"));
if (a !== r) {
const u = c.value[a], P = c.value[r];
c.value.splice(a, 1, P), c.value.splice(r, 1, u);
const u = c.value[a], w = c.value[r];
c.value.splice(a, 1, w), c.value.splice(r, 1, u);
}
}
}, M = (o, r, a, u) => {
}, S = (o, r, a, u) => {
if (o.stopPropagation(), r.ispersonal = Number(!r.ispersonal), u === "remove")
c.value.splice(a, 1);
else if (u === "change") {
const P = c.value.findIndex(($) => $.pssysappfuncid === r.pssysappfuncid);
P === -1 ? c.value.push(r) : c.value.splice(P, 1);
const w = c.value.findIndex(($) => $.pssysappfuncid === r.pssysappfuncid);
w === -1 ? c.value.push(r) : c.value.splice(w, 1);
}
};
return () => t("div", {
......@@ -198,7 +198,7 @@ const T = L({
}, [t("div", {
class: [e.be("group-item", "checkbox"), e.bem("group-item", "checkbox", "remove"), i.value ? e.bem("group-item", "checkbox", "show") : ""],
on: {
click: (a) => M(a, o, r, "remove")
click: (a) => S(a, o, r, "remove")
}
}, [t(F, {
attrs: {
......@@ -212,7 +212,7 @@ const T = L({
src: o.icon ? g.dir(`/assets/img/${o.icon}`) : p,
draggable: !1
}
})]), t(w, {
})]), t(P, {
attrs: {
content: o.tip,
disabled: !o.tip
......@@ -235,7 +235,7 @@ const T = L({
}, [t("div", {
class: [e.be("group-item", "checkbox"), a.ispersonal ? e.bem("group-item", "checkbox", "selected") : "", i.value ? e.bem("group-item", "checkbox", "show") : ""],
on: {
click: (u) => M(u, a, r, "change")
click: (u) => S(u, a, r, "change")
}
}, [a.ispersonal ? t(F, {
attrs: {
......@@ -249,7 +249,7 @@ const T = L({
src: a.icon ? g.dir(`/assets/img/${a.icon}`) : p,
draggable: !1
}
})]), t(w, {
})]), t(P, {
attrs: {
content: a.tip,
disabled: !a.tip
......@@ -258,7 +258,7 @@ const T = L({
class: e.be("group-item", "text")
}, [a.pssysappfuncname])])]))])]))])]);
}
}), W = L({
}), V = L({
name: "FuncPortalListPortlet",
components: {
FuncDrawer: T
......@@ -351,7 +351,7 @@ const T = L({
attrs: {
src: s.icon ? g.dir(`/assets/img/${s.icon}`) : this.placeholderImg
}
})]), t(w, {
})]), t(P, {
attrs: {
content: s.tip,
disabled: !s.tip
......@@ -368,9 +368,9 @@ const T = L({
})]);
}
});
class X {
class W {
constructor() {
y(this, "component", W);
y(this, "component", V);
}
async createController(n, e, p) {
const l = new D(
......@@ -381,7 +381,7 @@ class X {
return await l.init(), l;
}
}
const Y = L({
const X = L({
name: "TodoAppMenuPortlet",
props: {
modelData: {
......@@ -402,10 +402,10 @@ const Y = L({
if (s.modelData.appMenu) {
const i = s.modelData.appMenu.source.getPSAppCounterRef();
i && (I(async () => {
p = await K.getCounterByRef(i), p.onChange((m) => {
p = await H.getCounterByRef(i), p.onChange((m) => {
l.value = m;
});
}), H(() => {
}), J(() => {
p == null || p.destroy();
}));
}
......@@ -416,10 +416,7 @@ const Y = L({
counterData: l,
onClickMenuItem: async (c) => {
const i = c.source.getPSAppFunc();
if (i)
await ibiz.commands.execute(j.TAG, i);
else if (s.modelData.appMenu)
throw new G(s.modelData.appMenu.source, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
i && await ibiz.commands.execute(j.TAG, i);
}
};
},
......@@ -447,7 +444,7 @@ const Y = L({
class: this.ns.be("item-right", "count")
}, [t("span", {
class: [(this.counterData[n.counterId] || 0) > 99 ? this.ns.be("item-right", "add") : ""]
}, [(this.counterData[n.counterId] || 0) > 99 ? 99 : this.counterData[n.counterId] || 0]), t("span", ["\u4EF6"])]), t(w, {
}, [(this.counterData[n.counterId] || 0) > 99 ? 99 : this.counterData[n.counterId] || 0]), t("span", ["\u4EF6"])]), t(P, {
attrs: {
content: n.source.tooltip,
disabled: !n.source.tooltip
......@@ -457,9 +454,9 @@ const Y = L({
}, [n.label])])])]))]);
}
});
class Z {
class Y {
constructor() {
y(this, "component", Y);
y(this, "component", X);
}
async createController(n, e, p) {
const l = new E(
......@@ -470,21 +467,21 @@ class Z {
return await l.init(), l;
}
}
const ct = {
const it = {
mateUrl: import.meta.url,
install(s) {
ibiz.register.portletPart.register(
"PORTLET_CUSTOM_AppPortalList",
new V()
new Q()
), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_FuncPortalList",
new X()
new W()
), ibiz.register.portletPart.register(
"PORTLET_CUSTOM_TodoAppMenu",
new Z()
new Y()
);
}
};
export {
ct as default
it as default
};
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册