@ibiz-template/vue3-components 0.7.41-alpha.15 → 0.7.41-alpha.17
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/index-AOFxMmyX.js +1 -0
- package/dist/index-swminiXb.js +1 -0
- package/dist/index-t1aZ8OJE.js +11 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{wang-editor-yDknWojV.js → wang-editor-Y8puaTx2.js} +1 -1
- package/dist/{xlsx-util-8l4wyK1s.js → xlsx-util-jYyM8alm.js} +1 -1
- package/es/common/index.mjs +2 -0
- package/es/common/kanben-setting/kanben-setting.css +1 -0
- package/es/common/kanben-setting/kanben-setting.d.ts +42 -0
- package/es/common/kanben-setting/kanben-setting.mjs +65 -0
- package/es/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/es/control/calendar/components/custom-calendar/custom-calendar.mjs +25 -8
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.d.ts +8 -0
- package/es/control/calendar/components/custom-calendar/use-custom-calendar.mjs +20 -1
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.mjs +117 -22
- package/es/control/drbar/drbar.controller.mjs +2 -0
- package/es/control/drbar/drbar.css +1 -1
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/drtab/drtab.controller.d.ts +24 -0
- package/es/control/drtab/drtab.controller.mjs +36 -0
- package/es/control/drtab/drtab.css +1 -1
- package/es/control/drtab/drtab.d.ts +2 -0
- package/es/control/drtab/drtab.mjs +5 -2
- package/es/control/drtab/flow-drtab.css +1 -1
- package/es/control/drtab/flow-drtab.d.ts +17 -2
- package/es/control/drtab/flow-drtab.mjs +189 -11
- package/es/control/drtab/index.d.ts +2 -0
- package/es/control/form/edit-form/edit-form.mjs +11 -0
- package/es/control/form/form-detail/form-item/form-item.mjs +11 -7
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.css +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +59 -5
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.mjs +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.d.ts +6 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.mjs +4 -0
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -1
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.mjs +11 -11
- package/es/control/gantt/gantt.mjs +1 -0
- package/es/control/grid/grid/grid-control.util.mjs +36 -14
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.mjs +8 -3
- package/es/control/kanban/index.d.ts +4 -1
- package/es/control/kanban/kanban.css +1 -1
- package/es/control/kanban/kanban.d.ts +4 -1
- package/es/control/kanban/kanban.mjs +66 -23
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -1
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.d.ts +2 -7
- package/es/control/kanban/swimlane-kanban/swimlane-kanban.mjs +69 -12
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.d.ts +1 -1
- package/es/control/list/list.mjs +97 -12
- package/es/control/medit-view-panel/medit-view-panel.css +1 -1
- package/es/control/medit-view-panel/medit-view-panel.mjs +37 -30
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.d.ts +1 -1
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +47 -8
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.d.ts +1 -0
- package/es/editor/upload/ibiz-image-cropping/ibiz-image-cropping.d.ts +1 -0
- package/es/editor/upload/ibiz-image-upload/ibiz-image-upload.d.ts +1 -0
- package/es/editor/upload/upload-editor.controller.d.ts +25 -0
- package/es/editor/upload/upload-editor.controller.mjs +43 -1
- package/es/editor/upload/use/use-iview-upload.mjs +9 -2
- package/es/locale/en/index.d.ts +14 -5
- package/es/locale/en/index.mjs +11 -3
- package/es/locale/zh-CN/index.d.ts +14 -5
- package/es/locale/zh-CN/index.mjs +11 -3
- package/es/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.mjs +3377 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/common-extend-menu/common-extend-menu.mjs +20 -5
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-button-menu/extend-button-menu.d.ts +1950 -1
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-menu-base.util.d.ts +53 -6
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.css +1 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.d.ts +2031 -0
- package/es/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.mjs +278 -0
- package/es/panel-component/panel-button/panel-button.mjs +1 -0
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/view-engine/calendar-view.engine.d.ts +11 -1
- package/es/view-engine/calendar-view.engine.mjs +10 -0
- package/es/view-engine/chart-exp-view.engine.d.ts +6 -6
- package/es/view-engine/chart-exp-view.engine.mjs +6 -15
- package/es/view-engine/gantt-view.engine.d.ts +3 -3
- package/es/view-engine/gantt-view.engine.mjs +3 -46
- package/es/view-engine/login-view.engine.mjs +7 -0
- package/es/view-engine/tab-exp-view.engine.mjs +1 -1
- package/es/view-engine/tab-search-view.engine.mjs +4 -2
- package/es/view-engine/tree-view.engine.d.ts +12 -2
- package/es/view-engine/tree-view.engine.mjs +39 -11
- package/lib/common/index.cjs +2 -0
- package/lib/common/kanben-setting/kanben-setting.cjs +67 -0
- package/lib/common/kanben-setting/kanben-setting.css +1 -0
- package/lib/control/calendar/components/custom-calendar/custom-calendar.cjs +23 -6
- package/lib/control/calendar/components/custom-calendar/custom-calendar.css +1 -1
- package/lib/control/calendar/components/custom-calendar/use-custom-calendar.cjs +20 -0
- package/lib/control/data-view/data-view.cjs +117 -22
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drbar/drbar.controller.cjs +2 -0
- package/lib/control/drbar/drbar.css +1 -1
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/drtab/drtab.cjs +5 -2
- package/lib/control/drtab/drtab.controller.cjs +36 -0
- package/lib/control/drtab/drtab.css +1 -1
- package/lib/control/drtab/flow-drtab.cjs +188 -10
- package/lib/control/drtab/flow-drtab.css +1 -1
- package/lib/control/form/edit-form/edit-form.cjs +11 -0
- package/lib/control/form/form-detail/form-item/form-item.cjs +11 -7
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +58 -4
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.css +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.cjs +1 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.cjs +4 -0
- package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.cjs +11 -11
- package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -1
- package/lib/control/gantt/gantt.cjs +1 -0
- package/lib/control/grid/grid/grid-control.util.cjs +36 -14
- package/lib/control/grid/grid/grid.cjs +8 -3
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/kanban/kanban.cjs +64 -21
- package/lib/control/kanban/kanban.css +1 -1
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.cjs +67 -10
- package/lib/control/kanban/swimlane-kanban/swimlane-kanban.css +1 -1
- package/lib/control/list/list.cjs +97 -12
- package/lib/control/list/list.css +1 -1
- package/lib/control/medit-view-panel/medit-view-panel.cjs +36 -29
- package/lib/control/medit-view-panel/medit-view-panel.css +1 -1
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +47 -8
- package/lib/editor/upload/upload-editor.controller.cjs +43 -1
- package/lib/editor/upload/use/use-iview-upload.cjs +9 -2
- package/lib/locale/en/index.cjs +11 -3
- package/lib/locale/zh-CN/index.cjs +11 -3
- package/lib/node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.cjs +3384 -0
- package/lib/panel-component/app-extend-menu/extend-menu-base/common-extend-menu/common-extend-menu.cjs +20 -5
- package/lib/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.cjs +280 -0
- package/lib/panel-component/app-extend-menu/extend-menu-base/extend-standard-menu/extend-standard-menu.css +1 -0
- package/lib/panel-component/panel-button/panel-button.cjs +1 -0
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/view-engine/calendar-view.engine.cjs +10 -0
- package/lib/view-engine/chart-exp-view.engine.cjs +6 -15
- package/lib/view-engine/gantt-view.engine.cjs +2 -45
- package/lib/view-engine/login-view.engine.cjs +7 -0
- package/lib/view-engine/tab-exp-view.engine.cjs +1 -1
- package/lib/view-engine/tab-search-view.engine.cjs +4 -2
- package/lib/view-engine/tree-view.engine.cjs +39 -11
- package/package.json +9 -7
- package/dist/index-1hn7qv2s.js +0 -4
- package/dist/index-EYFbyMUF.js +0 -1
- package/dist/index-kNUznzXY.js +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.14_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.17_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.41-alpha.14_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.41-alpha.17_axios@1.6.8_lodash-es@4.17.21_qs@6.11.2_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -41,27 +41,138 @@ const FlowDrtab = /* @__PURE__ */ vue.defineComponent({
|
|
|
41
41
|
type: Object,
|
|
42
42
|
default: () => {
|
|
43
43
|
}
|
|
44
|
+
},
|
|
45
|
+
controller: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: () => {
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
},
|
|
46
51
|
setup(props) {
|
|
47
52
|
const ns = vue3Util.useNamespace("flow-drtab");
|
|
48
53
|
const uuid = qxUtil.createUUID();
|
|
54
|
+
const c = props.controller;
|
|
49
55
|
const navtag = vue.ref("");
|
|
50
56
|
const viewList = vue.ref([]);
|
|
57
|
+
const navbarpos = vue.ref();
|
|
58
|
+
const navBarWidth = vue.ref(200);
|
|
59
|
+
const visibleViews = [];
|
|
60
|
+
const scrollTop = vue.ref(0);
|
|
61
|
+
const navbarRef = vue.ref();
|
|
62
|
+
const completedViews = vue.ref(0);
|
|
63
|
+
const tempTimer = vue.ref();
|
|
64
|
+
const tempTarget = vue.ref();
|
|
65
|
+
navbarpos.value = c.navbarpos;
|
|
66
|
+
navBarWidth.value = c.navbarwidth;
|
|
67
|
+
const allVisibleViews = vue.computed(() => {
|
|
68
|
+
return props.pagesstate.filter((item) => {
|
|
69
|
+
const target = props.drtabpages.find((page) => {
|
|
70
|
+
return page.id === item.tag;
|
|
71
|
+
});
|
|
72
|
+
return target && !item.hidden;
|
|
73
|
+
}).length;
|
|
74
|
+
});
|
|
75
|
+
const allNavTags = vue.computed(() => {
|
|
76
|
+
if (props.pagesstate) {
|
|
77
|
+
return props.pagesstate.map((item) => {
|
|
78
|
+
const target = props.drtabpages.find((page) => {
|
|
79
|
+
return page.id === item.tag;
|
|
80
|
+
});
|
|
81
|
+
return "".concat(target == null ? void 0 : target.appViewId, "_").concat(item.tag);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return [];
|
|
85
|
+
});
|
|
51
86
|
const scrollToTarget = () => {
|
|
52
87
|
if (navtag.value) {
|
|
53
|
-
const el = document.getElementById("".concat(
|
|
88
|
+
const el = document.getElementById("".concat(navtag.value));
|
|
54
89
|
if (el) {
|
|
55
90
|
el.scrollIntoView();
|
|
56
91
|
}
|
|
57
92
|
}
|
|
58
93
|
};
|
|
59
|
-
const
|
|
60
|
-
|
|
94
|
+
const isFullyVisible = (element, container) => {
|
|
95
|
+
const containerRect = container.getBoundingClientRect();
|
|
96
|
+
const elementRect = element.getBoundingClientRect();
|
|
97
|
+
return (
|
|
98
|
+
// 元素顶部不超出容器顶部
|
|
99
|
+
elementRect.top >= containerRect.top && // 元素底部不超出容器底部
|
|
100
|
+
elementRect.bottom <= containerRect.bottom && // 元素左侧不超出容器左侧
|
|
101
|
+
elementRect.left >= containerRect.left && // 元素右侧不超出容器右侧
|
|
102
|
+
elementRect.right <= containerRect.right
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
const scrollToTargetNavItem = () => {
|
|
106
|
+
const anchor = document.getElementById("navbar_".concat(navtag.value));
|
|
107
|
+
if (anchor && navbarRef.value && !isFullyVisible(anchor, navbarRef.value)) {
|
|
108
|
+
anchor.scrollIntoView({
|
|
109
|
+
behavior: "smooth"
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
const computeSelectItem = () => {
|
|
114
|
+
if (visibleViews.length > 0) {
|
|
115
|
+
navtag.value = visibleViews[0];
|
|
116
|
+
}
|
|
117
|
+
if (tempTarget.value) {
|
|
118
|
+
clearTimeout(tempTimer.value);
|
|
119
|
+
tempTimer.value = setTimeout(() => {
|
|
120
|
+
navtag.value = tempTarget.value;
|
|
121
|
+
scrollToTargetNavItem();
|
|
122
|
+
tempTarget.value = "";
|
|
123
|
+
}, 200);
|
|
124
|
+
} else {
|
|
125
|
+
scrollToTargetNavItem();
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
const observer = new IntersectionObserver((entries) => {
|
|
129
|
+
if (allVisibleViews.value !== completedViews.value) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
entries.forEach((entry) => {
|
|
133
|
+
var _a, _b;
|
|
134
|
+
if (entry.isIntersecting) {
|
|
135
|
+
if (entry.target && entry.target.id) {
|
|
136
|
+
if (visibleViews.length > 0) {
|
|
137
|
+
const curIndex = (_a = allNavTags.value) == null ? void 0 : _a.findIndex((tag) => tag === entry.target.id);
|
|
138
|
+
const index = (_b = allNavTags.value) == null ? void 0 : _b.findIndex((tag) => tag === visibleViews[0]);
|
|
139
|
+
if (curIndex < index) {
|
|
140
|
+
visibleViews.unshift(entry.target.id);
|
|
141
|
+
} else {
|
|
142
|
+
visibleViews.push(entry.target.id);
|
|
143
|
+
}
|
|
144
|
+
} else {
|
|
145
|
+
visibleViews.push(entry.target.id);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
} else if (entry.target && entry.target.id) {
|
|
149
|
+
const index = visibleViews.indexOf(entry.target.id);
|
|
150
|
+
if (index >= 0) {
|
|
151
|
+
visibleViews.splice(index, 1);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
computeSelectItem();
|
|
156
|
+
});
|
|
157
|
+
const onViewMounted = (item) => {
|
|
158
|
+
const target = props.drtabpages.find((page) => {
|
|
159
|
+
return page.id === item.tag;
|
|
160
|
+
});
|
|
161
|
+
completedViews.value += 1;
|
|
162
|
+
if (completedViews.value === allVisibleViews.value && !navtag.value) {
|
|
163
|
+
navtag.value = "".concat(target == null ? void 0 : target.appViewId, "_").concat(props.pagesstate[0].tag);
|
|
164
|
+
}
|
|
165
|
+
const el = document.getElementById("".concat(target == null ? void 0 : target.appViewId, "_").concat(item.tag));
|
|
166
|
+
if (el) {
|
|
167
|
+
observer.observe(el);
|
|
168
|
+
}
|
|
61
169
|
};
|
|
62
170
|
vue.watch(() => props.activeTab, (newVal, oldVal) => {
|
|
63
171
|
if (newVal && newVal.tag !== (oldVal == null ? void 0 : oldVal.tag)) {
|
|
64
|
-
|
|
172
|
+
const target = props.drtabpages.find((page) => {
|
|
173
|
+
return page.id === newVal.tag;
|
|
174
|
+
});
|
|
175
|
+
navtag.value = "".concat(target == null ? void 0 : target.appViewId, "_").concat(newVal.tag);
|
|
65
176
|
scrollToTarget();
|
|
66
177
|
}
|
|
67
178
|
}, {
|
|
@@ -85,6 +196,14 @@ const FlowDrtab = /* @__PURE__ */ vue.defineComponent({
|
|
|
85
196
|
deep: true,
|
|
86
197
|
immediate: true
|
|
87
198
|
});
|
|
199
|
+
vue.onActivated(() => {
|
|
200
|
+
vue.nextTick(() => {
|
|
201
|
+
const el = document.getElementById("".concat(uuid));
|
|
202
|
+
if (el) {
|
|
203
|
+
el.scrollTop = scrollTop.value;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
88
207
|
const calcStyle = (tag) => {
|
|
89
208
|
const target = viewList.value.find((item) => {
|
|
90
209
|
return item.id === tag;
|
|
@@ -96,14 +215,68 @@ const FlowDrtab = /* @__PURE__ */ vue.defineComponent({
|
|
|
96
215
|
};
|
|
97
216
|
}
|
|
98
217
|
};
|
|
218
|
+
const onClickBar = (item) => {
|
|
219
|
+
const target = props.drtabpages.find((page) => {
|
|
220
|
+
return page.id === item.tag;
|
|
221
|
+
});
|
|
222
|
+
tempTarget.value = "".concat(target == null ? void 0 : target.appViewId, "_").concat(item.tag);
|
|
223
|
+
const el = document.getElementById("".concat(target == null ? void 0 : target.appViewId, "_").concat(item.tag));
|
|
224
|
+
if (el) {
|
|
225
|
+
el.scrollIntoView({
|
|
226
|
+
behavior: "smooth"
|
|
227
|
+
});
|
|
228
|
+
if (visibleViews.includes(tempTarget.value)) {
|
|
229
|
+
navtag.value = tempTarget.value;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
const renderAnchorBar = () => {
|
|
234
|
+
if (c.enableAnchor) {
|
|
235
|
+
return vue.createVNode("div", {
|
|
236
|
+
"class": [ns.e("anchor-bar"), ns.is(navbarpos.value, true)],
|
|
237
|
+
"style": {
|
|
238
|
+
width: "".concat(navBarWidth.value, "px")
|
|
239
|
+
}
|
|
240
|
+
}, [vue.createVNode("div", {
|
|
241
|
+
"class": [ns.e("anchor-items"), ns.is(navbarpos.value)],
|
|
242
|
+
"ref": (el) => {
|
|
243
|
+
navbarRef.value = el;
|
|
244
|
+
}
|
|
245
|
+
}, [props.pagesstate.map((item) => {
|
|
246
|
+
const target = props.drtabpages.find((page) => {
|
|
247
|
+
return page.id === item.tag;
|
|
248
|
+
});
|
|
249
|
+
if (!target || item.hidden) {
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
return vue.createVNode("div", {
|
|
253
|
+
"class": [ns.e("anchor-item"), ns.is("active", "".concat(target == null ? void 0 : target.appViewId, "_").concat(item.tag) === navtag.value)],
|
|
254
|
+
"id": "navbar_".concat(target.appViewId, "_").concat(item.tag),
|
|
255
|
+
"onClick": () => onClickBar(item)
|
|
256
|
+
}, [item.caption]);
|
|
257
|
+
})])]);
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
const handleScroll = () => {
|
|
261
|
+
const el = document.getElementById("".concat(uuid));
|
|
262
|
+
if (el) {
|
|
263
|
+
scrollTop.value = el.scrollTop;
|
|
264
|
+
}
|
|
265
|
+
};
|
|
99
266
|
return {
|
|
267
|
+
c,
|
|
100
268
|
ns,
|
|
101
269
|
uuid,
|
|
270
|
+
navbarpos,
|
|
102
271
|
onViewMounted,
|
|
103
|
-
|
|
272
|
+
navBarWidth,
|
|
273
|
+
calcStyle,
|
|
274
|
+
renderAnchorBar,
|
|
275
|
+
handleScroll
|
|
104
276
|
};
|
|
105
277
|
},
|
|
106
278
|
render() {
|
|
279
|
+
var _a, _b;
|
|
107
280
|
const tabs = this.pagesstate.map((item) => {
|
|
108
281
|
const counterNum = item.counterId ? this.counterData[item.counterId] : void 0;
|
|
109
282
|
const viewShell = vue.resolveComponent("IBizViewShell");
|
|
@@ -114,7 +287,7 @@ const FlowDrtab = /* @__PURE__ */ vue.defineComponent({
|
|
|
114
287
|
return null;
|
|
115
288
|
}
|
|
116
289
|
return vue.createVNode("div", {
|
|
117
|
-
"id": "".concat(
|
|
290
|
+
"id": "".concat(target.appViewId, "_").concat(item.tag),
|
|
118
291
|
"class": this.ns.e("tab-item")
|
|
119
292
|
}, [this.showHeader && vue.createVNode("div", {
|
|
120
293
|
"class": this.ns.em("tab-item", "label")
|
|
@@ -134,13 +307,18 @@ const FlowDrtab = /* @__PURE__ */ vue.defineComponent({
|
|
|
134
307
|
context: this.context,
|
|
135
308
|
params: this.params,
|
|
136
309
|
viewId: target.appViewId,
|
|
137
|
-
onMounted: this.onViewMounted
|
|
310
|
+
onMounted: () => this.onViewMounted(item)
|
|
138
311
|
})])]);
|
|
139
312
|
});
|
|
140
313
|
return vue.createVNode("div", {
|
|
141
|
-
"class": this.ns.b()
|
|
142
|
-
|
|
143
|
-
"
|
|
314
|
+
"class": [this.ns.b(), this.ns.m(this.navbarpos), this.ns.is("left", (_a = this.navbarpos) == null ? void 0 : _a.includes("left")), this.ns.is("right", (_b = this.navbarpos) == null ? void 0 : _b.includes("right")), this.ns.is("enable-anchor", this.c.enableAnchor)],
|
|
315
|
+
"onScroll": this.handleScroll,
|
|
316
|
+
"id": this.uuid
|
|
317
|
+
}, [this.renderAnchorBar(), vue.createVNode("div", {
|
|
318
|
+
"class": this.ns.e("container"),
|
|
319
|
+
"style": {
|
|
320
|
+
"--navbarwidth": "".concat(this.navBarWidth, "px")
|
|
321
|
+
}
|
|
144
322
|
}, [tabs])]);
|
|
145
323
|
}
|
|
146
324
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-flow-drtab{width:100%;height:100%;overflow:
|
|
1
|
+
.ibiz-flow-drtab{width:100%;height:100%;overflow:hidden;background-color:var(--ibiz-color-bg-0)}.ibiz-flow-drtab__container{height:100%;overflow:auto}.ibiz-flow-drtab__tab-item{background-color:var(--ibiz-color-bg-1);border-radius:var(--ibiz-border-radius-medium)}.ibiz-flow-drtab__tab-item--label{padding:var(--ibiz-spacing-base);font-size:var(--ibiz-font-size-header-5);border-bottom:1px solid var(--ibiz-color-fill-1)}.ibiz-flow-drtab__tab-item--tab-view{padding:var(--ibiz-spacing-tight) 0}.ibiz-flow-drtab__tab-item+.ibiz-flow-drtab__tab-item{margin-top:var(--ibiz-spacing-base)}.ibiz-flow-drtab__counter{font-size:var(--ibiz-font-size-regular);text-align:center}.ibiz-flow-drtab .ibiz-flow-drtab{background-color:inherit}.ibiz-flow-drtab.is-enable-anchor{display:flex;gap:var(--ibiz-spacing-base)}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__container{flex:1}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-bar{display:flex;min-width:200px;padding:var(--ibiz-spacing-base) 0;font-size:var(--ibiz-font-size-regular);background-color:#fff}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-bar.is-topleft{align-items:start}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-bar.is-bottomleft{align-items:end}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-bar.is-topright{flex-direction:row-reverse;align-items:start}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-bar.is-bottomright{flex-direction:row-reverse;align-items:end}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-bar.is-middleleft{align-items:center}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-bar.is-middleright{flex-direction:row-reverse;align-items:center}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-items{width:100%;max-height:100%;overflow:auto}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-item{width:100%;height:32px;padding:0 var(--ibiz-spacing-base);line-height:32px;cursor:pointer}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-item:hover{color:var(--ibiz-color-primary)}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-item.is-active{position:relative;color:var(--ibiz-color-primary)}.ibiz-flow-drtab.is-enable-anchor .ibiz-flow-drtab__anchor-item.is-active::before{position:absolute;top:0;left:0;width:4px;height:100%;content:"";background-color:var(--ibiz-color-primary);border-radius:2px}.ibiz-flow-drtab.is-enable-anchor.is-left{flex-direction:row;overflow:auto}.ibiz-flow-drtab.is-enable-anchor.is-left .ibiz-flow-drtab__container{--navbarwidth:200;flex:1 0;width:calc(100% - var(--navbarwidth) - 2 * var(--ibiz-spacing-base));overflow:unset}.ibiz-flow-drtab.is-enable-anchor.is-left .ibiz-flow-drtab__anchor-bar{position:sticky;top:0}.ibiz-flow-drtab.is-enable-anchor.is-left .ibiz-flow-drtab__anchor-items::-webkit-scrollbar{display:none}.ibiz-flow-drtab.is-enable-anchor.is-right{flex-direction:row-reverse;overflow:auto}.ibiz-flow-drtab.is-enable-anchor.is-right .ibiz-flow-drtab__container{--navbarwidth:200;flex:1 0;width:calc(100% - var(--navbarwidth) - 2 * var(--ibiz-spacing-base));overflow:unset}.ibiz-flow-drtab.is-enable-anchor.is-right .ibiz-flow-drtab__anchor-bar{position:sticky;top:0}.ibiz-flow-drtab.is-enable-anchor.is-right .ibiz-flow-drtab__anchor-items::-webkit-scrollbar{display:none}
|
|
@@ -62,6 +62,14 @@ const EditFormControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
62
62
|
loadDefault: {
|
|
63
63
|
type: Boolean,
|
|
64
64
|
default: true
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* @description 简单模式下传入的数据索引
|
|
68
|
+
* @default false
|
|
69
|
+
*/
|
|
70
|
+
simpleDataIndex: {
|
|
71
|
+
type: Number,
|
|
72
|
+
required: false
|
|
65
73
|
}
|
|
66
74
|
},
|
|
67
75
|
setup(props) {
|
|
@@ -73,6 +81,9 @@ const EditFormControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
73
81
|
const anchorList = vue.ref([]);
|
|
74
82
|
const anchorTargetRef = vue.ref();
|
|
75
83
|
if (props.isSimple) {
|
|
84
|
+
if (props.simpleDataIndex || props.simpleDataIndex === 0) {
|
|
85
|
+
c.setSimpleDataIndex(props.simpleDataIndex);
|
|
86
|
+
}
|
|
76
87
|
c.evt.on("onMounted", () => {
|
|
77
88
|
c.setSimpleData(props.data || {});
|
|
78
89
|
});
|
|
@@ -70,13 +70,17 @@ const FormItem = /* @__PURE__ */ vue.defineComponent({
|
|
|
70
70
|
} = this.c.model.editor || {};
|
|
71
71
|
editor = editorItems.map((item, index) => {
|
|
72
72
|
const controller = this.c.form.details[item.id];
|
|
73
|
-
return [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
return [
|
|
74
|
+
vue.createVNode(compositeFormItem.CompositeFormItem, {
|
|
75
|
+
"modelData": controller.model,
|
|
76
|
+
"controller": controller,
|
|
77
|
+
"attrs": this.attrs
|
|
78
|
+
}, null),
|
|
79
|
+
// feat:复合表单项样式2会在编辑器之间加`-`分隔符
|
|
80
|
+
editorItems.length - 1 > index && this.c.model.detailStyle === "STYLE2" && vue.createVNode("span", {
|
|
81
|
+
"class": this.ns.e("composite-separator")
|
|
82
|
+
}, [vue.createTextVNode("-")])
|
|
83
|
+
];
|
|
80
84
|
});
|
|
81
85
|
} else {
|
|
82
86
|
const editMode = (_d = (_c = (_b = this.c.editor) == null ? void 0 : _b.model) == null ? void 0 : _c.editorParams) == null ? void 0 : _d.editMode;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
|
+
var sortable_esm = require('../../../../../../node_modules/.pnpm/sortablejs@1.15.6/node_modules/sortablejs/modular/sortable.esm.cjs');
|
|
4
5
|
var runtime = require('@ibiz-template/runtime');
|
|
6
|
+
var qxUtil = require('qx-util');
|
|
5
7
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
8
|
var core = require('@ibiz-template/core');
|
|
7
9
|
require('./repeater-grid.css');
|
|
@@ -26,9 +28,14 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
26
28
|
}) {
|
|
27
29
|
const ns = vue3Util.useNamespace("repeater-grid");
|
|
28
30
|
const formItems = [];
|
|
31
|
+
const tableRef = vue.ref();
|
|
32
|
+
const tableKey = vue.ref(qxUtil.createUUID());
|
|
29
33
|
core.recursiveIterate(props.controller.repeatedForm, (item) => {
|
|
34
|
+
var _a;
|
|
30
35
|
if (item.detailType === "FORMITEM") {
|
|
31
|
-
|
|
36
|
+
if (((_a = item.editor) == null ? void 0 : _a.editorType) !== "HIDDEN") {
|
|
37
|
+
formItems.push(item);
|
|
38
|
+
}
|
|
32
39
|
}
|
|
33
40
|
}, {
|
|
34
41
|
childrenFields: ["deformPages", "deformTabPages", "deformDetails"]
|
|
@@ -84,6 +91,27 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
84
91
|
immediate: true,
|
|
85
92
|
deep: true
|
|
86
93
|
});
|
|
94
|
+
const rowDrop = () => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
const wrapper = (_b = (_a = tableRef.value) == null ? void 0 : _a.$el) == null ? void 0 : _b.querySelector(".el-table__body-wrapper tbody");
|
|
97
|
+
if (!wrapper || !props.controller.enableSort)
|
|
98
|
+
return;
|
|
99
|
+
sortable_esm.default.create(wrapper, {
|
|
100
|
+
animation: 150,
|
|
101
|
+
handle: ".".concat(ns.e("drag-icon")),
|
|
102
|
+
ghostClass: "".concat(ns.e("sortable-ghost")),
|
|
103
|
+
onEnd({
|
|
104
|
+
newIndex,
|
|
105
|
+
oldIndex
|
|
106
|
+
}) {
|
|
107
|
+
props.controller.dragChange(oldIndex, newIndex);
|
|
108
|
+
tableKey.value = qxUtil.createUUID();
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
vue.onMounted(() => {
|
|
113
|
+
vue.nextTick(() => rowDrop());
|
|
114
|
+
});
|
|
87
115
|
const renderRemoveBtn = (index) => {
|
|
88
116
|
let _slot2;
|
|
89
117
|
if (!props.controller.enableDelete) {
|
|
@@ -119,6 +147,8 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
119
147
|
};
|
|
120
148
|
return {
|
|
121
149
|
ns,
|
|
150
|
+
tableRef,
|
|
151
|
+
tableKey,
|
|
122
152
|
formItems,
|
|
123
153
|
formControllers,
|
|
124
154
|
renderRemoveBtn
|
|
@@ -136,16 +166,40 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
136
166
|
}, _isSlot(_slot3 = ibiz.i18n.t("app.add")) ? _slot3 : {
|
|
137
167
|
default: () => [_slot3]
|
|
138
168
|
}), vue.createVNode(vue.resolveComponent("el-table"), {
|
|
139
|
-
"
|
|
169
|
+
"ref": "tableRef",
|
|
170
|
+
"key": this.tableKey,
|
|
140
171
|
"show-header": true,
|
|
172
|
+
"class": this.ns.e("table"),
|
|
141
173
|
"data": this.controller.value,
|
|
142
174
|
"cell-class-name": ({
|
|
143
175
|
columnIndex
|
|
144
176
|
}) => {
|
|
145
|
-
|
|
177
|
+
const shouldShowIndex = this.controller.enableSort ? columnIndex === 1 : columnIndex === 0;
|
|
178
|
+
return shouldShowIndex ? this.ns.b("index") : "";
|
|
146
179
|
}
|
|
147
180
|
}, {
|
|
148
|
-
default: () => [vue.createVNode(vue.resolveComponent("el-table-column"), {
|
|
181
|
+
default: () => [this.controller.enableSort && vue.createVNode(vue.resolveComponent("el-table-column"), {
|
|
182
|
+
"width": 26,
|
|
183
|
+
"type": "default"
|
|
184
|
+
}, {
|
|
185
|
+
default: () => vue.createVNode("svg", {
|
|
186
|
+
"viewBox": "0 0 16 16",
|
|
187
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
188
|
+
"height": "1em",
|
|
189
|
+
"width": "1em",
|
|
190
|
+
"class": this.ns.e("drag-icon"),
|
|
191
|
+
"preserveAspectRatio": "xMidYMid meet",
|
|
192
|
+
"focusable": "false"
|
|
193
|
+
}, [vue.createVNode("g", {
|
|
194
|
+
"stroke-width": "1",
|
|
195
|
+
"fill-rule": "evenodd"
|
|
196
|
+
}, [vue.createVNode("g", {
|
|
197
|
+
"transform": "translate(5 1)",
|
|
198
|
+
"fill-rule": "nonzero"
|
|
199
|
+
}, [vue.createVNode("path", {
|
|
200
|
+
"d": "M1 2a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM1 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-4 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"
|
|
201
|
+
}, null)])])])
|
|
202
|
+
}), vue.createVNode(vue.resolveComponent("el-table-column"), {
|
|
149
203
|
"type": "index",
|
|
150
204
|
"width": 66,
|
|
151
205
|
"align": "center"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-repeater-grid{position:relative;width:100%;--ibiz-grid-column-justify-content:center}.ibiz-repeater-grid__add-btn{position:absolute;top:0;right:0;z-index:2}.ibiz-repeater-grid .el-table__row:hover .ibiz-repeater-grid-index__text:last-child{display:none}.ibiz-repeater-grid .el-table__row:hover .ibiz-repeater-grid-index__remove{display:inline}.ibiz-repeater-grid .ibiz-repeater-grid-index__remove.el-button.el-button--danger{--el-button-text-color:var(--ibiz-color-danger)}.ibiz-repeater-grid-index .cell{padding:var(--ibiz-spacing-extra-tight)}.ibiz-repeater-grid-index__remove{display:none}
|
|
1
|
+
.ibiz-repeater-grid{position:relative;width:100%;--ibiz-grid-column-justify-content:center}.ibiz-repeater-grid__add-btn{position:absolute;top:0;right:0;z-index:2}.ibiz-repeater-grid__drag-icon{cursor:move}.ibiz-repeater-grid__sortable-ghost{opacity:.5}.ibiz-repeater-grid .el-table__row{height:57px}.ibiz-repeater-grid .el-table__row:hover .ibiz-repeater-grid-index__text:last-child{display:none}.ibiz-repeater-grid .el-table__row:hover .ibiz-repeater-grid-index__remove{display:inline}.ibiz-repeater-grid .ibiz-repeater-grid-index__remove.el-button.el-button--danger{--el-button-text-color:var(--ibiz-color-danger)}.ibiz-repeater-grid-index .cell{padding:var(--ibiz-spacing-extra-tight)}.ibiz-repeater-grid-index__remove{display:none}
|
|
@@ -61,6 +61,7 @@ const RepeaterMultiForm = /* @__PURE__ */ vue.defineComponent({
|
|
|
61
61
|
return vue.createVNode(repeaterSingleForm.RepeaterSingleForm, {
|
|
62
62
|
"key": index,
|
|
63
63
|
"data": data,
|
|
64
|
+
"simpleDataIndex": index,
|
|
64
65
|
"controller": this.controller,
|
|
65
66
|
"onChange": (value) => {
|
|
66
67
|
this.onValueChange(value, index);
|
|
@@ -17,6 +17,9 @@ const RepeaterSingleForm = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
17
|
controller: {
|
|
18
18
|
type: runtime.FormMDCtrlRepeaterController,
|
|
19
19
|
required: true
|
|
20
|
+
},
|
|
21
|
+
simpleDataIndex: {
|
|
22
|
+
type: Number
|
|
20
23
|
}
|
|
21
24
|
},
|
|
22
25
|
emits: {
|
|
@@ -53,6 +56,7 @@ const RepeaterSingleForm = /* @__PURE__ */ vue.defineComponent({
|
|
|
53
56
|
"params": this.controller.params,
|
|
54
57
|
"modelData": this.controller.repeatedForm,
|
|
55
58
|
"isSimple": true,
|
|
59
|
+
"simpleDataIndex": this.simpleDataIndex,
|
|
56
60
|
"data": this.data,
|
|
57
61
|
"onFormDataChange": this.onFormDataChange,
|
|
58
62
|
"onCreated": this.onCreated
|
|
@@ -90,9 +90,8 @@ const MDCtrlContainer = /* @__PURE__ */ vue.defineComponent({
|
|
|
90
90
|
};
|
|
91
91
|
const renderRemoveBtn = (item, index) => {
|
|
92
92
|
let _slot3;
|
|
93
|
-
if (!props.enableDelete)
|
|
93
|
+
if (!props.enableDelete)
|
|
94
94
|
return null;
|
|
95
|
-
}
|
|
96
95
|
if (ibiz.config.form.mdCtrlConfirmBeforeRemove) {
|
|
97
96
|
return vue.createVNode(vue.resolveComponent("el-popconfirm"), {
|
|
98
97
|
"title": core.showTitle(ibiz.i18n.t("control.form.mdCtrlContainer.promptInformation")),
|
|
@@ -132,9 +131,8 @@ const MDCtrlContainer = /* @__PURE__ */ vue.defineComponent({
|
|
|
132
131
|
};
|
|
133
132
|
const renderStyle2RemoveBtn = (item, index) => {
|
|
134
133
|
let _slot4;
|
|
135
|
-
if (!props.enableDelete)
|
|
134
|
+
if (!props.enableDelete)
|
|
136
135
|
return null;
|
|
137
|
-
}
|
|
138
136
|
if (ibiz.config.form.mdCtrlConfirmBeforeRemove) {
|
|
139
137
|
return vue.createVNode(vue.resolveComponent("el-popconfirm"), {
|
|
140
138
|
"title": core.showTitle(ibiz.i18n.t("control.form.mdCtrlContainer.promptInformation")),
|
|
@@ -170,9 +168,11 @@ const MDCtrlContainer = /* @__PURE__ */ vue.defineComponent({
|
|
|
170
168
|
}) : vue.createVNode("div", null, [ibiz.i18n.t("control.form.mdCtrlContainer.noSlot")]);
|
|
171
169
|
return vue.createVNode("div", {
|
|
172
170
|
"class": ns.b("item")
|
|
173
|
-
}, [
|
|
174
|
-
"class": ns.
|
|
175
|
-
}, [
|
|
171
|
+
}, [vue.createVNode("div", {
|
|
172
|
+
"class": ns.be("item", "left")
|
|
173
|
+
}, [props.enableSort && renderDragBtn()]), formComponent, renderRemoveBtn(item, index), vue.createVNode("div", {
|
|
174
|
+
"class": ns.be("item", "right")
|
|
175
|
+
}, [index === 0 && props.enableCreate && renderAddBtn()])]);
|
|
176
176
|
};
|
|
177
177
|
return {
|
|
178
178
|
ns,
|
|
@@ -214,13 +214,13 @@ const MDCtrlContainer = /* @__PURE__ */ vue.defineComponent({
|
|
|
214
214
|
let defaultContent;
|
|
215
215
|
if ((_b = this.items) == null ? void 0 : _b.length) {
|
|
216
216
|
defaultContent = this.enableSort ? vue.createVNode(draggable, {
|
|
217
|
+
"itemKey": "id",
|
|
217
218
|
"ref": "container",
|
|
218
|
-
"class": [this.ns.e("drag")],
|
|
219
|
-
"chosenClass": this.ns.is("drag-chosen", true),
|
|
220
219
|
"list": this.dragItems,
|
|
221
|
-
"
|
|
220
|
+
"class": [this.ns.e("drag")],
|
|
222
221
|
"handle": ".".concat(this.dragClssName),
|
|
223
|
-
"onChange": this.handleDragChange
|
|
222
|
+
"onChange": this.handleDragChange,
|
|
223
|
+
"chosenClass": this.ns.is("drag-chosen", true)
|
|
224
224
|
}, {
|
|
225
225
|
item: ({
|
|
226
226
|
element,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-mdctrl-container-item{--ibiz-mdctrl-container-item-drag-chosen-color:rgba(var(--ibiz-grey-1), 1);display:flex}.ibiz-mdctrl-container-item__form{flex-grow:1}.ibiz-mdctrl-container-item__icon-drag{display:flex;align-items:center;min-height:var(--ibiz-height-control-default);max-height:var(--ibiz-height-control-default);margin-top:var(--ibiz-spacing-tight);cursor:move}.ibiz-mdctrl-container-item__icon-drag>svg{display:flex;align-items:center;justify-content:center;width:var(--ibiz-spacing-base);height:var(--ibiz-spacing-base);fill:var(--ibiz-color-text-3)}.ibiz-mdctrl-container-item.is-drag-chosen{background-color:var(--ibiz-mdctrl-container-item-drag-chosen-color)}.ibiz-mdctrl-container-item-actions{flex-shrink:0;width:80px;text-align:center}.ibiz-mdctrl-container-item-actions .el-button+.el-button{margin-left:var(--ibiz-spacing-none)}.ibiz-mdctrl-container-item-actions__btn{margin-top:var(--ibiz-spacing-tight)}.ibiz-mdctrl-container-no-data{width:100%;display:flex;justify-content:flex-end}.ibiz-mdctrl-container-style2-item-actions{flex:1;width:100%}.ibiz-mdctrl-container-style2-item-actions .el-button+.el-button{margin-left:var(--ibiz-spacing-none)}.ibiz-mdctrl-container-style2-item-actions__btn{margin-top:var(--ibiz-spacing-tight)}.ibiz-mdctrl-container-style2-item-actions__create{width:100%;color:var(--ibiz-color-primary);background-color:transparent;border:1px dashed var(--ibiz-color-border);border-width:1px!important}.ibiz-mdctrl-container-style2-item-actions__create ion-icon{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-mdctrl-container-style2-item-actions__create:focus{color:var(--ibiz-color-primary-hover);background-color:transparent;border:1px dashed var(--ibiz-color-primary-hover)}.ibiz-mdctrl-container-style2-item-actions__create:hover{color:var(--ibiz-color-primary-hover);background-color:transparent;border:1px dashed var(--ibiz-color-primary-hover)}.ibiz-mdctrl-container-style2-item-actions__remove{font-size:var(--ibiz-font-size-heder-6)}
|
|
1
|
+
.ibiz-mdctrl-container-item{--ibiz-mdctrl-container-item-drag-chosen-color:rgba(var(--ibiz-grey-1), 1);display:flex}.ibiz-mdctrl-container-item__form{flex-grow:1}.ibiz-mdctrl-container-item__left{flex-shrink:0}.ibiz-mdctrl-container-item__right{flex-shrink:0;width:60px;margin-left:var(--ibiz-spacing-tight)}.ibiz-mdctrl-container-item__icon-drag{display:flex;align-items:center;min-height:var(--ibiz-height-control-default);max-height:var(--ibiz-height-control-default);margin-top:var(--ibiz-spacing-tight);cursor:move}.ibiz-mdctrl-container-item__icon-drag>svg{display:flex;align-items:center;justify-content:center;width:var(--ibiz-spacing-base);height:var(--ibiz-spacing-base);fill:var(--ibiz-color-text-3)}.ibiz-mdctrl-container-item.is-drag-chosen{background-color:var(--ibiz-mdctrl-container-item-drag-chosen-color)}.ibiz-mdctrl-container-item-actions{flex-shrink:0;width:80px;text-align:center}.ibiz-mdctrl-container-item-actions .el-button+.el-button{margin-left:var(--ibiz-spacing-none)}.ibiz-mdctrl-container-item-actions__btn{margin-top:var(--ibiz-spacing-tight)}.ibiz-mdctrl-container-no-data{width:100%;display:flex;justify-content:flex-end}.ibiz-mdctrl-container-style2-item-actions{flex:1;width:100%}.ibiz-mdctrl-container-style2-item-actions .el-button+.el-button{margin-left:var(--ibiz-spacing-none)}.ibiz-mdctrl-container-style2-item-actions__btn{margin-top:var(--ibiz-spacing-tight)}.ibiz-mdctrl-container-style2-item-actions__create{width:100%;color:var(--ibiz-color-primary);background-color:transparent;border:1px dashed var(--ibiz-color-border);border-width:1px!important}.ibiz-mdctrl-container-style2-item-actions__create ion-icon{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-mdctrl-container-style2-item-actions__create:focus{color:var(--ibiz-color-primary-hover);background-color:transparent;border:1px dashed var(--ibiz-color-primary-hover)}.ibiz-mdctrl-container-style2-item-actions__create:hover{color:var(--ibiz-color-primary-hover);background-color:transparent;border:1px dashed var(--ibiz-color-primary-hover)}.ibiz-mdctrl-container-style2-item-actions__remove{font-size:var(--ibiz-font-size-heder-6)}
|
|
@@ -209,7 +209,7 @@ function useITableEvent(c) {
|
|
|
209
209
|
}
|
|
210
210
|
async function onRowClickDynamic(data, _column, event) {
|
|
211
211
|
if (data.srfuf === runtime.Srfuf.CREATE) {
|
|
212
|
-
if (c.editShowMode === "row") {
|
|
212
|
+
if (c.editShowMode === "row" && !data.isGroupRow) {
|
|
213
213
|
const row = c.findRowState(data);
|
|
214
214
|
if (row)
|
|
215
215
|
await c.switchRowEdit(row);
|
|
@@ -231,6 +231,11 @@ function useITableEvent(c) {
|
|
|
231
231
|
}
|
|
232
232
|
let forbidClick = false;
|
|
233
233
|
async function onRowClick(data, _column, event) {
|
|
234
|
+
var _a;
|
|
235
|
+
if (data.isGroupRow) {
|
|
236
|
+
(_a = tableRef.value) == null ? void 0 : _a.store.loadOrToggle(data);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
234
239
|
if (!event.shiftKey) {
|
|
235
240
|
const index = c.findRowStateIndex(data);
|
|
236
241
|
const isSelected = c.state.selectedData.includes(data);
|
|
@@ -266,9 +271,8 @@ function useITableEvent(c) {
|
|
|
266
271
|
}, 200);
|
|
267
272
|
}
|
|
268
273
|
function onDbRowClick(data) {
|
|
269
|
-
if (data.srfuf === runtime.Srfuf.CREATE)
|
|
274
|
+
if (data.srfuf === runtime.Srfuf.CREATE || data.isGroupRow)
|
|
270
275
|
return;
|
|
271
|
-
}
|
|
272
276
|
c.onDbRowClick(data);
|
|
273
277
|
}
|
|
274
278
|
function onSelectionChange(selection) {
|
|
@@ -491,21 +495,29 @@ function useAppGridBase(c, props, tableRef) {
|
|
|
491
495
|
const tableData = vue.computed(() => {
|
|
492
496
|
const state = c.state;
|
|
493
497
|
if (c.state.enableGroup) {
|
|
498
|
+
const grouprowmode = c.controlParams.grouprowmode;
|
|
494
499
|
const result = [];
|
|
495
500
|
state.groups.forEach((item) => {
|
|
496
|
-
if (!item.children.length)
|
|
501
|
+
if (!item.children.length)
|
|
497
502
|
return;
|
|
503
|
+
if (grouprowmode === "NEWROW") {
|
|
504
|
+
result.push({
|
|
505
|
+
...item,
|
|
506
|
+
tempsrfkey: item.key,
|
|
507
|
+
isGroupRow: true
|
|
508
|
+
});
|
|
509
|
+
} else {
|
|
510
|
+
const children = [...item.children];
|
|
511
|
+
const first = children.shift();
|
|
512
|
+
result.push({
|
|
513
|
+
tempsrfkey: (first == null ? void 0 : first.tempsrfkey) || item.caption,
|
|
514
|
+
srfkey: (first == null ? void 0 : first.srfkey) || item.caption,
|
|
515
|
+
isGroupData: true,
|
|
516
|
+
caption: item.caption,
|
|
517
|
+
first,
|
|
518
|
+
children
|
|
519
|
+
});
|
|
498
520
|
}
|
|
499
|
-
const children = [...item.children];
|
|
500
|
-
const first = children.shift();
|
|
501
|
-
result.push({
|
|
502
|
-
tempsrfkey: (first == null ? void 0 : first.tempsrfkey) || item.caption,
|
|
503
|
-
srfkey: (first == null ? void 0 : first.srfkey) || item.caption,
|
|
504
|
-
isGroupData: true,
|
|
505
|
-
caption: item.caption,
|
|
506
|
-
first,
|
|
507
|
-
children
|
|
508
|
-
});
|
|
509
521
|
});
|
|
510
522
|
return result;
|
|
511
523
|
}
|
|
@@ -662,6 +674,16 @@ function useAppGridBase(c, props, tableRef) {
|
|
|
662
674
|
colspan
|
|
663
675
|
};
|
|
664
676
|
}
|
|
677
|
+
if (row.isGroupRow) {
|
|
678
|
+
const total = c.state.singleSelect ? renderColumns.value.length : renderColumns.value.length + 1;
|
|
679
|
+
const index = c.state.singleSelect ? 0 : 1;
|
|
680
|
+
if (columnIndex === index)
|
|
681
|
+
return { rowspan: 1, colspan: total };
|
|
682
|
+
return {
|
|
683
|
+
rowspan: 0,
|
|
684
|
+
colspan: 0
|
|
685
|
+
};
|
|
686
|
+
}
|
|
665
687
|
};
|
|
666
688
|
const headerDragend = (newWidth, oldWidth, column) => {
|
|
667
689
|
const { property } = column;
|
|
@@ -179,9 +179,14 @@ function renderColumn(c, model, renderColumns, index) {
|
|
|
179
179
|
row
|
|
180
180
|
}) => {
|
|
181
181
|
let elRow = row;
|
|
182
|
-
if (
|
|
182
|
+
if (elRow.isGroupRow)
|
|
183
|
+
return vue.createVNode("div", {
|
|
184
|
+
"class": "ibiz-grid-field-column"
|
|
185
|
+
}, [vue.createVNode("span", {
|
|
186
|
+
"class": "ibiz-grid-field-column__text"
|
|
187
|
+
}, [row.caption])]);
|
|
188
|
+
if (row.isGroupData)
|
|
183
189
|
elRow = row.first;
|
|
184
|
-
}
|
|
185
190
|
const rowState = c.findRowState(elRow);
|
|
186
191
|
if (rowState) {
|
|
187
192
|
if (model.columnType === "DEFGRIDCOLUMN" || model.columnType === "DEFTREEGRIDCOLUMN") {
|
|
@@ -562,7 +567,7 @@ const GridControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
562
567
|
"controller": this.c
|
|
563
568
|
}, {
|
|
564
569
|
default: () => [vue.createVNode(vue.resolveComponent("iBizControlBase"), {
|
|
565
|
-
"class": [this.ns.b(), this.ns.is("dynamic-grid", this.c.state.isAutoGrid), this.ns.is("show-header", !this.c.state.hideHeader), this.ns.is("enable-page", this.c.state.enablePagingBar), this.ns.is("enable-group", this.c.state.enableGroup), this.ns.is("single-select", state.singleSelect), this.ns.is("empty", state.items.length === 0), this.ns.is("enable-customized", this.c.model.enableCustomized)],
|
|
570
|
+
"class": [this.ns.b(), this.ns.is("dynamic-grid", this.c.state.isAutoGrid), this.ns.is("show-header", !this.c.state.hideHeader), this.ns.is("enable-page", this.c.state.enablePagingBar), this.ns.is("enable-group", this.c.state.enableGroup), this.ns.is("single-select", state.singleSelect), this.ns.is("empty", state.items.length === 0), this.ns.is("enable-customized", this.c.model.enableCustomized), this.ns.is("group-row-mode", this.c.controlParams.grouprowmode === "NEWROW")],
|
|
566
571
|
"controller": this.c,
|
|
567
572
|
"style": this.headerCssVars
|
|
568
573
|
}, {
|