quick-admin-vue3-core
Version:
以快(计算机执行效率、开发效率)为核心的后台管理系统开发模板
74 lines (73 loc) • 2.93 kB
JavaScript
import { defineComponent as h, resolveComponent as v, createElementBlock as s, openBlock as n, createVNode as f, createBlock as g, createCommentVNode as D, withCtx as p, createElementVNode as a, toDisplayString as r, unref as t, Fragment as m, renderList as _, normalizeClass as S, createTextVNode as T } from "vue";
import { c as V, P as O } from "./platform-DsTwHxm6.js";
import { N as B } from "./index-C0qRtkRj.js";
/* empty css */
import { u as b } from "./dict-C-wULPWV.js";
const J = /* @__PURE__ */ h({
name: "DemoCenterPermissionsButton",
__name: "index",
setup(E) {
const { getOpts: x, getText: y } = b(), { baseBtns: u } = V.tpls ?? {}, C = x("D_RoleType"), d = O();
return (I, P) => {
const c = v("BaseSection"), N = v("BaseBtn");
return n(), s("div", null, [
f(c, { title: "当前用户信息" }, {
default: p(() => {
var o, e, l;
return [
a("div", null, "姓名:" + r((o = t(d)) == null ? void 0 : o.name), 1),
a("div", null, "角色名称:" + r(t(y)("D_RoleType", (e = t(d)) == null ? void 0 : e.role)), 1),
a("div", null, "角色code:" + r((l = t(d)) == null ? void 0 : l.role), 1)
];
}),
_: 1
}),
f(c, { title: "角色字典说明" }, {
default: p(() => [
(n(!0), s(m, null, _(t(C), (o, e) => (n(), s("div", { key: e }, [
a("span", null, r(o.value) + ":", 1),
a("span", null, r(o.label), 1)
]))), 128))
]),
_: 1
}),
f(c, { title: "当前按钮权限配置" }, {
default: p(() => [
t(u) ? (n(!0), s(m, { key: 0 }, _(t(u), (o, e) => {
var l, i;
return n(), s("div", { key: e }, [
a("span", {
class: S(`color-${((i = (l = t(B)[e]) == null ? void 0 : l.attrs) == null ? void 0 : i.type) ?? "info"}`)
}, r(t(B)[e].text) + " (" + r(e) + "):", 3),
a("span", null, r(JSON.stringify(o)), 1)
]);
}), 128)) : (n(), s(m, { key: 1 }, [
T("未配置权限")
], 64))
]),
_: 1
}),
t(u) ? (n(), g(c, {
key: 0,
title: "当前用户(角色)可见按钮"
}, {
default: p(() => [
(n(!0), s(m, null, _(t(u), (o, e) => {
var l, i;
return n(), g(N, {
auth: t(u)[e].auth,
tpl: e,
type: ((i = (l = t(B)[e]) == null ? void 0 : l.attrs) == null ? void 0 : i.type) ?? "info",
key: e
}, null, 8, ["auth", "tpl", "type"]);
}), 128))
]),
_: 1
})) : D("", !0)
]);
};
}
});
export {
J as default
};