@ibiz-template/mob-vue3-components 0.0.1-alpha.22 → 0.0.1-alpha.23
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 +2 -2
- package/dist/index.system.min.js.map +1 -1
- package/es/control/form/form/index.mjs +0 -2
- package/es/control/form/form-detail/index.d.ts +0 -1
- package/es/control/form/form-detail/index.mjs +0 -2
- package/es/control/form/index.mjs +0 -2
- package/es/control/index.mjs +0 -2
- package/lib/control/form/form/index.cjs +0 -2
- package/lib/control/form/form-detail/index.cjs +0 -4
- package/lib/control/form/index.cjs +4 -8
- package/lib/control/index.cjs +34 -38
- package/package.json +6 -6
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css +0 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.d.ts +0 -36
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.mjs +0 -66
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-data-view/form-mdctrl-data-view.d.ts +0 -17
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-data-view/form-mdctrl-data-view.mjs +0 -68
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.d.ts +0 -17
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.mjs +0 -80
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-list/form-mdctrl-list.d.ts +0 -17
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-list/form-mdctrl-list.mjs +0 -68
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.d.ts +0 -72
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.mjs +0 -157
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.d.ts +0 -17
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.mjs +0 -57
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.d.ts +0 -17
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.mjs +0 -55
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.d.ts +0 -26
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.mjs +0 -81
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.provider.d.ts +0 -15
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.provider.mjs +0 -21
- package/es/control/form/form-detail/form-mdctrl/index.d.ts +0 -26
- package/es/control/form/form-detail/form-mdctrl/index.mjs +0 -11
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.cjs +0 -71
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css +0 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-data-view/form-mdctrl-data-view.cjs +0 -73
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.cjs +0 -85
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-list/form-mdctrl-list.cjs +0 -73
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.cjs +0 -159
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.cjs +0 -62
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.cjs +0 -60
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.cjs +0 -86
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.provider.cjs +0 -23
- package/lib/control/form/form-detail/form-mdctrl/index.cjs +0 -17
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { isVNode, reactive, resolveComponent, h, createTextVNode, createVNode, defineComponent } from 'vue';
|
|
2
|
-
import { useNamespace, useController } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { FormMDCtrlContainer } from '../form-mdctrl-container/form-mdctrl-container.mjs';
|
|
4
|
-
|
|
5
|
-
"use strict";
|
|
6
|
-
function _isSlot(s) {
|
|
7
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
|
-
}
|
|
9
|
-
const FormMDCtrlList = /* @__PURE__ */ defineComponent({
|
|
10
|
-
name: "IBizFormMDCtrlList",
|
|
11
|
-
props: {
|
|
12
|
-
controller: {
|
|
13
|
-
type: Object,
|
|
14
|
-
required: true
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
setup(props) {
|
|
18
|
-
const ns = useNamespace("form-mdctrl");
|
|
19
|
-
useController(props.controller);
|
|
20
|
-
const c = props.controller;
|
|
21
|
-
c.state = reactive(c.state);
|
|
22
|
-
return {
|
|
23
|
-
ns,
|
|
24
|
-
c
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
render() {
|
|
28
|
-
let _slot;
|
|
29
|
-
const c = this.c;
|
|
30
|
-
const renderContent = () => {
|
|
31
|
-
if (c.controlModel && c.provider) {
|
|
32
|
-
const tempContext = c.parent.form.context.clone();
|
|
33
|
-
const controlProps = {
|
|
34
|
-
modelData: c.controlModel,
|
|
35
|
-
context: tempContext,
|
|
36
|
-
params: c.parent.form.params,
|
|
37
|
-
onSelectionChange: (arg) => c.onSelectionChange(arg),
|
|
38
|
-
onCreated: (event) => c.onListCreated(event),
|
|
39
|
-
class: this.ns.b("form-content-control")
|
|
40
|
-
};
|
|
41
|
-
const controlComponent = h(resolveComponent(c.provider.component), controlProps);
|
|
42
|
-
return createVNode("div", {
|
|
43
|
-
"class": this.ns.b("form-content")
|
|
44
|
-
}, [controlComponent, createVNode("div", {
|
|
45
|
-
"class": this.ns.b("btn")
|
|
46
|
-
}, [c.parent.isDelete && createVNode(resolveComponent("van-button"), {
|
|
47
|
-
"type": "danger",
|
|
48
|
-
"class": this.ns.b("remove-btn"),
|
|
49
|
-
"disabled": !this.c.state.isSelect,
|
|
50
|
-
"onClick": () => this.c.onDataRemove()
|
|
51
|
-
}, {
|
|
52
|
-
default: () => [createTextVNode("\u5220\u9664")]
|
|
53
|
-
})])]);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
return createVNode(FormMDCtrlContainer, {
|
|
57
|
-
"class": this.ns.b("list"),
|
|
58
|
-
"controller": c.parent,
|
|
59
|
-
"onInsertButtonClick": () => {
|
|
60
|
-
c.onDataInsert();
|
|
61
|
-
}
|
|
62
|
-
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
63
|
-
default: () => [_slot]
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export { FormMDCtrlList, FormMDCtrlList as default };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { FormMDCtrlItemController, FormMDCtrlRepeaterFormController } from '@ibiz-template/runtime';
|
|
2
|
-
import { IDEEditForm, IDEFormDetail } from '@ibiz/model-core';
|
|
3
|
-
import { PropType, VNode } from 'vue';
|
|
4
|
-
export declare const FormMDCtrlRepeaterFormShell: import("vue").DefineComponent<{
|
|
5
|
-
modelData: {
|
|
6
|
-
type: PropType<IDEEditForm>;
|
|
7
|
-
required: true;
|
|
8
|
-
};
|
|
9
|
-
context: {
|
|
10
|
-
type: PropType<IContext>;
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
params: {
|
|
14
|
-
type: PropType<IParams>;
|
|
15
|
-
default: () => {};
|
|
16
|
-
};
|
|
17
|
-
data: {
|
|
18
|
-
type: PropType<IData>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
index: {
|
|
22
|
-
type: NumberConstructor;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
controller: {
|
|
26
|
-
type: PropType<FormMDCtrlRepeaterFormController>;
|
|
27
|
-
required: true;
|
|
28
|
-
};
|
|
29
|
-
buttonVisible: {
|
|
30
|
-
type: BooleanConstructor;
|
|
31
|
-
default: boolean;
|
|
32
|
-
required: false;
|
|
33
|
-
};
|
|
34
|
-
}, {
|
|
35
|
-
c: FormMDCtrlItemController;
|
|
36
|
-
ns: import("@ibiz-template/core").Namespace;
|
|
37
|
-
renderByDetailType: (detail: IDEFormDetail, item: IData, index: number) => VNode | VNode[] | undefined;
|
|
38
|
-
init: import("vue").Ref<boolean>;
|
|
39
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
|
-
modelData: {
|
|
41
|
-
type: PropType<IDEEditForm>;
|
|
42
|
-
required: true;
|
|
43
|
-
};
|
|
44
|
-
context: {
|
|
45
|
-
type: PropType<IContext>;
|
|
46
|
-
required: true;
|
|
47
|
-
};
|
|
48
|
-
params: {
|
|
49
|
-
type: PropType<IParams>;
|
|
50
|
-
default: () => {};
|
|
51
|
-
};
|
|
52
|
-
data: {
|
|
53
|
-
type: PropType<IData>;
|
|
54
|
-
required: true;
|
|
55
|
-
};
|
|
56
|
-
index: {
|
|
57
|
-
type: NumberConstructor;
|
|
58
|
-
required: true;
|
|
59
|
-
};
|
|
60
|
-
controller: {
|
|
61
|
-
type: PropType<FormMDCtrlRepeaterFormController>;
|
|
62
|
-
required: true;
|
|
63
|
-
};
|
|
64
|
-
buttonVisible: {
|
|
65
|
-
type: BooleanConstructor;
|
|
66
|
-
default: boolean;
|
|
67
|
-
required: false;
|
|
68
|
-
};
|
|
69
|
-
}>>, {
|
|
70
|
-
params: IParams;
|
|
71
|
-
buttonVisible: boolean;
|
|
72
|
-
}, {}>;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { isVNode, ref, reactive, renderSlot, createTextVNode, createVNode, resolveComponent, h, defineComponent } from 'vue';
|
|
2
|
-
import { FormMDCtrlItemController, findChildFormDetails } from '@ibiz-template/runtime';
|
|
3
|
-
import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
|
|
4
|
-
|
|
5
|
-
"use strict";
|
|
6
|
-
function _isSlot(s) {
|
|
7
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
|
-
}
|
|
9
|
-
const FormMDCtrlRepeaterFormShell = /* @__PURE__ */ defineComponent({
|
|
10
|
-
name: "IBizFormMDCtrlRepeaterFormShell",
|
|
11
|
-
props: {
|
|
12
|
-
modelData: {
|
|
13
|
-
type: Object,
|
|
14
|
-
required: true
|
|
15
|
-
},
|
|
16
|
-
context: {
|
|
17
|
-
type: Object,
|
|
18
|
-
required: true
|
|
19
|
-
},
|
|
20
|
-
params: {
|
|
21
|
-
type: Object,
|
|
22
|
-
default: () => ({})
|
|
23
|
-
},
|
|
24
|
-
data: {
|
|
25
|
-
type: Object,
|
|
26
|
-
required: true
|
|
27
|
-
},
|
|
28
|
-
index: {
|
|
29
|
-
type: Number,
|
|
30
|
-
required: true
|
|
31
|
-
},
|
|
32
|
-
controller: {
|
|
33
|
-
type: Object,
|
|
34
|
-
required: true
|
|
35
|
-
},
|
|
36
|
-
buttonVisible: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: true,
|
|
39
|
-
required: false
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
setup(props, {
|
|
43
|
-
slots
|
|
44
|
-
}) {
|
|
45
|
-
const c = useControlController((...args) => new FormMDCtrlItemController(...args, props.data, props.controller.parent.form));
|
|
46
|
-
const ns = useNamespace("form-mdctrl");
|
|
47
|
-
c.state.isLoaded = true;
|
|
48
|
-
const init = ref(false);
|
|
49
|
-
c.evt.on("onCreated", () => {
|
|
50
|
-
const keys = Object.keys(c.details);
|
|
51
|
-
keys.forEach((key) => {
|
|
52
|
-
const detail = c.details[key];
|
|
53
|
-
detail.state = reactive(detail.state);
|
|
54
|
-
});
|
|
55
|
-
init.value = true;
|
|
56
|
-
});
|
|
57
|
-
c.evt.on("onFormDataChange", (arg) => {
|
|
58
|
-
if (arg.data.length > 0) {
|
|
59
|
-
props.controller.onDataItemChange(arg.data[0], props.index);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
const slotProps = {
|
|
63
|
-
form: c
|
|
64
|
-
};
|
|
65
|
-
const renderByDetailType = (detail, item, index) => {
|
|
66
|
-
let _slot;
|
|
67
|
-
if (detail.hidden) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
const detailId = detail.id;
|
|
71
|
-
const controller = c.details[detailId];
|
|
72
|
-
const detailProps = {
|
|
73
|
-
modelData: detail,
|
|
74
|
-
controller,
|
|
75
|
-
key: detail.id
|
|
76
|
-
};
|
|
77
|
-
if (slots[detailId]) {
|
|
78
|
-
return renderSlot(slots, detailId, {
|
|
79
|
-
...slotProps,
|
|
80
|
-
...detailProps
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
const childSlots = {};
|
|
84
|
-
if (detail.detailType === "FORMITEM" && slots[`${detailId}_editor`]) {
|
|
85
|
-
childSlots.default = (...args) => {
|
|
86
|
-
return slots[`${detailId}_editor`](...args);
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
const childDetails = findChildFormDetails(detail);
|
|
90
|
-
if (childDetails.length) {
|
|
91
|
-
childSlots.default = () => childDetails.map((child) => {
|
|
92
|
-
return renderByDetailType(child, item, index);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
const provider = (controller == null ? void 0 : controller.form).providers[detailId];
|
|
96
|
-
if (!provider) {
|
|
97
|
-
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")]);
|
|
98
|
-
}
|
|
99
|
-
const component = resolveComponent(provider.component);
|
|
100
|
-
return createVNode(resolveComponent("iBizCol"), {
|
|
101
|
-
"layoutPos": detailProps.modelData.layoutPos,
|
|
102
|
-
"state": detailProps.controller.state
|
|
103
|
-
}, _isSlot(_slot = h(component, {
|
|
104
|
-
...detailProps
|
|
105
|
-
}, childSlots)) ? _slot : {
|
|
106
|
-
default: () => [_slot]
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
return {
|
|
110
|
-
c,
|
|
111
|
-
ns,
|
|
112
|
-
renderByDetailType,
|
|
113
|
-
init
|
|
114
|
-
};
|
|
115
|
-
},
|
|
116
|
-
render() {
|
|
117
|
-
if (!this.init) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
const renderDetails = (item, index) => {
|
|
121
|
-
var _a;
|
|
122
|
-
if (!this.c.data) {
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
return (_a = this.controller.model.deformDetails) == null ? void 0 : _a.map((detail) => {
|
|
126
|
-
return this.renderByDetailType(detail, item, index);
|
|
127
|
-
});
|
|
128
|
-
};
|
|
129
|
-
return createVNode(resolveComponent("van-swipe-cell"), {
|
|
130
|
-
"class": `${this.ns.b("form-content")} ${this.ns.b("repeater-form-shell")}`
|
|
131
|
-
}, {
|
|
132
|
-
default: () => {
|
|
133
|
-
let _slot2;
|
|
134
|
-
return createVNode("div", {
|
|
135
|
-
"class": this.ns.b("form-content-container")
|
|
136
|
-
}, [createVNode(resolveComponent("iBizRow"), {
|
|
137
|
-
"layout": this.c.model.layout
|
|
138
|
-
}, _isSlot(_slot2 = renderDetails(this.data, this.index)) ? _slot2 : {
|
|
139
|
-
default: () => [_slot2]
|
|
140
|
-
})]);
|
|
141
|
-
},
|
|
142
|
-
right: () => {
|
|
143
|
-
return this.buttonVisible && this.controller.parent.isDelete && createVNode(resolveComponent("van-button"), {
|
|
144
|
-
"class": this.ns.b("btn"),
|
|
145
|
-
"type": "danger",
|
|
146
|
-
"onClick": () => {
|
|
147
|
-
this.controller.onDataRemove(this.index);
|
|
148
|
-
}
|
|
149
|
-
}, {
|
|
150
|
-
default: () => [createTextVNode("\u5220\u9664")]
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
export { FormMDCtrlRepeaterFormShell };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { FormMDCtrlRepeaterFormController } from '@ibiz-template/runtime';
|
|
3
|
-
export declare const FormMDCtrlRepeaterForm: import("vue").DefineComponent<{
|
|
4
|
-
controller: {
|
|
5
|
-
type: PropType<FormMDCtrlRepeaterFormController>;
|
|
6
|
-
required: true;
|
|
7
|
-
};
|
|
8
|
-
}, {
|
|
9
|
-
ns: import("@ibiz-template/core").Namespace;
|
|
10
|
-
c: FormMDCtrlRepeaterFormController;
|
|
11
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
-
controller: {
|
|
13
|
-
type: PropType<FormMDCtrlRepeaterFormController>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
}>>, {}, {}>;
|
|
17
|
-
export default FormMDCtrlRepeaterForm;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { isVNode, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
-
import { useNamespace, useController } from '@ibiz-template/vue3-util';
|
|
3
|
-
|
|
4
|
-
"use strict";
|
|
5
|
-
function _isSlot(s) {
|
|
6
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
7
|
-
}
|
|
8
|
-
const FormMDCtrlRepeaterForm = /* @__PURE__ */ defineComponent({
|
|
9
|
-
name: "IBizFormMDCtrlRepeaterForm",
|
|
10
|
-
props: {
|
|
11
|
-
controller: {
|
|
12
|
-
type: Object,
|
|
13
|
-
required: true
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
setup(props) {
|
|
17
|
-
const ns = useNamespace("form-mdctrl");
|
|
18
|
-
useController(props.controller);
|
|
19
|
-
const c = props.controller;
|
|
20
|
-
return {
|
|
21
|
-
ns,
|
|
22
|
-
c
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
render() {
|
|
26
|
-
let _slot;
|
|
27
|
-
if (!this.c) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const renderContent = () => {
|
|
31
|
-
return this.c.data.map((item, index) => {
|
|
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);
|
|
41
|
-
}
|
|
42
|
-
}, null);
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
return createVNode(resolveComponent("formMDCtrlContainer"), {
|
|
46
|
-
"class": this.ns.b("repeater-form"),
|
|
47
|
-
"controller": this.c.parent,
|
|
48
|
-
"onInsertButtonClick": () => {
|
|
49
|
-
this.c.onDataInsert();
|
|
50
|
-
}
|
|
51
|
-
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
52
|
-
default: () => [_slot]
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
export { FormMDCtrlRepeaterForm, FormMDCtrlRepeaterForm as default };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { FormMDCtrlRepeaterFormOneController } from '@ibiz-template/runtime';
|
|
3
|
-
export declare const FormMDCtrlRepeaterFormOne: import("vue").DefineComponent<{
|
|
4
|
-
controller: {
|
|
5
|
-
type: PropType<FormMDCtrlRepeaterFormOneController>;
|
|
6
|
-
required: true;
|
|
7
|
-
};
|
|
8
|
-
}, {
|
|
9
|
-
ns: import("@ibiz-template/core").Namespace;
|
|
10
|
-
c: FormMDCtrlRepeaterFormOneController;
|
|
11
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
-
controller: {
|
|
13
|
-
type: PropType<FormMDCtrlRepeaterFormOneController>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
}>>, {}, {}>;
|
|
17
|
-
export default FormMDCtrlRepeaterFormOne;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { isVNode, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
-
import { useNamespace, useController } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { FormMDCtrlContainer } from '../../form-mdctrl-container/form-mdctrl-container.mjs';
|
|
4
|
-
|
|
5
|
-
"use strict";
|
|
6
|
-
function _isSlot(s) {
|
|
7
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
8
|
-
}
|
|
9
|
-
const FormMDCtrlRepeaterFormOne = /* @__PURE__ */ defineComponent({
|
|
10
|
-
name: "IBizFormMDCtrlRepeaterFormOne",
|
|
11
|
-
props: {
|
|
12
|
-
controller: {
|
|
13
|
-
type: Object,
|
|
14
|
-
required: true
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
setup(props) {
|
|
18
|
-
const ns = useNamespace("form-mdctrl");
|
|
19
|
-
useController(props.controller);
|
|
20
|
-
const c = props.controller;
|
|
21
|
-
return {
|
|
22
|
-
ns,
|
|
23
|
-
c
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
|
-
render() {
|
|
27
|
-
let _slot;
|
|
28
|
-
if (!this.c) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const renderContent = () => {
|
|
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": this.c.data,
|
|
37
|
-
"index": 0,
|
|
38
|
-
"controller": this.c,
|
|
39
|
-
"buttonVisible": false,
|
|
40
|
-
"onControllerAppear": (c) => {
|
|
41
|
-
this.c.setFromController(c);
|
|
42
|
-
}
|
|
43
|
-
}, null);
|
|
44
|
-
};
|
|
45
|
-
return createVNode(FormMDCtrlContainer, {
|
|
46
|
-
"class": this.ns.b("repeater-form-one"),
|
|
47
|
-
"controller": this.c.parent,
|
|
48
|
-
"buttonVisible": false
|
|
49
|
-
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
50
|
-
default: () => [_slot]
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
export { FormMDCtrlRepeaterFormOne, FormMDCtrlRepeaterFormOne as default };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { PropType, VNode } from 'vue';
|
|
2
|
-
import { IDEFormMDCtrl } from '@ibiz/model-core';
|
|
3
|
-
import { FormMDCtrlController } from '@ibiz-template/runtime';
|
|
4
|
-
export declare const FormMDCtrl: import("vue").DefineComponent<{
|
|
5
|
-
modelData: {
|
|
6
|
-
type: PropType<IDEFormMDCtrl>;
|
|
7
|
-
required: true;
|
|
8
|
-
};
|
|
9
|
-
controller: {
|
|
10
|
-
type: typeof FormMDCtrlController;
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
}, {
|
|
14
|
-
c: FormMDCtrlController;
|
|
15
|
-
renderContentRepeater: () => VNode | undefined;
|
|
16
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
-
modelData: {
|
|
18
|
-
type: PropType<IDEFormMDCtrl>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
controller: {
|
|
22
|
-
type: typeof FormMDCtrlController;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
}>>, {}, {}>;
|
|
26
|
-
export default FormMDCtrl;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
-
import { useController } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { FormMDCtrlController } from '@ibiz-template/runtime';
|
|
4
|
-
|
|
5
|
-
"use strict";
|
|
6
|
-
const FormMDCtrl = /* @__PURE__ */ defineComponent({
|
|
7
|
-
name: "IBizFormMDCtrl",
|
|
8
|
-
props: {
|
|
9
|
-
modelData: {
|
|
10
|
-
type: Object,
|
|
11
|
-
required: true
|
|
12
|
-
},
|
|
13
|
-
controller: {
|
|
14
|
-
type: FormMDCtrlController,
|
|
15
|
-
required: true
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
setup(props) {
|
|
19
|
-
useController(props.controller);
|
|
20
|
-
const c = props.controller;
|
|
21
|
-
const renderContentRepeater = () => {
|
|
22
|
-
switch (c.model.detailStyle) {
|
|
23
|
-
case "STYLE2":
|
|
24
|
-
return createVNode(resolveComponent("iBizFormMDCtrlRepeaterGrid"), {
|
|
25
|
-
"controller": c.mdCtrlContentController
|
|
26
|
-
}, null);
|
|
27
|
-
case "STYLE3":
|
|
28
|
-
return createVNode(resolveComponent("iBizFormMDCtrlRepeaterFormOne"), {
|
|
29
|
-
"controller": c.mdCtrlContentController
|
|
30
|
-
}, null);
|
|
31
|
-
default:
|
|
32
|
-
return createVNode(resolveComponent("iBizFormMDCtrlRepeaterForm"), {
|
|
33
|
-
"controller": c.mdCtrlContentController
|
|
34
|
-
}, null);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
return {
|
|
38
|
-
c,
|
|
39
|
-
renderContentRepeater
|
|
40
|
-
};
|
|
41
|
-
},
|
|
42
|
-
render() {
|
|
43
|
-
const renderContentByType = () => {
|
|
44
|
-
let content;
|
|
45
|
-
const {
|
|
46
|
-
model
|
|
47
|
-
} = this.c;
|
|
48
|
-
switch (model == null ? void 0 : model.contentType) {
|
|
49
|
-
case "FORM":
|
|
50
|
-
content = createVNode(resolveComponent("iBizFormMDCtrlForm"), {
|
|
51
|
-
"controller": this.c.mdCtrlContentController
|
|
52
|
-
}, null);
|
|
53
|
-
break;
|
|
54
|
-
case "GRID":
|
|
55
|
-
content = createVNode(resolveComponent("iBizFormMDCtrlGrid"), {
|
|
56
|
-
"controller": this.c.mdCtrlContentController
|
|
57
|
-
}, null);
|
|
58
|
-
break;
|
|
59
|
-
case "LIST":
|
|
60
|
-
content = createVNode(resolveComponent("iBizFormMDCtrlList"), {
|
|
61
|
-
"controller": this.c.mdCtrlContentController
|
|
62
|
-
}, null);
|
|
63
|
-
break;
|
|
64
|
-
case "DATAVIEW":
|
|
65
|
-
content = createVNode(resolveComponent("iBizFormMDCtrlDataView"), {
|
|
66
|
-
"controller": this.c.mdCtrlContentController
|
|
67
|
-
}, null);
|
|
68
|
-
break;
|
|
69
|
-
case "REPEATER":
|
|
70
|
-
content = this.renderContentRepeater();
|
|
71
|
-
break;
|
|
72
|
-
default:
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
return content;
|
|
76
|
-
};
|
|
77
|
-
return renderContentByType();
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
export { FormMDCtrl, FormMDCtrl as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FormController, FormMDCtrlController, IFormDetailContainerController, IFormDetailProvider } from '@ibiz-template/runtime';
|
|
2
|
-
import { IDEFormMDCtrl } from '@ibiz/model-core';
|
|
3
|
-
/**
|
|
4
|
-
* 表单多数据部件适配器
|
|
5
|
-
*
|
|
6
|
-
* @author lxm
|
|
7
|
-
* @date 2022-09-19 22:09:03
|
|
8
|
-
* @export
|
|
9
|
-
* @class FormMDCtrlProvider
|
|
10
|
-
* @implements {EditorProvider}
|
|
11
|
-
*/
|
|
12
|
-
export declare class FormMDCtrlProvider implements IFormDetailProvider {
|
|
13
|
-
component: string;
|
|
14
|
-
createController(detailModel: IDEFormMDCtrl, form: FormController, parent: IFormDetailContainerController | undefined): Promise<FormMDCtrlController>;
|
|
15
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FormMDCtrlController } from '@ibiz-template/runtime';
|
|
2
|
-
|
|
3
|
-
"use strict";
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __publicField = (obj, key, value) => {
|
|
7
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
-
return value;
|
|
9
|
-
};
|
|
10
|
-
class FormMDCtrlProvider {
|
|
11
|
-
constructor() {
|
|
12
|
-
__publicField(this, "component", "IBizFormMDCtrl");
|
|
13
|
-
}
|
|
14
|
-
async createController(detailModel, form, parent) {
|
|
15
|
-
const c = new FormMDCtrlController(detailModel, form, parent);
|
|
16
|
-
await c.init();
|
|
17
|
-
return c;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { FormMDCtrlProvider };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export * from './form-mdctrl.provider';
|
|
2
|
-
export declare const IBizFormMDCtrl: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
3
|
-
modelData: {
|
|
4
|
-
type: import("vue").PropType<import("@ibiz/model-core").IDEFormMDCtrl>;
|
|
5
|
-
required: true;
|
|
6
|
-
};
|
|
7
|
-
controller: {
|
|
8
|
-
type: typeof import("@ibiz-template/runtime").FormMDCtrlController;
|
|
9
|
-
required: true;
|
|
10
|
-
};
|
|
11
|
-
}, {
|
|
12
|
-
c: import("@ibiz-template/runtime").FormMDCtrlController;
|
|
13
|
-
renderContentRepeater: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}> | undefined;
|
|
16
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
-
modelData: {
|
|
18
|
-
type: import("vue").PropType<import("@ibiz/model-core").IDEFormMDCtrl>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
controller: {
|
|
22
|
-
type: typeof import("@ibiz-template/runtime").FormMDCtrlController;
|
|
23
|
-
required: true;
|
|
24
|
-
};
|
|
25
|
-
}>>, {}, {}>>;
|
|
26
|
-
export default IBizFormMDCtrl;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { registerFormDetailProvider } from '@ibiz-template/runtime';
|
|
2
|
-
import { withInstall } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { FormMDCtrl } from './form-mdctrl.mjs';
|
|
4
|
-
import { FormMDCtrlProvider } from './form-mdctrl.provider.mjs';
|
|
5
|
-
|
|
6
|
-
"use strict";
|
|
7
|
-
const IBizFormMDCtrl = withInstall(FormMDCtrl, function(v) {
|
|
8
|
-
registerFormDetailProvider("MDCTRL", () => new FormMDCtrlProvider());
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export { FormMDCtrlProvider, IBizFormMDCtrl, IBizFormMDCtrl as default };
|