@ibiz-template/mob-vue3-components 0.0.1-alpha.22 → 0.0.1-alpha.24
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/edit-form/edit-form.d.ts +16 -1
- package/es/control/form/edit-form/edit-form.mjs +26 -8
- package/es/control/form/edit-form/index.d.ts +15 -0
- package/es/control/form/form/form.d.ts +1 -5
- package/es/control/form/form/form.mjs +39 -15
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.css +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.d.ts +7 -6
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.mjs +51 -58
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.css +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.d.ts +19 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.mjs +79 -0
- package/es/control/form/form-detail/form-mdctrl/{form-mdctrl-data-view/form-mdctrl-data-view.d.ts → form-mdctrl-repeater/form-mdctrl-repeater.d.ts} +5 -7
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.mjs +50 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.d.ts +19 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.mjs +59 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.css +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.d.ts +29 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.mjs +54 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.d.ts +4 -2
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.mjs +40 -54
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl.provider.mjs +21 -2
- package/es/control/form/form-detail/form-mdctrl/index.d.ts +2 -4
- package/es/control/form/form-detail/form-mdctrl/index.mjs +10 -1
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -0
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.d.ts +40 -0
- package/es/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.mjs +94 -0
- package/es/control/form/form-detail/index.mjs +0 -1
- package/es/control/form/index.mjs +0 -1
- package/es/control/index.mjs +0 -1
- package/es/editor/upload/upload-editor.controller.mjs +2 -17
- package/es/panel-component/panel-button/index.d.ts +1 -1
- package/es/panel-component/panel-button/panel-button.d.ts +1 -1
- package/es/view/login-view/login-view.mjs +1 -1
- package/lib/control/form/edit-form/edit-form.cjs +26 -8
- package/lib/control/form/form/form.cjs +38 -14
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.cjs +48 -58
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-form/form-mdctrl-form.css +1 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.cjs +81 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-md/form-mdctrl-md.css +1 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater.cjs +52 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.cjs +61 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.cjs +56 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.css +1 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.cjs +38 -52
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.css +1 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl.provider.cjs +20 -1
- package/lib/control/form/form-detail/form-mdctrl/index.cjs +9 -1
- package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.cjs +96 -0
- package/lib/control/form/form-detail/form-mdctrl/mdctrl-container/mdctrl-container.css +1 -0
- package/lib/control/form/form-detail/index.cjs +0 -2
- package/lib/control/form/index.cjs +0 -2
- package/lib/control/index.cjs +0 -2
- package/lib/editor/upload/upload-editor.controller.cjs +1 -16
- package/lib/view/login-view/login-view.cjs +1 -1
- 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.mjs +0 -68
- 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/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-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
|
@@ -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 };
|
package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.cjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
|
-
require('./form-mdctrl-container.css');
|
|
8
|
-
|
|
9
|
-
"use strict";
|
|
10
|
-
const FormMDCtrlContainer = /* @__PURE__ */ vue.defineComponent({
|
|
11
|
-
name: "FormMDCtrlContainer",
|
|
12
|
-
props: {
|
|
13
|
-
controller: {
|
|
14
|
-
type: Object,
|
|
15
|
-
required: true
|
|
16
|
-
},
|
|
17
|
-
buttonVisible: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: true,
|
|
20
|
-
required: false
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
emits: ["insertButtonClick"],
|
|
24
|
-
setup(props, {
|
|
25
|
-
emit
|
|
26
|
-
}) {
|
|
27
|
-
const ns = vue3Util.useNamespace("form-mdctrl");
|
|
28
|
-
const c = props.controller;
|
|
29
|
-
const handleRemove = () => {
|
|
30
|
-
};
|
|
31
|
-
const insertButtonClick = () => {
|
|
32
|
-
emit("insertButtonClick");
|
|
33
|
-
};
|
|
34
|
-
const hasCaption = c.model.showCaption && !!c.model.caption;
|
|
35
|
-
const ns2 = vue3Util.useNamespace("form-group");
|
|
36
|
-
return {
|
|
37
|
-
ns,
|
|
38
|
-
ns2,
|
|
39
|
-
c,
|
|
40
|
-
handleRemove,
|
|
41
|
-
insertButtonClick,
|
|
42
|
-
hasCaption
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
render() {
|
|
46
|
-
const renderFormContent = () => {
|
|
47
|
-
return this.$slots.default && this.$slots.default();
|
|
48
|
-
};
|
|
49
|
-
const renderMainContent = () => {
|
|
50
|
-
return vue.createVNode("div", {
|
|
51
|
-
"class": this.ns.b("main")
|
|
52
|
-
}, [[vue.createVNode("div", {
|
|
53
|
-
"class": [this.ns.b("title"), this.ns2.b("header")]
|
|
54
|
-
}, [vue.createVNode("span", {
|
|
55
|
-
"class": this.ns.b("caption")
|
|
56
|
-
}, [this.controller.model.showCaption && this.controller.model.caption]), this.buttonVisible && this.controller.isCreate && vue.createVNode(vue.resolveComponent("van-button"), {
|
|
57
|
-
"class": this.ns.b("add-btn"),
|
|
58
|
-
"onClick": () => this.insertButtonClick(),
|
|
59
|
-
"type": "primary"
|
|
60
|
-
}, {
|
|
61
|
-
default: () => [vue.createTextVNode("\u6DFB\u52A0")]
|
|
62
|
-
})]), renderFormContent()]]);
|
|
63
|
-
};
|
|
64
|
-
return vue.createVNode("div", {
|
|
65
|
-
"class": [this.ns.b(), this.ns.b(this.c.model.codeName), this.ns.b(this.c.model.contentType.toLowerCase()), ...this.controller.containerClass, this.ns.is("no-caption", !this.hasCaption)]
|
|
66
|
-
}, [renderMainContent()]);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
exports.FormMDCtrlContainer = FormMDCtrlContainer;
|
|
71
|
-
exports.default = FormMDCtrlContainer;
|
package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-container/form-mdctrl-container.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ibiz-form-mdctrl{min-height:var(--ibiz-form-mdctrl-min-height);--ibiz-form-mdctrl-gap:var(--ibiz-spacing-tight);--ibiz-form-mdctrl-btn-width:0;--ibiz-form-mdctrl-min-height:2rem;--ibiz-form-mdctrl-content-min-height:4.5rem}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content{display:flex;min-height:var(--ibiz-form-mdctrl-content-min-height);margin-top:var(--ibiz-spacing-tight)}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content-container{width:100%}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-form-content-control{width:calc(100% - var(--ibiz-form-mdctrl-btn-width) - var(--ibiz-form-mdctrl-gap))}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-btn{height:100%;margin-left:var(--ibiz-form-mdctrl-gap);cursor:pointer;display:flex;flex-flow:column nowrap;align-items:center;justify-content:flex-start}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-title{display:flex;align-items:center;justify-content:space-between}.ibiz-form-mdctrl .ibiz-form-mdctrl-main .ibiz-form-mdctrl-title .ibiz-form-mdctrl-caption{font-size:.875rem;font-weight:var(--ibiz-font-weight-bold)}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main{position:relative}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main>.ibiz-form-mdctrl-form-content:nth-child(2) .ibiz-form-mdctrl-btn{position:relative;top:2.5rem;height:-moz-fit-content;height:fit-content}.ibiz-form-mdctrl.is-no-caption .ibiz-form-mdctrl-main .ibiz-form-mdctrl-title{position:absolute;top:0;right:0;z-index:2}.ibiz-form-mdctrl .ibiz-form-mdctrl-add-btn{height:1.875rem}
|
package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-data-view/form-mdctrl-data-view.cjs
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
|
-
var formMdctrlContainer = require('../form-mdctrl-container/form-mdctrl-container.cjs');
|
|
8
|
-
|
|
9
|
-
"use strict";
|
|
10
|
-
function _isSlot(s) {
|
|
11
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
12
|
-
}
|
|
13
|
-
const FormMDCtrlDataView = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
-
name: "IBizFormMDCtrlDataView",
|
|
15
|
-
props: {
|
|
16
|
-
controller: {
|
|
17
|
-
type: Object,
|
|
18
|
-
required: true
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
setup(props) {
|
|
22
|
-
const ns = vue3Util.useNamespace("form-mdctrl");
|
|
23
|
-
vue3Util.useController(props.controller);
|
|
24
|
-
const c = props.controller;
|
|
25
|
-
c.state = vue.reactive(c.state);
|
|
26
|
-
return {
|
|
27
|
-
ns,
|
|
28
|
-
c
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
render() {
|
|
32
|
-
let _slot;
|
|
33
|
-
const c = this.c;
|
|
34
|
-
const renderContent = () => {
|
|
35
|
-
if (c.controlModel && c.provider) {
|
|
36
|
-
const tempContext = c.parent.form.context.clone();
|
|
37
|
-
const controlProps = {
|
|
38
|
-
modelData: c.controlModel,
|
|
39
|
-
context: tempContext,
|
|
40
|
-
params: c.parent.form.params,
|
|
41
|
-
onSelectionChange: (arg) => c.onSelectionChange(arg),
|
|
42
|
-
onCreated: (event) => c.onDataViewCreated(event),
|
|
43
|
-
class: this.ns.b("form-content-control")
|
|
44
|
-
};
|
|
45
|
-
const controlComponent = vue.h(vue.resolveComponent(c.provider.component), controlProps);
|
|
46
|
-
return vue.createVNode("div", {
|
|
47
|
-
"class": this.ns.b("form-content")
|
|
48
|
-
}, [controlComponent, vue.createVNode("div", {
|
|
49
|
-
"class": this.ns.b("btn")
|
|
50
|
-
}, [c.parent.isDelete && vue.createVNode(vue.resolveComponent("van-button"), {
|
|
51
|
-
"type": "danger",
|
|
52
|
-
"class": this.ns.b("remove-btn"),
|
|
53
|
-
"disabled": !this.c.state.isSelect,
|
|
54
|
-
"onClick": () => this.c.onDataRemove()
|
|
55
|
-
}, {
|
|
56
|
-
default: () => [vue.createTextVNode("\u5220\u9664")]
|
|
57
|
-
})])]);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
return vue.createVNode(formMdctrlContainer.FormMDCtrlContainer, {
|
|
61
|
-
"class": this.ns.b("data-view"),
|
|
62
|
-
"controller": c.parent,
|
|
63
|
-
"onInsertButtonClick": () => {
|
|
64
|
-
c.onDataInsert();
|
|
65
|
-
}
|
|
66
|
-
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
67
|
-
default: () => [_slot]
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
exports.FormMDCtrlDataView = FormMDCtrlDataView;
|
|
73
|
-
exports.default = FormMDCtrlDataView;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
|
-
var formMdctrlContainer = require('../form-mdctrl-container/form-mdctrl-container.cjs');
|
|
8
|
-
|
|
9
|
-
"use strict";
|
|
10
|
-
function _isSlot(s) {
|
|
11
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
12
|
-
}
|
|
13
|
-
const FormMDCtrlList = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
-
name: "IBizFormMDCtrlList",
|
|
15
|
-
props: {
|
|
16
|
-
controller: {
|
|
17
|
-
type: Object,
|
|
18
|
-
required: true
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
setup(props) {
|
|
22
|
-
const ns = vue3Util.useNamespace("form-mdctrl");
|
|
23
|
-
vue3Util.useController(props.controller);
|
|
24
|
-
const c = props.controller;
|
|
25
|
-
c.state = vue.reactive(c.state);
|
|
26
|
-
return {
|
|
27
|
-
ns,
|
|
28
|
-
c
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
render() {
|
|
32
|
-
let _slot;
|
|
33
|
-
const c = this.c;
|
|
34
|
-
const renderContent = () => {
|
|
35
|
-
if (c.controlModel && c.provider) {
|
|
36
|
-
const tempContext = c.parent.form.context.clone();
|
|
37
|
-
const controlProps = {
|
|
38
|
-
modelData: c.controlModel,
|
|
39
|
-
context: tempContext,
|
|
40
|
-
params: c.parent.form.params,
|
|
41
|
-
onSelectionChange: (arg) => c.onSelectionChange(arg),
|
|
42
|
-
onCreated: (event) => c.onListCreated(event),
|
|
43
|
-
class: this.ns.b("form-content-control")
|
|
44
|
-
};
|
|
45
|
-
const controlComponent = vue.h(vue.resolveComponent(c.provider.component), controlProps);
|
|
46
|
-
return vue.createVNode("div", {
|
|
47
|
-
"class": this.ns.b("form-content")
|
|
48
|
-
}, [controlComponent, vue.createVNode("div", {
|
|
49
|
-
"class": this.ns.b("btn")
|
|
50
|
-
}, [c.parent.isDelete && vue.createVNode(vue.resolveComponent("van-button"), {
|
|
51
|
-
"type": "danger",
|
|
52
|
-
"class": this.ns.b("remove-btn"),
|
|
53
|
-
"disabled": !this.c.state.isSelect,
|
|
54
|
-
"onClick": () => this.c.onDataRemove()
|
|
55
|
-
}, {
|
|
56
|
-
default: () => [vue.createTextVNode("\u5220\u9664")]
|
|
57
|
-
})])]);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
return vue.createVNode(formMdctrlContainer.FormMDCtrlContainer, {
|
|
61
|
-
"class": this.ns.b("list"),
|
|
62
|
-
"controller": c.parent,
|
|
63
|
-
"onInsertButtonClick": () => {
|
|
64
|
-
c.onDataInsert();
|
|
65
|
-
}
|
|
66
|
-
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
67
|
-
default: () => [_slot]
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
exports.FormMDCtrlList = FormMDCtrlList;
|
|
73
|
-
exports.default = FormMDCtrlList;
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var vue = require('vue');
|
|
4
|
-
var runtime = require('@ibiz-template/runtime');
|
|
5
|
-
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
-
|
|
7
|
-
"use strict";
|
|
8
|
-
function _isSlot(s) {
|
|
9
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
10
|
-
}
|
|
11
|
-
const FormMDCtrlRepeaterFormShell = /* @__PURE__ */ vue.defineComponent({
|
|
12
|
-
name: "IBizFormMDCtrlRepeaterFormShell",
|
|
13
|
-
props: {
|
|
14
|
-
modelData: {
|
|
15
|
-
type: Object,
|
|
16
|
-
required: true
|
|
17
|
-
},
|
|
18
|
-
context: {
|
|
19
|
-
type: Object,
|
|
20
|
-
required: true
|
|
21
|
-
},
|
|
22
|
-
params: {
|
|
23
|
-
type: Object,
|
|
24
|
-
default: () => ({})
|
|
25
|
-
},
|
|
26
|
-
data: {
|
|
27
|
-
type: Object,
|
|
28
|
-
required: true
|
|
29
|
-
},
|
|
30
|
-
index: {
|
|
31
|
-
type: Number,
|
|
32
|
-
required: true
|
|
33
|
-
},
|
|
34
|
-
controller: {
|
|
35
|
-
type: Object,
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
buttonVisible: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: true,
|
|
41
|
-
required: false
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
setup(props, {
|
|
45
|
-
slots
|
|
46
|
-
}) {
|
|
47
|
-
const c = vue3Util.useControlController((...args) => new runtime.FormMDCtrlItemController(...args, props.data, props.controller.parent.form));
|
|
48
|
-
const ns = vue3Util.useNamespace("form-mdctrl");
|
|
49
|
-
c.state.isLoaded = true;
|
|
50
|
-
const init = vue.ref(false);
|
|
51
|
-
c.evt.on("onCreated", () => {
|
|
52
|
-
const keys = Object.keys(c.details);
|
|
53
|
-
keys.forEach((key) => {
|
|
54
|
-
const detail = c.details[key];
|
|
55
|
-
detail.state = vue.reactive(detail.state);
|
|
56
|
-
});
|
|
57
|
-
init.value = true;
|
|
58
|
-
});
|
|
59
|
-
c.evt.on("onFormDataChange", (arg) => {
|
|
60
|
-
if (arg.data.length > 0) {
|
|
61
|
-
props.controller.onDataItemChange(arg.data[0], props.index);
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
const slotProps = {
|
|
65
|
-
form: c
|
|
66
|
-
};
|
|
67
|
-
const renderByDetailType = (detail, item, index) => {
|
|
68
|
-
let _slot;
|
|
69
|
-
if (detail.hidden) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const detailId = detail.id;
|
|
73
|
-
const controller = c.details[detailId];
|
|
74
|
-
const detailProps = {
|
|
75
|
-
modelData: detail,
|
|
76
|
-
controller,
|
|
77
|
-
key: detail.id
|
|
78
|
-
};
|
|
79
|
-
if (slots[detailId]) {
|
|
80
|
-
return vue.renderSlot(slots, detailId, {
|
|
81
|
-
...slotProps,
|
|
82
|
-
...detailProps
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
const childSlots = {};
|
|
86
|
-
if (detail.detailType === "FORMITEM" && slots[`${detailId}_editor`]) {
|
|
87
|
-
childSlots.default = (...args) => {
|
|
88
|
-
return slots[`${detailId}_editor`](...args);
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
const childDetails = runtime.findChildFormDetails(detail);
|
|
92
|
-
if (childDetails.length) {
|
|
93
|
-
childSlots.default = () => childDetails.map((child) => {
|
|
94
|
-
return renderByDetailType(child, item, index);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
const provider = (controller == null ? void 0 : controller.form).providers[detailId];
|
|
98
|
-
if (!provider) {
|
|
99
|
-
return vue.createVNode("div", null, [vue.createTextVNode("\u6682\u672A\u652F\u6301\u7684\u8868\u5355\u9879\u7C7B\u578B: "), detail.detailType, vue.createTextVNode("\u6216\u627E\u4E0D\u5230\u5BF9\u5E94\u9002\u914D\u5668")]);
|
|
100
|
-
}
|
|
101
|
-
const component = vue.resolveComponent(provider.component);
|
|
102
|
-
return vue.createVNode(vue.resolveComponent("iBizCol"), {
|
|
103
|
-
"layoutPos": detailProps.modelData.layoutPos,
|
|
104
|
-
"state": detailProps.controller.state
|
|
105
|
-
}, _isSlot(_slot = vue.h(component, {
|
|
106
|
-
...detailProps
|
|
107
|
-
}, childSlots)) ? _slot : {
|
|
108
|
-
default: () => [_slot]
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
return {
|
|
112
|
-
c,
|
|
113
|
-
ns,
|
|
114
|
-
renderByDetailType,
|
|
115
|
-
init
|
|
116
|
-
};
|
|
117
|
-
},
|
|
118
|
-
render() {
|
|
119
|
-
if (!this.init) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
const renderDetails = (item, index) => {
|
|
123
|
-
var _a;
|
|
124
|
-
if (!this.c.data) {
|
|
125
|
-
return null;
|
|
126
|
-
}
|
|
127
|
-
return (_a = this.controller.model.deformDetails) == null ? void 0 : _a.map((detail) => {
|
|
128
|
-
return this.renderByDetailType(detail, item, index);
|
|
129
|
-
});
|
|
130
|
-
};
|
|
131
|
-
return vue.createVNode(vue.resolveComponent("van-swipe-cell"), {
|
|
132
|
-
"class": `${this.ns.b("form-content")} ${this.ns.b("repeater-form-shell")}`
|
|
133
|
-
}, {
|
|
134
|
-
default: () => {
|
|
135
|
-
let _slot2;
|
|
136
|
-
return vue.createVNode("div", {
|
|
137
|
-
"class": this.ns.b("form-content-container")
|
|
138
|
-
}, [vue.createVNode(vue.resolveComponent("iBizRow"), {
|
|
139
|
-
"layout": this.c.model.layout
|
|
140
|
-
}, _isSlot(_slot2 = renderDetails(this.data, this.index)) ? _slot2 : {
|
|
141
|
-
default: () => [_slot2]
|
|
142
|
-
})]);
|
|
143
|
-
},
|
|
144
|
-
right: () => {
|
|
145
|
-
return this.buttonVisible && this.controller.parent.isDelete && vue.createVNode(vue.resolveComponent("van-button"), {
|
|
146
|
-
"class": this.ns.b("btn"),
|
|
147
|
-
"type": "danger",
|
|
148
|
-
"onClick": () => {
|
|
149
|
-
this.controller.onDataRemove(this.index);
|
|
150
|
-
}
|
|
151
|
-
}, {
|
|
152
|
-
default: () => [vue.createTextVNode("\u5220\u9664")]
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
exports.FormMDCtrlRepeaterFormShell = FormMDCtrlRepeaterFormShell;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
|
-
|
|
8
|
-
"use strict";
|
|
9
|
-
function _isSlot(s) {
|
|
10
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
11
|
-
}
|
|
12
|
-
const FormMDCtrlRepeaterForm = /* @__PURE__ */ vue.defineComponent({
|
|
13
|
-
name: "IBizFormMDCtrlRepeaterForm",
|
|
14
|
-
props: {
|
|
15
|
-
controller: {
|
|
16
|
-
type: Object,
|
|
17
|
-
required: true
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(props) {
|
|
21
|
-
const ns = vue3Util.useNamespace("form-mdctrl");
|
|
22
|
-
vue3Util.useController(props.controller);
|
|
23
|
-
const c = props.controller;
|
|
24
|
-
return {
|
|
25
|
-
ns,
|
|
26
|
-
c
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
render() {
|
|
30
|
-
let _slot;
|
|
31
|
-
if (!this.c) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const renderContent = () => {
|
|
35
|
-
return this.c.data.map((item, index) => {
|
|
36
|
-
return vue.createVNode(vue.resolveComponent("iBizFormMDCtrlRepeaterFormShell"), {
|
|
37
|
-
"modelData": this.c.model,
|
|
38
|
-
"context": this.c.parent.form.context,
|
|
39
|
-
"params": this.c.parent.form.params,
|
|
40
|
-
"data": item,
|
|
41
|
-
"index": index,
|
|
42
|
-
"controller": this.c,
|
|
43
|
-
"onControllerAppear": (c) => {
|
|
44
|
-
this.c.setFromController(c);
|
|
45
|
-
}
|
|
46
|
-
}, null);
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
return vue.createVNode(vue.resolveComponent("formMDCtrlContainer"), {
|
|
50
|
-
"class": this.ns.b("repeater-form"),
|
|
51
|
-
"controller": this.c.parent,
|
|
52
|
-
"onInsertButtonClick": () => {
|
|
53
|
-
this.c.onDataInsert();
|
|
54
|
-
}
|
|
55
|
-
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
56
|
-
default: () => [_slot]
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
exports.FormMDCtrlRepeaterForm = FormMDCtrlRepeaterForm;
|
|
62
|
-
exports.default = FormMDCtrlRepeaterForm;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var vue = require('vue');
|
|
6
|
-
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
|
-
var formMdctrlContainer = require('../../form-mdctrl-container/form-mdctrl-container.cjs');
|
|
8
|
-
|
|
9
|
-
"use strict";
|
|
10
|
-
function _isSlot(s) {
|
|
11
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !vue.isVNode(s);
|
|
12
|
-
}
|
|
13
|
-
const FormMDCtrlRepeaterFormOne = /* @__PURE__ */ vue.defineComponent({
|
|
14
|
-
name: "IBizFormMDCtrlRepeaterFormOne",
|
|
15
|
-
props: {
|
|
16
|
-
controller: {
|
|
17
|
-
type: Object,
|
|
18
|
-
required: true
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
setup(props) {
|
|
22
|
-
const ns = vue3Util.useNamespace("form-mdctrl");
|
|
23
|
-
vue3Util.useController(props.controller);
|
|
24
|
-
const c = props.controller;
|
|
25
|
-
return {
|
|
26
|
-
ns,
|
|
27
|
-
c
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
render() {
|
|
31
|
-
let _slot;
|
|
32
|
-
if (!this.c) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const renderContent = () => {
|
|
36
|
-
return vue.createVNode(vue.resolveComponent("iBizFormMDCtrlRepeaterFormShell"), {
|
|
37
|
-
"modelData": this.c.model,
|
|
38
|
-
"context": this.c.parent.form.context,
|
|
39
|
-
"params": this.c.parent.form.params,
|
|
40
|
-
"data": this.c.data,
|
|
41
|
-
"index": 0,
|
|
42
|
-
"controller": this.c,
|
|
43
|
-
"buttonVisible": false,
|
|
44
|
-
"onControllerAppear": (c) => {
|
|
45
|
-
this.c.setFromController(c);
|
|
46
|
-
}
|
|
47
|
-
}, null);
|
|
48
|
-
};
|
|
49
|
-
return vue.createVNode(formMdctrlContainer.FormMDCtrlContainer, {
|
|
50
|
-
"class": this.ns.b("repeater-form-one"),
|
|
51
|
-
"controller": this.c.parent,
|
|
52
|
-
"buttonVisible": false
|
|
53
|
-
}, _isSlot(_slot = renderContent()) ? _slot : {
|
|
54
|
-
default: () => [_slot]
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
exports.FormMDCtrlRepeaterFormOne = FormMDCtrlRepeaterFormOne;
|
|
60
|
-
exports.default = FormMDCtrlRepeaterFormOne;
|