@ibiz-template/vue3-components 0.1.12-dev.0 → 0.1.12
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.min.css +1 -1
- package/dist/index.system.min.js +3 -3
- package/dist/index.system.min.js.map +1 -1
- package/dist/wang-editor-0c05cd5f.js +2 -0
- package/dist/wang-editor-0c05cd5f.js.map +1 -0
- package/es/common/action-toolbar/action-toolbar.mjs +1 -1
- package/es/common/no-data/no-data.mjs +1 -1
- package/es/control/app-menu/app-menu.css +1 -1
- package/es/control/app-menu/app-menu.mjs +1 -1
- package/es/control/app-menu-icon-view/app-menu-icon-view.mjs +1 -1
- package/es/control/calendar/calendar.mjs +1 -1
- package/es/control/dashboard/portlet/container-portlet/container-portlet.css +1 -0
- package/es/control/dashboard/portlet/container-portlet/container-portlet.d.ts +1 -0
- package/es/control/dashboard/portlet/container-portlet/container-portlet.mjs +1 -0
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +1 -1
- package/es/control/drbar/drbar.controller.mjs +2 -8
- package/es/control/drtab/drtab.controller.mjs +2 -8
- package/es/control/exp-bar/render-util.mjs +2 -2
- package/es/control/form/form/form.mjs +1 -1
- package/es/control/form/form-detail/form-button/form-button.css +1 -1
- package/es/control/form/form-detail/form-button/form-button.mjs +6 -5
- package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.d.ts +72 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.mjs +157 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.d.ts +1 -3
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.mjs +17 -100
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.d.ts +1 -3
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.mjs +19 -85
- package/es/control/form/form-detail/form-mdctrl/index.mjs +2 -0
- package/es/control/form/search-form/search-form.css +1 -1
- package/es/control/form/search-form/search-form.mjs +10 -3
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +2 -0
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +7 -4
- package/es/control/grid/grid-column/grid-field-column/index.d.ts +2 -0
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +2 -1
- package/es/control/panel/view-layout-panel/index.d.ts +10 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +11 -3
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +48 -42
- package/es/control/toolbar/toolbar.mjs +1 -1
- package/es/control/tree/tree.css +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +5 -0
- package/es/editor/text-box/input/input.d.ts +2 -2
- package/es/editor/text-box/input/input.mjs +1 -1
- package/es/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/es/panel-component/panel-button/panel-button.css +1 -1
- package/es/panel-component/panel-button/panel-button.mjs +5 -4
- package/es/panel-component/single-data-container/index.d.ts +10 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +37 -2
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +75 -1
- package/es/panel-component/single-data-container/single-data-container.d.ts +11 -2
- package/es/panel-component/single-data-container/single-data-container.mjs +34 -21
- package/es/view/common/view.css +1 -1
- package/lib/common/action-toolbar/action-toolbar.cjs +1 -1
- package/lib/common/no-data/no-data.cjs +1 -1
- package/lib/control/app-menu/app-menu.cjs +1 -1
- package/lib/control/app-menu/app-menu.css +1 -1
- package/lib/control/app-menu-icon-view/app-menu-icon-view.cjs +1 -1
- package/lib/control/calendar/calendar.cjs +1 -1
- package/lib/control/dashboard/portlet/container-portlet/container-portlet.cjs +1 -0
- package/lib/control/dashboard/portlet/container-portlet/container-portlet.css +1 -0
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +1 -1
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/lib/control/drbar/drbar.controller.cjs +2 -8
- package/lib/control/drtab/drtab.controller.cjs +2 -8
- package/lib/control/exp-bar/render-util.cjs +2 -2
- package/lib/control/form/form/form.cjs +1 -1
- package/lib/control/form/form-detail/form-button/form-button.cjs +6 -5
- package/lib/control/form/form-detail/form-button/form-button.css +1 -1
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.cjs +159 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.cjs +16 -99
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.cjs +18 -84
- package/lib/control/form/form-detail/form-mdctrl/index.cjs +2 -0
- package/lib/control/form/search-form/search-form.cjs +10 -3
- package/lib/control/form/search-form/search-form.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +7 -4
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +2 -1
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +47 -41
- package/lib/control/toolbar/toolbar.cjs +1 -1
- package/lib/control/tree/tree.css +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +5 -0
- package/lib/editor/text-box/input/input.cjs +1 -1
- package/lib/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/lib/panel-component/panel-button/panel-button.cjs +5 -4
- package/lib/panel-component/panel-button/panel-button.css +1 -1
- package/lib/panel-component/single-data-container/single-data-container.cjs +33 -20
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +74 -0
- package/lib/view/common/view.css +1 -1
- package/package.json +6 -6
- package/dist/wang-editor-675011c6.js +0 -2
- package/dist/wang-editor-675011c6.js.map +0 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { isVNode, defineComponent,
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent } from 'vue';
|
|
2
2
|
import { useNamespace, useController } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { findChildFormDetails } from '@ibiz-template/runtime';
|
|
4
3
|
import { FormMDCtrlContainer } from '../../form-mdctrl-container/form-mdctrl-container.mjs';
|
|
5
4
|
|
|
6
5
|
function _isSlot(s) {
|
|
@@ -14,115 +13,33 @@ const FormMDCtrlRepeaterForm = /* @__PURE__ */ defineComponent({
|
|
|
14
13
|
required: true
|
|
15
14
|
}
|
|
16
15
|
},
|
|
17
|
-
setup(props
|
|
18
|
-
slots
|
|
19
|
-
}) {
|
|
16
|
+
setup(props) {
|
|
20
17
|
const ns = useNamespace("form-mdctrl");
|
|
21
18
|
useController(props.controller);
|
|
22
19
|
const c = props.controller;
|
|
23
|
-
c.state = reactive(c.state);
|
|
24
|
-
c.useFormMdCtrlCtx();
|
|
25
|
-
const slotProps = {
|
|
26
|
-
form: c
|
|
27
|
-
};
|
|
28
|
-
const getDetailController = (itemController, name) => {
|
|
29
|
-
const detail = itemController.find((item) => {
|
|
30
|
-
return item.name === name;
|
|
31
|
-
});
|
|
32
|
-
return detail == null ? void 0 : detail.c;
|
|
33
|
-
};
|
|
34
|
-
const renderByDetailType = (detail, item, index) => {
|
|
35
|
-
let _slot;
|
|
36
|
-
if (detail.hidden) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const detailId = detail.id;
|
|
40
|
-
const controller = getDetailController(c.formDetails[index], detailId);
|
|
41
|
-
const detailProps = {
|
|
42
|
-
modelData: detail,
|
|
43
|
-
controller,
|
|
44
|
-
key: detail.id
|
|
45
|
-
};
|
|
46
|
-
if (slots[detailId]) {
|
|
47
|
-
return renderSlot(slots, detailId, {
|
|
48
|
-
...slotProps,
|
|
49
|
-
...detailProps
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
const childSlots = {};
|
|
53
|
-
if (detail.detailType === "FORMITEM" && slots[`${detailId}_editor`]) {
|
|
54
|
-
childSlots.default = (...args) => {
|
|
55
|
-
return slots[`${detailId}_editor`](...args);
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const childDetails = findChildFormDetails(detail);
|
|
59
|
-
if (childDetails.length) {
|
|
60
|
-
childSlots.default = () => childDetails.map((child) => {
|
|
61
|
-
return renderByDetailType(child, item, index);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
const provider = (controller == null ? void 0 : controller.form).providers[detailId];
|
|
65
|
-
if (!provider) {
|
|
66
|
-
return createVNode("div", null, [createTextVNode("\u6682\u672A\u652F\u6301\u7684\u8868\u5355\u9879\u7C7B\u578B: "), detail.detailType, createTextVNode("\u6216\u627E\u4E0D\u5230\u5BF9\u5E94\u9002\u914D\u5668")]);
|
|
67
|
-
}
|
|
68
|
-
const component = resolveComponent(provider.component);
|
|
69
|
-
return createVNode(resolveComponent("iBizCol"), {
|
|
70
|
-
"layoutPos": detailProps.modelData.layoutPos,
|
|
71
|
-
"state": detailProps.controller.state
|
|
72
|
-
}, _isSlot(_slot = h(component, {
|
|
73
|
-
...detailProps
|
|
74
|
-
}, childSlots)) ? _slot : {
|
|
75
|
-
default: () => [_slot]
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
20
|
return {
|
|
79
21
|
ns,
|
|
80
|
-
c
|
|
81
|
-
renderByDetailType
|
|
22
|
+
c
|
|
82
23
|
};
|
|
83
24
|
},
|
|
84
25
|
render() {
|
|
85
|
-
let
|
|
86
|
-
if (!this.c
|
|
26
|
+
let _slot;
|
|
27
|
+
if (!this.c) {
|
|
87
28
|
return;
|
|
88
29
|
}
|
|
89
|
-
const renderDetails = (item, index) => {
|
|
90
|
-
var _a;
|
|
91
|
-
if (!this.c.data) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
return (_a = this.c.model.deformDetails) == null ? void 0 : _a.map((detail) => {
|
|
95
|
-
return this.renderByDetailType(detail, item, index);
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
30
|
const renderContent = () => {
|
|
99
31
|
return this.c.data.map((item, index) => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
})]), createVNode("div", {
|
|
110
|
-
"class": this.ns.b("btn")
|
|
111
|
-
}, [createVNode(resolveComponent("el-popconfirm"), {
|
|
112
|
-
"title": "\u662F\u5426\u5220\u9664\u8BE5\u9879",
|
|
113
|
-
"confirm-button-text": "\u786E\u8BA4",
|
|
114
|
-
"cancel-button-text": "\u53D6\u6D88",
|
|
115
|
-
"onConfirm": () => this.c.onDataRemove(index)
|
|
116
|
-
}, {
|
|
117
|
-
reference: () => {
|
|
118
|
-
return createVNode(resolveComponent("el-button"), {
|
|
119
|
-
"type": "danger",
|
|
120
|
-
"class": this.ns.b("remove-btn")
|
|
121
|
-
}, {
|
|
122
|
-
default: () => [createTextVNode("\u5220\u9664")]
|
|
123
|
-
});
|
|
32
|
+
return createVNode(resolveComponent("iBizFormMDCtrlRepeaterFormShell"), {
|
|
33
|
+
"modelData": this.c.model,
|
|
34
|
+
"context": this.c.parent.form.context,
|
|
35
|
+
"params": this.c.parent.form.params,
|
|
36
|
+
"data": item,
|
|
37
|
+
"index": index,
|
|
38
|
+
"controller": this.c,
|
|
39
|
+
"onControllerAppear": (c) => {
|
|
40
|
+
this.c.setFromController(c);
|
|
124
41
|
}
|
|
125
|
-
})
|
|
42
|
+
}, null);
|
|
126
43
|
});
|
|
127
44
|
};
|
|
128
45
|
return createVNode(FormMDCtrlContainer, {
|
|
@@ -130,8 +47,8 @@ const FormMDCtrlRepeaterForm = /* @__PURE__ */ defineComponent({
|
|
|
130
47
|
"onInsertButtonClick": () => {
|
|
131
48
|
this.c.onDataInsert();
|
|
132
49
|
}
|
|
133
|
-
}, _isSlot(
|
|
134
|
-
default: () => [
|
|
50
|
+
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
51
|
+
default: () => [_slot]
|
|
135
52
|
});
|
|
136
53
|
}
|
|
137
54
|
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PropType
|
|
2
|
-
import { IDEFormDetail } from '@ibiz/model-core';
|
|
1
|
+
import { PropType } from 'vue';
|
|
3
2
|
import { FormMDCtrlRepeaterFormOneController } from '@ibiz-template/runtime';
|
|
4
3
|
export declare const FormMDCtrlRepeaterFormOne: import("vue").DefineComponent<{
|
|
5
4
|
controller: {
|
|
@@ -9,7 +8,6 @@ export declare const FormMDCtrlRepeaterFormOne: import("vue").DefineComponent<{
|
|
|
9
8
|
}, {
|
|
10
9
|
ns: import("@ibiz-template/core").Namespace;
|
|
11
10
|
c: FormMDCtrlRepeaterFormOneController;
|
|
12
|
-
renderByDetailType: (detail: IDEFormDetail, item: IData) => VNode | VNode[] | undefined;
|
|
13
11
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
12
|
controller: {
|
|
15
13
|
type: PropType<FormMDCtrlRepeaterFormOneController>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { isVNode, defineComponent,
|
|
1
|
+
import { isVNode, defineComponent, createVNode, resolveComponent } from 'vue';
|
|
2
2
|
import { useNamespace, useController } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { findChildFormDetails } from '@ibiz-template/runtime';
|
|
4
3
|
import { FormMDCtrlContainer } from '../../form-mdctrl-container/form-mdctrl-container.mjs';
|
|
5
4
|
|
|
6
5
|
function _isSlot(s) {
|
|
@@ -14,104 +13,39 @@ const FormMDCtrlRepeaterFormOne = /* @__PURE__ */ defineComponent({
|
|
|
14
13
|
required: true
|
|
15
14
|
}
|
|
16
15
|
},
|
|
17
|
-
setup(props
|
|
18
|
-
slots
|
|
19
|
-
}) {
|
|
16
|
+
setup(props) {
|
|
20
17
|
const ns = useNamespace("form-mdctrl");
|
|
21
18
|
useController(props.controller);
|
|
22
19
|
const c = props.controller;
|
|
23
|
-
c.state = reactive(c.state);
|
|
24
|
-
c.useFormMdCtrlCtx();
|
|
25
|
-
const slotProps = {
|
|
26
|
-
form: c
|
|
27
|
-
};
|
|
28
|
-
const getDetailController = (itemController, name) => {
|
|
29
|
-
const detail = itemController.find((item) => {
|
|
30
|
-
return item.name === name;
|
|
31
|
-
});
|
|
32
|
-
return detail == null ? void 0 : detail.c;
|
|
33
|
-
};
|
|
34
|
-
const renderByDetailType = (detail, item) => {
|
|
35
|
-
let _slot;
|
|
36
|
-
if (detail.hidden) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const detailId = detail.id;
|
|
40
|
-
const controller = getDetailController(c.formDetail, detailId);
|
|
41
|
-
const detailProps = {
|
|
42
|
-
modelData: detail,
|
|
43
|
-
controller,
|
|
44
|
-
key: detail.id
|
|
45
|
-
};
|
|
46
|
-
if (slots[detailId]) {
|
|
47
|
-
return renderSlot(slots, detailId, {
|
|
48
|
-
...slotProps,
|
|
49
|
-
...detailProps
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
const childSlots = {};
|
|
53
|
-
if (detail.detailType === "FORMITEM" && slots[`${detailId}_editor`]) {
|
|
54
|
-
childSlots.default = (...args) => {
|
|
55
|
-
return slots[`${detailId}_editor`](...args);
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
const childDetails = findChildFormDetails(detail);
|
|
59
|
-
if (childDetails.length) {
|
|
60
|
-
childSlots.default = () => childDetails.map((child) => {
|
|
61
|
-
return renderByDetailType(child, item);
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
const provider = (controller == null ? void 0 : controller.form).providers[detailId];
|
|
65
|
-
if (!provider) {
|
|
66
|
-
return createVNode("div", null, [createTextVNode("\u6682\u672A\u652F\u6301\u7684\u8868\u5355\u9879\u7C7B\u578B: "), detail.detailType, createTextVNode("\u6216\u627E\u4E0D\u5230\u5BF9\u5E94\u9002\u914D\u5668")]);
|
|
67
|
-
}
|
|
68
|
-
const component = resolveComponent(provider.component);
|
|
69
|
-
return createVNode(resolveComponent("iBizCol"), {
|
|
70
|
-
"layoutPos": detailProps.modelData.layoutPos,
|
|
71
|
-
"state": detailProps.controller.state
|
|
72
|
-
}, _isSlot(_slot = h(component, {
|
|
73
|
-
...detailProps
|
|
74
|
-
}, childSlots)) ? _slot : {
|
|
75
|
-
default: () => [_slot]
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
20
|
return {
|
|
79
21
|
ns,
|
|
80
|
-
c
|
|
81
|
-
renderByDetailType
|
|
22
|
+
c
|
|
82
23
|
};
|
|
83
24
|
},
|
|
84
25
|
render() {
|
|
85
|
-
let
|
|
86
|
-
if (!this.c
|
|
26
|
+
let _slot;
|
|
27
|
+
if (!this.c) {
|
|
87
28
|
return;
|
|
88
29
|
}
|
|
89
|
-
const renderDetails = (item) => {
|
|
90
|
-
var _a;
|
|
91
|
-
if (!this.c.data) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
return (_a = this.c.model.deformDetails) == null ? void 0 : _a.map((detail) => {
|
|
95
|
-
return this.renderByDetailType(detail, item);
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
30
|
const renderContent = () => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
31
|
+
return createVNode(resolveComponent("iBizFormMDCtrlRepeaterFormShell"), {
|
|
32
|
+
"modelData": this.c.model,
|
|
33
|
+
"context": this.c.parent.form.context,
|
|
34
|
+
"params": this.c.parent.form.params,
|
|
35
|
+
"data": this.c.data,
|
|
36
|
+
"index": 0,
|
|
37
|
+
"controller": this.c,
|
|
38
|
+
"buttonVisible": false,
|
|
39
|
+
"onControllerAppear": (c) => {
|
|
40
|
+
this.c.setFromController(c);
|
|
41
|
+
}
|
|
42
|
+
}, null);
|
|
109
43
|
};
|
|
110
44
|
return createVNode(FormMDCtrlContainer, {
|
|
111
45
|
"controller": this.c.parent,
|
|
112
46
|
"buttonVisible": false
|
|
113
|
-
}, _isSlot(
|
|
114
|
-
default: () => [
|
|
47
|
+
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
48
|
+
default: () => [_slot]
|
|
115
49
|
});
|
|
116
50
|
}
|
|
117
51
|
});
|
|
@@ -7,6 +7,7 @@ import { FormMDCtrlGrid } from './form-mdctrl-grid/form-mdctrl-grid.mjs';
|
|
|
7
7
|
import { FormMDCtrlList } from './form-mdctrl-list/form-mdctrl-list.mjs';
|
|
8
8
|
import { FormMDCtrlRepeaterFormOne } from './form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.mjs';
|
|
9
9
|
import { FormMDCtrlRepeaterForm } from './form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.mjs';
|
|
10
|
+
import { FormMDCtrlRepeaterFormShell } from './form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.mjs';
|
|
10
11
|
import { FormMDCtrlRepeaterGrid } from './form-mdctrl-repeater/form-mdctrl-repeater-grid/form-mdctrl-repeater-grid.mjs';
|
|
11
12
|
import { FormMDCtrlProvider } from './form-mdctrl.provider.mjs';
|
|
12
13
|
|
|
@@ -19,6 +20,7 @@ const IBizFormMDCtrl = withInstall(FormMDCtrl, function(v) {
|
|
|
19
20
|
v.component(FormMDCtrlRepeaterForm.name, FormMDCtrlRepeaterForm);
|
|
20
21
|
v.component(FormMDCtrlRepeaterFormOne.name, FormMDCtrlRepeaterFormOne);
|
|
21
22
|
v.component(FormMDCtrlRepeaterGrid.name, FormMDCtrlRepeaterGrid);
|
|
23
|
+
v.component(FormMDCtrlRepeaterFormShell.name, FormMDCtrlRepeaterFormShell);
|
|
22
24
|
registerFormDetailProvider("MDCTRL", () => new FormMDCtrlProvider());
|
|
23
25
|
});
|
|
24
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.ibiz-control-searchform-buttons{display:flex;align-items:center;justify-content:flex-end;flex-shrink:0;text-align:right}.ibiz-control-searchform{--ibiz-control-searchform-bg-color:transparent;--ibiz-control-searchform-padding:
|
|
1
|
+
@charset "UTF-8";.ibiz-control-searchform-buttons{display:flex;align-items:center;justify-content:flex-end;height:100%;flex-shrink:0;text-align:right}.ibiz-control-searchform{--ibiz-control-searchform-bg-color:transparent;--ibiz-control-searchform-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);display:flex;padding:var(--ibiz-control-searchform-padding);background-color:var(--ibiz-control-searchform-bg-color)}.ibiz-control-searchform>.ibiz-form-page{flex-grow:1}.ibiz-control-searchform.is-btn-bottom{flex-direction:column}
|
|
@@ -42,15 +42,22 @@ const SearchFormControl = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
return createVNode(resolveComponent("iBizFormControl"), {
|
|
45
|
-
"class": this.ns.b(),
|
|
45
|
+
"class": [this.ns.b(), this.ns.is("btn-bottom", this.c.model.searchButtonPos === "BOTTOM")],
|
|
46
46
|
"controller": this.c,
|
|
47
47
|
"nativeOnkeyup": (e) => this.c.onKeyUp(e)
|
|
48
48
|
}, {
|
|
49
49
|
...this.$slots,
|
|
50
|
-
|
|
50
|
+
searchButtons: () => {
|
|
51
|
+
if (this.c.model.searchButtonStyle === "NONE") {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
51
54
|
return createVNode("div", {
|
|
52
55
|
"class": this.ns.b("buttons")
|
|
53
|
-
}, [createVNode(resolveComponent("el-
|
|
56
|
+
}, [this.c.model.searchButtonStyle === "SEARCHONLY" ? createVNode(resolveComponent("el-button"), {
|
|
57
|
+
"onClick": () => this.c.onSearchButtonClick()
|
|
58
|
+
}, {
|
|
59
|
+
default: () => [createTextVNode("\u641C\u7D22")]
|
|
60
|
+
}) : createVNode(resolveComponent("el-dropdown"), {
|
|
54
61
|
"split-button": true,
|
|
55
62
|
"type": "primary",
|
|
56
63
|
"onClick": () => this.c.onSearchButtonClick()
|
|
@@ -14,6 +14,8 @@ export declare const GridFieldColumn: import("vue").DefineComponent<{
|
|
|
14
14
|
onCellClick: (event: MouseEvent) => void;
|
|
15
15
|
onTextClick: (event: MouseEvent) => void;
|
|
16
16
|
CustomHtml: import("vue").ComputedRef<string | undefined>;
|
|
17
|
+
fieldValue: import("vue").ComputedRef<any>;
|
|
18
|
+
formatValue: import("vue").ComputedRef<string>;
|
|
17
19
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
20
|
controller: {
|
|
19
21
|
type: typeof GridFieldColumnController;
|
|
@@ -32,16 +32,19 @@ const GridFieldColumn = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
const CustomHtml = computed(() => {
|
|
33
33
|
return props.controller.getCustomHtml(props.row);
|
|
34
34
|
});
|
|
35
|
+
const fieldValue = computed(() => props.row.data[props.controller.model.codeName]);
|
|
36
|
+
const formatValue = computed(() => props.controller.formatValue(fieldValue.value));
|
|
35
37
|
return {
|
|
36
38
|
ns,
|
|
37
39
|
onCellClick,
|
|
38
40
|
onTextClick,
|
|
39
|
-
CustomHtml
|
|
41
|
+
CustomHtml,
|
|
42
|
+
fieldValue,
|
|
43
|
+
formatValue
|
|
40
44
|
};
|
|
41
45
|
},
|
|
42
46
|
render() {
|
|
43
47
|
const c = this.controller;
|
|
44
|
-
const fieldValue = this.row.data[this.controller.model.codeName];
|
|
45
48
|
let content = null;
|
|
46
49
|
if (c.isCustomCode) {
|
|
47
50
|
content = createVNode("span", {
|
|
@@ -53,14 +56,14 @@ const GridFieldColumn = /* @__PURE__ */ defineComponent({
|
|
|
53
56
|
"class": this.ns.e("text"),
|
|
54
57
|
"codeListItems": c.codeListItems,
|
|
55
58
|
"codeList": c.codeList,
|
|
56
|
-
"value": fieldValue,
|
|
59
|
+
"value": this.fieldValue,
|
|
57
60
|
"onClick": this.onTextClick
|
|
58
61
|
}, null);
|
|
59
62
|
} else {
|
|
60
63
|
content = createVNode("span", {
|
|
61
64
|
"class": this.ns.e("text"),
|
|
62
65
|
"onClick": this.onTextClick
|
|
63
|
-
}, [
|
|
66
|
+
}, [this.formatValue, this.fieldValue != null && c.model.unitName]);
|
|
64
67
|
}
|
|
65
68
|
return createVNode("div", {
|
|
66
69
|
"class": [this.ns.b(), c.clickable(this.row) && this.ns.m("clickable")],
|
|
@@ -13,6 +13,8 @@ export declare const IBizGridFieldColumn: import("@ibiz-template/vue3-util").Typ
|
|
|
13
13
|
onCellClick: (event: MouseEvent) => void;
|
|
14
14
|
onTextClick: (event: MouseEvent) => void;
|
|
15
15
|
CustomHtml: import("vue").ComputedRef<string | undefined>;
|
|
16
|
+
fieldValue: import("vue").ComputedRef<any>;
|
|
17
|
+
formatValue: import("vue").ComputedRef<string>;
|
|
16
18
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
19
|
controller: {
|
|
18
20
|
type: typeof import("@ibiz-template/runtime").GridFieldColumnController;
|
|
@@ -51,6 +51,7 @@ const GridFieldEditColumn = /* @__PURE__ */ defineComponent({
|
|
|
51
51
|
};
|
|
52
52
|
},
|
|
53
53
|
render() {
|
|
54
|
+
const val = this.row.data[this.fieldName];
|
|
54
55
|
return createVNode(resolveComponent("iBizGridEditItem"), {
|
|
55
56
|
ref: "componentRef",
|
|
56
57
|
required: !this.c.editItem.allowEmpty,
|
|
@@ -58,7 +59,7 @@ const GridFieldEditColumn = /* @__PURE__ */ defineComponent({
|
|
|
58
59
|
...this.gridEditItemProps
|
|
59
60
|
}, {
|
|
60
61
|
default: () => [this.c.editorProvider && h(resolveComponent(this.c.editorProvider.gridEditor), {
|
|
61
|
-
value: this.
|
|
62
|
+
value: this.editorProps.readonly ? this.c.formatValue(val) : val,
|
|
62
63
|
data: this.row.data,
|
|
63
64
|
controller: this.c.editor,
|
|
64
65
|
onChange: this.rowDataChange,
|
|
@@ -16,6 +16,16 @@ export declare const IBizViewLayoutPanelControl: import("@ibiz-template/vue3-uti
|
|
|
16
16
|
}, {
|
|
17
17
|
c: import("@ibiz-template/runtime").ViewLayoutPanelController;
|
|
18
18
|
ns: import("@ibiz-template/core").Namespace;
|
|
19
|
+
renderPanelItem: (panelItem: import("@ibiz/model-core").IPanelItem, options?: {
|
|
20
|
+
providers: {
|
|
21
|
+
[key: string]: import("@ibiz-template/runtime").IPanelItemProvider;
|
|
22
|
+
};
|
|
23
|
+
panelItems: {
|
|
24
|
+
[key: string]: import("@ibiz-template/runtime").IPanelItemController;
|
|
25
|
+
};
|
|
26
|
+
} | undefined) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}> | null;
|
|
19
29
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
30
|
modelData: {
|
|
21
31
|
type: import("vue").PropType<import("@ibiz/model-core").IViewLayoutPanel>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { IViewLayoutPanel } from '@ibiz/model-core';
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
import { IPanelItem, IViewLayoutPanel } from '@ibiz/model-core';
|
|
3
3
|
import './view-layout-panel.scss';
|
|
4
|
-
import { ViewLayoutPanelController } from '@ibiz-template/runtime';
|
|
4
|
+
import { IPanelItemController, IPanelItemProvider, ViewLayoutPanelController } from '@ibiz-template/runtime';
|
|
5
5
|
/**
|
|
6
6
|
* 视图布局面板组件
|
|
7
7
|
*/
|
|
@@ -22,6 +22,14 @@ export declare const ViewLayoutPanelControl: import("vue").DefineComponent<{
|
|
|
22
22
|
}, {
|
|
23
23
|
c: ViewLayoutPanelController;
|
|
24
24
|
ns: import("@ibiz-template/core").Namespace;
|
|
25
|
+
renderPanelItem: (panelItem: IPanelItem, options?: {
|
|
26
|
+
providers: {
|
|
27
|
+
[key: string]: IPanelItemProvider;
|
|
28
|
+
};
|
|
29
|
+
panelItems: {
|
|
30
|
+
[key: string]: IPanelItemController;
|
|
31
|
+
};
|
|
32
|
+
} | undefined) => VNode | null;
|
|
25
33
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
26
34
|
modelData: {
|
|
27
35
|
type: PropType<IViewLayoutPanel>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, createVNode, createTextVNode, resolveComponent, h,
|
|
1
|
+
import { isVNode, defineComponent, watch, reactive, createVNode, createTextVNode, resolveComponent, h, provide } from 'vue';
|
|
2
2
|
import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import './view-layout-panel.css';
|
|
4
4
|
import { ViewLayoutPanelController } from '@ibiz-template/runtime';
|
|
@@ -6,44 +6,6 @@ import { ViewLayoutPanelController } from '@ibiz-template/runtime';
|
|
|
6
6
|
function _isSlot(s) {
|
|
7
7
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
8
|
}
|
|
9
|
-
function renderPanelItem(panelItem, c, ins) {
|
|
10
|
-
var _a, _b;
|
|
11
|
-
if (panelItem.hidden) {
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
const {
|
|
15
|
-
providers,
|
|
16
|
-
panelItems
|
|
17
|
-
} = c;
|
|
18
|
-
const provider = providers[panelItem.id];
|
|
19
|
-
if (!provider) {
|
|
20
|
-
return createVNode("div", null, [createTextVNode("\u6682\u672A\u652F\u6301\u7684\u9762\u677F\u9879: "), panelItem.id, createTextVNode(" - "), panelItem.itemType]);
|
|
21
|
-
}
|
|
22
|
-
const component = resolveComponent(provider.component);
|
|
23
|
-
let children;
|
|
24
|
-
if (panelItem.itemType === "CTRLPOS" && ins.$slots[panelItem.id]) {
|
|
25
|
-
children = () => {
|
|
26
|
-
return ins.$slots[panelItem.id]();
|
|
27
|
-
};
|
|
28
|
-
} else if (panelItem.itemType === "TABPANEL" && ((_a = panelItem.panelTabPages) == null ? void 0 : _a.length)) {
|
|
29
|
-
children = () => {
|
|
30
|
-
return panelItem.panelTabPages.map((child) => {
|
|
31
|
-
return renderPanelItem(child, c, ins);
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
} else if ((_b = panelItem.panelItems) == null ? void 0 : _b.length) {
|
|
35
|
-
children = () => {
|
|
36
|
-
return panelItem.panelItems.map((child) => {
|
|
37
|
-
return renderPanelItem(child, c, ins);
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
return h(component, {
|
|
42
|
-
modelData: panelItem,
|
|
43
|
-
controller: panelItems[panelItem.id],
|
|
44
|
-
key: panelItem.id
|
|
45
|
-
}, children);
|
|
46
|
-
}
|
|
47
9
|
const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
48
10
|
name: "IBizViewLayoutPanelControl",
|
|
49
11
|
props: {
|
|
@@ -61,7 +23,9 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
61
23
|
},
|
|
62
24
|
data: Object
|
|
63
25
|
},
|
|
64
|
-
setup(props
|
|
26
|
+
setup(props, {
|
|
27
|
+
slots
|
|
28
|
+
}) {
|
|
65
29
|
const c = useControlController((...args) => new ViewLayoutPanelController(...args));
|
|
66
30
|
const ns = useNamespace(`control-${c.model.controlType.toLowerCase()}`);
|
|
67
31
|
watch(() => {
|
|
@@ -81,9 +45,51 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
81
45
|
panelItem.state = reactive(panelItem.state);
|
|
82
46
|
});
|
|
83
47
|
});
|
|
48
|
+
const renderPanelItem = (panelItem, options) => {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
if (panelItem.hidden) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
const {
|
|
54
|
+
providers,
|
|
55
|
+
panelItems
|
|
56
|
+
} = options || c;
|
|
57
|
+
const provider = providers[panelItem.id];
|
|
58
|
+
if (!provider) {
|
|
59
|
+
return createVNode("div", null, [createTextVNode("\u6682\u672A\u652F\u6301\u7684\u9762\u677F\u9879: "), panelItem.id, createTextVNode(" - "), panelItem.itemType]);
|
|
60
|
+
}
|
|
61
|
+
const component = resolveComponent(provider.component);
|
|
62
|
+
let children;
|
|
63
|
+
if (panelItem.itemType === "CTRLPOS" && slots[panelItem.id]) {
|
|
64
|
+
children = () => {
|
|
65
|
+
return slots[panelItem.id]();
|
|
66
|
+
};
|
|
67
|
+
} else if (panelItem.itemType === "TABPANEL" && ((_a = panelItem.panelTabPages) == null ? void 0 : _a.length)) {
|
|
68
|
+
children = () => {
|
|
69
|
+
return panelItem.panelTabPages.map((child) => {
|
|
70
|
+
return renderPanelItem(child, options);
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
} else if (panelItem.itemType === "CONTAINER" && panelItem.predefinedType === "CONTAINER_SINGLEDATA") {
|
|
74
|
+
children = void 0;
|
|
75
|
+
} else if ((_b = panelItem.panelItems) == null ? void 0 : _b.length) {
|
|
76
|
+
children = () => {
|
|
77
|
+
return panelItem.panelItems.map((child) => {
|
|
78
|
+
return renderPanelItem(child, options);
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
return h(component, {
|
|
83
|
+
modelData: panelItem,
|
|
84
|
+
controller: panelItems[panelItem.id],
|
|
85
|
+
key: panelItem.id
|
|
86
|
+
}, children);
|
|
87
|
+
};
|
|
88
|
+
provide("renderPanelItem", renderPanelItem);
|
|
84
89
|
return {
|
|
85
90
|
c,
|
|
86
|
-
ns
|
|
91
|
+
ns,
|
|
92
|
+
renderPanelItem
|
|
87
93
|
};
|
|
88
94
|
},
|
|
89
95
|
render() {
|
|
@@ -111,7 +117,7 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
111
117
|
return createVNode(resolveComponent("iBizCol"), {
|
|
112
118
|
"layoutPos": panelItem.layoutPos,
|
|
113
119
|
"state": subC.state
|
|
114
|
-
}, _isSlot(_slot = renderPanelItem(panelItem
|
|
120
|
+
}, _isSlot(_slot = this.renderPanelItem(panelItem)) ? _slot : {
|
|
115
121
|
default: () => [_slot]
|
|
116
122
|
});
|
|
117
123
|
}))];
|
|
@@ -17,7 +17,7 @@ const btnContent = (item) => {
|
|
|
17
17
|
}
|
|
18
18
|
if (item.showCaption) {
|
|
19
19
|
if (item.capLanguageRes) {
|
|
20
|
-
const caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.
|
|
20
|
+
const caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
21
21
|
result.push(caption);
|
|
22
22
|
} else if (item.caption) {
|
|
23
23
|
result.push(item.caption);
|
package/es/control/tree/tree.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-control-treeview-node{display:flex;flex-grow:1;flex-shrink:1;align-items:center;min-width:1px;height:100%;line-height:26px}.ibiz-control-treeview-node__icon{margin-right:var(--ibiz-spacing-tight)}.ibiz-control-treeview-node__label{flex-grow:1;flex-shrink:1;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-control-treeview-node:hover .ibiz-control-treeview-context-menu-trigger{display:inline-block}.ibiz-control-treeview-context-menu-trigger{display:none;flex-shrink:0;width:30px;text-align:center;cursor:pointer}.ibiz-control-treeview-context-menu-trigger__caption-icon{vertical-align:middle}
|
|
1
|
+
.ibiz-control-treeview-node{display:flex;flex-grow:1;flex-shrink:1;align-items:center;min-width:1px;height:100%;line-height:26px}.ibiz-control-treeview-node__icon{min-width:var(--ibiz-spacing-base);margin-right:var(--ibiz-spacing-tight)}.ibiz-control-treeview-node__label{flex-grow:1;flex-shrink:1;min-width:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-control-treeview-node:hover .ibiz-control-treeview-context-menu-trigger{display:inline-block}.ibiz-control-treeview-context-menu-trigger{display:none;flex-shrink:0;width:30px;text-align:center;cursor:pointer}.ibiz-control-treeview-context-menu-trigger__caption-icon{vertical-align:middle}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, shallowRef, ref, watch, onBeforeUnmount, onMounted, createVNode } from 'vue';
|
|
2
2
|
import { Toolbar, Editor } from '@wangeditor/editor-for-vue';
|
|
3
3
|
import { getCookie } from 'qx-util';
|
|
4
|
+
import { isNil } from 'ramda';
|
|
4
5
|
import { getHtmlProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
|
|
5
6
|
import { CoreConst } from '@ibiz-template/core';
|
|
6
7
|
import './wang-editor.css';
|
|
@@ -115,10 +116,14 @@ const IBizHtml = /* @__PURE__ */ defineComponent({
|
|
|
115
116
|
});
|
|
116
117
|
const handleCreated = (editor) => {
|
|
117
118
|
editorRef.value = editor;
|
|
119
|
+
editor.setHtml(valueHtml.value);
|
|
118
120
|
};
|
|
119
121
|
const handleChange = (editor) => {
|
|
120
122
|
const html = editor.getHtml();
|
|
121
123
|
const emitValue = html === "<p><br></p>" ? "" : html;
|
|
124
|
+
if (emitValue === props.value || emitValue === "" && isNil(props.value)) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
122
127
|
emit("change", emitValue);
|
|
123
128
|
};
|
|
124
129
|
const handleDestroyed = (_editor) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './input.scss';
|
|
2
2
|
import { TextBoxEditorController } from '../text-box-editor.controller';
|
|
3
3
|
export declare const IBizInput: import("vue").DefineComponent<{
|
|
4
|
-
value: StringConstructor;
|
|
4
|
+
value: (StringConstructor | NumberConstructor)[];
|
|
5
5
|
controller: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<TextBoxEditorController>, undefined, undefined>;
|
|
6
6
|
data: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<IData>, undefined, undefined>;
|
|
7
7
|
disabled: {
|
|
@@ -31,7 +31,7 @@ export declare const IBizInput: import("vue").DefineComponent<{
|
|
|
31
31
|
blur: () => boolean;
|
|
32
32
|
focus: () => boolean;
|
|
33
33
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
-
value: StringConstructor;
|
|
34
|
+
value: (StringConstructor | NumberConstructor)[];
|
|
35
35
|
controller: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<TextBoxEditorController>, undefined, undefined>;
|
|
36
36
|
data: import("@ibiz-template/vue3-util").RequiredProp<import("vue").PropType<IData>, undefined, undefined>;
|
|
37
37
|
disabled: {
|