@ibiz-template/vue3-components 0.7.22 → 0.7.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-1aXzEF4M.js +4 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-0QZbYSph.js → xlsx-util-ptclljJM.js} +1 -1
- package/es/control/drbar/drbar.controller.mjs +2 -2
- package/es/control/drtab/drtab.controller.mjs +2 -2
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.d.ts +2 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.mjs +7 -2
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.d.ts +3 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.mjs +5 -4
- package/es/control/gantt/gantt.mjs +4 -1
- package/es/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.mjs +5 -0
- package/es/editor/data-picker/ibiz-mpicker/ibiz-mpicker.mjs +5 -0
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +5 -0
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +6 -1
- package/es/editor/data-picker/picker-editor.controller.mjs +1 -1
- package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.mjs +6 -1
- package/es/editor/html/wang-editor/wang-editor.css +1 -1
- package/es/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.mjs +7 -0
- package/es/editor/raw/ibiz-raw/ibiz-raw.mjs +2 -2
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.d.ts +1 -0
- package/es/editor/text-box/ibiz-input-ip/ibiz-input-ip.mjs +10 -1
- package/es/locale/en/index.d.ts +3 -0
- package/es/locale/zh-CN/index.d.ts +3 -0
- package/es/view-engine/edit-view.engine.mjs +2 -2
- package/es/view-engine/mpickup-view-engine.mjs +0 -4
- package/es/view-engine/opt-view.engine.mjs +2 -2
- package/lib/control/drbar/drbar.controller.cjs +2 -2
- package/lib/control/drtab/drtab.controller.cjs +2 -2
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-multi-form/repeater-multi-form.cjs +7 -2
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-single-form/repeater-single-form.cjs +5 -4
- package/lib/control/gantt/gantt.cjs +4 -1
- package/lib/editor/autocomplete/ibiz-autocomplete/ibiz-autocomplete.cjs +5 -0
- package/lib/editor/data-picker/ibiz-mpicker/ibiz-mpicker.cjs +5 -0
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +5 -0
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +6 -1
- package/lib/editor/data-picker/picker-editor.controller.cjs +1 -1
- package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.cjs +5 -0
- package/lib/editor/html/wang-editor/wang-editor.css +1 -1
- package/lib/editor/number-range/ibiz-number-range-picker/ibiz-number-range-picker.cjs +7 -0
- package/lib/editor/raw/ibiz-raw/ibiz-raw.cjs +2 -2
- package/lib/editor/text-box/ibiz-input-ip/ibiz-input-ip.cjs +9 -0
- package/lib/view-engine/edit-view.engine.cjs +2 -2
- package/lib/view-engine/mpickup-view-engine.cjs +0 -4
- package/lib/view-engine/opt-view.engine.cjs +2 -2
- package/package.json +7 -7
- package/dist/index-j68-5YVA.js +0 -4
|
@@ -249,8 +249,8 @@ class DRBarController extends ControlController {
|
|
|
249
249
|
this.form.evt.on("onLoadSuccess", async (event) => {
|
|
250
250
|
const data = event.data[0];
|
|
251
251
|
this.view.state.srfactiveviewdata = data;
|
|
252
|
-
if (data
|
|
253
|
-
this.view.context.srfreadonly =
|
|
252
|
+
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
253
|
+
this.view.context.srfreadonly = data.srfreadonly;
|
|
254
254
|
}
|
|
255
255
|
await this.calcDrBarItemsState();
|
|
256
256
|
this.handleFormChange();
|
|
@@ -198,8 +198,8 @@ class DRTabController extends ControlController {
|
|
|
198
198
|
this.form.evt.on("onLoadSuccess", async (event) => {
|
|
199
199
|
const data = event.data[0];
|
|
200
200
|
this.view.state.srfactiveviewdata = data;
|
|
201
|
-
if (data
|
|
202
|
-
this.view.context.srfreadonly =
|
|
201
|
+
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
202
|
+
this.view.context.srfreadonly = data.srfreadonly;
|
|
203
203
|
}
|
|
204
204
|
await this.calcDrTabPagesState();
|
|
205
205
|
this.handleFormChange();
|
package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.mjs
CHANGED
|
@@ -44,7 +44,7 @@ const RepeaterGrid = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
await formC.created();
|
|
45
45
|
formC.setSimpleData(data);
|
|
46
46
|
formControllers.push(formC);
|
|
47
|
-
props.controller.setRepeaterController(
|
|
47
|
+
props.controller.setRepeaterController("".concat(formControllers.length - 1), formC);
|
|
48
48
|
formC.evt.on("onFormDataChange", (event) => {
|
|
49
49
|
const formData = {
|
|
50
50
|
...event.data[0]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormMDCtrlRepeaterController } from '@ibiz-template/runtime';
|
|
1
|
+
import { EventBase, FormMDCtrlRepeaterController } from '@ibiz-template/runtime';
|
|
2
2
|
export declare const RepeaterMultiForm: import("vue").DefineComponent<{
|
|
3
3
|
controller: {
|
|
4
4
|
type: typeof FormMDCtrlRepeaterController;
|
|
@@ -7,6 +7,7 @@ export declare const RepeaterMultiForm: import("vue").DefineComponent<{
|
|
|
7
7
|
}, {
|
|
8
8
|
ns: import("@ibiz-template/core").Namespace;
|
|
9
9
|
onValueChange: (value: IData, index: number) => void;
|
|
10
|
+
onCreated: (index: number, event: EventBase) => void;
|
|
10
11
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
12
|
change: (_value: IData[]) => true;
|
|
12
13
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -24,9 +24,13 @@ const RepeaterMultiForm = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
arrData[index] = value;
|
|
25
25
|
emit("change", arrData);
|
|
26
26
|
};
|
|
27
|
+
const onCreated = (index, event) => {
|
|
28
|
+
props.controller.setRepeaterController("".concat(index), event.ctrl);
|
|
29
|
+
};
|
|
27
30
|
return {
|
|
28
31
|
ns,
|
|
29
|
-
onValueChange
|
|
32
|
+
onValueChange,
|
|
33
|
+
onCreated
|
|
30
34
|
};
|
|
31
35
|
},
|
|
32
36
|
render() {
|
|
@@ -49,7 +53,8 @@ const RepeaterMultiForm = /* @__PURE__ */ defineComponent({
|
|
|
49
53
|
"controller": this.controller,
|
|
50
54
|
"onChange": (value) => {
|
|
51
55
|
this.onValueChange(value, index);
|
|
52
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"onCreated": (event) => this.onCreated(index, event)
|
|
53
58
|
}, null);
|
|
54
59
|
}
|
|
55
60
|
});
|
|
@@ -13,9 +13,10 @@ export declare const RepeaterSingleForm: import("vue").DefineComponent<{
|
|
|
13
13
|
}, {
|
|
14
14
|
ns: import("@ibiz-template/core").Namespace;
|
|
15
15
|
onFormDataChange: (event: EventBase) => void;
|
|
16
|
-
onCreated: (
|
|
16
|
+
onCreated: (event: EventBase) => void;
|
|
17
17
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
18
|
change: (_value: IData) => true;
|
|
19
|
+
created: (_value: EventBase) => true;
|
|
19
20
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
21
|
data: {
|
|
21
22
|
type: PropType<IData>;
|
|
@@ -27,4 +28,5 @@ export declare const RepeaterSingleForm: import("vue").DefineComponent<{
|
|
|
27
28
|
};
|
|
28
29
|
}>> & {
|
|
29
30
|
onChange?: ((_value: IData) => any) | undefined;
|
|
31
|
+
onCreated?: ((_value: EventBase) => any) | undefined;
|
|
30
32
|
}, {}, {}>;
|
|
@@ -18,7 +18,8 @@ const RepeaterSingleForm = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
emits: {
|
|
21
|
-
change: (_value) => true
|
|
21
|
+
change: (_value) => true,
|
|
22
|
+
created: (_value) => true
|
|
22
23
|
},
|
|
23
24
|
setup(props, {
|
|
24
25
|
emit
|
|
@@ -37,8 +38,8 @@ const RepeaterSingleForm = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
const data = getFilteredData(event.data[0]);
|
|
38
39
|
emit("change", data);
|
|
39
40
|
};
|
|
40
|
-
const onCreated = (
|
|
41
|
-
|
|
41
|
+
const onCreated = (event) => {
|
|
42
|
+
emit("created", event);
|
|
42
43
|
};
|
|
43
44
|
return {
|
|
44
45
|
ns,
|
|
@@ -58,7 +59,7 @@ const RepeaterSingleForm = /* @__PURE__ */ defineComponent({
|
|
|
58
59
|
"isSimple": true,
|
|
59
60
|
"data": this.data,
|
|
60
61
|
"onFormDataChange": this.onFormDataChange,
|
|
61
|
-
"onCreated":
|
|
62
|
+
"onCreated": this.onCreated
|
|
62
63
|
}, null);
|
|
63
64
|
}
|
|
64
65
|
});
|
|
@@ -43,6 +43,7 @@ const GanttControl = /* @__PURE__ */ defineComponent({
|
|
|
43
43
|
const ganttRef = ref();
|
|
44
44
|
const isInited = ref(false);
|
|
45
45
|
const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
46
|
+
const sliderMove = ref(false);
|
|
46
47
|
const iBizRawItem = resolveComponent("IBizRawItem");
|
|
47
48
|
const iBizIcon = resolveComponent("IBizIcon");
|
|
48
49
|
let forbidClick = false;
|
|
@@ -132,7 +133,8 @@ const GanttControl = /* @__PURE__ */ defineComponent({
|
|
|
132
133
|
c.setSelection(selection);
|
|
133
134
|
};
|
|
134
135
|
const onNodeClick = (nodeData, evt) => {
|
|
135
|
-
if (forbidClick) {
|
|
136
|
+
if (forbidClick || sliderMove.value) {
|
|
137
|
+
sliderMove.value = false;
|
|
136
138
|
return;
|
|
137
139
|
}
|
|
138
140
|
c.onTreeNodeClick(nodeData, evt);
|
|
@@ -181,6 +183,7 @@ const GanttControl = /* @__PURE__ */ defineComponent({
|
|
|
181
183
|
begin: nodeData._beginDataItemValue ? dayjs(nodeData._beginDataItemValue).format("YYYY-MM-DD HH:mm:ss") : void 0,
|
|
182
184
|
end: nodeData._endDataItemValue ? dayjs(nodeData._endDataItemValue).format("YYYY-MM-DD HH:mm:ss") : void 0
|
|
183
185
|
};
|
|
186
|
+
sliderMove.value = true;
|
|
184
187
|
c.modifyNodeTime(nodeData, newValue);
|
|
185
188
|
};
|
|
186
189
|
const calcContextMenuItems = (toolbarItems, nodeData, evt, menuState) => {
|
|
@@ -74,6 +74,11 @@ const IBizAutoComplete = /* @__PURE__ */ defineComponent({
|
|
|
74
74
|
}, {
|
|
75
75
|
immediate: true
|
|
76
76
|
});
|
|
77
|
+
watch(editorRef, (newVal) => {
|
|
78
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
79
|
+
newVal.focus();
|
|
80
|
+
}
|
|
81
|
+
});
|
|
77
82
|
const handleDataSelect = async (data) => {
|
|
78
83
|
const dataItems = await c.calcFillDataItems(data);
|
|
79
84
|
if (dataItems.length) {
|
|
@@ -79,6 +79,11 @@ const IBizMPicker = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
immediate: true,
|
|
80
80
|
deep: true
|
|
81
81
|
});
|
|
82
|
+
watch(editorRef, (newVal) => {
|
|
83
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
84
|
+
newVal.focus();
|
|
85
|
+
}
|
|
86
|
+
});
|
|
82
87
|
const setEditable = (flag) => {
|
|
83
88
|
if (flag) {
|
|
84
89
|
isEditable.value = flag;
|
|
@@ -58,6 +58,11 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
58
58
|
}, {
|
|
59
59
|
immediate: true
|
|
60
60
|
});
|
|
61
|
+
watch(editorRef, (newVal) => {
|
|
62
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
63
|
+
newVal.focus();
|
|
64
|
+
}
|
|
65
|
+
});
|
|
61
66
|
const onSearch = async (query) => {
|
|
62
67
|
if (!shouldLoad.value) {
|
|
63
68
|
return;
|
|
@@ -90,7 +90,7 @@ const IBizPickerSelectView = /* @__PURE__ */ defineComponent({
|
|
|
90
90
|
srfkey: props.data[c.valueItem],
|
|
91
91
|
srfmajortext: props.value
|
|
92
92
|
}];
|
|
93
|
-
params.value.
|
|
93
|
+
params.value.selecteddata = selectedData.value;
|
|
94
94
|
}
|
|
95
95
|
} else {
|
|
96
96
|
const selectItems = [];
|
|
@@ -146,6 +146,11 @@ const IBizPickerSelectView = /* @__PURE__ */ defineComponent({
|
|
|
146
146
|
immediate: true,
|
|
147
147
|
deep: true
|
|
148
148
|
});
|
|
149
|
+
watch(editorRef, (newVal) => {
|
|
150
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
151
|
+
newVal.focus();
|
|
152
|
+
}
|
|
153
|
+
});
|
|
149
154
|
onMounted(() => {
|
|
150
155
|
if (editorRef.value) {
|
|
151
156
|
pickViewWidth.value = "".concat(editorRef.value.$parent.$el.offsetWidth, "px");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, computed, resolveComponent, mergeProps, createVNode, defineComponent } from 'vue';
|
|
1
|
+
import { ref, computed, watch, resolveComponent, mergeProps, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { getDateRangeProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { clone } from 'ramda';
|
|
4
4
|
import './ibiz-date-range-picker.css';
|
|
@@ -102,6 +102,11 @@ const IBizDateRangePicker = /* @__PURE__ */ defineComponent({
|
|
|
102
102
|
setEditable(false);
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
|
+
watch(editorRef, (newVal) => {
|
|
106
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
107
|
+
newVal.focus();
|
|
108
|
+
}
|
|
109
|
+
});
|
|
105
110
|
const onFocus = (e) => {
|
|
106
111
|
emit("focus", e);
|
|
107
112
|
setEditable(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-html{--ibiz-html-height:300px;display:inline-block;width:100%;height:100%;--w-e-textarea-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-color:var(--ibiz-color-text-2);--w-e-textarea-border-color:var(--ibiz-color-border);--w-e-textarea-slight-border-color:var(--ibiz-color-border);--w-e-textarea-slight-color:var(--ibiz-color-text-
|
|
1
|
+
.ibiz-html{--ibiz-html-height:300px;display:inline-block;width:100%;height:100%;--w-e-textarea-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-color:var(--ibiz-color-text-2);--w-e-textarea-border-color:var(--ibiz-color-border);--w-e-textarea-slight-border-color:var(--ibiz-color-border);--w-e-textarea-slight-color:var(--ibiz-color-text-3);--w-e-textarea-slight-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-selected-border-color:var(--ibiz-color-border);--w-e-textarea-handler-bg-color:var(--ibiz-color-primary);--w-e-toolbar-color:var(--ibiz-color-text-0);--w-e-toolbar-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-active-color:var(--ibiz-color-text-0);--w-e-toolbar-active-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-disabled-color:var(--ibiz-color-disabled-text);--w-e-toolbar-border-color:var(--ibiz-color-border);--w-e-modal-button-bg-color:var(--ibiz-color-bg-1);--w-e-modal-button-border-color:var(--ibiz-color-border)}.ibiz-html .ibiz-html-content{display:flex;flex-direction:column;height:100%;background-color:var(--ibiz-color-bg-0)}.ibiz-html .ibiz-html-editor{height:var(--ibiz-html-height)!important;padding:0;overflow-y:scroll;border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor.is-readonly{height:auto!important}.ibiz-html .ibiz-html-editor table{width:100%!important;border-collapse:collapse}.ibiz-html .ibiz-html-editor table th{height:var(--ibiz-height-control-large);min-height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight);border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor table td{height:var(--ibiz-height-control-large);min-height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight);empty-cells:show;border:1px solid var(--ibiz-color-border)}.ibiz-html .w-e-menu-tooltip-v5::before{color:var(--ibiz-color-text-0);background-color:var(--w-e-toolbar-bg-color)}.ibiz-html .w-e-full-screen-container{z-index:9999}.ibiz-html .w-e-scroll>div{background-color:var(--ibiz-color-bg-1)}.ibiz-html .table-container table{width:100%}.ibiz-html-editor-readonly .ibiz-html-toolbar{display:none}.ibiz-html-editor-readonly .ibiz-html-editor{border:none}.ibiz-html-footer{display:flex;align-items:center;justify-content:end;margin-top:var(--ibiz-spacing-base-tight);margin-right:var(--ibiz-spacing-tight)}.ibiz-html-footer>*+*{margin-left:var(--ibiz-spacing-base)}.ibiz-html-footer__cancel{height:var(--ibiz-height-control-default);line-height:var(--ibiz-height-control-default);color:var(--ibiz-color-text-1);cursor:pointer;opacity:.7}.ibiz-html-footer__cancel:hover{color:var(--ibiz-color-primary);opacity:1}.ibiz-html-footer__save{height:var(--ibiz-height-control-default);padding:0 var(--ibiz-spacing-base);line-height:var(--ibiz-height-control-default);color:var(--ibiz-color-primary-active-text);text-align:center;cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:var(--ibiz-border-radius-small)}.ibiz-html-custom-toolbar{display:flex;align-items:center;justify-content:end;width:100%;height:var(--ibiz-height-control-default);padding-right:var(--ibiz-spacing-base);font-size:var(--ibiz-font-size-header-6)}.ibiz-html-custom-toolbar>*+*{margin-left:var(--ibiz-spacing-base-loose)}.ibiz-html-custom-toolbar i{cursor:pointer}.ibiz-html-custom-toolbar i:hover{color:var(--ibiz-color-primary)}.ibiz-html-message{width:500px;max-width:unset}.ibiz-html-message__message-content--message-tip{color:var(--ibiz-color-text-3)}.ibiz-html-message__message-cancel{color:var(--ibiz-color-text-1);background-color:transparent}.ibiz-html-message__message-cancel:hover{color:var(--ibiz-color-primary);background-color:transparent}.ibiz-html-message__message-comfire{background-color:var(--ibiz-color-danger)!important}.ibiz-html-message__message-comfire:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-danger)}.ibiz-html-dialog-full-screen{height:80%}.ibiz-html-dialog-full-screen .ibiz-html{padding:0 var(--ibiz-spacing-extra-loose);--w-e-toolbar-bg-color:var(--ibiz-color-bg-0)}.ibiz-html-dialog-full-screen .ibiz-html-custom-toolbar{height:56px}.ibiz-html-dialog-full-screen .ibiz-html-content{height:calc(100% - 124px)}.ibiz-html-dialog-full-screen .ibiz-html-content .ibiz-html-editor{height:100%!important}.ibiz-html-footer-dialog{height:68px;margin-top:0}
|
|
@@ -62,6 +62,12 @@ const IBizNumberRangePicker = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
}, {
|
|
63
63
|
immediate: true
|
|
64
64
|
});
|
|
65
|
+
watch(editorRef, (newVal) => {
|
|
66
|
+
if (props.autoFocus && newVal) {
|
|
67
|
+
const input = newVal.$el.getElementsByTagName("input")[0];
|
|
68
|
+
input.focus();
|
|
69
|
+
}
|
|
70
|
+
});
|
|
65
71
|
const setEditable = (flag) => {
|
|
66
72
|
if (flag) {
|
|
67
73
|
isEditable.value = flag;
|
|
@@ -137,6 +143,7 @@ const IBizNumberRangePicker = /* @__PURE__ */ defineComponent({
|
|
|
137
143
|
const editContent = createVNode("div", {
|
|
138
144
|
"class": this.ns.b("input")
|
|
139
145
|
}, [createVNode(resolveComponent("el-input-number"), mergeProps({
|
|
146
|
+
"ref": "editorRef",
|
|
140
147
|
"min": this.min,
|
|
141
148
|
"modelValue": this.minValue,
|
|
142
149
|
"disabled": this.disabled,
|
|
@@ -39,7 +39,7 @@ const IBizRaw = /* @__PURE__ */ defineComponent({
|
|
|
39
39
|
content.value = newVal;
|
|
40
40
|
}
|
|
41
41
|
if (template && newVal) {
|
|
42
|
-
let obj =
|
|
42
|
+
let obj = newVal;
|
|
43
43
|
if (typeof newVal === "string") {
|
|
44
44
|
try {
|
|
45
45
|
obj = JSON.parse(newVal);
|
|
@@ -54,7 +54,7 @@ const IBizRaw = /* @__PURE__ */ defineComponent({
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
-
content.value = await ibiz.util.hbs.render(template, obj
|
|
57
|
+
content.value = await ibiz.util.hbs.render(template, obj);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ref, computed, watch, resolveComponent, createVNode, createTextVNode, defineComponent } from 'vue';
|
|
2
2
|
import { getInputIpProps, getEditorEmits, useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import './ibiz-input-ip.css';
|
|
4
4
|
|
|
@@ -12,6 +12,7 @@ const IBizInputIP = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
}) {
|
|
13
13
|
const ns = useNamespace("input-ip");
|
|
14
14
|
const c = props.controller;
|
|
15
|
+
const editorRef = ref();
|
|
15
16
|
const showFormDefaultContent = computed(() => {
|
|
16
17
|
if (props.controlParams && props.controlParams.editmode === "hover" && !props.readonly) {
|
|
17
18
|
return true;
|
|
@@ -62,6 +63,12 @@ const IBizInputIP = /* @__PURE__ */ defineComponent({
|
|
|
62
63
|
watch(forIp, (newVal, oldVal) => {
|
|
63
64
|
checkIpVal(newVal, oldVal, forIp, 3);
|
|
64
65
|
});
|
|
66
|
+
watch(editorRef, (newVal) => {
|
|
67
|
+
if (props.autoFocus && newVal) {
|
|
68
|
+
const input = newVal.$el.getElementsByTagName("input")[0];
|
|
69
|
+
input.focus();
|
|
70
|
+
}
|
|
71
|
+
});
|
|
65
72
|
const getFocus = () => {
|
|
66
73
|
activeElement.value = true;
|
|
67
74
|
if (isAllBlur.value) {
|
|
@@ -86,6 +93,7 @@ const IBizInputIP = /* @__PURE__ */ defineComponent({
|
|
|
86
93
|
return {
|
|
87
94
|
ns,
|
|
88
95
|
c,
|
|
96
|
+
editorRef,
|
|
89
97
|
currentVal,
|
|
90
98
|
getFocus,
|
|
91
99
|
blur,
|
|
@@ -101,6 +109,7 @@ const IBizInputIP = /* @__PURE__ */ defineComponent({
|
|
|
101
109
|
return createVNode("div", {
|
|
102
110
|
"class": [this.ns.b(), this.disabled ? this.ns.m("disabled") : "", this.readonly ? this.ns.m("readonly") : "", this.ns.is("show-default", this.showFormDefaultContent)]
|
|
103
111
|
}, [createVNode(resolveComponent("el-input"), {
|
|
112
|
+
"ref": "editorRef",
|
|
104
113
|
"type": "text",
|
|
105
114
|
"size": "small",
|
|
106
115
|
"disabled": this.disabled,
|
package/es/locale/en/index.d.ts
CHANGED
|
@@ -101,8 +101,8 @@ class EditViewEngine extends ViewEngineBase {
|
|
|
101
101
|
formDataStateChange(event);
|
|
102
102
|
const data = event.data[0];
|
|
103
103
|
this.view.state.srfactiveviewdata = data;
|
|
104
|
-
if (data
|
|
105
|
-
this.view.context.srfreadonly =
|
|
104
|
+
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
105
|
+
this.view.context.srfreadonly = data.srfreadonly;
|
|
106
106
|
}
|
|
107
107
|
evt.emit("onDataChange", { ...event, actionType: "LOAD" });
|
|
108
108
|
});
|
|
@@ -37,10 +37,6 @@ class MPickupViewEngine extends PickupViewEngine {
|
|
|
37
37
|
this.selectData = JSON.parse(this.view.params.selecteddata);
|
|
38
38
|
delete this.view.params.selecteddata;
|
|
39
39
|
}
|
|
40
|
-
if (this.view.params.selectedData) {
|
|
41
|
-
this.selectData = JSON.parse(this.view.params.selectedData);
|
|
42
|
-
delete this.view.params.selectedData;
|
|
43
|
-
}
|
|
44
40
|
if (!this.view.slotProps.simplelist) {
|
|
45
41
|
this.view.slotProps.simplelist = {};
|
|
46
42
|
}
|
|
@@ -66,8 +66,8 @@ class OptViewEngine extends ViewEngineBase {
|
|
|
66
66
|
this.form.evt.on("onLoadSuccess", (event) => {
|
|
67
67
|
const data = event.data[0];
|
|
68
68
|
this.view.state.srfactiveviewdata = data;
|
|
69
|
-
if (data
|
|
70
|
-
this.view.context.srfreadonly =
|
|
69
|
+
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
70
|
+
this.view.context.srfreadonly = data.srfreadonly;
|
|
71
71
|
}
|
|
72
72
|
formDataStateChange(event);
|
|
73
73
|
});
|
|
@@ -251,8 +251,8 @@ class DRBarController extends runtime.ControlController {
|
|
|
251
251
|
this.form.evt.on("onLoadSuccess", async (event) => {
|
|
252
252
|
const data = event.data[0];
|
|
253
253
|
this.view.state.srfactiveviewdata = data;
|
|
254
|
-
if (data
|
|
255
|
-
this.view.context.srfreadonly =
|
|
254
|
+
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
255
|
+
this.view.context.srfreadonly = data.srfreadonly;
|
|
256
256
|
}
|
|
257
257
|
await this.calcDrBarItemsState();
|
|
258
258
|
this.handleFormChange();
|
|
@@ -200,8 +200,8 @@ class DRTabController extends runtime.ControlController {
|
|
|
200
200
|
this.form.evt.on("onLoadSuccess", async (event) => {
|
|
201
201
|
const data = event.data[0];
|
|
202
202
|
this.view.state.srfactiveviewdata = data;
|
|
203
|
-
if (data
|
|
204
|
-
this.view.context.srfreadonly =
|
|
203
|
+
if (Object.prototype.hasOwnProperty.call(data, "srfreadonly")) {
|
|
204
|
+
this.view.context.srfreadonly = data.srfreadonly;
|
|
205
205
|
}
|
|
206
206
|
await this.calcDrTabPagesState();
|
|
207
207
|
this.handleFormChange();
|
|
@@ -46,7 +46,7 @@ const RepeaterGrid = /* @__PURE__ */ vue.defineComponent({
|
|
|
46
46
|
await formC.created();
|
|
47
47
|
formC.setSimpleData(data);
|
|
48
48
|
formControllers.push(formC);
|
|
49
|
-
props.controller.setRepeaterController(
|
|
49
|
+
props.controller.setRepeaterController("".concat(formControllers.length - 1), formC);
|
|
50
50
|
formC.evt.on("onFormDataChange", (event) => {
|
|
51
51
|
const formData = {
|
|
52
52
|
...event.data[0]
|
|
@@ -26,9 +26,13 @@ const RepeaterMultiForm = /* @__PURE__ */ vue.defineComponent({
|
|
|
26
26
|
arrData[index] = value;
|
|
27
27
|
emit("change", arrData);
|
|
28
28
|
};
|
|
29
|
+
const onCreated = (index, event) => {
|
|
30
|
+
props.controller.setRepeaterController("".concat(index), event.ctrl);
|
|
31
|
+
};
|
|
29
32
|
return {
|
|
30
33
|
ns,
|
|
31
|
-
onValueChange
|
|
34
|
+
onValueChange,
|
|
35
|
+
onCreated
|
|
32
36
|
};
|
|
33
37
|
},
|
|
34
38
|
render() {
|
|
@@ -51,7 +55,8 @@ const RepeaterMultiForm = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
55
|
"controller": this.controller,
|
|
52
56
|
"onChange": (value) => {
|
|
53
57
|
this.onValueChange(value, index);
|
|
54
|
-
}
|
|
58
|
+
},
|
|
59
|
+
"onCreated": (event) => this.onCreated(index, event)
|
|
55
60
|
}, null);
|
|
56
61
|
}
|
|
57
62
|
});
|
|
@@ -20,7 +20,8 @@ const RepeaterSingleForm = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
emits: {
|
|
23
|
-
change: (_value) => true
|
|
23
|
+
change: (_value) => true,
|
|
24
|
+
created: (_value) => true
|
|
24
25
|
},
|
|
25
26
|
setup(props, {
|
|
26
27
|
emit
|
|
@@ -39,8 +40,8 @@ const RepeaterSingleForm = /* @__PURE__ */ vue.defineComponent({
|
|
|
39
40
|
const data = getFilteredData(event.data[0]);
|
|
40
41
|
emit("change", data);
|
|
41
42
|
};
|
|
42
|
-
const onCreated = (
|
|
43
|
-
|
|
43
|
+
const onCreated = (event) => {
|
|
44
|
+
emit("created", event);
|
|
44
45
|
};
|
|
45
46
|
return {
|
|
46
47
|
ns,
|
|
@@ -60,7 +61,7 @@ const RepeaterSingleForm = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
61
|
"isSimple": true,
|
|
61
62
|
"data": this.data,
|
|
62
63
|
"onFormDataChange": this.onFormDataChange,
|
|
63
|
-
"onCreated":
|
|
64
|
+
"onCreated": this.onCreated
|
|
64
65
|
}, null);
|
|
65
66
|
}
|
|
66
67
|
});
|
|
@@ -45,6 +45,7 @@ const GanttControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
45
|
const ganttRef = vue.ref();
|
|
46
46
|
const isInited = vue.ref(false);
|
|
47
47
|
const ns = vue3Util.useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
48
|
+
const sliderMove = vue.ref(false);
|
|
48
49
|
const iBizRawItem = vue.resolveComponent("IBizRawItem");
|
|
49
50
|
const iBizIcon = vue.resolveComponent("IBizIcon");
|
|
50
51
|
let forbidClick = false;
|
|
@@ -134,7 +135,8 @@ const GanttControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
134
135
|
c.setSelection(selection);
|
|
135
136
|
};
|
|
136
137
|
const onNodeClick = (nodeData, evt) => {
|
|
137
|
-
if (forbidClick) {
|
|
138
|
+
if (forbidClick || sliderMove.value) {
|
|
139
|
+
sliderMove.value = false;
|
|
138
140
|
return;
|
|
139
141
|
}
|
|
140
142
|
c.onTreeNodeClick(nodeData, evt);
|
|
@@ -183,6 +185,7 @@ const GanttControl = /* @__PURE__ */ vue.defineComponent({
|
|
|
183
185
|
begin: nodeData._beginDataItemValue ? dayjs(nodeData._beginDataItemValue).format("YYYY-MM-DD HH:mm:ss") : void 0,
|
|
184
186
|
end: nodeData._endDataItemValue ? dayjs(nodeData._endDataItemValue).format("YYYY-MM-DD HH:mm:ss") : void 0
|
|
185
187
|
};
|
|
188
|
+
sliderMove.value = true;
|
|
186
189
|
c.modifyNodeTime(nodeData, newValue);
|
|
187
190
|
};
|
|
188
191
|
const calcContextMenuItems = (toolbarItems, nodeData, evt, menuState) => {
|
|
@@ -76,6 +76,11 @@ const IBizAutoComplete = /* @__PURE__ */ vue.defineComponent({
|
|
|
76
76
|
}, {
|
|
77
77
|
immediate: true
|
|
78
78
|
});
|
|
79
|
+
vue.watch(editorRef, (newVal) => {
|
|
80
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
81
|
+
newVal.focus();
|
|
82
|
+
}
|
|
83
|
+
});
|
|
79
84
|
const handleDataSelect = async (data) => {
|
|
80
85
|
const dataItems = await c.calcFillDataItems(data);
|
|
81
86
|
if (dataItems.length) {
|
|
@@ -81,6 +81,11 @@ const IBizMPicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
81
|
immediate: true,
|
|
82
82
|
deep: true
|
|
83
83
|
});
|
|
84
|
+
vue.watch(editorRef, (newVal) => {
|
|
85
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
86
|
+
newVal.focus();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
84
89
|
const setEditable = (flag) => {
|
|
85
90
|
if (flag) {
|
|
86
91
|
isEditable.value = flag;
|
|
@@ -60,6 +60,11 @@ const IBizPickerDropDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
60
60
|
}, {
|
|
61
61
|
immediate: true
|
|
62
62
|
});
|
|
63
|
+
vue.watch(editorRef, (newVal) => {
|
|
64
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
65
|
+
newVal.focus();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
63
68
|
const onSearch = async (query) => {
|
|
64
69
|
if (!shouldLoad.value) {
|
|
65
70
|
return;
|
|
@@ -92,7 +92,7 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
92
92
|
srfkey: props.data[c.valueItem],
|
|
93
93
|
srfmajortext: props.value
|
|
94
94
|
}];
|
|
95
|
-
params.value.
|
|
95
|
+
params.value.selecteddata = selectedData.value;
|
|
96
96
|
}
|
|
97
97
|
} else {
|
|
98
98
|
const selectItems = [];
|
|
@@ -148,6 +148,11 @@ const IBizPickerSelectView = /* @__PURE__ */ vue.defineComponent({
|
|
|
148
148
|
immediate: true,
|
|
149
149
|
deep: true
|
|
150
150
|
});
|
|
151
|
+
vue.watch(editorRef, (newVal) => {
|
|
152
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
153
|
+
newVal.focus();
|
|
154
|
+
}
|
|
155
|
+
});
|
|
151
156
|
vue.onMounted(() => {
|
|
152
157
|
if (editorRef.value) {
|
|
153
158
|
pickViewWidth.value = "".concat(editorRef.value.$parent.$el.offsetWidth, "px");
|
|
@@ -220,7 +220,7 @@ class PickerEditorController extends runtime.EditorController {
|
|
|
220
220
|
this.params
|
|
221
221
|
);
|
|
222
222
|
if (selectedData) {
|
|
223
|
-
params.
|
|
223
|
+
params.selecteddata = selectedData;
|
|
224
224
|
}
|
|
225
225
|
if (!this.pickupView) {
|
|
226
226
|
throw new core.RuntimeModelError(
|
|
@@ -104,6 +104,11 @@ const IBizDateRangePicker = /* @__PURE__ */ vue.defineComponent({
|
|
|
104
104
|
setEditable(false);
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
|
+
vue.watch(editorRef, (newVal) => {
|
|
108
|
+
if (props.autoFocus && newVal && newVal.focus) {
|
|
109
|
+
newVal.focus();
|
|
110
|
+
}
|
|
111
|
+
});
|
|
107
112
|
const onFocus = (e) => {
|
|
108
113
|
emit("focus", e);
|
|
109
114
|
setEditable(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-html{--ibiz-html-height:300px;display:inline-block;width:100%;height:100%;--w-e-textarea-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-color:var(--ibiz-color-text-2);--w-e-textarea-border-color:var(--ibiz-color-border);--w-e-textarea-slight-border-color:var(--ibiz-color-border);--w-e-textarea-slight-color:var(--ibiz-color-text-
|
|
1
|
+
.ibiz-html{--ibiz-html-height:300px;display:inline-block;width:100%;height:100%;--w-e-textarea-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-color:var(--ibiz-color-text-2);--w-e-textarea-border-color:var(--ibiz-color-border);--w-e-textarea-slight-border-color:var(--ibiz-color-border);--w-e-textarea-slight-color:var(--ibiz-color-text-3);--w-e-textarea-slight-bg-color:var(--ibiz-color-bg-1);--w-e-textarea-selected-border-color:var(--ibiz-color-border);--w-e-textarea-handler-bg-color:var(--ibiz-color-primary);--w-e-toolbar-color:var(--ibiz-color-text-0);--w-e-toolbar-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-active-color:var(--ibiz-color-text-0);--w-e-toolbar-active-bg-color:var(--ibiz-color-bg-1);--w-e-toolbar-disabled-color:var(--ibiz-color-disabled-text);--w-e-toolbar-border-color:var(--ibiz-color-border);--w-e-modal-button-bg-color:var(--ibiz-color-bg-1);--w-e-modal-button-border-color:var(--ibiz-color-border)}.ibiz-html .ibiz-html-content{display:flex;flex-direction:column;height:100%;background-color:var(--ibiz-color-bg-0)}.ibiz-html .ibiz-html-editor{height:var(--ibiz-html-height)!important;padding:0;overflow-y:scroll;border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor.is-readonly{height:auto!important}.ibiz-html .ibiz-html-editor table{width:100%!important;border-collapse:collapse}.ibiz-html .ibiz-html-editor table th{height:var(--ibiz-height-control-large);min-height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight);border:1px solid var(--ibiz-color-border)}.ibiz-html .ibiz-html-editor table td{height:var(--ibiz-height-control-large);min-height:var(--ibiz-height-control-large);padding:var(--ibiz-spacing-tight);empty-cells:show;border:1px solid var(--ibiz-color-border)}.ibiz-html .w-e-menu-tooltip-v5::before{color:var(--ibiz-color-text-0);background-color:var(--w-e-toolbar-bg-color)}.ibiz-html .w-e-full-screen-container{z-index:9999}.ibiz-html .w-e-scroll>div{background-color:var(--ibiz-color-bg-1)}.ibiz-html .table-container table{width:100%}.ibiz-html-editor-readonly .ibiz-html-toolbar{display:none}.ibiz-html-editor-readonly .ibiz-html-editor{border:none}.ibiz-html-footer{display:flex;align-items:center;justify-content:end;margin-top:var(--ibiz-spacing-base-tight);margin-right:var(--ibiz-spacing-tight)}.ibiz-html-footer>*+*{margin-left:var(--ibiz-spacing-base)}.ibiz-html-footer__cancel{height:var(--ibiz-height-control-default);line-height:var(--ibiz-height-control-default);color:var(--ibiz-color-text-1);cursor:pointer;opacity:.7}.ibiz-html-footer__cancel:hover{color:var(--ibiz-color-primary);opacity:1}.ibiz-html-footer__save{height:var(--ibiz-height-control-default);padding:0 var(--ibiz-spacing-base);line-height:var(--ibiz-height-control-default);color:var(--ibiz-color-primary-active-text);text-align:center;cursor:pointer;background-color:var(--ibiz-color-primary);border-radius:var(--ibiz-border-radius-small)}.ibiz-html-custom-toolbar{display:flex;align-items:center;justify-content:end;width:100%;height:var(--ibiz-height-control-default);padding-right:var(--ibiz-spacing-base);font-size:var(--ibiz-font-size-header-6)}.ibiz-html-custom-toolbar>*+*{margin-left:var(--ibiz-spacing-base-loose)}.ibiz-html-custom-toolbar i{cursor:pointer}.ibiz-html-custom-toolbar i:hover{color:var(--ibiz-color-primary)}.ibiz-html-message{width:500px;max-width:unset}.ibiz-html-message__message-content--message-tip{color:var(--ibiz-color-text-3)}.ibiz-html-message__message-cancel{color:var(--ibiz-color-text-1);background-color:transparent}.ibiz-html-message__message-cancel:hover{color:var(--ibiz-color-primary);background-color:transparent}.ibiz-html-message__message-comfire{background-color:var(--ibiz-color-danger)!important}.ibiz-html-message__message-comfire:hover{box-shadow:0 2px 5px 1px var(--ibiz-color-danger)}.ibiz-html-dialog-full-screen{height:80%}.ibiz-html-dialog-full-screen .ibiz-html{padding:0 var(--ibiz-spacing-extra-loose);--w-e-toolbar-bg-color:var(--ibiz-color-bg-0)}.ibiz-html-dialog-full-screen .ibiz-html-custom-toolbar{height:56px}.ibiz-html-dialog-full-screen .ibiz-html-content{height:calc(100% - 124px)}.ibiz-html-dialog-full-screen .ibiz-html-content .ibiz-html-editor{height:100%!important}.ibiz-html-footer-dialog{height:68px;margin-top:0}
|