@ibiz-template/vue3-components 0.5.7-alpha.2 → 0.5.7-alpha.3
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-5ErnlgZ5.js +2 -0
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/{xlsx-util-BE5Eyj1T.js → xlsx-util-15YjErDj.js} +1 -1
- package/es/common/view-message/view-message.css +1 -0
- package/es/common/view-message/view-message.d.ts +1 -0
- package/es/common/view-message/view-message.mjs +2 -0
- package/es/control/drbar/drbar.controller.d.ts +8 -1
- package/es/control/drbar/drbar.controller.mjs +17 -6
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.mjs +4 -3
- package/es/editor/data-picker/ibiz-picker/ibiz-picker.mjs +6 -1
- package/es/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.mjs +46 -38
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +4 -5
- package/es/editor/text-box/input/input.mjs +3 -0
- package/es/panel-component/index.mjs +2 -0
- package/es/panel-component/panel-button/index.d.ts +1 -0
- package/es/panel-component/panel-button/panel-button.d.ts +1 -0
- package/es/panel-component/panel-button/panel-button.mjs +4 -1
- package/es/panel-component/user-message/user-message.mjs +2 -1
- package/es/panel-component/view-message/index.d.ts +24 -0
- package/es/panel-component/view-message/index.mjs +15 -0
- package/es/panel-component/view-message/view-message.d.ts +26 -0
- package/es/panel-component/view-message/view-message.mjs +46 -0
- package/es/panel-component/view-message/view-message.provider.d.ts +15 -0
- package/es/panel-component/view-message/view-message.provider.mjs +21 -0
- package/lib/common/view-message/view-message.cjs +2 -0
- package/lib/common/view-message/view-message.css +1 -0
- package/lib/control/drbar/drbar.controller.cjs +17 -6
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.cjs +4 -3
- package/lib/editor/data-picker/ibiz-picker/ibiz-picker.cjs +6 -1
- package/lib/editor/data-picker/ibiz-picker-dropdown/ibiz-picker-dropdown.cjs +45 -37
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +4 -5
- package/lib/editor/text-box/input/input.cjs +3 -0
- package/lib/panel-component/index.cjs +2 -0
- package/lib/panel-component/panel-button/panel-button.cjs +4 -1
- package/lib/panel-component/user-message/user-message.cjs +1 -0
- package/lib/panel-component/view-message/index.cjs +20 -0
- package/lib/panel-component/view-message/view-message.cjs +48 -0
- package/lib/panel-component/view-message/view-message.provider.cjs +23 -0
- package/package.json +5 -5
- package/dist/index-p-YChWUE.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-view-message__alert.is-no-title.el-alert .el-alert__description{margin:0}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import './view-message.css';
|
|
3
4
|
|
|
4
5
|
"use strict";
|
|
5
6
|
const ViewMessage = /* @__PURE__ */ defineComponent({
|
|
@@ -37,6 +38,7 @@ const ViewMessage = /* @__PURE__ */ defineComponent({
|
|
|
37
38
|
return createVNode(resolveComponent("el-alert"), {
|
|
38
39
|
"type": this.getType(message.messageType),
|
|
39
40
|
"title": message.title,
|
|
41
|
+
"class": [this.ns.e("alert"), this.ns.is("no-title", !message.title)],
|
|
40
42
|
"description": message.message,
|
|
41
43
|
"closable": message.removeMode !== 0
|
|
42
44
|
}, null);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ControlController, IDRBarController, IDRBarEvent, IDRBarState, IDRBarItemsState, IEditFormController, IPanelItemNavPosController, AppCounter } from '@ibiz-template/runtime';
|
|
1
|
+
import { ControlController, IDRBarController, IDRBarEvent, IDRBarState, IDRBarItemsState, IEditFormController, IPanelItemNavPosController, AppCounter, IPanelItemController } from '@ibiz-template/runtime';
|
|
2
2
|
import { IDEDRBar, IDEDRBarItem } from '@ibiz/model-core';
|
|
3
3
|
import { Router } from 'vue-router';
|
|
4
4
|
/**
|
|
@@ -24,6 +24,13 @@ export declare class DRBarController extends ControlController<IDEDRBar, IDRBarS
|
|
|
24
24
|
* @memberof DRBarController
|
|
25
25
|
*/
|
|
26
26
|
get navPos(): IPanelItemNavPosController;
|
|
27
|
+
/**
|
|
28
|
+
* 导航视图容器控制器
|
|
29
|
+
* @return {*}
|
|
30
|
+
* @author: zhujiamin
|
|
31
|
+
* @Date: 2024-01-25 16:03:00
|
|
32
|
+
*/
|
|
33
|
+
get viewNavPos(): IPanelItemController | undefined;
|
|
27
34
|
/**
|
|
28
35
|
* 表单部件
|
|
29
36
|
*
|
|
@@ -35,6 +35,16 @@ class DRBarController extends ControlController {
|
|
|
35
35
|
var _a;
|
|
36
36
|
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.nav_pos;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* 导航视图容器控制器
|
|
40
|
+
* @return {*}
|
|
41
|
+
* @author: zhujiamin
|
|
42
|
+
* @Date: 2024-01-25 16:03:00
|
|
43
|
+
*/
|
|
44
|
+
get viewNavPos() {
|
|
45
|
+
var _a;
|
|
46
|
+
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.view_nav_pos;
|
|
47
|
+
}
|
|
38
48
|
/**
|
|
39
49
|
* 表单部件
|
|
40
50
|
*
|
|
@@ -269,18 +279,18 @@ class DRBarController extends ControlController {
|
|
|
269
279
|
viewForm.state.visible = true;
|
|
270
280
|
viewForm.state.keepAlive = true;
|
|
271
281
|
}
|
|
272
|
-
if (this.
|
|
273
|
-
this.
|
|
274
|
-
this.
|
|
282
|
+
if (this.viewNavPos) {
|
|
283
|
+
this.viewNavPos.state.visible = false;
|
|
284
|
+
this.viewNavPos.state.keepAlive = true;
|
|
275
285
|
}
|
|
276
286
|
} else {
|
|
277
287
|
if (viewForm) {
|
|
278
288
|
viewForm.state.visible = false;
|
|
279
289
|
viewForm.state.keepAlive = true;
|
|
280
290
|
}
|
|
281
|
-
if (this.
|
|
282
|
-
this.
|
|
283
|
-
this.
|
|
291
|
+
if (this.viewNavPos) {
|
|
292
|
+
this.viewNavPos.state.visible = true;
|
|
293
|
+
this.viewNavPos.state.keepAlive = true;
|
|
284
294
|
}
|
|
285
295
|
}
|
|
286
296
|
}
|
|
@@ -335,6 +345,7 @@ class DRBarController extends ControlController {
|
|
|
335
345
|
doDefaultSelect() {
|
|
336
346
|
var _a;
|
|
337
347
|
if (!this.state.hideEditItem && !this.state.srfnav) {
|
|
348
|
+
this.setVisible("form");
|
|
338
349
|
return;
|
|
339
350
|
}
|
|
340
351
|
if (this.isCreate) {
|
|
@@ -31,13 +31,14 @@ const TreeGridExUAColumn = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
};
|
|
32
32
|
},
|
|
33
33
|
render() {
|
|
34
|
-
var _a, _b
|
|
34
|
+
var _a, _b;
|
|
35
|
+
const uiactionGroup = this.controller.getUIActionGroup(this.row);
|
|
35
36
|
return createVNode("div", {
|
|
36
37
|
"class": [this.ns.b(), (_a = this.controller.model.cellSysCss) == null ? void 0 : _a.cssName],
|
|
37
38
|
"onDblclick": this.onStopPropagation,
|
|
38
39
|
"onClick": this.onStopPropagation
|
|
39
|
-
}, [((
|
|
40
|
-
"action-details":
|
|
40
|
+
}, [((_b = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _b.length) && createVNode(resolveComponent("iBizActionToolbar"), {
|
|
41
|
+
"action-details": uiactionGroup.uiactionGroupDetails,
|
|
41
42
|
"actions-state": this.row.columnActionsStates[this.controller.model.codeName],
|
|
42
43
|
"onActionClick": this.onActionClick
|
|
43
44
|
}, null)]);
|
|
@@ -18,6 +18,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
const isShowAll = ref(true);
|
|
19
19
|
const isEditable = ref(false);
|
|
20
20
|
const editorRef = ref();
|
|
21
|
+
const isLoaded = ref(false);
|
|
21
22
|
const showFormDefaultContent = computed(() => {
|
|
22
23
|
if (props.controlParams && props.controlParams.editmode === "hover") {
|
|
23
24
|
return true;
|
|
@@ -107,6 +108,7 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
107
108
|
const res = await c.getServiceData(trimQuery, props.data);
|
|
108
109
|
if (res) {
|
|
109
110
|
items.value = res.data;
|
|
111
|
+
isLoaded.value = true;
|
|
110
112
|
if (cb && cb instanceof Function) {
|
|
111
113
|
cb(items.value);
|
|
112
114
|
}
|
|
@@ -159,13 +161,16 @@ const IBizPicker = /* @__PURE__ */ defineComponent({
|
|
|
159
161
|
onMounted(() => {
|
|
160
162
|
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
161
163
|
if (newVal !== oldVal) {
|
|
162
|
-
if (
|
|
164
|
+
if (!isLoaded.value && editorRef.value) {
|
|
163
165
|
await onSearch("");
|
|
164
166
|
}
|
|
165
167
|
const curItem = items.value.find((item) => Object.is(item[c.keyName], newVal));
|
|
166
168
|
if (curItem) {
|
|
167
169
|
curValue.value = curItem[c.textName];
|
|
168
170
|
}
|
|
171
|
+
if (newVal === null) {
|
|
172
|
+
emit("change", null);
|
|
173
|
+
}
|
|
169
174
|
}
|
|
170
175
|
}, {
|
|
171
176
|
immediate: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isVNode, ref, computed, watch, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
1
|
+
import { isVNode, ref, computed, watch, onMounted, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { getDataPickerProps, getEditorEmits, useNamespace, renderString } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { isNil, clone } from 'ramda';
|
|
4
4
|
import './ibiz-picker-dropdown.css';
|
|
@@ -22,6 +22,9 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
const refValue = ref("");
|
|
23
23
|
const isEditable = ref(false);
|
|
24
24
|
const editorRef = ref();
|
|
25
|
+
const loading = ref(false);
|
|
26
|
+
let waitQuery = null;
|
|
27
|
+
const isLoaded = ref(false);
|
|
25
28
|
const showFormDefaultContent = computed(() => {
|
|
26
29
|
if (props.controlParams && props.controlParams.editmode === "hover") {
|
|
27
30
|
return true;
|
|
@@ -55,16 +58,50 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
55
58
|
}, {
|
|
56
59
|
immediate: true
|
|
57
60
|
});
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
const onSearch = async (query) => {
|
|
62
|
+
if (!shouldLoad.value) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (c.model.appDataEntityId && loading.value === false) {
|
|
66
|
+
loading.value = true;
|
|
67
|
+
try {
|
|
68
|
+
let trimQuery = "";
|
|
69
|
+
if (query !== props.value) {
|
|
70
|
+
trimQuery = query.trim();
|
|
71
|
+
}
|
|
72
|
+
const res = await c.getServiceData(trimQuery, props.data);
|
|
73
|
+
if (res) {
|
|
74
|
+
items.value = res.data;
|
|
75
|
+
}
|
|
76
|
+
} finally {
|
|
77
|
+
loading.value = false;
|
|
78
|
+
isLoaded.value = true;
|
|
79
|
+
if (waitQuery != null) {
|
|
80
|
+
const selfQuery = waitQuery;
|
|
81
|
+
waitQuery = null;
|
|
82
|
+
await onSearch(selfQuery);
|
|
83
|
+
}
|
|
63
84
|
}
|
|
85
|
+
} else {
|
|
86
|
+
waitQuery = query;
|
|
64
87
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
88
|
+
};
|
|
89
|
+
onMounted(() => {
|
|
90
|
+
watch(() => props.data[c.valueItem], async (newVal, oldVal) => {
|
|
91
|
+
if (newVal !== oldVal) {
|
|
92
|
+
if (!isLoaded.value && editorRef.value) {
|
|
93
|
+
shouldLoad.value = true;
|
|
94
|
+
await onSearch("");
|
|
95
|
+
}
|
|
96
|
+
refValue.value = newVal;
|
|
97
|
+
if (newVal === null) {
|
|
98
|
+
emit("change", null);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
immediate: true,
|
|
103
|
+
deep: true
|
|
104
|
+
});
|
|
68
105
|
});
|
|
69
106
|
const setEditable = (flag) => {
|
|
70
107
|
if (flag) {
|
|
@@ -75,7 +112,6 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
75
112
|
}, 100);
|
|
76
113
|
}
|
|
77
114
|
};
|
|
78
|
-
const loading = ref(false);
|
|
79
115
|
const onACSelect = async (data) => {
|
|
80
116
|
const dataItems = await c.calcFillDataItems(data);
|
|
81
117
|
if (dataItems.length) {
|
|
@@ -105,34 +141,6 @@ const IBizPickerDropDown = /* @__PURE__ */ defineComponent({
|
|
|
105
141
|
}
|
|
106
142
|
shouldLoad.value = false;
|
|
107
143
|
};
|
|
108
|
-
let waitQuery = null;
|
|
109
|
-
const onSearch = async (query) => {
|
|
110
|
-
if (!shouldLoad.value) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
if (c.model.appDataEntityId && loading.value === false) {
|
|
114
|
-
loading.value = true;
|
|
115
|
-
try {
|
|
116
|
-
let trimQuery = "";
|
|
117
|
-
if (query !== props.value) {
|
|
118
|
-
trimQuery = query.trim();
|
|
119
|
-
}
|
|
120
|
-
const res = await c.getServiceData(trimQuery, props.data);
|
|
121
|
-
if (res) {
|
|
122
|
-
items.value = res.data;
|
|
123
|
-
}
|
|
124
|
-
} finally {
|
|
125
|
-
loading.value = false;
|
|
126
|
-
if (waitQuery != null) {
|
|
127
|
-
const selfQuery = waitQuery;
|
|
128
|
-
waitQuery = null;
|
|
129
|
-
await onSearch(selfQuery);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
} else {
|
|
133
|
-
waitQuery = query;
|
|
134
|
-
}
|
|
135
|
-
};
|
|
136
144
|
const onOpenChange = (isOpen) => {
|
|
137
145
|
if (isOpen) {
|
|
138
146
|
items.value = [];
|
|
@@ -13,7 +13,6 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
setup(props, {
|
|
14
14
|
emit
|
|
15
15
|
}) {
|
|
16
|
-
var _a;
|
|
17
16
|
const ns = useNamespace("dropdown");
|
|
18
17
|
const c = props.controller;
|
|
19
18
|
const items = ref([]);
|
|
@@ -23,7 +22,7 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
23
22
|
const treeNodes = ref([]);
|
|
24
23
|
const isEditable = ref(false);
|
|
25
24
|
const editorRef = ref();
|
|
26
|
-
const editorItems =
|
|
25
|
+
const editorItems = c.model.editorItems;
|
|
27
26
|
const isLoading = ref(false);
|
|
28
27
|
let editorState = "";
|
|
29
28
|
let funcs;
|
|
@@ -103,15 +102,15 @@ const IBizDropdown = /* @__PURE__ */ defineComponent({
|
|
|
103
102
|
};
|
|
104
103
|
const curValue = computed({
|
|
105
104
|
get() {
|
|
106
|
-
var
|
|
105
|
+
var _a, _b;
|
|
107
106
|
if (!isLoadedCodeList.value) {
|
|
108
|
-
return "";
|
|
107
|
+
return c.multiple ? [] : "";
|
|
109
108
|
}
|
|
110
109
|
if (editorItems && editorItems.length > 0 && !c.multiple) {
|
|
111
110
|
return props.data[editorItems[0].id];
|
|
112
111
|
}
|
|
113
112
|
if (props.value) {
|
|
114
|
-
return c.multiple ? (
|
|
113
|
+
return c.multiple ? (_a = props.value) == null ? void 0 : _a.toString().split(",") : props.value.toString();
|
|
115
114
|
}
|
|
116
115
|
return (_b = props.value) == null ? void 0 : _b.toString();
|
|
117
116
|
},
|
|
@@ -265,6 +265,9 @@ const IBizInput = /* @__PURE__ */ defineComponent({
|
|
|
265
265
|
"type": this.type,
|
|
266
266
|
"rows": this.rows,
|
|
267
267
|
"resize": "none",
|
|
268
|
+
"maxlength": this.c.model.maxLength,
|
|
269
|
+
"minlength": this.c.model.minLength,
|
|
270
|
+
"show-word-limit": this.c.model.showMaxLength,
|
|
268
271
|
"onInput": this.handleChange,
|
|
269
272
|
"onKeyup": this.handleKeyUp,
|
|
270
273
|
"onBlur": this.onBlur,
|
|
@@ -16,6 +16,7 @@ import { IBizPanelRememberMe } from './panel-remember-me/index.mjs';
|
|
|
16
16
|
import { IBizIndexActions } from './index-actions/index.mjs';
|
|
17
17
|
import { IBizUserMessage } from './user-message/index.mjs';
|
|
18
18
|
import { IBizSearchFormButtons } from './searchform-buttons/index.mjs';
|
|
19
|
+
import { IBizViewMessage } from './view-message/index.mjs';
|
|
19
20
|
export { NavPosIndexState } from './nav-pos-index/nav-pos-index.state.mjs';
|
|
20
21
|
export { NavPosIndexController } from './nav-pos-index/nav-pos-index.controller.mjs';
|
|
21
22
|
export { PanelButtonController } from './panel-button/panel-button.controller.mjs';
|
|
@@ -55,6 +56,7 @@ const IBizPanelComponents = {
|
|
|
55
56
|
v.use(IBizPanelContainerImage);
|
|
56
57
|
v.use(IBizSearchFormButtons);
|
|
57
58
|
v.use(IBizPanelItemRender);
|
|
59
|
+
v.use(IBizViewMessage);
|
|
58
60
|
}
|
|
59
61
|
};
|
|
60
62
|
|
|
@@ -17,6 +17,7 @@ export declare const IBizPanelButton: import("@ibiz-template/vue3-util").TypeWit
|
|
|
17
17
|
sysImage: import("@ibiz/model-core").ISysImage | undefined;
|
|
18
18
|
codeName: string | undefined;
|
|
19
19
|
state: import("./panel-button.state").PanelButtonState;
|
|
20
|
+
tooltip: string | undefined;
|
|
20
21
|
handleButtonClick: (event: MouseEvent) => Promise<void>;
|
|
21
22
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
23
|
modelData: {
|
|
@@ -20,6 +20,7 @@ export declare const PanelButton: import("vue").DefineComponent<{
|
|
|
20
20
|
sysImage: import("@ibiz/model-core").ISysImage | undefined;
|
|
21
21
|
codeName: string | undefined;
|
|
22
22
|
state: import("./panel-button.state").PanelButtonState;
|
|
23
|
+
tooltip: string | undefined;
|
|
23
24
|
handleButtonClick: (event: MouseEvent) => Promise<void>;
|
|
24
25
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
26
|
modelData: {
|
|
@@ -25,7 +25,8 @@ const PanelButton = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
showCaption,
|
|
26
26
|
sysImage,
|
|
27
27
|
codeName,
|
|
28
|
-
itemStyle
|
|
28
|
+
itemStyle,
|
|
29
|
+
tooltip
|
|
29
30
|
} = props.modelData;
|
|
30
31
|
const {
|
|
31
32
|
panel,
|
|
@@ -80,6 +81,7 @@ const PanelButton = /* @__PURE__ */ defineComponent({
|
|
|
80
81
|
sysImage,
|
|
81
82
|
codeName,
|
|
82
83
|
state,
|
|
84
|
+
tooltip,
|
|
83
85
|
handleButtonClick
|
|
84
86
|
};
|
|
85
87
|
},
|
|
@@ -90,6 +92,7 @@ const PanelButton = /* @__PURE__ */ defineComponent({
|
|
|
90
92
|
}, [createVNode(resolveComponent("el-button"), {
|
|
91
93
|
"type": this.buttonType,
|
|
92
94
|
"text": this.isText,
|
|
95
|
+
"title": this.tooltip,
|
|
93
96
|
"disabled": this.state.disabled,
|
|
94
97
|
"loading": this.state.loading,
|
|
95
98
|
"onClick": this.handleButtonClick
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref, resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
-
import { PanelItemController } from '@ibiz-template/runtime';
|
|
3
|
+
import { PanelItemController, PresetIdentifier } from '@ibiz-template/runtime';
|
|
4
4
|
import './user-message.css';
|
|
5
5
|
import { AsyncActionTab } from './async-action/async-action-tab/async-action-tab.mjs';
|
|
6
6
|
import './internal-message/index.mjs';
|
|
@@ -61,6 +61,7 @@ const UserMessage = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
"hidden": this.noticeNum === 0
|
|
62
62
|
}, {
|
|
63
63
|
default: () => [createVNode(resolveComponent("i-biz-icon"), {
|
|
64
|
+
"id": PresetIdentifier.MESSAGE,
|
|
64
65
|
"class": [this.ns.e("image")],
|
|
65
66
|
"icon": this.sysImage
|
|
66
67
|
}, null)]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const IBizViewMessage: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
modelData: {
|
|
3
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
controller: {
|
|
7
|
+
type: typeof import("@ibiz-template/runtime").PanelItemController;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
12
|
+
c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
13
|
+
view: import("@ibiz-template/runtime").IViewController<import("@ibiz/model-core").IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>;
|
|
14
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
modelData: {
|
|
16
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
controller: {
|
|
20
|
+
type: typeof import("@ibiz-template/runtime").PanelItemController;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
}>>, {}, {}>>;
|
|
24
|
+
export default IBizViewMessage;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
2
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
3
|
+
import { ViewMessage } from './view-message.mjs';
|
|
4
|
+
import { ViewMessageProvider } from './view-message.provider.mjs';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const IBizViewMessage = withInstall(ViewMessage, function(v) {
|
|
8
|
+
v.component(ViewMessage.name, ViewMessage);
|
|
9
|
+
registerPanelItemProvider(
|
|
10
|
+
"RAWITEM_VIEW_MESSAGE",
|
|
11
|
+
() => new ViewMessageProvider()
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { IBizViewMessage, IBizViewMessage as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
3
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
|
+
export declare const ViewMessage: import("vue").DefineComponent<{
|
|
5
|
+
modelData: {
|
|
6
|
+
type: PropType<IPanelRawItem>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
controller: {
|
|
10
|
+
type: typeof PanelItemController;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
15
|
+
c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
16
|
+
view: import("@ibiz-template/runtime").IViewController<import("@ibiz/model-core").IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>;
|
|
17
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
modelData: {
|
|
19
|
+
type: PropType<IPanelRawItem>;
|
|
20
|
+
required: true;
|
|
21
|
+
};
|
|
22
|
+
controller: {
|
|
23
|
+
type: typeof PanelItemController;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { resolveComponent, createVNode, defineComponent } from 'vue';
|
|
2
|
+
import { useNamespace, useCtx } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
const ViewMessage = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "IBizViewMessage",
|
|
8
|
+
props: {
|
|
9
|
+
modelData: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true
|
|
12
|
+
},
|
|
13
|
+
controller: {
|
|
14
|
+
type: PanelItemController,
|
|
15
|
+
required: true
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
setup(props) {
|
|
19
|
+
const ns = useNamespace("view-message");
|
|
20
|
+
const c = props.controller;
|
|
21
|
+
const ctx = useCtx();
|
|
22
|
+
const {
|
|
23
|
+
view
|
|
24
|
+
} = ctx;
|
|
25
|
+
return {
|
|
26
|
+
ns,
|
|
27
|
+
c,
|
|
28
|
+
view
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
render() {
|
|
32
|
+
const c = this.view;
|
|
33
|
+
if (c.state.isCreated) {
|
|
34
|
+
const viewMessages = c.state.viewMessages.BODY;
|
|
35
|
+
if (viewMessages == null ? void 0 : viewMessages.length) {
|
|
36
|
+
return createVNode(resolveComponent("view-message"), {
|
|
37
|
+
"class": [this.ns.e("body-message")],
|
|
38
|
+
"messages": viewMessages
|
|
39
|
+
}, null);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export { ViewMessage };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* 预置视图消息适配器
|
|
5
|
+
*
|
|
6
|
+
* @author zk
|
|
7
|
+
* @date 2024-01-25 02:01:01
|
|
8
|
+
* @export
|
|
9
|
+
* @class ViewMessageProvider
|
|
10
|
+
* @implements {IPanelItemProvider}
|
|
11
|
+
*/
|
|
12
|
+
export declare class ViewMessageProvider implements IPanelItemProvider {
|
|
13
|
+
component: string;
|
|
14
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PanelItemController } 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 ViewMessageProvider {
|
|
11
|
+
constructor() {
|
|
12
|
+
__publicField(this, "component", "IBizViewMessage");
|
|
13
|
+
}
|
|
14
|
+
async createController(panelItem, panel, parent) {
|
|
15
|
+
const c = new PanelItemController(panelItem, panel, parent);
|
|
16
|
+
await c.init();
|
|
17
|
+
return c;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { ViewMessageProvider };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
require('./view-message.css');
|
|
5
6
|
|
|
6
7
|
"use strict";
|
|
7
8
|
const ViewMessage = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -39,6 +40,7 @@ const ViewMessage = /* @__PURE__ */ vue.defineComponent({
|
|
|
39
40
|
return vue.createVNode(vue.resolveComponent("el-alert"), {
|
|
40
41
|
"type": this.getType(message.messageType),
|
|
41
42
|
"title": message.title,
|
|
43
|
+
"class": [this.ns.e("alert"), this.ns.is("no-title", !message.title)],
|
|
42
44
|
"description": message.message,
|
|
43
45
|
"closable": message.removeMode !== 0
|
|
44
46
|
}, null);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-view-message__alert.is-no-title.el-alert .el-alert__description{margin:0}
|
|
@@ -37,6 +37,16 @@ class DRBarController extends runtime.ControlController {
|
|
|
37
37
|
var _a;
|
|
38
38
|
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.nav_pos;
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* 导航视图容器控制器
|
|
42
|
+
* @return {*}
|
|
43
|
+
* @author: zhujiamin
|
|
44
|
+
* @Date: 2024-01-25 16:03:00
|
|
45
|
+
*/
|
|
46
|
+
get viewNavPos() {
|
|
47
|
+
var _a;
|
|
48
|
+
return (_a = this.view.layoutPanel) == null ? void 0 : _a.panelItems.view_nav_pos;
|
|
49
|
+
}
|
|
40
50
|
/**
|
|
41
51
|
* 表单部件
|
|
42
52
|
*
|
|
@@ -271,18 +281,18 @@ class DRBarController extends runtime.ControlController {
|
|
|
271
281
|
viewForm.state.visible = true;
|
|
272
282
|
viewForm.state.keepAlive = true;
|
|
273
283
|
}
|
|
274
|
-
if (this.
|
|
275
|
-
this.
|
|
276
|
-
this.
|
|
284
|
+
if (this.viewNavPos) {
|
|
285
|
+
this.viewNavPos.state.visible = false;
|
|
286
|
+
this.viewNavPos.state.keepAlive = true;
|
|
277
287
|
}
|
|
278
288
|
} else {
|
|
279
289
|
if (viewForm) {
|
|
280
290
|
viewForm.state.visible = false;
|
|
281
291
|
viewForm.state.keepAlive = true;
|
|
282
292
|
}
|
|
283
|
-
if (this.
|
|
284
|
-
this.
|
|
285
|
-
this.
|
|
293
|
+
if (this.viewNavPos) {
|
|
294
|
+
this.viewNavPos.state.visible = true;
|
|
295
|
+
this.viewNavPos.state.keepAlive = true;
|
|
286
296
|
}
|
|
287
297
|
}
|
|
288
298
|
}
|
|
@@ -337,6 +347,7 @@ class DRBarController extends runtime.ControlController {
|
|
|
337
347
|
doDefaultSelect() {
|
|
338
348
|
var _a;
|
|
339
349
|
if (!this.state.hideEditItem && !this.state.srfnav) {
|
|
350
|
+
this.setVisible("form");
|
|
340
351
|
return;
|
|
341
352
|
}
|
|
342
353
|
if (this.isCreate) {
|
|
@@ -35,13 +35,14 @@ const TreeGridExUAColumn = /* @__PURE__ */ vue.defineComponent({
|
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
37
|
render() {
|
|
38
|
-
var _a, _b
|
|
38
|
+
var _a, _b;
|
|
39
|
+
const uiactionGroup = this.controller.getUIActionGroup(this.row);
|
|
39
40
|
return vue.createVNode("div", {
|
|
40
41
|
"class": [this.ns.b(), (_a = this.controller.model.cellSysCss) == null ? void 0 : _a.cssName],
|
|
41
42
|
"onDblclick": this.onStopPropagation,
|
|
42
43
|
"onClick": this.onStopPropagation
|
|
43
|
-
}, [((
|
|
44
|
-
"action-details":
|
|
44
|
+
}, [((_b = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _b.length) && vue.createVNode(vue.resolveComponent("iBizActionToolbar"), {
|
|
45
|
+
"action-details": uiactionGroup.uiactionGroupDetails,
|
|
45
46
|
"actions-state": this.row.columnActionsStates[this.controller.model.codeName],
|
|
46
47
|
"onActionClick": this.onActionClick
|
|
47
48
|
}, null)]);
|