super-page-runtime 2.2.59 → 2.2.65
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/dist/es/assets/file.png.js +4 -0
- package/dist/es/assets/folder.png.js +4 -0
- package/dist/es/components/runtime/utils/events/event-util.js +23 -23
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +5 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +105 -65
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +2 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +14 -0
- package/dist/es/components/runtime/utils/page-init-util.js +21 -10
- package/dist/es/components/runtime/utils/tree-utils.js +49 -15
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.d.ts +31 -0
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +35 -0
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/fixed/FixedBox.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.d.ts +94 -0
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +5 -71
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +72 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +22 -19
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +113 -45
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +59 -54
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +144 -130
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/index.d.ts +2 -1
- package/dist/es/index.js +2 -0
- package/dist/es/style.css +372 -26
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getBaseUrl as
|
|
2
|
-
import
|
|
1
|
+
import { getBaseUrl as e, getRealRestApiPath as t } from "./common-util.js";
|
|
2
|
+
import a from "agilebuilder-ui/src/utils/request";
|
|
3
3
|
import "./eventBus.js";
|
|
4
4
|
import { getPermissionCodes as o } from "./page-init-util.js";
|
|
5
5
|
import "agilebuilder-ui/src/utils/common-util";
|
|
@@ -16,24 +16,58 @@ import "./page-store.js";
|
|
|
16
16
|
import "agilebuilder-ui/src/utils/i18n-util";
|
|
17
17
|
import "vue-i18n";
|
|
18
18
|
import "async-validator";
|
|
19
|
-
function
|
|
20
|
-
return new Promise((
|
|
19
|
+
function i(i2, r2, s2, n2, p2) {
|
|
20
|
+
return new Promise((s3, n3) => {
|
|
21
21
|
var _a, _b;
|
|
22
|
-
if (
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
u && Object.assign(
|
|
28
|
-
|
|
22
|
+
if (r2 && ((_a = r2.props.dataOrigin) == null ? void 0 : _a.optionValueSetType)) if ("beanName" === ((_b = r2.props.dataOrigin) == null ? void 0 : _b.optionValueSetType)) {
|
|
23
|
+
const n4 = i2.backendUrl, m = i2.systemCode, l = o(r2, i2);
|
|
24
|
+
let d = e(n4, i2.isTest) + "/dsc/commons/load-tree-node";
|
|
25
|
+
d = t(d, m, n4, i2.isTest);
|
|
26
|
+
const u = { pageCode: i2.code, pageVersion: i2.version, tableName: i2.tableName, systemCode: m, functionCode: l, beanName: i2.beanName };
|
|
27
|
+
r2.props.dataOrigin.beanName && (u.beanName = r2.props.dataOrigin.beanName), p2 && Object.assign(u, p2), a.post(d, u).then((e2) => {
|
|
28
|
+
s3(e2);
|
|
29
29
|
});
|
|
30
30
|
} else {
|
|
31
|
-
const
|
|
32
|
-
|
|
31
|
+
const e2 = (r2.runtime ? r2.runtime : {}).props;
|
|
32
|
+
e2 && e2.staticData ? s3(e2.staticData) : s3([]);
|
|
33
33
|
}
|
|
34
|
-
else
|
|
34
|
+
else s3([]);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
+
const r = (t2, o2, i2) => new Promise((r2, s2) => {
|
|
38
|
+
var _a;
|
|
39
|
+
if ("beanName" === ((_a = o2.props.dataOrigin) == null ? void 0 : _a.optionValueSetType)) {
|
|
40
|
+
const s3 = i2.backendUrl, n2 = e(s3, i2.isTest) + "/dsc/commons/tree-node", m = p(false, t2, o2, i2);
|
|
41
|
+
a.delete(n2, { data: m }).then((e2) => {
|
|
42
|
+
r2(e2);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}), s = (t2, o2, i2) => new Promise((r2, s2) => {
|
|
46
|
+
var _a;
|
|
47
|
+
if ("beanName" === ((_a = o2.props.dataOrigin) == null ? void 0 : _a.optionValueSetType)) {
|
|
48
|
+
const s3 = i2.backendUrl, n2 = e(s3, i2.isTest) + "/dsc/commons/tree-node", m = p(true, t2, o2, i2);
|
|
49
|
+
a.post(n2, m).then((e2) => {
|
|
50
|
+
r2(e2);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}), n = (t2, o2, i2) => new Promise((r2, s2) => {
|
|
54
|
+
var _a;
|
|
55
|
+
if ("beanName" === ((_a = o2.props.dataOrigin) == null ? void 0 : _a.optionValueSetType)) {
|
|
56
|
+
const s3 = i2.backendUrl, n2 = e(s3, i2.isTest) + "/dsc/commons/tree-node";
|
|
57
|
+
a.put(n2, p(false, t2, o2, i2)).then((e2) => {
|
|
58
|
+
r2(e2);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
function p(e2, t2, a2, o2) {
|
|
63
|
+
const i2 = JSON.parse(JSON.stringify(t2.data));
|
|
64
|
+
e2 && (i2.nodeId = null);
|
|
65
|
+
const r2 = { pageCode: o2.code, pageVersion: o2.version, systemCode: o2.systemCode, beanName: o2.beanName, tableName: a2.props.base.treeTableName, treeLabelProp: a2.props.base.treeLabelProp, treeParentIdProp: a2.props.base.treeParentIdProp, currentNode: i2, parentNode: null };
|
|
66
|
+
return a2.props.dataOrigin.beanName && (r2.beanName = a2.props.dataOrigin.beanName), t2.parent && t2.parent.level > 0 && (r2.parentNode = t2.parent.data), r2;
|
|
67
|
+
}
|
|
37
68
|
export {
|
|
38
|
-
|
|
69
|
+
s as createTreeNode,
|
|
70
|
+
r as deleteNode,
|
|
71
|
+
i as getMenuTreeData,
|
|
72
|
+
n as updateTreeNode
|
|
39
73
|
};
|
package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare function refreshConditionList(): void;
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
pageContext: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: any;
|
|
6
|
+
};
|
|
7
|
+
}>, {
|
|
8
|
+
refreshConditionList: typeof refreshConditionList;
|
|
9
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
close: (...args: any[]) => void;
|
|
11
|
+
confirm: (...args: any[]) => void;
|
|
12
|
+
open: (...args: any[]) => void;
|
|
13
|
+
opend: (...args: any[]) => void;
|
|
14
|
+
closed: (...args: any[]) => void;
|
|
15
|
+
save: (...args: any[]) => void;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
|
+
pageContext: {
|
|
18
|
+
type: ObjectConstructor;
|
|
19
|
+
default: any;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{
|
|
22
|
+
onClose?: (...args: any[]) => any;
|
|
23
|
+
onConfirm?: (...args: any[]) => any;
|
|
24
|
+
onOpen?: (...args: any[]) => any;
|
|
25
|
+
onOpend?: (...args: any[]) => any;
|
|
26
|
+
onClosed?: (...args: any[]) => any;
|
|
27
|
+
onSave?: (...args: any[]) => any;
|
|
28
|
+
}>, {
|
|
29
|
+
pageContext: Record<string, any>;
|
|
30
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as l, resolveComponent as o, createElementBlock as a, openBlock as n, createVNode as s, withCtx as u, createTextVNode as i, toDisplayString as r, createElementVNode as d } from "vue";
|
|
2
|
+
import { ElMessage as p } from "element-plus";
|
|
3
|
+
import { useI18n as c } from "vue-i18n";
|
|
4
|
+
import { listChartConditions as m, deleteChartCondition as g } from "../../../utils/events/standard-event.js";
|
|
5
|
+
const f = { class: "dialog-footer" }, v = e({ __name: "save-chart-condition-dialog", props: { pageContext: { type: Object, default: null } }, emits: ["open", "opend", "close", "closed", "save", "confirm"], setup(e2, { expose: v2, emit: h }) {
|
|
6
|
+
const { t: C } = c(), y = e2, _ = h, b = t([]), w = t(null), M = t([]);
|
|
7
|
+
function P() {
|
|
8
|
+
_("save", w.value);
|
|
9
|
+
}
|
|
10
|
+
function R() {
|
|
11
|
+
0 === b.value.length || b.value.length > 1 ? p({ showClose: true, type: "warning", message: C("superPageRuntimeMessage.pleaseSelectCondition") }) : _("confirm", b.value[0]);
|
|
12
|
+
}
|
|
13
|
+
function $() {
|
|
14
|
+
m(y.pageContext).then((e3) => {
|
|
15
|
+
M.value = e3;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function k(e3) {
|
|
19
|
+
b.value = e3;
|
|
20
|
+
}
|
|
21
|
+
return l(() => {
|
|
22
|
+
$();
|
|
23
|
+
}), v2({ refreshConditionList: $ }), (e3, t2) => {
|
|
24
|
+
const l2 = o("el-input"), c2 = o("el-col"), m2 = o("el-button"), v3 = o("el-row"), h2 = o("el-table-column"), y2 = o("Delete"), b2 = o("el-icon"), x = o("el-table"), O = o("el-dialog");
|
|
25
|
+
return n(), a("div", null, [s(O, { "model-value": "", title: e3.$t("superPageRuntimeMessage.saveCondition"), "close-on-click-modal": false, "append-to-body": "", width: "40%", "max-height": "400", onOpen: t2[2] || (t2[2] = (e4) => _("open")), onOpend: t2[3] || (t2[3] = (e4) => _("opend")), onClose: t2[4] || (t2[4] = (e4) => _("close")), onClosed: t2[5] || (t2[5] = (e4) => _("closed")) }, { footer: u(() => [d("div", f, [s(m2, { type: "primary", onClick: R }, { default: u(() => [i(r(e3.$t("superPageRuntimeMessage.sure")), 1)]), _: 1 }), s(m2, { onClick: t2[1] || (t2[1] = (e4) => _("close")) }, { default: u(() => [i(r(e3.$t("superPageRuntimeMessage.cancel")), 1)]), _: 1 })])]), default: u(() => [s(v3, { style: { "padding-bottom": "10px" }, gutter: 10 }, { default: u(() => [s(c2, { span: 18 }, { default: u(() => [s(l2, { modelValue: w.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => w.value = e4), placeholder: e3.$t("superPageRuntimeMessage.pleaseInputConditionName") }, null, 8, ["modelValue", "placeholder"])]), _: 1 }), s(c2, { span: 6 }, { default: u(() => [s(m2, { type: "primary", onClick: P }, { default: u(() => [i(r(e3.$t("superPageRuntimeMessage.save")), 1)]), _: 1 })]), _: 1 })]), _: 1 }), s(x, { data: M.value, border: "", style: { width: "100%" }, onSelect: k }, { default: u(() => [s(h2, { type: "selection", align: "center", width: "55" }), s(h2, { prop: "name", label: e3.$t("superPageRuntimeMessage.conditionName") }, null, 8, ["label"]), s(h2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "60" }, { default: u((e4) => [s(b2, { size: "14", style: { color: "#5893ef", cursor: "pointer" }, onClick: (t3) => {
|
|
26
|
+
return l3 = e4.row, void g(l3.id).then(() => {
|
|
27
|
+
p({ showClose: true, type: "success", message: C("superPageRuntimeMessage.successfulDelete") }), $();
|
|
28
|
+
});
|
|
29
|
+
var l3;
|
|
30
|
+
} }, { default: u(() => [s(y2)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["title"])]);
|
|
31
|
+
};
|
|
32
|
+
} });
|
|
33
|
+
export {
|
|
34
|
+
v as default
|
|
35
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import r from "./card-runtime.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import e from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const t = e(r, [["__scopeId", "data-v-
|
|
4
|
+
const t = e(r, [["__scopeId", "data-v-fc66efb1"]]);
|
|
5
5
|
export {
|
|
6
6
|
t as default
|
|
7
7
|
};
|
|
@@ -21,7 +21,7 @@ const V = e({ __name: "card-runtime", props: { pageContext: {}, configure: {} },
|
|
|
21
21
|
_.configure.props.title = "teee";
|
|
22
22
|
} }), (e3, t2) => {
|
|
23
23
|
const o2 = r("el-button");
|
|
24
|
-
return s(), l(u(b), { ref_key: "thisRef", ref: z, style: p(
|
|
24
|
+
return s(), l(u(b), { ref_key: "thisRef", ref: z, style: p(u(A)), "data-collapse": String(D.value), class: a(["yx-card-box-view-main", u(B)]) }, c({ default: f(() => [g("div", { class: "yx-card-box-view-context", style: p(u(F)) }, [(s(true), m(y, null, d(e3.configure.items, (t3, o3) => (s(), l(S, { key: t3.uuid, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"]))), 128))], 4)]), _: 2 }, [e3.configure.props.base.tittleShow ? { name: "header", fn: f(() => [g("div", { class: "yx-card-box-view-header", onClick: G }, [g("div", { class: "yx-card-box-view-title", style: p(u(E)) }, [e3.configure.props.iconType && e3.configure.props.iconValue ? (s(), l(u(h), { key: 0, iconType: e3.configure.props.iconType, iconValue: e3.configure.props.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : x("", true), v(" " + C(u(j)(e3.configure.props.base.title)), 1)], 4), R.value ? (s(), l(o2, { key: 0, type: "text", icon: D.value ? u(k) : u(w), style: { margin: "-15px 0", "z-index": "1" } }, null, 8, ["icon"])) : x("", true)])]), key: "0" } : void 0]), 1032, ["style", "data-collapse", "class"]);
|
|
25
25
|
};
|
|
26
26
|
} });
|
|
27
27
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import e from "./FixedBox.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = o(e, [["__scopeId", "data-v-
|
|
4
|
+
const r = o(e, [["__scopeId", "data-v-9b488f43"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
type Position = 'top' | 'bottom';
|
|
4
|
+
type Target = string | HTMLElement | Window;
|
|
5
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
|
+
offset: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
position: {
|
|
11
|
+
type: PropType<Position>;
|
|
12
|
+
default: string;
|
|
13
|
+
validator: (value: string) => value is Position;
|
|
14
|
+
};
|
|
15
|
+
target: {
|
|
16
|
+
type: PropType<Target>;
|
|
17
|
+
default: () => Window & typeof globalThis;
|
|
18
|
+
};
|
|
19
|
+
autoDetectParentScroll: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
stickyInScrollContainer: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
zIndex: {
|
|
28
|
+
type: NumberConstructor;
|
|
29
|
+
default: number;
|
|
30
|
+
};
|
|
31
|
+
enableIntervalUpdate: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
enableIntervalTime: {
|
|
36
|
+
type: NumberConstructor;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
40
|
+
change: (fixed: boolean) => void;
|
|
41
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
42
|
+
offset: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
46
|
+
position: {
|
|
47
|
+
type: PropType<Position>;
|
|
48
|
+
default: string;
|
|
49
|
+
validator: (value: string) => value is Position;
|
|
50
|
+
};
|
|
51
|
+
target: {
|
|
52
|
+
type: PropType<Target>;
|
|
53
|
+
default: () => Window & typeof globalThis;
|
|
54
|
+
};
|
|
55
|
+
autoDetectParentScroll: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
stickyInScrollContainer: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
zIndex: {
|
|
64
|
+
type: NumberConstructor;
|
|
65
|
+
default: number;
|
|
66
|
+
};
|
|
67
|
+
enableIntervalUpdate: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
enableIntervalTime: {
|
|
72
|
+
type: NumberConstructor;
|
|
73
|
+
default: number;
|
|
74
|
+
};
|
|
75
|
+
}>> & Readonly<{
|
|
76
|
+
onChange?: (fixed: boolean) => any;
|
|
77
|
+
}>, {
|
|
78
|
+
position: Position;
|
|
79
|
+
offset: number;
|
|
80
|
+
zIndex: number;
|
|
81
|
+
target: Target;
|
|
82
|
+
autoDetectParentScroll: boolean;
|
|
83
|
+
stickyInScrollContainer: boolean;
|
|
84
|
+
enableIntervalUpdate: boolean;
|
|
85
|
+
enableIntervalTime: number;
|
|
86
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
|
|
87
|
+
default?(_: {}): any;
|
|
88
|
+
}>;
|
|
89
|
+
export default _default;
|
|
90
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
91
|
+
new (): {
|
|
92
|
+
$slots: S;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
@@ -1,73 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!y.value) return;
|
|
6
|
-
const e3 = y.value.getBoundingClientRect(), t2 = T.value;
|
|
7
|
-
if (t2 === window) {
|
|
8
|
-
const t3 = "top" === m.position ? e3.top <= m.offset : e3.bottom >= window.innerHeight - m.offset;
|
|
9
|
-
B.value = 0, S(t3, e3);
|
|
10
|
-
} else if (m.stickyInScrollContainer) {
|
|
11
|
-
const o2 = t2.getBoundingClientRect(), { isFixTop: n2, isFixBottom: i2, containerOffset: l2 } = ((e4) => {
|
|
12
|
-
const t3 = ["top"].includes(m.position), o3 = ["bottom"].includes(m.position);
|
|
13
|
-
if (!x.value) return { isTop: t3, isBottom: o3 };
|
|
14
|
-
const n3 = x.value.getBoundingClientRect(), i3 = n3.top - e4.top, l3 = n3.left - e4.left, a2 = e4.height - n3.height - i3, r2 = e4.top, s2 = window.innerHeight - e4.bottom;
|
|
15
|
-
return { isTop: t3, isBottom: o3, containerTop: r2, containerBottom: s2, containerOffset: t3 ? r2 : o3 ? s2 : 0, offsetTop: i3, offsetLeft: l3, offsetBottom: a2, isFixTop: t3 && i3 <= 0, isFixBottom: o3 && a2 <= 0 };
|
|
16
|
-
})(o2);
|
|
17
|
-
B.value = l2 ?? 0, S(n2 || i2 || false, e3);
|
|
18
|
-
}
|
|
19
|
-
} catch (e3) {
|
|
20
|
-
}
|
|
21
|
-
}, S = (e3, t2) => {
|
|
22
|
-
e3 !== h.value && (h.value = e3, w("change", e3), g.value = e3 ? { width: `${t2.width}px`, height: `${t2.height}px` } : {});
|
|
23
|
-
}, C = () => {
|
|
24
|
-
requestAnimationFrame(E);
|
|
25
|
-
};
|
|
26
|
-
let L;
|
|
27
|
-
const k = () => {
|
|
28
|
-
h.value = false, clearTimeout(L), L = window.setTimeout(() => {
|
|
29
|
-
E();
|
|
30
|
-
}, 100);
|
|
31
|
-
};
|
|
32
|
-
o(() => {
|
|
33
|
-
setTimeout(() => {
|
|
34
|
-
n(() => {
|
|
35
|
-
try {
|
|
36
|
-
m.enableIntervalUpdate && (I.value = setInterval(C, m.enableIntervalTime));
|
|
37
|
-
const e3 = (() => {
|
|
38
|
-
if (m.autoDetectParentScroll && y.value) {
|
|
39
|
-
const e4 = [];
|
|
40
|
-
let t2 = y.value.parentElement;
|
|
41
|
-
for (; t2 && t2 !== document.body; ) {
|
|
42
|
-
const { overflowY: o2 } = window.getComputedStyle(t2);
|
|
43
|
-
/(auto|scroll)/.test(o2) && e4.push(t2), t2 = t2.parentElement;
|
|
44
|
-
}
|
|
45
|
-
return [...e4, window];
|
|
46
|
-
}
|
|
47
|
-
if ("string" == typeof m.target) {
|
|
48
|
-
const e4 = document.querySelector(m.target);
|
|
49
|
-
return [...e4 ? [e4] : [], window];
|
|
50
|
-
}
|
|
51
|
-
return [window];
|
|
52
|
-
})();
|
|
53
|
-
b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", C)), window.addEventListener("resize", k), E();
|
|
54
|
-
} catch (e3) {
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}, 100);
|
|
58
|
-
}), i(() => {
|
|
59
|
-
T.value && b.value.forEach((e3) => e3.removeEventListener("scroll", C)), window.removeEventListener("resize", k), clearTimeout(L), I.value && clearInterval(I.value);
|
|
60
|
-
}), l(() => {
|
|
61
|
-
n(() => {
|
|
62
|
-
C();
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
const z = a(() => {
|
|
66
|
-
var _a;
|
|
67
|
-
return h.value ? { position: "fixed", width: `${(_a = y.value) == null ? void 0 : _a.offsetWidth}px`, zIndex: m.zIndex, [m.position]: `${m.offset + B.value}px` } : { position: "relative" };
|
|
68
|
-
});
|
|
69
|
-
return (e3, t2) => (s(), r("div", { ref_key: "affixMainRef", ref: x, class: "yx-affix" }, [h.value ? (s(), r("div", { key: 0, style: c(g.value), class: "yx-affix-placeholder" }, null, 4)) : u("", true), f("div", { ref_key: "affixRef", ref: y, style: c(z.value), class: d({ "yx-affix-content": true, "is-fixed": h.value, "is-top": "top" === m.position, "is-bottom": "bottom" === m.position }) }, [p(e3.$slots, "default")], 6)], 512));
|
|
70
|
-
} });
|
|
1
|
+
import e from "./YxAffix.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import o from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = o(e, [["__scopeId", "data-v-d053fb6d"]]);
|
|
71
5
|
export {
|
|
72
|
-
|
|
6
|
+
r as default
|
|
73
7
|
};
|
|
@@ -1,4 +1,74 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, watchEffect as l, computed as a, createElementBlock as r, openBlock as s, createCommentVNode as u, createElementVNode as f, normalizeStyle as c, normalizeClass as d, renderSlot as p } from "vue";
|
|
2
|
+
const v = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 }, position: { type: String, default: "top", validator: (e2) => ["top", "bottom"].includes(e2) }, target: { type: [String, HTMLElement], default: () => window }, autoDetectParentScroll: { type: Boolean, default: true }, stickyInScrollContainer: { type: Boolean, default: true }, zIndex: { type: Number, default: 100 }, enableIntervalUpdate: { type: Boolean, default: true }, enableIntervalTime: { type: Number, default: 2e3 } }, emits: ["change"], setup(e2, { emit: v2 }) {
|
|
3
|
+
const m = e2, w = v2, h = t(null), x = t(null), y = t(false), g = t({}), b = t([]), T = t(window), B = t(0), I = t(null), E = () => {
|
|
4
|
+
try {
|
|
5
|
+
if (!x.value) return;
|
|
6
|
+
const e3 = x.value.getBoundingClientRect(), t2 = T.value;
|
|
7
|
+
if (t2 === window) {
|
|
8
|
+
const t3 = "top" === m.position ? e3.top <= m.offset : e3.bottom >= window.innerHeight - m.offset;
|
|
9
|
+
B.value = 0, S(t3, e3);
|
|
10
|
+
} else if (m.stickyInScrollContainer) {
|
|
11
|
+
const o2 = t2.getBoundingClientRect(), { isFixTop: n2, isFixBottom: i2, containerOffset: l2 } = ((e4) => {
|
|
12
|
+
const t3 = ["top"].includes(m.position), o3 = ["bottom"].includes(m.position);
|
|
13
|
+
if (!h.value) return { isTop: t3, isBottom: o3 };
|
|
14
|
+
const n3 = h.value.getBoundingClientRect(), i3 = n3.top - e4.top, l3 = n3.left - e4.left, a2 = e4.height - n3.height - i3, r2 = e4.top, s2 = window.innerHeight - e4.bottom;
|
|
15
|
+
return { isTop: t3, isBottom: o3, containerTop: r2, containerBottom: s2, containerOffset: t3 ? r2 : o3 ? s2 : 0, offsetTop: i3, offsetLeft: l3, offsetBottom: a2, isFixTop: t3 && i3 <= 0, isFixBottom: o3 && a2 <= 0 };
|
|
16
|
+
})(o2);
|
|
17
|
+
B.value = l2 ?? 0, S(n2 || i2 || false, e3);
|
|
18
|
+
}
|
|
19
|
+
} catch (e3) {
|
|
20
|
+
}
|
|
21
|
+
}, S = (e3, t2) => {
|
|
22
|
+
var _a;
|
|
23
|
+
e3 === y.value && ((_a = g.value) == null ? void 0 : _a.height) === `${t2.height}px` || (y.value = e3, w("change", e3), g.value = e3 ? { width: "100%", height: `${t2.height}px` } : {});
|
|
24
|
+
}, C = () => {
|
|
25
|
+
requestAnimationFrame(E);
|
|
26
|
+
};
|
|
27
|
+
let L;
|
|
28
|
+
const k = () => {
|
|
29
|
+
y.value = false, clearTimeout(L), L = window.setTimeout(() => {
|
|
30
|
+
E();
|
|
31
|
+
}, 100);
|
|
32
|
+
};
|
|
33
|
+
o(() => {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
n(() => {
|
|
36
|
+
try {
|
|
37
|
+
m.enableIntervalUpdate && (I.value = setInterval(C, m.enableIntervalTime));
|
|
38
|
+
const e3 = (() => {
|
|
39
|
+
if (m.autoDetectParentScroll && x.value) {
|
|
40
|
+
const e4 = [];
|
|
41
|
+
let t2 = x.value.parentElement;
|
|
42
|
+
for (; t2 && t2 !== document.body; ) {
|
|
43
|
+
const { overflowY: o2 } = window.getComputedStyle(t2);
|
|
44
|
+
/(auto|scroll)/.test(o2) && e4.push(t2), t2 = t2.parentElement;
|
|
45
|
+
}
|
|
46
|
+
return [...e4, window];
|
|
47
|
+
}
|
|
48
|
+
if ("string" == typeof m.target) {
|
|
49
|
+
const e4 = document.querySelector(m.target);
|
|
50
|
+
return [...e4 ? [e4] : [], window];
|
|
51
|
+
}
|
|
52
|
+
return [window];
|
|
53
|
+
})();
|
|
54
|
+
b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", C)), window.addEventListener("resize", k), E();
|
|
55
|
+
} catch (e3) {
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}, 100);
|
|
59
|
+
}), i(() => {
|
|
60
|
+
T.value && b.value.forEach((e3) => e3.removeEventListener("scroll", C)), window.removeEventListener("resize", k), clearTimeout(L), I.value && clearInterval(I.value);
|
|
61
|
+
}), l(() => {
|
|
62
|
+
n(() => {
|
|
63
|
+
C();
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
const z = a(() => {
|
|
67
|
+
var _a;
|
|
68
|
+
return y.value ? { position: "fixed", width: `${(_a = x.value) == null ? void 0 : _a.offsetWidth}px`, zIndex: m.zIndex, [m.position]: `${m.offset + B.value}px` } : { position: "relative" };
|
|
69
|
+
});
|
|
70
|
+
return (e3, t2) => (s(), r("div", { ref_key: "affixMainRef", ref: h, class: "yx-affix" }, [y.value ? (s(), r("div", { key: 0, style: c(g.value), class: "yx-affix-placeholder" }, null, 4)) : u("", true), f("div", { ref_key: "affixRef", ref: x, style: c(z.value), class: d({ "yx-affix-content": true, "is-fixed": y.value, "is-top": "top" === m.position, "is-bottom": "bottom" === m.position }) }, [p(e3.$slots, "default", {}, void 0, true)], 6)], 512));
|
|
71
|
+
} });
|
|
2
72
|
export {
|
|
3
|
-
|
|
73
|
+
v as default
|
|
4
74
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as n, nextTick as o, createBlock as a, openBlock as i, unref as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as n, nextTick as o, createBlock as a, openBlock as i, unref as u, normalizeClass as l, normalizeStyle as r, withCtx as c, createElementBlock as p, Fragment as s, renderList as g, createElementVNode as f, createCommentVNode as m, toDisplayString as d } from "vue";
|
|
2
2
|
import { ElTabs as b, ElTabPane as y } from "element-plus";
|
|
3
3
|
import x from "../../object-render.vue.js";
|
|
4
4
|
import { SuperIcon as C } from "agilebuilder-ui";
|
|
@@ -23,7 +23,7 @@ const V = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} },
|
|
|
23
23
|
function q() {
|
|
24
24
|
return T(null, V2.pageContext, V2.configure, "tab-add");
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function w(e3, t2) {
|
|
27
27
|
const n2 = { paneName: e3, action: t2 };
|
|
28
28
|
return T(e3, V2.pageContext, V2.configure, "edit", n2);
|
|
29
29
|
}
|
|
@@ -34,7 +34,7 @@ const V = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} },
|
|
|
34
34
|
t2.code && e3.push(document.querySelector("." + t2.code));
|
|
35
35
|
}), v(null, V2.pageContext, V2.configure, { componentRef: _.value, tabsDom: e3, entity: V2.pageContext.entity.data, pageData: V2.pageContext.entity.page });
|
|
36
36
|
});
|
|
37
|
-
}), (e3, t2) => (i(), a(
|
|
37
|
+
}), (e3, t2) => (i(), a(u(b), { ref_key: "thisRef", ref: _, modelValue: k.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => k.value = e4), type: e3.configure.props.cardType, "tab-position": e3.configure.props.tabPosition, style: r(u(N)), class: l([u(R), "runtime-page-container-tabs-view"]), onTabClick: E, onTabChange: O, onTabRemove: S, onTabAdd: q, onEdit: w }, { default: c(() => [(i(true), p(s, null, g(e3.configure.items, (t3, n2) => (i(), a(u(y), { label: t3.label, name: t3.index }, { label: c(() => [f("span", { class: l(t3.code) }, [t3.iconType && t3.iconValue ? (i(), a(u(C), { key: 0, iconType: t3.iconType, iconValue: t3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : m("", true), f("span", { style: r(u(D)) }, d(u(h)(t3.label)), 5)], 2)]), default: c(() => [(i(true), p(s, null, g(t3.items, (t4, n3) => (i(), a(x, { key: t4.uuid, pageContext: e3.pageContext, configure: t4 }, null, 8, ["pageContext", "configure"]))), 128))]), _: 2 }, 1032, ["label", "name"]))), 256))]), _: 1 }, 8, ["modelValue", "type", "tab-position", "style", "class"]));
|
|
38
38
|
} });
|
|
39
39
|
export {
|
|
40
40
|
V as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./tools-runtime.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const e = t(o, [["__scopeId", "data-v-
|
|
4
|
+
const e = t(o, [["__scopeId", "data-v-445a411e"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as o, onMounted as i, nextTick as a, onUnmounted as n, createBlock as l, createElementBlock as u,
|
|
2
|
-
import
|
|
3
|
-
import { handleAfterInitEvent as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
1
|
+
import { defineComponent as e, ref as t, computed as o, onMounted as i, nextTick as a, onUnmounted as n, createBlock as l, createElementBlock as u, createCommentVNode as s, openBlock as f, withCtx as r, createElementVNode as g, normalizeStyle as p, normalizeClass as v, unref as d, Fragment as c, renderList as m } from "vue";
|
|
2
|
+
import x from "../../object-render.vue.js";
|
|
3
|
+
import { handleAfterInitEvent as y } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import C from "../fixed/YxAffix.vue.js";
|
|
5
|
+
import b from "../fixed/FixedBox.vue.js";
|
|
6
|
+
const k = { "data-v": "1.0.0", class: "amb-widget-tools-parent" }, w = { "data-v": "1.0.0", class: "amb-widget-tools-parent" }, _ = { key: 2, "data-v": "1.0.0", class: "amb-widget-tools-parent" }, j = e({ __name: "tools-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
7
|
+
const j2 = e2, h = t(null), R = j2.configure.runtime ?? {}, A = R.class, F = o(() => j2.configure.props), B = o(() => {
|
|
8
|
+
var _a, _b;
|
|
9
|
+
return !!((_b = (_a = j2.configure) == null ? void 0 : _a.items) == null ? void 0 : _b.length);
|
|
10
|
+
}), D = o(() => {
|
|
11
|
+
const { gap: e3 } = F.value ?? {};
|
|
9
12
|
return { backgroundColor: "#fff", ...e3 ? { gap: `${e3}px` } : {}, ...R.style ?? {} };
|
|
10
|
-
}),
|
|
13
|
+
}), Y = o(() => {
|
|
11
14
|
var _a, _b, _c;
|
|
12
|
-
return !![(_a =
|
|
13
|
-
}),
|
|
15
|
+
return !![(_a = F.value) == null ? void 0 : _a.isAffix, (_b = F.value) == null ? void 0 : _b.isFixed].every((e3) => void 0 === e3) || ((_c = F.value) == null ? void 0 : _c.isAffix);
|
|
16
|
+
}), $ = o(() => {
|
|
14
17
|
var _a;
|
|
15
|
-
return (_a =
|
|
16
|
-
}),
|
|
18
|
+
return (_a = F.value) == null ? void 0 : _a.isFixed;
|
|
19
|
+
}), q = o(() => {
|
|
17
20
|
var _a, _b;
|
|
18
|
-
return ["top"].includes((_a =
|
|
19
|
-
}),
|
|
21
|
+
return ["top"].includes((_a = F.value) == null ? void 0 : _a.position) ? "top" : ["bottom"].includes((_b = F.value) == null ? void 0 : _b.position) ? "bottom" : void 0;
|
|
22
|
+
}), z = o(() => {
|
|
20
23
|
var _a;
|
|
21
|
-
return ((_a =
|
|
24
|
+
return ((_a = F.value) == null ? void 0 : _a.offset) ?? 0;
|
|
22
25
|
});
|
|
23
26
|
return i(() => {
|
|
24
27
|
a(() => {
|
|
25
|
-
|
|
28
|
+
y(null, j2.pageContext, j2.configure, { componentRef: h.value, entity: j2.pageContext.entity.data, pageData: j2.pageContext.entity.page });
|
|
26
29
|
});
|
|
27
30
|
}), n(() => {
|
|
28
|
-
}), (e3, t2) =>
|
|
31
|
+
}), (e3, t2) => $.value && B.value ? (f(), l(b, { key: 0, position: q.value, offset: z.value }, { default: r(() => [g("div", k, [g("div", { class: v(["amb-widget-container-tool amb-widget-tools", d(A)]), style: p(D.value), ref_key: "thisRef", ref: h }, [(f(true), u(c, null, m(j2.configure.items, (e4) => (f(), l(x, { pageContext: j2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)])]), _: 1 }, 8, ["position", "offset"])) : Y.value && B.value ? (f(), l(C, { key: 1, position: q.value, offset: z.value }, { default: r(() => [g("div", w, [g("div", { class: v(["amb-widget-container-tool amb-widget-tools", d(A)]), style: p(D.value), ref_key: "thisRef", ref: h }, [(f(true), u(c, null, m(j2.configure.items, (e4) => (f(), l(x, { pageContext: j2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)])]), _: 1 }, 8, ["position", "offset"])) : B.value ? (f(), u("div", _, [g("div", { class: v(["amb-widget-container-tool amb-widget-tools", d(A)]), style: p(D.value), ref_key: "thisRef", ref: h }, [(f(true), u(c, null, m(j2.configure.items, (e4) => (f(), l(x, { pageContext: j2.pageContext, configure: e4, key: e4.uuid }, null, 8, ["pageContext", "configure"]))), 128))], 6)])) : s("", true);
|
|
29
32
|
} });
|
|
30
33
|
export {
|
|
31
|
-
|
|
34
|
+
j as default
|
|
32
35
|
};
|