@ibiz-template/vue3-components 0.7.41-alpha.36 → 0.7.41-alpha.38
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/ibiz-markdown-editor-qRaayafj.js +1 -0
- package/dist/index-BiYphJ2f.js +11 -0
- package/dist/{index-BFGNWF-0.js → index-C28lnh2e.js} +1 -1
- package/dist/{index-BiFsbM1Y.js → index-Dp8ExwuL.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-DDVqSnRX.js +1 -0
- package/dist/{xlsx-util-CxXULY47.js → xlsx-util-BMANxyk-.js} +1 -1
- package/es/control/calendar/calendar.mjs +33 -8
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.mjs +10 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.mjs +30 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +114 -85
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.css +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.mjs +309 -0
- package/es/control/tab-exp-panel/tab-exp-panel.mjs +4 -17
- package/es/editor/code/code-editor.controller.mjs +176 -1
- package/es/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/es/editor/code/monaco-editor/monaco-editor.mjs +116 -6
- package/es/editor/html/html-editor.controller.mjs +77 -2
- package/es/editor/html/wang-editor/index.mjs +1 -0
- package/es/editor/html/wang-editor/module/index.mjs +1 -0
- package/es/editor/html/wang-editor/module/inline-ai-module.mjs +95 -0
- package/es/editor/html/wang-editor/wang-editor.css +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +35 -4
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +45 -0
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +109 -13
- package/es/editor/markdown/markdown-editor.controller.mjs +113 -1
- package/es/editor/text-box/input/input.css +1 -1
- package/es/index.mjs +1 -0
- package/es/locale/en/index.mjs +15 -2
- package/es/locale/zh-CN/index.mjs +15 -2
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.util.mjs +1 -1
- package/es/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.mjs +2 -2
- package/es/util/ai-util/ai-util.mjs +6 -2
- package/es/util/app-util/app-util.mjs +41 -2
- package/es/util/index.mjs +1 -0
- package/es/util/inline-ai-util/inline-ai-textarea/icon.mjs +142 -0
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -0
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +162 -0
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +205 -0
- package/es/util/inline-ai-util/inline-ai-util.mjs +145 -0
- package/es/web-app/main.mjs +2 -0
- package/lib/control/calendar/calendar.cjs +32 -7
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs +10 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.cjs +32 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +113 -84
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.cjs +311 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid2/repeater-grid2.css +1 -0
- package/lib/control/tab-exp-panel/tab-exp-panel.cjs +3 -16
- package/lib/editor/code/code-editor.controller.cjs +175 -0
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +116 -6
- package/lib/editor/code/monaco-editor/monaco-editor.css +1 -1
- package/lib/editor/html/html-editor.controller.cjs +75 -0
- package/lib/editor/html/wang-editor/index.cjs +3 -0
- package/lib/editor/html/wang-editor/module/index.cjs +3 -0
- package/lib/editor/html/wang-editor/module/inline-ai-module.cjs +98 -0
- package/lib/editor/html/wang-editor/wang-editor.cjs +35 -4
- package/lib/editor/html/wang-editor/wang-editor.css +1 -1
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +47 -0
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +109 -13
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/lib/editor/markdown/markdown-editor.controller.cjs +112 -0
- package/lib/editor/text-box/input/input.css +1 -1
- package/lib/index.cjs +2 -0
- package/lib/locale/en/index.cjs +15 -2
- package/lib/locale/zh-CN/index.cjs +15 -2
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.util.cjs +1 -1
- package/lib/panel-component/user-message/internal-message/internal-message-json/internal-message-json.provider.cjs +2 -2
- package/lib/util/ai-util/ai-util.cjs +6 -2
- package/lib/util/app-util/app-util.cjs +40 -1
- package/lib/util/index.cjs +2 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/icon.cjs +151 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +207 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.css +1 -0
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +167 -0
- package/lib/util/inline-ai-util/inline-ai-util.cjs +147 -0
- package/lib/web-app/main.cjs +2 -0
- package/package.json +5 -5
- package/dist/ibiz-markdown-editor-Cs1m7gKI.js +0 -1
- package/dist/index-CCKb6xlM.js +0 -11
- package/dist/wang-editor-BIllIvre.js +0 -1
|
@@ -4,6 +4,7 @@ var vue = require('vue');
|
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
5
|
var runtime = require('@ibiz-template/runtime');
|
|
6
6
|
var dayjs = require('dayjs');
|
|
7
|
+
var lodashEs = require('lodash-es');
|
|
7
8
|
var core = require('@ibiz-template/core');
|
|
8
9
|
var index = require('./components/custom-calendar/index.cjs');
|
|
9
10
|
var calendarUtil = require('./calendar-util.cjs');
|
|
@@ -82,6 +83,13 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
82
83
|
const curPopover = vue.ref();
|
|
83
84
|
const showDateRange = vue.ref(c.controlParams.showmode === "daterange");
|
|
84
85
|
const showDateList = vue.ref(c.controlParams.showmode === "expand");
|
|
86
|
+
const infiniteScroll = vue.ref();
|
|
87
|
+
const disabledLodeMore = vue.computed(() => {
|
|
88
|
+
if (c.model.calendarStyle !== "TIMELINE" || c.state.isLoading)
|
|
89
|
+
return true;
|
|
90
|
+
const result = !Object.values(c.loadMoreItems).some((item) => item.curPage < item.totalPage);
|
|
91
|
+
return result;
|
|
92
|
+
});
|
|
85
93
|
const monthLegendClick = (_item) => {
|
|
86
94
|
Object.assign(_item, {
|
|
87
95
|
isShow: !_item.isShow
|
|
@@ -118,6 +126,17 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
118
126
|
vue.watch(() => UIStore.theme, () => {
|
|
119
127
|
calcLegend();
|
|
120
128
|
});
|
|
129
|
+
const handleScrollLoad = async () => {
|
|
130
|
+
if (!infiniteScroll.value || disabledLodeMore.value)
|
|
131
|
+
return;
|
|
132
|
+
const scrollTop = infiniteScroll.value.scrollTop;
|
|
133
|
+
const scrollHeight = infiniteScroll.value.scrollHeight;
|
|
134
|
+
const clientHeight = infiniteScroll.value.clientHeight;
|
|
135
|
+
if (scrollHeight - scrollTop - clientHeight < 10)
|
|
136
|
+
await c.load({
|
|
137
|
+
isLoadMore: true
|
|
138
|
+
});
|
|
139
|
+
};
|
|
121
140
|
const popoverValue = vue.ref("");
|
|
122
141
|
const selectDate = (tag) => {
|
|
123
142
|
if (!calendarRef.value)
|
|
@@ -374,15 +393,18 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
374
393
|
ns,
|
|
375
394
|
curPopover,
|
|
376
395
|
calendarRef,
|
|
377
|
-
showDateRange,
|
|
378
|
-
showDateList,
|
|
379
|
-
popoverValue,
|
|
380
396
|
legendItems,
|
|
397
|
+
popoverValue,
|
|
398
|
+
showDateList,
|
|
399
|
+
showDateRange,
|
|
400
|
+
infiniteScroll,
|
|
401
|
+
disabledLodeMore,
|
|
381
402
|
selectDate,
|
|
382
403
|
calcItemStyle,
|
|
404
|
+
handleScrollLoad,
|
|
405
|
+
monthLegendClick,
|
|
383
406
|
calcCalendarItems,
|
|
384
|
-
onNodeContextmenu
|
|
385
|
-
monthLegendClick
|
|
407
|
+
onNodeContextmenu
|
|
386
408
|
};
|
|
387
409
|
},
|
|
388
410
|
render() {
|
|
@@ -650,14 +672,17 @@ const CalendarControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
650
672
|
};
|
|
651
673
|
const renderTimeLine = () => {
|
|
652
674
|
return vue.createVNode("div", {
|
|
653
|
-
"
|
|
675
|
+
"ref": "infiniteScroll",
|
|
676
|
+
"class": this.ns.b("timeline-content"),
|
|
677
|
+
"onScroll": lodashEs.debounce(this.handleScrollLoad, 300)
|
|
654
678
|
}, [vue.createVNode(vue.resolveComponent("el-timeline"), null, {
|
|
655
679
|
default: () => [this.c.state.items.length > 0 ? this.c.state.items.map((item) => {
|
|
656
680
|
var _a;
|
|
657
681
|
const model = (_a = this.c.model.sysCalendarItems) == null ? void 0 : _a.find((calendarItems) => {
|
|
658
682
|
return item.itemType === calendarItems.itemType;
|
|
659
683
|
});
|
|
660
|
-
const
|
|
684
|
+
const time = item[this.c.groupTimeField];
|
|
685
|
+
const temptime = time ? dayjs(time).format(this.c.timelineCaptionFormat) : time;
|
|
661
686
|
return vue.createVNode(vue.resolveComponent("el-timeline-item"), {
|
|
662
687
|
"key": item.id,
|
|
663
688
|
"placement": "top",
|
package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs
CHANGED
|
@@ -6,6 +6,7 @@ var vue3Util = require('@ibiz-template/vue3-util');
|
|
|
6
6
|
var repeaterSingleForm = require('./repeater-single-form/repeater-single-form.cjs');
|
|
7
7
|
var repeaterMultiForm = require('./repeater-multi-form/repeater-multi-form.cjs');
|
|
8
8
|
var repeaterGrid = require('./repeater-grid/repeater-grid.cjs');
|
|
9
|
+
var repeaterGrid2 = require('./repeater-grid2/repeater-grid2.cjs');
|
|
9
10
|
|
|
10
11
|
"use strict";
|
|
11
12
|
const FormMDCtrlRepeater = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -27,6 +28,7 @@ const FormMDCtrlRepeater = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
28
|
};
|
|
28
29
|
},
|
|
29
30
|
render() {
|
|
31
|
+
var _a;
|
|
30
32
|
const classNames = [this.ns.b()];
|
|
31
33
|
switch (this.controller.repeaterStyle) {
|
|
32
34
|
case "MultiForm":
|
|
@@ -36,6 +38,14 @@ const FormMDCtrlRepeater = /* @__PURE__ */ vue.defineComponent({
|
|
|
36
38
|
"controller": this.controller
|
|
37
39
|
}, null);
|
|
38
40
|
case "Grid":
|
|
41
|
+
const gridStyle = (_a = this.controller.model.ctrlParams) == null ? void 0 : _a.gridStyle;
|
|
42
|
+
if (gridStyle === "style2") {
|
|
43
|
+
return vue.createVNode(repeaterGrid2.RepeaterGrid2, {
|
|
44
|
+
"class": classNames,
|
|
45
|
+
"controller": this.controller,
|
|
46
|
+
"onChange": this.onDataChange
|
|
47
|
+
}, null);
|
|
48
|
+
}
|
|
39
49
|
return vue.createVNode(repeaterGrid.RepeaterGrid, {
|
|
40
50
|
"class": classNames,
|
|
41
51
|
"controller": this.controller,
|
package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.util.cjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
function useLoadMore(initItems, chunkSize) {
|
|
7
|
+
let totalItems = [];
|
|
8
|
+
let page = 1;
|
|
9
|
+
const renderItems = vue.ref([]);
|
|
10
|
+
const updateTotalItems = (items) => {
|
|
11
|
+
page = 1;
|
|
12
|
+
totalItems = items != null ? items : [];
|
|
13
|
+
renderItems.value = totalItems.slice(0, chunkSize);
|
|
14
|
+
};
|
|
15
|
+
updateTotalItems(initItems);
|
|
16
|
+
const loadMore = () => {
|
|
17
|
+
if (renderItems.value.length >= totalItems.length) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
page += 1;
|
|
21
|
+
const start = (page - 1) * chunkSize;
|
|
22
|
+
const end = page * chunkSize;
|
|
23
|
+
renderItems.value.push(...totalItems.slice(start, end));
|
|
24
|
+
};
|
|
25
|
+
return {
|
|
26
|
+
renderItems,
|
|
27
|
+
loadMore,
|
|
28
|
+
updateTotalItems
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.useLoadMore = useLoadMore;
|
|
@@ -6,6 +6,7 @@ var runtime = require('@ibiz-template/runtime');
|
|
|
6
6
|
var qxUtil = require('qx-util');
|
|
7
7
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
8
8
|
var core = require('@ibiz-template/core');
|
|
9
|
+
var formMdctrlRepeater_util = require('../form-mdctrl-repeater.util.cjs');
|
|
9
10
|
require('./repeater-grid.css');
|
|
10
11
|
|
|
11
12
|
"use strict";
|
|
@@ -26,14 +27,21 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
26
27
|
setup(props, {
|
|
27
28
|
emit
|
|
28
29
|
}) {
|
|
30
|
+
var _a, _b;
|
|
29
31
|
const ns = vue3Util.useNamespace("repeater-grid");
|
|
30
32
|
const formItems = [];
|
|
31
33
|
const tableRef = vue.ref();
|
|
32
34
|
const tableKey = vue.ref(qxUtil.createUUID());
|
|
35
|
+
const chunkSize = ((_a = props.controller.model.ctrlParams) == null ? void 0 : _a.chunkSize) ? Number((_b = props.controller.model.ctrlParams) == null ? void 0 : _b.chunkSize) : 100;
|
|
36
|
+
const {
|
|
37
|
+
renderItems,
|
|
38
|
+
loadMore,
|
|
39
|
+
updateTotalItems
|
|
40
|
+
} = formMdctrlRepeater_util.useLoadMore(props.controller.value, chunkSize);
|
|
33
41
|
core.recursiveIterate(props.controller.repeatedForm, (item) => {
|
|
34
|
-
var
|
|
42
|
+
var _a2;
|
|
35
43
|
if (item.detailType === "FORMITEM") {
|
|
36
|
-
if (((
|
|
44
|
+
if (((_a2 = item.editor) == null ? void 0 : _a2.editorType) !== "HIDDEN") {
|
|
37
45
|
formItems.push(item);
|
|
38
46
|
}
|
|
39
47
|
}
|
|
@@ -87,14 +95,15 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
87
95
|
});
|
|
88
96
|
}
|
|
89
97
|
}
|
|
98
|
+
updateTotalItems(newVal || []);
|
|
90
99
|
}, {
|
|
91
100
|
immediate: true,
|
|
92
101
|
deep: true
|
|
93
102
|
});
|
|
94
103
|
let sortable;
|
|
95
104
|
const rowDrop = () => {
|
|
96
|
-
var
|
|
97
|
-
const wrapper = (
|
|
105
|
+
var _a2, _b2;
|
|
106
|
+
const wrapper = (_b2 = (_a2 = tableRef.value) == null ? void 0 : _a2.$el) == null ? void 0 : _b2.querySelector(".el-table__body-wrapper tbody");
|
|
98
107
|
if (!wrapper || !props.controller.enableSort)
|
|
99
108
|
return;
|
|
100
109
|
sortable = sortable_esm.default.create(wrapper, {
|
|
@@ -154,12 +163,19 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
154
163
|
tableRef,
|
|
155
164
|
tableKey,
|
|
156
165
|
formItems,
|
|
166
|
+
renderItems,
|
|
157
167
|
formControllers,
|
|
158
|
-
renderRemoveBtn
|
|
168
|
+
renderRemoveBtn,
|
|
169
|
+
loadMore
|
|
159
170
|
};
|
|
160
171
|
},
|
|
161
172
|
render() {
|
|
173
|
+
var _a;
|
|
162
174
|
let _slot3;
|
|
175
|
+
const tableHeight = (_a = this.controller.model.layoutPos) == null ? void 0 : _a.height;
|
|
176
|
+
const heightObject = tableHeight ? {
|
|
177
|
+
height: tableHeight
|
|
178
|
+
} : {};
|
|
163
179
|
return vue.createVNode("div", {
|
|
164
180
|
"class": this.ns.b()
|
|
165
181
|
}, [this.controller.enableCreate && vue.createVNode(vue.resolveComponent("el-button"), {
|
|
@@ -169,104 +185,117 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
169
185
|
}
|
|
170
186
|
}, _isSlot(_slot3 = ibiz.i18n.t("app.add")) ? _slot3 : {
|
|
171
187
|
default: () => [_slot3]
|
|
172
|
-
}), vue.createVNode(vue.resolveComponent("el-table"), {
|
|
188
|
+
}), vue.createVNode(vue.resolveComponent("el-table"), vue.mergeProps({
|
|
173
189
|
"ref": "tableRef",
|
|
174
190
|
"key": this.tableKey,
|
|
175
191
|
"show-header": true,
|
|
176
192
|
"class": this.ns.e("table"),
|
|
177
|
-
"data": this.
|
|
193
|
+
"data": this.renderItems,
|
|
178
194
|
"cell-class-name": ({
|
|
179
195
|
columnIndex
|
|
180
196
|
}) => {
|
|
181
197
|
const shouldShowIndex = this.controller.enableSort ? columnIndex === 1 : columnIndex === 0;
|
|
182
198
|
return shouldShowIndex ? this.ns.b("index") : "";
|
|
183
199
|
}
|
|
184
|
-
}, {
|
|
185
|
-
default: () =>
|
|
186
|
-
"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}, {
|
|
211
|
-
default: (opts) => {
|
|
212
|
-
const {
|
|
213
|
-
$index
|
|
214
|
-
} = opts;
|
|
215
|
-
if (!this.controller.enableDelete) {
|
|
216
|
-
return vue.createVNode("span", null, [$index + 1]);
|
|
217
|
-
}
|
|
218
|
-
return [this.renderRemoveBtn($index), vue.createVNode("span", {
|
|
219
|
-
"class": this.ns.be("index", "text")
|
|
220
|
-
}, [$index + 1])];
|
|
221
|
-
}
|
|
222
|
-
}), this.formItems.length > 0 && this.formItems.map((item) => {
|
|
223
|
-
const width = item.labelWidth;
|
|
224
|
-
let columnWidth = "";
|
|
225
|
-
if (typeof width === "number") {
|
|
226
|
-
columnWidth = "".concat(width, "px");
|
|
227
|
-
}
|
|
228
|
-
return vue.createVNode(vue.resolveComponent("el-table-column"), {
|
|
229
|
-
"label": item.caption,
|
|
230
|
-
"prop": item.id,
|
|
231
|
-
"width": columnWidth,
|
|
200
|
+
}, heightObject), {
|
|
201
|
+
default: () => {
|
|
202
|
+
return [this.controller.enableSort && vue.createVNode(vue.resolveComponent("el-table-column"), {
|
|
203
|
+
"width": 26,
|
|
204
|
+
"type": "default"
|
|
205
|
+
}, {
|
|
206
|
+
default: () => vue.createVNode("svg", {
|
|
207
|
+
"viewBox": "0 0 16 16",
|
|
208
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
209
|
+
"height": "1em",
|
|
210
|
+
"width": "1em",
|
|
211
|
+
"class": this.ns.e("drag-icon"),
|
|
212
|
+
"preserveAspectRatio": "xMidYMid meet",
|
|
213
|
+
"focusable": "false"
|
|
214
|
+
}, [vue.createVNode("g", {
|
|
215
|
+
"stroke-width": "1",
|
|
216
|
+
"fill-rule": "evenodd"
|
|
217
|
+
}, [vue.createVNode("g", {
|
|
218
|
+
"transform": "translate(5 1)",
|
|
219
|
+
"fill-rule": "nonzero"
|
|
220
|
+
}, [vue.createVNode("path", {
|
|
221
|
+
"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"
|
|
222
|
+
}, null)])])])
|
|
223
|
+
}), vue.createVNode(vue.resolveComponent("el-table-column"), {
|
|
224
|
+
"type": "index",
|
|
225
|
+
"width": 66,
|
|
232
226
|
"align": "center"
|
|
233
227
|
}, {
|
|
234
228
|
default: (opts) => {
|
|
235
229
|
const {
|
|
236
230
|
$index
|
|
237
231
|
} = opts;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
return vue.createVNode("div", null, [ibiz.i18n.t("control.form.repeaterGrid.absentOrLoad")]);
|
|
232
|
+
if (!this.controller.enableDelete) {
|
|
233
|
+
return vue.createVNode("span", null, [$index + 1]);
|
|
241
234
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
controller: formItemC.editor,
|
|
254
|
-
disabled: formItemC.state.disabled,
|
|
255
|
-
readonly: formItemC.state.readonly,
|
|
256
|
-
onChange: (val, name) => {
|
|
257
|
-
formItemC.setDataValue(val, name);
|
|
258
|
-
}
|
|
259
|
-
});
|
|
235
|
+
return [this.renderRemoveBtn($index), vue.createVNode("span", {
|
|
236
|
+
"class": this.ns.be("index", "text")
|
|
237
|
+
}, [$index + 1])];
|
|
238
|
+
}
|
|
239
|
+
}), this.formItems.length > 0 && this.formItems.map((item) => {
|
|
240
|
+
const width = item.labelWidth;
|
|
241
|
+
let widthName = "width";
|
|
242
|
+
let columnWidth = "";
|
|
243
|
+
if (typeof width === "number") {
|
|
244
|
+
if (width === 1) {
|
|
245
|
+
widthName = "min-width";
|
|
260
246
|
}
|
|
261
|
-
|
|
262
|
-
"error": formItemC.state.error,
|
|
263
|
-
"required": formItemC.state.required
|
|
264
|
-
}, _isSlot(editor) ? editor : {
|
|
265
|
-
default: () => [editor]
|
|
266
|
-
});
|
|
247
|
+
columnWidth = "".concat(width, "px");
|
|
267
248
|
}
|
|
268
|
-
|
|
269
|
-
|
|
249
|
+
return vue.createVNode(vue.resolveComponent("el-table-column"), vue.mergeProps({
|
|
250
|
+
"label": item.caption,
|
|
251
|
+
"prop": item.id
|
|
252
|
+
}, {
|
|
253
|
+
[widthName]: columnWidth
|
|
254
|
+
}, {
|
|
255
|
+
"align": "center"
|
|
256
|
+
}), {
|
|
257
|
+
default: (opts) => {
|
|
258
|
+
const {
|
|
259
|
+
$index
|
|
260
|
+
} = opts;
|
|
261
|
+
const formC = vue.toRaw(this.formControllers[$index]);
|
|
262
|
+
if (!formC || !formC.state.isLoaded) {
|
|
263
|
+
return vue.createVNode("div", null, [ibiz.i18n.t("control.form.repeaterGrid.absentOrLoad")]);
|
|
264
|
+
}
|
|
265
|
+
const formItemC = formC.formItems.find((x) => x.name === item.id);
|
|
266
|
+
let editor = null;
|
|
267
|
+
if (!formItemC.editorProvider) {
|
|
268
|
+
editor = vue.createVNode(vue.resolveComponent("not-supported-editor"), {
|
|
269
|
+
"modelData": item.editor
|
|
270
|
+
}, null);
|
|
271
|
+
} else {
|
|
272
|
+
const component = vue.resolveComponent(formItemC.editorProvider.formEditor);
|
|
273
|
+
editor = vue.h(component, {
|
|
274
|
+
value: formItemC.value,
|
|
275
|
+
data: formItemC.data,
|
|
276
|
+
controller: formItemC.editor,
|
|
277
|
+
disabled: formItemC.state.disabled,
|
|
278
|
+
readonly: formItemC.state.readonly,
|
|
279
|
+
onChange: (val, name) => {
|
|
280
|
+
formItemC.setDataValue(val, name);
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
return vue.createVNode(vue.resolveComponent("iBizGridEditItem"), {
|
|
285
|
+
"error": formItemC.state.error,
|
|
286
|
+
"required": formItemC.state.required
|
|
287
|
+
}, _isSlot(editor) ? editor : {
|
|
288
|
+
default: () => [editor]
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
})];
|
|
293
|
+
},
|
|
294
|
+
append: () => {
|
|
295
|
+
return [tableHeight && vue.withDirectives(vue.createVNode("div", {
|
|
296
|
+
"infinite-scroll-distance": 20
|
|
297
|
+
}, null), [[vue.resolveDirective("infinite-scroll"), () => this.loadMore()]])];
|
|
298
|
+
}
|
|
270
299
|
})]);
|
|
271
300
|
}
|
|
272
301
|
});
|