flymopet-vec
Version:
基于element-plus二次开发的公共业务组件。方便统一维护,实现。
1,990 lines • 120 kB
JavaScript
var fe = Object.defineProperty, de = Object.defineProperties;
var oe = Object.getOwnPropertyDescriptors;
var pu = Object.getOwnPropertySymbols;
var ku = Object.prototype.hasOwnProperty, xu = Object.prototype.propertyIsEnumerable;
var Tu = (u, e, a) => e in u ? fe(u, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : u[e] = a, S = (u, e) => {
for (var a in e || (e = {}))
ku.call(e, a) && Tu(u, a, e[a]);
if (pu)
for (var a of pu(e))
xu.call(e, a) && Tu(u, a, e[a]);
return u;
}, B = (u, e) => de(u, oe(e));
var Ru = (u, e) => {
var a = {};
for (var t in u)
ku.call(u, t) && e.indexOf(t) < 0 && (a[t] = u[t]);
if (u != null && pu)
for (var t of pu(u))
e.indexOf(t) < 0 && xu.call(u, t) && (a[t] = u[t]);
return a;
};
var Fu = (u, e, a) => new Promise((t, n) => {
var c = (o) => {
try {
d(a.next(o));
} catch (r) {
n(r);
}
}, f = (o) => {
try {
d(a.throw(o));
} catch (r) {
n(r);
}
}, d = (o) => o.done ? t(o.value) : Promise.resolve(o.value).then(c, f);
d((a = a.apply(u, e)).next());
});
import { shallowRef as X, defineComponent as T, computed as ou, openBlock as h, createElementBlock as v, createElementVNode as R, normalizeClass as Q, h as l, onMounted as yu, onUpdated as re, withDirectives as uu, ref as I, normalizeStyle as Au, withModifiers as le, renderSlot as q, resolveComponent as E, createVNode as _, withCtx as z, createCommentVNode as Z, reactive as eu, Fragment as W, createTextVNode as V, watch as gu, toRefs as _u, renderList as mu, toDisplayString as ru, vShow as lu, inject as se, createBlock as H, KeepAlive as ie, resolveDynamicComponent as be, unref as K } from "vue";
import { ElTableColumn as wu, ElTable as pe, vLoading as qu, ElPagination as ge, ElMessage as iu, ElFormItem as me, ElButton as Su, ElCol as Cu, ElRow as Gu, ElForm as he, ElLink as Ou, ElSpace as zu, ElTag as ye, ElIcon as su, ElMenu as Lu, ElSubMenu as _e, ElMenuItem as Bu, ElDropdown as $e, ElDropdownItem as Se, ElRadioGroup as ve, ElRadio as vu, ElDrawer as we, ElDivider as Mu, ElConfigProvider as Ce, ElContainer as Nu, ElMain as ze, ElAside as Ae, ElMessageBox as nu, ElLoading as De } from "element-plus";
import { Refresh as Ku, ArrowDownBold as Xu, ArrowUpBold as Qu, CircleClose as Ee, Search as Te, DArrowLeft as ke, DArrowRight as xe, Setting as Re, Close as Fe } from "@element-plus/icons";
import { useElementSize as Oe } from "@vueuse/core";
import Le from "mitt";
import J from "dayjs";
function ue() {
const u = X({});
function e() {
u.value.clearSelection();
}
function a($, M = !0) {
if (Array.isArray($))
for (let du = 0; du < $.length; du++)
u.value.toggleRowSelection($[du], M);
else
u.value.toggleRowSelection($, M);
}
function t() {
u.value.toggleAllSelection();
}
function n($, M) {
u.value.toggleRowExpansion($, M);
}
function c($) {
u.value.setCurrentRow($);
}
function f() {
u.value.clearSort();
}
function d($) {
u.value.clearFilter($);
}
function o() {
u.value.doLayout();
}
function r($, M) {
u.value.sort($, M);
}
function m() {
return u.value.getSelectionRows();
}
function s(...$) {
return u.value.scrollTo(...$);
}
function g($) {
return u.value.setScrollTop($);
}
function b($) {
return u.value.setScrollLeft($);
}
function i($, M) {
return u.value.rowClickSelection($, M);
}
function A($, M) {
return u.value.rowClickSelectionOne($, M);
}
function p() {
return u.value.getFormData();
}
function y($) {
return u.value.setFormData($);
}
function D() {
return u.value.resetFormData();
}
function L() {
return u.value.actionQuery();
}
function x() {
return u.value.actionReset();
}
function k() {
return u.value.actionRefresh();
}
function C() {
return u.value.getTableData();
}
function w($) {
return u.value.setTableData($);
}
function F($, M) {
return u.value.findByRowKey($, M);
}
function j() {
return u.value.countSelectionRows();
}
function Y() {
return u.value.getCurrentRow();
}
return {
tbRef: u,
clearSelection: e,
toggleRowSelection: a,
toggleAllSelection: t,
toggleRowExpansion: n,
setCurrentRow: c,
clearSort: f,
clearFilter: d,
doLayout: o,
setSort: r,
getSelectionRows: m,
scrollTo: s,
setScrollTop: g,
setScrollLeft: b,
rowClickSelection: i,
rowClickSelectionOne: A,
getFormData: p,
setFormData: y,
resetFormData: D,
actionQuery: L,
actionReset: x,
actionRefresh: k,
getTableData: C,
setTableData: w,
findByRowKey: F,
countSelectionRows: j,
getCurrentRow: Y
};
}
const O = (u, e) => {
const a = u.__vccOpts || u;
for (const [t, n] of e)
a[t] = n;
return a;
}, Be = T({
name: "Sortable",
props: {
order: {
type: String,
default: ""
}
},
emits: ["change"],
setup(u, e) {
const a = ou(() => u.order);
return {
checked: a,
onChange: (n) => {
a.value = n, e.emit("change", n);
}
};
}
}), Me = { class: "sortable-wrapper" };
function Ne(u, e, a, t, n, c) {
return h(), v("span", Me, [
R("i", {
class: Q([
"sortable-caret",
"ascending",
u.checked === "ascending" ? "active" : ""
]),
onClick: e[0] || (e[0] = (f) => u.onChange("ascending"))
}, null, 2),
R("i", {
class: Q([
"sortable-caret",
"descending",
u.checked === "descending" ? "active" : ""
]),
onClick: e[1] || (e[1] = (f) => u.onChange("descending"))
}, null, 2)
]);
}
const Ve = /* @__PURE__ */ O(Be, [["render", Ne]]), je = T({
name: "Column",
props: {
config: {
type: Object,
required: !0,
default: () => ({})
}
},
render(u) {
const { $slots: e } = u, s = u.config, {
thEllipsis: a,
thSlotName: t,
render: n,
labelClassName: c
} = s, f = Ru(s, [
"thEllipsis",
"thSlotName",
"render",
"labelClassName"
]), d = () => [
c,
a ? "cell-ellipsis" : ""
].filter(Boolean).join(" "), o = () => {
const g = t ? e[t] : null;
if (typeof g == "function")
return g;
}, r = () => {
const g = e[f.prop];
return typeof g == "function" ? g : ({ row: b, column: { property: i }, $index: A }) => {
var y, D;
let p = (y = b[i]) != null ? y : "";
return typeof n == "function" ? (D = n(p, b, A)) != null ? D : "" : p;
};
}, m = {
header: o(),
default: r()
};
return l(wu, B(S({}, f), {
labelClassName: d()
}), m);
}
});
const ee = T({
name: "BasicTable",
props: {
loading: {
type: Boolean,
default: !1
},
useIndex: {
type: Boolean,
default: !0
},
indexName: {
type: String,
default: "\u5E8F\u53F7"
},
useSelection: {
type: Boolean,
default: !1
},
data: {
type: Array,
default: () => []
},
columns: {
type: Array,
default: () => []
},
config: {
type: Object,
default: () => ({})
},
scrollbarSize: {
type: Number,
default: 8
},
style: {
type: Object,
default: () => ({})
}
},
emits: ["mounted", "updated"],
setup(u, e) {
const { emit: a, expose: t } = e, {
tbRef: n,
clearSelection: c,
toggleRowSelection: f,
toggleAllSelection: d,
toggleRowExpansion: o,
setCurrentRow: r,
clearSort: m,
clearFilter: s,
doLayout: g,
setSort: b,
getSelectionRows: i,
scrollTo: A,
setScrollTop: p,
setScrollLeft: y
} = ue(), D = (x, k) => {
var w;
const C = (w = i()) == null ? void 0 : w.find((F) => x[k] === F[k]);
f(x, !C);
};
return t({
clearSelection: c,
toggleRowSelection: f,
toggleAllSelection: d,
toggleRowExpansion: o,
setCurrentRow: r,
clearSort: m,
clearFilter: s,
doLayout: g,
setSort: b,
getSelectionRows: i,
scrollTo: A,
setScrollTop: p,
setScrollLeft: y,
rowClickSelection: D,
rowClickSelectionOne: (x, k) => {
var w;
((w = i()) == null ? void 0 : w.find((F) => x[k] === F[k])) ? c() : (c(), f(x, !0));
}
}), yu(() => {
a("mounted");
}), re(() => {
a("updated");
}), {
tbRef: n,
rowClickSelection: D
};
},
render(u) {
const {
$slots: e,
data: a,
scrollbarSize: t,
style: n,
loading: c
} = u, f = l(pe, B(S({}, u.config), {
ref: "tbRef",
class: "basic-table-wrapper",
data: Array.isArray(a) ? a : [],
style: S({
"--scrollbar-size": t + "px"
}, n)
}), {
default: () => Ie(u),
append: e.append,
empty: e.empty
});
return uu(f, [
[qu, c, "loading"]
]);
}
});
function Ie(u) {
const {
useIndex: e,
indexName: a,
useSelection: t,
columns: n,
$slots: c
} = u;
if (!Array.isArray(n))
return [];
let f = [];
typeof c.expand == "function" && f.push(c.expand()), t && f.push(l(wu, {
type: "selection",
prop: "selection",
key: "selection",
width: 60,
align: "center",
fixed: !0
})), e && f.push(l(wu, {
type: "index",
index: (d) => d + 1,
label: a,
prop: "indexName",
key: "indexName",
width: 60,
align: "center",
fixed: !0
}));
for (let d = 0; d < n.length; d++)
f.push(l(je, {
config: n[d]
}, c));
return f;
}
const Pe = T({
name: "Hscrollbar",
props: {
height: {
type: String,
default: "100%"
},
size: {
type: String,
default: "6px"
}
},
setup() {
const u = I(null);
return {
scrollbarRef: u,
handleScroll: (a) => {
const t = a.wheelDelta || -a.deltaY * 40;
u.value.scrollLeft = u.value.scrollLeft + t / 4;
}
};
}
});
function He(u, e, a, t, n, c) {
return h(), v("div", {
ref: "scrollbarRef",
class: "h-scrollbar",
style: Au({
"--scrollbar-height": u.height,
"--scrollbar-size": u.size
}),
onWheel: e[0] || (e[0] = le((...f) => u.handleScroll && u.handleScroll(...f), ["prevent"]))
}, [
q(u.$slots, "default")
], 36);
}
const Du = /* @__PURE__ */ O(Pe, [["render", He]]);
const Ue = T({
name: "Pagination",
components: {
ElPagination: ge,
Refresh: Ku
},
props: {
page: {
type: Number,
default: 0
},
total: {
type: Number,
default: 0
},
limit: {
type: Number,
default: 20
},
small: {
type: Boolean,
default: !0
},
hideOnSinglePage: {
type: Boolean,
default: !1
},
background: {
type: Boolean,
default: !0
},
pageSizes: {
type: Array,
default: () => [10, 20, 50, 100]
},
layout: {
type: String,
default: "total, sizes, prev, pager, next, jumper"
},
sizeChange: {
type: Function,
default: null
},
currentChange: {
type: Function,
default: void 0
},
refresh: {
type: Function,
default: void 0
}
}
}), Ye = {
class: /* @__PURE__ */ Q([
"pagination-wrapper"
])
}, We = { class: "pagination" };
function Ze(u, e, a, t, n, c) {
const f = E("el-pagination"), d = E("Refresh"), o = E("el-icon");
return h(), v("div", Ye, [
R("div", {
class: "pagination-count",
style: Au({ fontSize: (u.small ? 12 : 14) + "px" })
}, [
q(u.$slots, "default")
], 4),
R("div", We, [
_(f, {
"current-page": u.page,
background: u.background,
small: u.small,
"hide-on-single-page": u.hideOnSinglePage,
total: u.total,
"page-size": u.limit,
"page-sizes": u.pageSizes,
layout: u.layout,
onSizeChange: u.sizeChange,
onCurrentChange: u.currentChange
}, null, 8, ["current-page", "background", "small", "hide-on-single-page", "total", "page-size", "page-sizes", "layout", "onSizeChange", "onCurrentChange"]),
u.refresh ? (h(), v("span", {
key: 0,
class: Q([
"pagination-refresh"
]),
title: "\u5237\u65B0",
onClick: e[0] || (e[0] = (...r) => u.refresh && u.refresh(...r))
}, [
_(o, {
size: u.small ? 16 : 18
}, {
default: z(() => [
_(d)
]),
_: 1
}, 8, ["size"])
])) : Z("", !0)
])
]);
}
const ae = /* @__PURE__ */ O(Ue, [["render", Ze]]);
const Je = ({ props: u, boxRef: e }) => {
let a = null;
const t = () => {
a = document.createElement("div"), a.classList.add("paneresize-splitter"), a.classList.add("paneresize-pointer"), e.value.appendChild(a);
}, n = ({ x: g, y: b }) => {
u.horizontal ? a.style.left = g + "px" : a.style.top = b + "px";
}, c = () => {
e.value.removeChild(a), a = null;
}, f = X(null);
return {
splitterRef: f,
addTempSplitter: t,
setTempSplitter: n,
removeTempSplitter: c,
getSplitterWidth: () => f.value.offsetWidth,
getSplitterHeight: () => f.value.offsetHeight,
getSplitterOffsetLeft: () => f.value.offsetLeft,
getSplitterOffsetTop: () => f.value.offsetTop,
onSplitter: (g) => {
f.value && f.value.addEventListener("mousedown", (b) => g(b));
}
};
}, qe = T({
name: "Paneresize",
props: {
horizontal: {
type: Boolean,
default: !1
},
width: {
type: String,
default: "100%"
},
height: {
type: String,
default: "auto"
},
style: {
type: Object,
default: () => ({})
},
before: {
type: Object,
default: () => ({})
},
after: {
type: Object,
default: () => ({})
}
},
emits: ["resized"],
setup(u, e) {
const a = X(null), t = X(null), n = X(null), c = eu(S({
row: !1,
style: {}
}, u.before)), f = eu(S({
row: !1,
size: "0px",
style: {}
}, u.after)), {
splitterRef: d,
addTempSplitter: o,
setTempSplitter: r,
removeTempSplitter: m,
getSplitterWidth: s,
getSplitterHeight: g,
getSplitterOffsetLeft: b,
getSplitterOffsetTop: i,
onSplitter: A
} = Je({ props: u, boxRef: a }), p = (x) => {
const k = a.value.getBoundingClientRect(), { clientX: C, clientY: w } = x;
return {
x: C - k.left,
y: w - k.top
};
}, y = (x) => {
x.preventDefault();
const { x: k, y: C } = p(x);
r({ x: k, y: C });
}, D = (x) => {
const k = p(x);
let C = 0, w = 0;
if (u.horizontal) {
const F = n.value.offsetWidth, j = k.x - b();
if (j < 0) {
const Y = a.value.offsetWidth - s();
C = F + Math.abs(j), C >= Y && (C = Y);
} else
C = F - Math.abs(j), C <= 0 && (C = 0);
f.size = C + "px";
} else {
const F = n.value.offsetHeight, j = k.y - i();
if (j < 0) {
const Y = a.value.offsetHeight - g();
w = F + Math.abs(j), w >= Y && (w = Y);
} else
w = F - j, w <= 0 && (w = 0);
f.size = w + "px";
}
document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", D), m(), e.emit("resized", { afterSize: f.size });
}, L = () => {
document.addEventListener("mousemove", y), document.addEventListener("mouseup", D), o();
};
return yu(() => {
A(L);
}), {
boxRef: a,
beforeRef: t,
splitterRef: d,
afterRef: n,
beforeProps: c,
afterProps: f
};
},
render(u) {
const {
$slots: e,
horizontal: a,
width: t,
height: n,
boxStyle: c,
beforeProps: f,
afterProps: d
} = u, o = () => {
if (!e.before)
return console.error("\u63D2\u69FD before \u4E0D\u80FD\u4E3A\u7A7A"), null;
const s = B(S({}, f.style), {
flexDirection: f.row ? "row" : "column"
});
return e.after && (a ? s.width = `calc(100% - ${d.size})` : s.height = `calc(100% - ${d.size})`), l("div", {
ref: "beforeRef",
class: "paneresize-before",
style: s
}, e.before());
}, r = () => {
if (!e.after)
return null;
const s = B(S({}, d.style), {
flexDirection: d.row ? "row" : "column"
});
return a ? s.width = d.size : s.height = d.size, l("div", {
ref: "afterRef",
class: "paneresize-after",
style: s
}, e.after({ afterSize: d.size }));
}, m = () => e.after ? l("div", {
ref: "splitterRef",
class: "paneresize-splitter"
}) : null;
return l(
"div",
{
ref: "boxRef",
class: [
"paneresize-wrapper",
`paneresize-${a ? "horizontal" : "vertical"}`
],
style: B(S({}, c), {
width: t,
height: n
})
},
[
o(),
m(),
r()
]
);
}
});
const Ge = T({
name: "FormCollapse",
components: {
ArrowDownBold: Xu,
ArrowUpBold: Qu
},
props: {
modelValue: {
type: Boolean
}
},
emits: ["update:modelValue"],
setup(u, e) {
return {
checked: I(!0),
onChange: (n) => {
e.emit("update:modelValue", !n.target.checked);
}
};
}
}), Ke = /* @__PURE__ */ V("\xA0\u5C55\u5F00 "), Xe = /* @__PURE__ */ V("\xA0\u6536\u8D77 ");
function Qe(u, e, a, t, n, c) {
const f = E("ArrowDownBold"), d = E("el-icon"), o = E("ArrowUpBold");
return h(), v("label", null, [
R("input", {
type: "checkbox",
style: { width: "0", height: "0" },
onChange: e[0] || (e[0] = (...r) => u.onChange && u.onChange(...r))
}, null, 32),
u.modelValue ? (h(), v(W, { key: 0 }, [
_(d, null, {
default: z(() => [
_(f)
]),
_: 1
}),
Ke
], 64)) : (h(), v(W, { key: 1 }, [
_(d, null, {
default: z(() => [
_(o)
]),
_: 1
}),
Xe
], 64))
]);
}
const u5 = /* @__PURE__ */ O(Ge, [["render", Qe]]), e5 = ({
props: u,
ctx: { slots: e },
boxWidth: a
}) => {
const t = X(null), n = () => S({}, u.initFormData), c = eu({
formData: n(),
formCollapse: !0,
formCollapseShow: !0
});
gu(() => u.initFormData, () => {
c.formData = S(S({}, c.formData), n());
}, { deep: !0 });
const f = () => {
const p = {};
return Object.keys(c.formData).forEach((y) => {
var L;
let D = (L = c.formData[y]) != null ? L : "";
typeof D == "string" && (D = D.trim()), p[y] = D;
}), p;
}, d = (p) => {
!p || typeof p != "object" || Object.keys(p).forEach((y) => {
var D;
return c.formData[y] = (D = p[y]) != null ? D : "";
});
}, o = () => c.formData = n();
e.form && (gu(() => c.formCollapse, () => {
i();
}), gu(() => a.value, () => {
i();
}));
let r = null;
const m = () => {
if (r)
return r;
const p = t.value.$el.children || [], [y] = p;
return y && y.classList.contains("el-row") ? r = y.children ? [].slice.call(y.children) : null : r = p ? [].slice.call(p) : null, r;
};
let s = null;
const g = () => {
var p;
return s || (s = (p = m()) == null ? void 0 : p.map((y) => y.offsetWidth || 0), s);
}, b = (p, y = !0) => p.style.display = y ? "inline-flex" : "none", i = () => {
if (!e.form || !u.useFormCollapse)
return;
const p = [...g()];
if (!p.length)
return;
const y = p.pop(), D = a.value - y - 20;
let L = 0;
p.forEach((x, k) => {
const C = r[k];
if (L += x, !c.formCollapse) {
b(C);
return;
}
L <= D ? b(C) : b(C, !1);
}), c.formCollapseShow = L > D;
}, A = (p) => {
c.formCollapse = p;
};
return B(S({
formRef: t
}, _u(c)), {
getFormData: f,
setFormData: d,
resetFormData: o,
setFormCollapse: A
});
}, a5 = ({
props: u,
ctx: { emit: e },
formState: { getFormData: a, resetFormData: t }
}) => {
const n = eu({
loading: !1,
tableData: []
}), c = eu(B(S({
defaultPageSize: 20,
pageSizes: [10, 20, 50, 100],
layout: "total, sizes, prev, pager, next, jumper",
total: 0,
page: 1,
limit: 20,
start: 0
}, u.paginationConfig), {
currentChange(i) {
c.page = i, f();
},
sizeChange(i) {
n.tableData = [], c.total = 0, c.page = 1, c.start = 1, c.limit = i, f();
}
})), f = () => Fu(void 0, null, function* () {
if (typeof u.request != "function") {
console.error("request \u4E0D\u80FD\u4E3A\u7A7A");
return;
}
try {
n.loading = !0;
const i = yield u.request(B(S({}, a()), {
page: c.page,
limit: c.limit,
start: (c.page - 1) * c.limit
})), { list: A, total: p } = i || {};
n.tableData = Array.isArray(A) ? A : [], c.total = +p || 0;
} catch (i) {
console.log("pro-table error:", i), iu.error((i == null ? void 0 : i.msg) || "\u7F51\u7EDC\u9519\u8BEF\uFF01"), n.tableData = [];
} finally {
n.loading = !1;
}
}), d = () => {
c.page = 1, f(), e("query");
}, o = (i = !0) => {
var A;
t(), n.tableData = [], c.total = 0, c.page = 1, c.start = 1, c.limit = ((A = u.paginationConfig) == null ? void 0 : A.limit) || 20, i && f(), e("reset");
}, r = () => {
f(), e("refresh");
}, m = () => n.tableData, s = (i) => n.tableData = i, g = (i, A) => n.tableData.find((p) => p[i] === A), b = () => c.total;
return yu(() => {
u.useAutoLoad && d();
}), B(S({}, _u(n)), {
_pagination: c,
actionQuery: d,
actionReset: o,
actionRefresh: r,
getTableData: m,
setTableData: s,
findByRowKey: g,
getTotal: b
});
}, t5 = ({
props: u,
ctx: { emit: e },
boxRef: a,
paginationState: { getTableData: t },
getSelectionRows: n
}) => {
const c = ou(() => S({
height: u.height ? "100%" : void 0,
scrollbarAlwaysOn: !0
}, u.tableConfig)), f = I(0), d = () => {
var s;
f.value = ((s = n()) == null ? void 0 : s.length) || 0;
}, o = () => {
let s = 0;
if (a.value) {
const g = a.value.querySelectorAll(".el-table__body .el-table__row") || [];
for (let b = 0, i = g.length; b < i; b++)
if (g[b].classList.contains("current-row")) {
s = b;
break;
}
}
return t()[s];
};
return {
_tableConfig: c,
selectionCount: f,
tableMounted: () => {
e("mounted");
},
tableUpdated: () => {
e("updated", {
row: o()
});
},
countSelectionRows: d,
getCurrentRow: o
};
};
const c5 = T({
name: "ProTable",
props: {
layouts: {
type: String,
default: "toolbar,form,custom,table,pagination"
},
height: {
type: String,
default: "auto"
},
toolbarConfig: {
type: Object,
default: () => ({
style: {}
})
},
initFormData: {
type: Object,
default: () => ({})
},
formConfig: {
type: Object,
default: () => ({
style: {}
})
},
formLayout: {
type: String,
default: "default"
},
formColspan: {
type: Number,
default: 4
},
useFormCollapse: {
type: Boolean,
default: !0
},
actionAlignRight: {
type: Boolean,
default: !1
},
useIndex: {
type: Boolean,
default: !0
},
indexName: {
type: String,
default: "\u5E8F\u53F7"
},
useSelection: {
type: Boolean,
default: !1
},
useSelectionCount: {
type: Boolean,
default: !1
},
tableConfig: {
type: Object,
default: () => ({})
},
tableColumns: {
type: Array,
default: () => []
},
tableStyle: {
type: Object,
default: () => ({})
},
paginationConfig: {
type: Object,
default: () => ({})
},
usePagination: {
type: Boolean,
default: !0
},
request: {
type: Function,
default: void 0
},
useAutoLoad: {
type: Boolean,
default: !1
}
},
emits: ["mounted", "updated", "reset", "query", "refresh"],
setup(u, e) {
const { expose: a } = e, t = X(null), {
width: n
} = Oe(t), c = I(u.detailSize), {
tbRef: f,
clearSelection: d,
toggleRowSelection: o,
toggleAllSelection: r,
toggleRowExpansion: m,
setCurrentRow: s,
clearSort: g,
clearFilter: b,
doLayout: i,
setSort: A,
getSelectionRows: p,
scrollTo: y,
setScrollTop: D,
setScrollLeft: L,
rowClickSelection: x,
rowClickSelectionOne: k
} = ue(), C = e5({ props: u, ctx: e, boxWidth: n }), w = a5({ props: u, ctx: e, formState: C }), F = t5({ props: u, ctx: e, boxRef: t, paginationState: w, getSelectionRows: p });
return yu(() => {
}), a({
clearSelection: d,
toggleRowSelection: o,
toggleAllSelection: r,
toggleRowExpansion: m,
setCurrentRow: s,
clearSort: g,
clearFilter: b,
doLayout: i,
setSort: A,
getSelectionRows: p,
scrollTo: y,
setScrollTop: D,
setScrollLeft: L,
rowClickSelection: x,
rowClickSelectionOne: k,
getFormData: C.getFormData,
setFormData: C.setFormData,
resetFormData: C.resetFormData,
actionQuery: w.actionQuery,
actionReset: w.actionReset,
actionRefresh: w.actionRefresh,
getTableData: w.getTableData,
setTableData: w.setTableData,
findByRowKey: w.findByRowKey,
getTotal: w.getTotal,
countSelectionRows: F.countSelectionRows,
getCurrentRow: F.getCurrentRow
}), B(S(S(S({
boxRef: t,
_detailsize: c,
tbRef: f
}, C), w), F), {
clearSelection: d,
toggleAllSelection: r
});
},
render(u) {
const {
layouts: e,
height: a,
formData: t,
actionReset: n,
actionRefresh: c,
actionQuery: f,
formConfig: d,
loading: o,
formCollapseShow: r,
formCollapse: m,
useFormCollapse: s,
setFormCollapse: g,
actionAlignRight: b,
formLayout: i,
formColspan: A,
toolbarConfig: p,
tableData: y,
tableColumns: D,
_tableConfig: L,
useIndex: x,
indexName: k,
useSelection: C,
tableStyle: w,
tableMounted: F,
tableUpdated: j,
usePagination: Y,
_pagination: $,
useSelectionCount: M,
selectionCount: du,
clearSelection: te,
toggleAllSelection: ce,
$slots: P
} = u, ne = {
form: () => {
if (typeof P.form != "function")
return null;
let N = P.form({ data: t });
if (!Array.isArray(N))
return null;
const tu = l(me, {
class: [
b ? "action-align-right" : ""
]
}, [
l(Su, {
disabled: o,
onClick: n,
icon: Ee
}, [
"\u91CD\u7F6E"
]),
l(Su, {
disabled: o,
onClick: c,
icon: Ku
}, [
"\u5237\u65B0"
]),
l(Su, {
disabled: o,
type: "primary",
onClick: f,
icon: Te
}, [
"\u67E5\u8BE2"
]),
typeof P.actionbutton == "function" ? P.actionbutton() : null,
s && r ? l(u5, {
modelValue: m,
"onUpdate:modelValue": (cu) => g(cu)
}) : null
]);
return i === "grid" ? (N = N.map((cu) => {
const { props: bu } = cu;
return l(Cu, {
span: bu && bu.span || A
}, [cu]);
}), N.push(tu), N = [l(Gu, {}, [N])]) : N.push(tu), l(he, B(S({
labelPosition: "right",
inline: !0
}, d), {
ref: "formRef",
class: "pro-table-form",
model: t
}), N);
},
toolbar: () => P.toolbar ? l(Du, S({
class: "pro-table-toolbar",
height: "auto"
}, p), P.toolbar()) : null,
table: () => {
const N = l(ee, {
ref: "tbRef",
vLoading: o,
data: y,
columns: D,
config: L,
style: w,
useIndex: x,
indexName: k,
useSelection: C,
onMounted: F,
onUpdated: j
}, {
expand: P.expand,
empty: P.empty
});
return uu(N, [
[qu, o, "loading"]
]);
},
pagination: () => Y ? l(ae, B(S({}, $), {
refresh: c
}), {
default() {
return M ? [
l("span", null, [`\u5DF2\u9009\u62E9 ${du} \u6761\u6570\u636E`]),
l(Ou, {
type: "primary",
style: {
fontSize: "inherit",
marginLeft: "10px"
},
onClick() {
te();
}
}, ["\u53D6\u6D88\u6240\u6709\u52FE\u9009"]),
l(Ou, {
type: "primary",
style: {
fontSize: "inherit",
marginLeft: "10px"
},
onClick() {
ce();
}
}, ["\u52FE\u9009\u6240\u6709"])
] : null;
}
}) : null,
custom: () => typeof P.custom == "function" ? P.custom({
formData: t,
actionReset: n,
actionRefresh: c,
actionQuery: f,
loading: o
}) : null
}, Eu = e.split(",");
return l("div", {
ref: "boxRef",
class: "pro-table-wrapper",
style: {
height: a
}
}, (() => {
const N = [];
for (let tu = 0; tu < Eu.length; tu++) {
const cu = Eu[tu], bu = ne[cu]();
N.push(bu);
}
return N;
})());
}
}), n5 = T({
name: "Puyo",
props: {
content: {
type: String,
default: ""
},
placement: {
type: String,
default: "top"
},
width: {
type: String,
default: "300px"
}
},
render(u) {
const { content: e, placement: a, width: t } = u;
if (!e || typeof e != "string")
return "";
const n = {
default() {
return /* @__PURE__ */ React.createElement("span", {
class: "puyo-text"
}, e.replace(/<|>/g, (c) => encodeURIComponent(c)).replace(/\n/g, "<br/>"));
},
reference() {
return /* @__PURE__ */ React.createElement("div", {
class: "puyo-ellipsis"
}, e);
}
};
return /* @__PURE__ */ React.createElement("el-popover", {
placement: a,
trigger: "hover",
width: t,
"v-slots": n
});
}
});
const f5 = T({
name: "Readmore",
components: {
ArrowDownBold: Xu,
ArrowUpBold: Qu
},
props: {
list: {
type: Array,
default: void 0
},
defaultRows: {
type: Number,
default: 4
}
},
setup(u) {
const e = ou(() => {
var c;
return ((c = u.list) == null ? void 0 : c.length) > u.defaultRows;
}), a = I(!0), t = (c) => {
a.value = !c.target.checked;
}, n = ou(() => e.value ? Array.isArray(u.list) ? a.value ? u.list.slice(0, u.defaultRows) : u.list : [] : u.list);
return {
isChecked: a,
onChange: t,
items: n,
showMore: e
};
}
}), d5 = { class: "readmore-wrapper" }, o5 = { key: 0 }, r5 = /* @__PURE__ */ V("\xA0\u5C55\u5F00 "), l5 = /* @__PURE__ */ V("\xA0\u6536\u8D77 ");
function s5(u, e, a, t, n, c) {
const f = E("ArrowDownBold"), d = E("el-icon"), o = E("ArrowUpBold");
return h(), v("div", d5, [
(h(!0), v(W, null, mu(u.items, (r, m) => q(u.$slots, "default", {
key: m,
data: r
})), 128)),
u.showMore ? (h(), v("label", o5, [
R("input", {
type: "checkbox",
style: { width: "0", height: "0" },
onChange: e[0] || (e[0] = (...r) => u.onChange && u.onChange(...r))
}, null, 32),
u.isChecked ? (h(), v(W, { key: 0 }, [
_(d, null, {
default: z(() => [
_(f)
]),
_: 1
}),
r5
], 64)) : (h(), v(W, { key: 1 }, [
_(d, null, {
default: z(() => [
_(o)
]),
_: 1
}),
l5
], 64))
])) : Z("", !0)
]);
}
const i5 = /* @__PURE__ */ O(f5, [["render", s5]]), b5 = T({
name: "TagPicker",
props: {
modelValue: {
type: [String, Number],
default: ""
},
options: {
type: Array,
default: () => []
},
theme: {
type: String,
default: "light"
},
config: {
type: Object,
default: () => ({})
}
},
emits: ["update:model-value"],
render(u) {
const { theme: e, config: a } = u;
return l(zu, {}, u.options.map(({ label: t, value: n }) => (e === "dark" ? (a.type = "", a.effect = u.modelValue === n ? "dark" : "") : (a.type = u.modelValue === n ? "" : "info", a.effect = "light"), l(ye, B(S({}, u.config), {
style: {
cursor: "pointer"
},
onClick() {
u.$emit("update:model-value", n);
}
}), t))));
}
});
const p5 = T({
name: "TbSplitRows",
props: {
data: {
type: Array,
default: () => []
},
field: {
type: String,
default: ""
}
}
}), g5 = {
key: 0,
class: "tb-split-rows"
}, m5 = ["title"];
function h5(u, e, a, t, n, c) {
return u.data && u.data.length ? (h(), v("div", g5, [
(h(!0), v(W, null, mu(u.data, (f, d) => (h(), v("div", {
key: d,
class: "tb-split-row"
}, [
q(u.$slots, "default", { data: f }),
u.$slots.default ? Z("", !0) : (h(), v("span", {
key: 0,
title: f[u.field]
}, ru(f[u.field]), 9, m5))
]))), 128))
])) : Z("", !0);
}
const y5 = /* @__PURE__ */ O(p5, [["render", h5]]), U = Le(), hu = {
data: {
title: "",
layoutMode: "horizontal",
headerHeight: "40px",
headerBgColor: "#fff",
headerTextColor: "var(--el-text-color-primary)",
headerActiveColor: "#f5f5f5",
isCollapse: 0,
slideberWidth: "200px",
slideberCollapseWidth: "64px",
slideberBgColor: "#fff",
slideberTextColor: "var(--el-text-color-primary)",
slideberActiveColor: "var(--el-text-color-primary)",
slideberActiveTextColor: "#fff",
i18n: "zh-cn",
componentSize: "small",
elementPlusZIndex: 3e3,
isBreadcrumb: !0,
isTagsview: !0,
isCacheTagsView: !0,
tagsViewHeight: "36px"
},
key: "flymopet-settings"
};
function G() {
let u = {};
try {
u = JSON.parse(localStorage.getItem(hu.key));
} catch (e) {
console.log(e);
}
return S(S({}, hu.data), u);
}
function $u(u) {
const e = S(S({}, G()), u);
hu.data = e, localStorage.setItem(hu.key, JSON.stringify(e));
}
const _5 = T({
name: "CollapseSlideber",
components: {
ElIcon: su,
DArrowLeft: ke,
DArrowRight: xe
},
props: {
vertical: {
type: Boolean,
default: !1
},
isCollapse: {
type: Number,
default: 0
}
},
setup() {
const { isCollapse: u } = G(), e = I(u);
return {
collapse: e,
changeCollapse: () => {
const t = e.value === 1 ? 0 : 1;
e.value = t, $u({ collapse: t }), U.emit("e-collapse-slidebar", t);
}
};
}
}), $5 = {
key: 0,
style: { "padding-left": "10px" }
};
function S5(u, e, a, t, n, c) {
const f = E("DArrowLeft"), d = E("ElIcon"), o = E("DArrowRight");
return h(), v("div", {
class: "collapse-slideber",
style: { cursor: "pointer", "font-size": "var(--el-menu-item-font-size)" },
onClick: e[0] || (e[0] = (...r) => u.changeCollapse && u.changeCollapse(...r))
}, [
uu(_(d, {
size: "20px",
color: "var(--el-text-color-regular)"
}, {
default: z(() => [
_(f)
]),
_: 1
}, 512), [
[lu, u.collapse === 0]
]),
uu(_(d, { size: "20px" }, {
default: z(() => [
_(o)
]),
_: 1
}, 512), [
[lu, u.collapse === 1]
]),
u.vertical && u.isCollapse === 0 ? (h(), v("span", $5, " \u6536\u8D77/\u5C55\u5F00 ")) : Z("", !0)
]);
}
const v5 = /* @__PURE__ */ O(_5, [["render", S5]]);
const Vu = T({
name: "Slideber",
components: {
ElMenu: Lu
},
props: {
routes: {
type: Array,
default: () => []
}
},
setup() {
const {
layoutMode: u,
isCollapse: e
} = G(), a = I(u);
U.on("e-layout-mode", (n) => {
a.value = n;
});
const t = I(!!e);
return U.on("e-collapse-slidebar", (n) => {
t.value = !!n;
}), {
mode: a,
collapse: t
};
},
render(u) {
const {
$route: e,
mode: a,
routes: t,
collapse: n
} = u, c = (f) => {
if (!!Array.isArray(f))
return f.filter(({ meta: d, path: o } = {}) => {
const { hidden: r, title: m } = d;
return !r && m && o;
}).map(({ children: d, path: o, meta: { icon: r, iconSize: m, title: s, blank: g } }) => d && d.length ? l(_e, {
index: o,
popperClass: "slideber-wrapper"
}, {
default() {
return c(d);
},
title() {
return [
r ? l(su, {
size: m
}, [l(r)]) : null,
l("span", {}, s)
];
}
}) : g ? l(Bu, {}, [
l("a", {
href: g,
target: "_blank"
}, s)
]) : l(Bu, {
index: o
}, {
title() {
return l("div", {}, [
r ? l(su, {
size: m
}, [l(r)]) : null,
l("span", {}, s)
]);
}
}));
};
return l(Lu, {
router: !0,
class: "slideber-wrapper",
mode: a,
defaultActive: e.path,
collapseTransition: !1,
collapse: n
}, c(t));
}
});
const w5 = T({
name: "SettingButton",
components: {
ElIcon: su,
Setting: Re
},
props: {
vertical: {
type: Boolean,
default: !1
},
isCollapse: {
type: Number,
default: 0
}
},
setup() {
return {
handle: () => {
U.emit("e-project-setting");
}
};
}
}), C5 = {
key: 0,
style: { "padding-left": "10px" }
};
function z5(u, e, a, t, n, c) {
const f = E("Setting"), d = E("ElIcon");
return h(), v("span", {
class: "setting-button",
onClick: e[0] || (e[0] = (...o) => u.handle && u.handle(...o))
}, [
_(d, { size: 20 }, {
default: z(() => [
_(f)
]),
_: 1
}),
u.vertical && u.isCollapse === 0 ? (h(), v("span", C5, " \u9879\u76EE\u8BBE\u7F6E ")) : Z("", !0)
]);
}
const ju = /* @__PURE__ */ O(w5, [["render", z5]]);
/*!
* vue-router v4.0.15
* (c) 2022 Eduardo San Martin Morote
* @license MIT
*/
const A5 = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol", fu = (u) => A5 ? Symbol(process.env.NODE_ENV !== "production" ? "[vue-router]: " + u : u) : (process.env.NODE_ENV !== "production" ? "[vue-router]: " : "_vr_") + u;
process.env.NODE_ENV;
process.env.NODE_ENV;
const D5 = /* @__PURE__ */ fu(process.env.NODE_ENV !== "production" ? "router" : "r");
process.env.NODE_ENV;
process.env.NODE_ENV;
var Iu;
(function(u) {
u.pop = "pop", u.push = "push";
})(Iu || (Iu = {}));
var Pu;
(function(u) {
u.back = "back", u.forward = "forward", u.unknown = "";
})(Pu || (Pu = {}));
process.env.NODE_ENV;
var Hu;
(function(u) {
u[u.aborted = 4] = "aborted", u[u.cancelled = 8] = "cancelled", u[u.duplicated = 16] = "duplicated";
})(Hu || (Hu = {}));
function E5() {
return se(D5);
}
const T5 = {}, k5 = {
class: "icon",
viewBox: "0 0 1024 1024",
xmlns: "http://www.w3.org/2000/svg",
width: "200",
height: "200"
}, x5 = /* @__PURE__ */ R("path", { d: "M911.4 325.78L686.06 98.6s-61.43-7.91-56.8 48.81l-.04 61.49-209.78 178.14-129.28 7.73s-47.34 15.71-30.05 56.75l75.26 74.36.02.02 45.31 45.84L99.19 916.96c-3.9 5.06 2.65 11.52 7.66 7.55l341.42-284.42 128.59 130.1s51.98 14.21 55.21-25.15l-3.11-134.1 184.67-212.73L894 393.6s63.07-12.66 17.4-67.82z" }, null, -1), R5 = [
x5
];
function F5(u, e) {
return h(), v("svg", k5, R5);
}
const O5 = /* @__PURE__ */ O(T5, [["render", F5]]);
const L5 = [
{ label: "\u56FA\u5B9A\u6807\u7B7E", action: "FIXED_TAG" },
{ label: "\u5173\u95ED\u5176\u5B83\u6807\u7B7E", action: "CLOSE_OTHER_TAG" },
{ label: "\u5173\u95ED\u5DE6\u8FB9\u6240\u6709\u6807\u7B7E", action: "CLOSE_LEFT_TAG" },
{ label: "\u5173\u95ED\u53F3\u8FB9\u6240\u6709\u6807\u7B7E", action: "CLOSE_RIGHT_TAG" }
], B5 = T({
name: "TagsView",
components: {
ElIcon: su,
Close: Fe,
ElDropdown: $e,
ElDropdownItem: Se,
HScrollbar: Du,
DingFullIcon: O5
},
props: {
tagsViewCache: {
type: Boolean,
default: !0
},
tagsViewCacheKey: {
type: String,
default: "flymopet-tags-view"
}
},
setup(u) {
const e = () => {
if (!u.tagsViewCache)
return [];
try {
return JSON.parse(localStorage.getItem(u.tagsViewCacheKey)) || [];
} catch (r) {
return [];
}
}, {
tagsViewHeight: a
} = G(), t = {
"--tags-view-height": a
}, n = E5(), c = eu({
navs: e()
}), f = ({ action: r }, m, s) => {
if (r === "FIXED_TAG") {
c.navs.forEach((b, i) => {
b.path === m && (b.fixed = !0, c.navs.splice(i, 1, b));
});
return;
}
let g = "";
if (r === "FIXED_TAG" ? c.navs.forEach((b, i) => b.path === m ? (b.fixed = !0, c.navs.splice(i, 1, b), !0) : !1) : r === "CLOSE_OTHER_TAG" ? c.navs = c.navs.filter((b) => b.fixed || b.path === m ? !0 : (b.path === m && (g = !0), !1)) : r === "CLOSE_LEFT_TAG" ? c.navs = c.navs.filter((b, i) => b.fixed || i >= s ? !0 : (b.path === m && (g = !0), !1)) : r === "CLOSE_RIGHT_TAG" && (c.navs = c.navs.filter((b, i) => b.fixed || i <= s ? !0 : (b.path === m && (g = !0), !1))), g) {
const { path: b } = c.navs[0] || {};
n.push({ path: b || "/" });
}
}, d = (r) => c.navs.some((m) => m.path === r), o = ({ path: r, meta: { title: m, tagView: s } = {} } = {}) => {
!r || s || d(r) || c.navs.push({ path: r, title: m });
};
return u.tagsViewCache && gu(() => c.navs, (r) => {
localStorage.setItem(u.tagsViewCacheKey, JSON.stringify(r));
}, { deep: !0 }), B(S({
styles: t
}, _u(c)), {
rightMenus: L5,
changeRightMenus: f,
pushRoute: o
});
},
watch: {
$route: {
immediate: !0,
deep: !0,
handler(u) {
this.pushRoute(u);
}
}
},
methods: {
closeTag(u) {
if (this.navs = this.navs.filter((e) => e.path !== u.path), this.$route.path === u.path) {
const { path: e = "/" } = this.navs[0] || {};
this.$router.push({ path: e });
}
}
}
}), M5 = ["onClick"];
function N5(u, e, a, t, n, c) {
const f = E("DingFullIcon"), d = E("ElIcon"), o = E("RouterLink"), r = E("Close"), m = E("ElDropdownItem"), s = E("ElDropdownMenu"), g = E("ElDropdown"), b = E("HScrollbar");
return uu((h(), H(b, {
class: "tags-view",
style: Au(u.styles)
}, {
default: z(() => [
(h(!0), v(W, null, mu(u.navs, (i, A) => (h(), H(g, {
key: A,
trigger: "contextmenu",
size: "small"
}, {
dropdown: z(() => [
_(s, null, {
default: z(() => [
(h(!0), v(W, null, mu(u.rightMenus, (p) => (h(), H(m, {
key: p.id,
onClick: (y) => u.changeRightMenus(p, i.path, A)
}, {
default: z(() => [
V(ru(p.label), 1)
]),
_: 2
}, 1032, ["onClick"]))), 128))
]),
_: 2
}, 1024)
]),
default: z(() => [
R("div", {
class: Q({
"tags-view-link": !0,
"tags-view-item-active": u.$route.path === i.path
})
}, [
_(o, {
to: i.path
}, {
default: z(() => [
i.fixed ? (h(), H(d, {
key: 0,
size: 12
}, {
default: z(() => [
_(f)
]),
_: 1
})) : Z("", !0),
V(" " + ru(i.title), 1)
]),
_: 2
}, 1032, ["to"]),
u.navs.length > 1 ? (h(), v("span", {
key: 0,
class: "tags-view-icon",
onClick: (p) => u.closeTag(i)
}, [
_(d, { size: 12 }, {
default: z(() => [
_(r)
]),
_: 1
})
], 8, M5)) : Z("", !0)
], 2)
]),
_: 2
}, 1024))), 128))
]),
_: 1
}, 8, ["style"])), [
[lu, u.navs.length]
]);
}
const V5 = /* @__PURE__ */ O(B5, [["render", N5]]), j5 = T({
name: "MainView",
props: {
routes: {
type: Array,
default: () => []
}
},
setup(u) {
return {
keepAlives: ou(() => {
const a = [], t = (n) => {
n && n.forEach(({ children: c, name: f, meta: d }) => {
c && c.length ? t(c) : f && d && d.cache && a.push(f);
});
};
return t(u.routes), a;
})
};
}
});
function I5(u, e, a, t, n, c) {
const f = E("RouterView");
return h(), H(f, null, {
default: z(({ Component: d, route: o }) => [
(h(), H(ie, { include: u.keepAlives }, [
(h(), H(be(d), {
key: o.path
}))
], 1032, ["include"]))
]),
_: 1
});
}
const P5 = /* @__PURE__ */ O(j5, [["render", I5]]);
const H5 = T({
name: "LayoutMode",
setup() {
const { layoutMode: u } = G(), e = I(u);
return {
mode: e,
onChangeMode: (t) => {
e.value !== t && (e.value = t, U.emit("e-layout-mode", t), $u({ layoutMode: t }));
}
};
}
}), U5 = { class: "layout-mode" }, Y5 = /* @__PURE__ */ R("span", { style: { "font-size": "10px" } }, "\u9876\u90E8\u5E03\u5C40\u6A21\u5F0F", -1), W5 = /* @__PURE__ */ R("span", { style: { "font-size": "10px" } }, "\u5DE6\u4FA7\u5E03\u5C40\u6A21\u5F0F", -1);
function Z5(u, e, a, t, n, c) {
return h(), v("div", U5, [
R("div", null, [
R("div", {
class: Q(["layout-mode-item", { horizontal: !0, active: u.mode === "horizontal" }]),
onClick: e[0] || (e[0] = (f) => u.onChangeMode("horizontal"))
}, null, 2),
Y5
]),
R("div", null, [
R("div", {
class: Q(["layout-mode-item", { vertical: !0, active: u.mode === "vertical" }]),
onClick: e[1] || (e[1] = (f) => u.onChangeMode("vertical"))
}, null, 2),
W5
])
]);
}
const J5 = /* @__PURE__ */ O(H5, [["render", Z5]]), q5 = /* @__PURE__ */ V("\u5927\u5C3A\u5BF8"), G5 = /* @__PURE__ */ V("\u4E2D\u5C3A\u5BF8"), K5 = /* @__PURE__ */ V("\u5C0F\u5C3A\u5BF8"), X5 = {
setup(u) {
const { componentSize: e } = G(), a = I(e), t = (n) => {
U.emit("e-component-size", n), $u({ componentSize: n });
};
return (n, c) => (h(), H(K(ve), {
modelValue: a.value,
"onUpdate:modelValue": c[0] || (c[0] = (f) => a.value = f),
onChange: t
}, {
default: z(() => [
_(K(vu), { label: "large" }, {
default: z(() => [
q5
]),
_: 1
}),
_(K(vu), { label: "default" }, {
default: z(() => [
G5
]),
_: 1
}),
_(K(vu), { label: "small" }, {
default: z(() => [
K5
]),
_: 1
})
]),
_: 1
}, 8, ["modelValue"]));
}
}, Q5 = /* @__PURE__ */ V(" \u5E03\u5C40\u6A21\u5F0F "), ua = /* @__PURE__ */ R("br", null, null, -1), ea = /* @__PURE__ */ V(" \u7EC4\u4EF6\u5C3A\u5BF8 "), aa = {
setup(u) {
const e = I(!1);
return U.on("e-project-setting", () => {
e.value = !0;
}), (a, t) => (h(), H(K(we), {
modelValue: e.value,
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value = n),
title: "\u9879\u76EE\u914D\u7F6E",
direction: "rtl",
size: "300px"
}, {
default: z(() => [
_(K(Mu), { "content-position": "left" }, {
default: z(() => [
Q5
]),
_: 1
}),
_(J5),
ua,
_(K(Mu), { "content-position": "left" }, {
default: z(() => [
ea
]),
_: 1
}),
_(X5)
]),
_: 1
}, 8, ["modelValue"]));
}
};
const ta = T({
name: "ProLayout",
props: {
routes: {
type: Array,
default: () => []
},
settings: {
type: Object,
default: () => ({})
},
useTagsView: {
type: Boolean,
default: !0
},
tagsViewCache: {
type: Boolean,
default: !0
},
tagsViewCacheKey: {
type: String,
default: void 0
}
},
setup(u) {
$u(u.settings);
const {
slideberWidth: e,
slideberCollapseWidth: a,
layoutMode: t,
isCollapse: n,
componentSize: c
} = G(), f = (o) => o === 1 ? a : e, d = eu({
isHorizontal: t === "horizontal",
isCollapse: n,
slideberWidth: f(n),
componentSize: c
});
return U.on("e-layout-mode", (o) => {
d.isHorizontal = o === "horizontal";
}), U.on("e-collapse-slidebar", (o) => {
d.isCollapse = o, d.slideberWidth =