@ibiz-template/mob-vue3-components 0.7.41-alpha.23 → 0.7.41-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-HQsqnjtM.js +2 -0
- package/dist/index-HQsqnjtM.js.map +1 -0
- package/dist/index.min.css +9 -9
- package/dist/index.system.min.js +1 -1
- package/dist/{quill-CeDXLpcJ.js → quill-CSDnV3Pb.js} +2 -2
- package/dist/{quill-CeDXLpcJ.js.map → quill-CSDnV3Pb.js.map} +1 -1
- package/dist/quill-editor-B7NuxNK7.js +2 -0
- package/dist/{quill-editor-C5mEMG93.js.map → quill-editor-B7NuxNK7.js.map} +1 -1
- package/dist/quill-editor-preview-CtFf0ZKt.js +2 -0
- package/dist/{quill-editor-preview-BPS9uMa7.js.map → quill-editor-preview-CtFf0ZKt.js.map} +1 -1
- package/dist/tree-on8cJom4.js +2 -0
- package/dist/{tree-SAqvldtV.js.map → tree-on8cJom4.js.map} +1 -1
- package/dist/{xlsx-util-b5CesqYd.js → xlsx-util-DRvvWEVq.js} +2 -2
- package/dist/{xlsx-util-b5CesqYd.js.map → xlsx-util-DRvvWEVq.js.map} +1 -1
- package/es/common/fullscreen-header/fullscreen-header.css +1 -1
- package/es/control/app-menu/app-menu.mjs +2 -2
- package/es/control/app-menu/custom-menu-design/custom-menu-design.css +1 -1
- package/es/control/app-menu/custom-menu-design/custom-menu-design.mjs +30 -86
- package/es/control/app-menu/custom-menu-design/menu-design-list/menu-design-list.css +1 -0
- package/es/control/app-menu/custom-menu-design/menu-design-list/menu-design-list.mjs +105 -0
- package/es/control/app-menu/custom-menu-design/menu-design-tree/menu-design-tree.css +1 -0
- package/es/control/app-menu/custom-menu-design/menu-design-tree/menu-design-tree.mjs +124 -0
- package/es/control/app-menu/menu-render-util.mjs +4 -1
- package/es/control/form/form-detail/form-button/form-button.mjs +3 -3
- package/es/control/toolbar/float-toolbar/float-toolbar.mjs +6 -1
- package/es/control/toolbar/toolbar-group-list/toolbar-group-list.css +1 -1
- package/es/control/toolbar/toolbar-group-list/toolbar-group-list.mjs +26 -12
- package/es/control/toolbar/toolbar-render-util.mjs +68 -17
- package/es/control/toolbar/toolbar.css +1 -1
- package/es/control/toolbar/toolbar.mjs +3 -0
- package/es/editor/html/quill-editor-preview/quill-editor-preview.css +1 -1
- package/es/editor/upload/ibiz-file-upload/ibiz-file-upload.css +1 -1
- package/es/mob-app/guard/auth-guard/dyna-auth-guard.mjs +1 -1
- package/es/util/button-util/button-util.mjs +2 -2
- package/es/util/fullscreen/fullscreen-util.mjs +1 -1
- package/es/util/list-util/list-render-util.mjs +2 -2
- package/es/view/download-view/download-view.mjs +4 -1
- package/es/view/login-view/login-view.mjs +1 -0
- package/es/view-engine/index-view.engine.mjs +0 -4
- package/lib/common/fullscreen-header/fullscreen-header.css +1 -1
- package/lib/control/app-menu/app-menu.cjs +1 -1
- package/lib/control/app-menu/custom-menu-design/custom-menu-design.cjs +29 -85
- package/lib/control/app-menu/custom-menu-design/custom-menu-design.css +1 -1
- package/lib/control/app-menu/custom-menu-design/menu-design-list/menu-design-list.cjs +107 -0
- package/lib/control/app-menu/custom-menu-design/menu-design-list/menu-design-list.css +1 -0
- package/lib/control/app-menu/custom-menu-design/menu-design-tree/menu-design-tree.cjs +126 -0
- package/lib/control/app-menu/custom-menu-design/menu-design-tree/menu-design-tree.css +1 -0
- package/lib/control/app-menu/menu-render-util.cjs +4 -1
- package/lib/control/form/form-detail/form-button/form-button.cjs +3 -3
- package/lib/control/toolbar/float-toolbar/float-toolbar.cjs +6 -1
- package/lib/control/toolbar/toolbar-group-list/toolbar-group-list.cjs +25 -11
- package/lib/control/toolbar/toolbar-group-list/toolbar-group-list.css +1 -1
- package/lib/control/toolbar/toolbar-render-util.cjs +66 -15
- package/lib/control/toolbar/toolbar.cjs +3 -0
- package/lib/control/toolbar/toolbar.css +1 -1
- package/lib/editor/html/quill-editor-preview/quill-editor-preview.css +1 -1
- package/lib/editor/upload/ibiz-file-upload/ibiz-file-upload.css +1 -1
- package/lib/mob-app/guard/auth-guard/dyna-auth-guard.cjs +1 -1
- package/lib/util/button-util/button-util.cjs +2 -2
- package/lib/util/fullscreen/fullscreen-util.cjs +1 -1
- package/lib/util/list-util/list-render-util.cjs +2 -2
- package/lib/view/download-view/download-view.cjs +3 -0
- package/lib/view/login-view/login-view.cjs +1 -0
- package/lib/view-engine/index-view.engine.cjs +0 -4
- package/package.json +5 -5
- package/dist/index-Cxv8dJIk.js +0 -2
- package/dist/index-Cxv8dJIk.js.map +0 -1
- package/dist/quill-editor-C5mEMG93.js +0 -2
- package/dist/quill-editor-preview-BPS9uMa7.js +0 -2
- package/dist/tree-SAqvldtV.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-fullscreen-header{--ibiz-fullscreen-header-spacing-full-screen-spacing:var(--safe-area-inset-top) var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);--ibiz-fullscreen-header-width-full-screen:100vw;--ibiz-fullscreen-header-height-full-screen:100vh;--ibiz-fullscreen-header-height-fullscreen-header:2.75rem;--ibiz-fullscreen-header-font-fullscreen-header-fontSize:var(--ibiz-font-size-header-5);--ibiz-fullscreen-header-font-fullscreen-header-fontWeight:var(--ibiz-font-weight-bold);height:var(--ibiz-fullscreen-header-height-fullscreen-header);display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative;font-size:var(--ibiz-fullscreen-header-font-fullscreen-header-fontSize);font-weight:var(--ibiz-fullscreen-header-font-fullscreen-header-fontWeight)}.ibiz-fullscreen-header__close{position:absolute;right:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-header-1);height:100%;display:flex;align-items:center}.ibiz-full-screen{position:fixed;top:0;left:0;height:var(--ibiz-fullscreen-header-height-full-screen);width:var(--ibiz-fullscreen-header-width-full-screen);padding:var(--ibiz-fullscreen-header-spacing-full-screen-spacing)}
|
|
1
|
+
.ibiz-fullscreen-header{--ibiz-fullscreen-header-spacing-full-screen-spacing:var(--safe-area-inset-top) var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);--ibiz-fullscreen-header-width-full-screen:100vw;--ibiz-fullscreen-header-height-full-screen:100vh;--ibiz-fullscreen-header-height-fullscreen-header:2.75rem;--ibiz-fullscreen-header-font-fullscreen-header-fontSize:var(--ibiz-font-size-header-5);--ibiz-fullscreen-header-font-fullscreen-header-fontWeight:var(--ibiz-font-weight-bold);height:var(--ibiz-fullscreen-header-height-fullscreen-header);display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative;font-size:var(--ibiz-fullscreen-header-font-fullscreen-header-fontSize);font-weight:var(--ibiz-fullscreen-header-font-fullscreen-header-fontWeight)}.ibiz-fullscreen-header__close{position:absolute;right:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-font-size-header-1);height:100%;display:flex;align-items:center}.ibiz-full-screen{--ibiz-fullscreen-header-spacing-full-screen-spacing:var(--safe-area-inset-top) var(--safe-area-inset-right) var(--safe-area-inset-bottom) var(--safe-area-inset-left);--ibiz-fullscreen-header-width-full-screen:100vw;--ibiz-fullscreen-header-height-full-screen:100vh;--ibiz-fullscreen-header-height-fullscreen-header:2.75rem;--ibiz-fullscreen-header-font-fullscreen-header-fontSize:var(--ibiz-font-size-header-5);--ibiz-fullscreen-header-font-fullscreen-header-fontWeight:var(--ibiz-font-weight-bold);position:fixed;top:0;left:0;z-index:10;height:var(--ibiz-fullscreen-header-height-full-screen)!important;width:var(--ibiz-fullscreen-header-width-full-screen)!important;padding:var(--ibiz-fullscreen-header-spacing-full-screen-spacing)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createVNode, resolveComponent, ref,
|
|
1
|
+
import { defineComponent, createVNode, resolveComponent, ref, watch } from 'vue';
|
|
2
2
|
import { useRoute } from 'vue-router';
|
|
3
3
|
import { useControlController, useNamespace } from '@ibiz-template/vue3-util';
|
|
4
4
|
import { AppMenuController } from '@ibiz-template/runtime';
|
|
@@ -65,7 +65,7 @@ const AppMenuControl = /* @__PURE__ */ defineComponent({
|
|
|
65
65
|
activeName.value = active;
|
|
66
66
|
await c.onClickMenuItem(active, event, true, opts);
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
c.evt.on("onCreated", async () => {
|
|
69
69
|
const allItems = c.getAllItems();
|
|
70
70
|
const defaultActiveMenuItem = allItems.find((item) => {
|
|
71
71
|
return item.openDefault && c.isMobMenuItemValid(item);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-menu-design{--ibiz-menu-design-color-
|
|
1
|
+
.ibiz-menu-design{--ibiz-menu-design-color-list-bg:var(--ibiz-color-bg-0);--ibiz-menu-design-color-primary-btn-text:var(--ibiz-color-primary);--ibiz-menu-design-spacing-padding:var(--ibiz-spacing-base);--ibiz-menu-design-spacing-header-padding:0 0 var(--ibiz-spacing-tight);--ibiz-menu-design-radius-item-circle:var(--ibiz-border-radius-medium);--ibiz-menu-design-font-header-font-size:var(--ibiz-font-size-header-5);--ibiz-menu-design-font-header-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-menu-design-font-close-icon-font-size:var(--ibiz-font-size-header-3);--ibiz-menu-design-font-item-font-size:var(--ibiz-font-size-header-6);display:flex;flex-direction:column;width:100%;height:100%;padding:var(--ibiz-menu-design-spacing-padding)}.ibiz-menu-design__header{display:flex;align-items:center;justify-content:space-between;padding:var(--ibiz-menu-design-spacing-header-padding);font-size:var(--ibiz-menu-design-font-header-font-size)}.ibiz-menu-design__header--close-icon{font-size:var(--ibiz-menu-design-font-close-icon-font-size)}.ibiz-menu-design__header--caption{font-weight:var(--ibiz-menu-design-font-header-caption-font-weight)}.ibiz-menu-design__header--save{color:var(--ibiz-menu-design-color-primary-btn-text)}.ibiz-menu-design__content{flex:1;overflow-y:auto}.ibiz-menu-design.is-list{background-color:var(--ibiz-menu-design-color-list-bg)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent, createVNode,
|
|
1
|
+
import { defineComponent, createVNode, ref } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { MenuDesignList } from './menu-design-list/menu-design-list.mjs';
|
|
4
|
+
import { MenuDesignTree } from './menu-design-tree/menu-design-tree.mjs';
|
|
5
5
|
import './custom-menu-design.css';
|
|
6
6
|
|
|
7
7
|
"use strict";
|
|
@@ -12,12 +12,12 @@ const MenuDesign = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
type: Object,
|
|
13
13
|
required: true
|
|
14
14
|
},
|
|
15
|
-
show: {
|
|
16
|
-
type: Boolean,
|
|
17
|
-
default: false
|
|
18
|
-
},
|
|
19
15
|
modal: {
|
|
20
16
|
type: Object
|
|
17
|
+
},
|
|
18
|
+
showMode: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "DEFALUT"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
emits: {
|
|
@@ -28,104 +28,48 @@ const MenuDesign = /* @__PURE__ */ defineComponent({
|
|
|
28
28
|
}) {
|
|
29
29
|
const ns = useNamespace("menu-design");
|
|
30
30
|
const c = props.controller;
|
|
31
|
-
const
|
|
32
|
-
const allMenuMap = /* @__PURE__ */ new Map();
|
|
33
|
-
const initData = () => {
|
|
34
|
-
[...c.state.mobMenuItems, ...c.saveConfigs].forEach((item) => {
|
|
35
|
-
if (item.id) {
|
|
36
|
-
menuMap.value.set(item.id, item);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
recursiveIterate({
|
|
40
|
-
appMenuItems: c.state.mobAuthedMenuItems
|
|
41
|
-
}, (item) => {
|
|
42
|
-
if (item.id) {
|
|
43
|
-
allMenuMap.set(item.id, item);
|
|
44
|
-
}
|
|
45
|
-
}, {
|
|
46
|
-
childrenFields: ["appMenuItems"]
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
initData();
|
|
50
|
-
const getItemIcon = (item, isGroup) => {
|
|
51
|
-
if (item.sysImage)
|
|
52
|
-
return item.sysImage;
|
|
53
|
-
switch (c.model.appMenuStyle) {
|
|
54
|
-
case "ICONVIEW":
|
|
55
|
-
return !isGroup ? getDefaultIconVal() : void 0;
|
|
56
|
-
case "LISTVIEW":
|
|
57
|
-
return;
|
|
58
|
-
default:
|
|
59
|
-
return getDefaultIconVal();
|
|
60
|
-
}
|
|
61
|
-
};
|
|
31
|
+
const curVisibleMenuItems = ref([...c.state.mobMenuItems]);
|
|
62
32
|
const onClose = () => {
|
|
63
33
|
var _a;
|
|
64
34
|
emit("close");
|
|
65
35
|
(_a = props.modal) == null ? void 0 : _a.dismiss();
|
|
66
|
-
menuMap.value.clear();
|
|
67
36
|
};
|
|
68
37
|
const onSave = async () => {
|
|
69
|
-
|
|
70
|
-
return allMenuMap.get(item.id);
|
|
71
|
-
}).filter((item) => !!item);
|
|
72
|
-
c.saveCustomMenusModel(curMenuItems);
|
|
38
|
+
c.saveCustomMenusModel(curVisibleMenuItems.value);
|
|
73
39
|
onClose();
|
|
74
40
|
};
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
return;
|
|
78
|
-
if (checked) {
|
|
79
|
-
menuMap.value.delete(item.id);
|
|
80
|
-
} else {
|
|
81
|
-
menuMap.value.set(item.id, item);
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const renderNodeItem = (_item, _level, isGroup) => {
|
|
85
|
-
const marginLeft = "calc(".concat(_level, " * var(").concat(ns.cssVarBlockName("spacing-node-item-margin-left"), "))");
|
|
86
|
-
let checked = menuMap.value.has(_item.id || "");
|
|
87
|
-
return createVNode("div", {
|
|
88
|
-
"class": [ns.e("item"), ns.is("group-item", !!isGroup)],
|
|
89
|
-
"style": {
|
|
90
|
-
marginLeft
|
|
91
|
-
},
|
|
92
|
-
"onClick": () => handleItemClick(_item, checked)
|
|
93
|
-
}, [createVNode(resolveComponent("iBizIcon"), {
|
|
94
|
-
"class": ns.em("item", "icon"),
|
|
95
|
-
"icon": getItemIcon(_item, isGroup)
|
|
96
|
-
}, null), createVNode("div", {
|
|
97
|
-
"class": ns.em("item", "caption")
|
|
98
|
-
}, [_item.caption]), createVNode(resolveComponent("van-checkbox"), {
|
|
99
|
-
"modelValue": checked,
|
|
100
|
-
"onUpdate:modelValue": ($event) => checked = $event,
|
|
101
|
-
"class": ns.em("item", "checkbox")
|
|
102
|
-
}, null)]);
|
|
41
|
+
const onCurVisibleMenuChange = (menuItems) => {
|
|
42
|
+
curVisibleMenuItems.value = menuItems;
|
|
103
43
|
};
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
44
|
+
const renderContent = () => {
|
|
45
|
+
switch (props.showMode) {
|
|
46
|
+
case "LIST":
|
|
47
|
+
return createVNode(MenuDesignList, {
|
|
48
|
+
"curVisibleMenuItems": curVisibleMenuItems.value,
|
|
49
|
+
"allVisibleMenuItems": c.state.mobAuthedMenuItems,
|
|
50
|
+
"onCurVisibleMenuChange": onCurVisibleMenuChange
|
|
51
|
+
}, null);
|
|
52
|
+
case "TREE":
|
|
53
|
+
default:
|
|
54
|
+
return createVNode(MenuDesignTree, {
|
|
55
|
+
"curVisibleMenuItems": curVisibleMenuItems.value,
|
|
56
|
+
"allVisibleMenuItems": c.state.mobAuthedMenuItems,
|
|
57
|
+
"appMenuStyle": c.model.appMenuStyle,
|
|
58
|
+
"onCurVisibleMenuChange": onCurVisibleMenuChange
|
|
59
|
+
}, null);
|
|
110
60
|
}
|
|
111
|
-
return renderNodeItem(_item, _level);
|
|
112
|
-
};
|
|
113
|
-
const renderTree = (items) => {
|
|
114
|
-
return createVNode("div", {
|
|
115
|
-
"class": ns.e("tree")
|
|
116
|
-
}, [items.map((item) => renderNode(item, 0))]);
|
|
117
61
|
};
|
|
118
62
|
return {
|
|
119
63
|
c,
|
|
120
64
|
ns,
|
|
121
65
|
onSave,
|
|
122
66
|
onClose,
|
|
123
|
-
|
|
67
|
+
renderContent
|
|
124
68
|
};
|
|
125
69
|
},
|
|
126
70
|
render() {
|
|
127
71
|
return createVNode("div", {
|
|
128
|
-
"class": this.ns.b()
|
|
72
|
+
"class": [this.ns.b(), this.ns.is(this.showMode.toLocaleLowerCase(), true)]
|
|
129
73
|
}, [createVNode("div", {
|
|
130
74
|
"class": this.ns.e("header")
|
|
131
75
|
}, [createVNode("ion-icon", {
|
|
@@ -139,7 +83,7 @@ const MenuDesign = /* @__PURE__ */ defineComponent({
|
|
|
139
83
|
"onClick": this.onSave
|
|
140
84
|
}, [ibiz.i18n.t("control.appmenu.save")])]), createVNode("div", {
|
|
141
85
|
"class": this.ns.e("content")
|
|
142
|
-
}, [this.
|
|
86
|
+
}, [this.renderContent()])]);
|
|
143
87
|
}
|
|
144
88
|
});
|
|
145
89
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-menu-design-list{--ibiz-menu-design-list-color-group-caption:var(--ibiz-color-text-2);--ibiz-menu-design-list-color-draggable-bg:var(--ibiz-color-bg-1);--ibiz-menu-design-list-color-draggable-prefix-icon:var(--ibiz-color-danger);--ibiz-menu-design-list-color-draggable-add-icon:var(--ibiz-color-primary);--ibiz-menu-design-list-color-draggable-item-content-border:var(--ibiz-color-border);--ibiz-menu-design-list-width-draggable-item-icon:var(--van-tabbar-item-icon-size);--ibiz-menu-design-list-spacing-caption-padding:var(--ibiz-spacing-base) 0;--ibiz-menu-design-list-spacing-draggable-padding:var(--ibiz-spacing-base-tight);--ibiz-menu-design-list-spacing-draggable-item-content-padding:var(--ibiz-spacing-base-tight) 0;--ibiz-menu-design-list-spacing-draggable-prefix-icon-margin:0 var(--ibiz-spacing-tight) 0 0;--ibiz-menu-design-list-spacing-draggable-item-icon:0 var(--ibiz-spacing-tight) 0 0;--ibiz-menu-design-list-radius-draggable-circle:var(--ibiz-border-radius-medium);--ibiz-menu-design-list-font-draggable-icon:var(--ibiz-font-size-header-3);--ibiz-menu-design-list-font-draggable-item:var(--ibiz-width-icon-medium);--ibiz-menu-design-list-line-height-draggable-item-caption:1}.ibiz-menu-design-list__group--caption{padding:var(--ibiz-menu-design-list-spacing-caption-padding);color:var(--ibiz-menu-design-list-color-group-caption)}.ibiz-menu-design-list__draggable{padding:var(--ibiz-menu-design-list-spacing-draggable-padding);background-color:var(--ibiz-menu-design-list-color-draggable-bg);border-radius:var(--ibiz-menu-design-list-radius-draggable-circle)}.ibiz-menu-design-list__draggable--icon{font-size:var(--ibiz-menu-design-list-font-draggable-icon)}.ibiz-menu-design-list__draggable--icon.ibiz-menu-design-list__draggable--prefix-icon{margin:var(--ibiz-menu-design-list-spacing-draggable-prefix-icon-margin)}.ibiz-menu-design-list__draggable--icon.ibiz-menu-design-list__draggable--remove-icon{color:var(--ibiz-menu-design-list-color-draggable-prefix-icon)}.ibiz-menu-design-list__draggable--icon.ibiz-menu-design-list__draggable--add-icon{color:var(--ibiz-menu-design-list-color-draggable-add-icon)}.ibiz-menu-design-list__draggable--item{display:flex;align-items:center;width:100%;font-size:var(--ibiz-menu-design-list-font-draggable-item)}.ibiz-menu-design-list__draggable--item-content{display:flex;flex-grow:1;align-items:center;justify-content:space-between;padding:var(--ibiz-menu-design-list-spacing-draggable-item-content-padding);border-bottom:1px solid var(--ibiz-menu-design-list-color-draggable-item-content-border)}.ibiz-menu-design-list__draggable--item-caption{display:flex;align-items:center;line-height:var(--ibiz-menu-design-list-line-height-draggable-item-caption)}.ibiz-menu-design-list__draggable--item-icon{display:flex;align-items:center;width:var(--ibiz-menu-design-list-width-draggable-item-icon);margin:var(--ibiz-menu-design-list-spacing-draggable-item-icon)}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { defineComponent, createVNode, ref, resolveComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import draggable from 'vuedraggable';
|
|
4
|
+
import './menu-design-list.css';
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
const MenuDesignList = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizMenuDesignList",
|
|
9
|
+
components: {
|
|
10
|
+
draggable
|
|
11
|
+
},
|
|
12
|
+
props: {
|
|
13
|
+
curVisibleMenuItems: {
|
|
14
|
+
type: Array,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
allVisibleMenuItems: {
|
|
18
|
+
type: Array,
|
|
19
|
+
required: true
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
emits: {
|
|
23
|
+
curVisibleMenuChange: (_menuItems) => true
|
|
24
|
+
},
|
|
25
|
+
setup(props, {
|
|
26
|
+
emit
|
|
27
|
+
}) {
|
|
28
|
+
const ns = useNamespace("menu-design-list");
|
|
29
|
+
const curMenuItems = ref([]);
|
|
30
|
+
const moreMenuItems = ref([]);
|
|
31
|
+
const initData = () => {
|
|
32
|
+
curMenuItems.value = [...props.curVisibleMenuItems];
|
|
33
|
+
moreMenuItems.value = props.allVisibleMenuItems.filter((menu) => !props.curVisibleMenuItems.find((_item) => menu.id === _item.id));
|
|
34
|
+
};
|
|
35
|
+
initData();
|
|
36
|
+
const emitChange = () => {
|
|
37
|
+
emit("curVisibleMenuChange", [...curMenuItems.value]);
|
|
38
|
+
};
|
|
39
|
+
const handleRemoveOrAdd = (type, index) => {
|
|
40
|
+
if (type === "nav") {
|
|
41
|
+
const item = curMenuItems.value[index];
|
|
42
|
+
curMenuItems.value.splice(index, 1);
|
|
43
|
+
moreMenuItems.value.push(item);
|
|
44
|
+
} else {
|
|
45
|
+
const item = moreMenuItems.value[index];
|
|
46
|
+
moreMenuItems.value.splice(index, 1);
|
|
47
|
+
curMenuItems.value.push(item);
|
|
48
|
+
}
|
|
49
|
+
emitChange();
|
|
50
|
+
};
|
|
51
|
+
const renderDraggable = (type, menuItems) => {
|
|
52
|
+
return createVNode(draggable, {
|
|
53
|
+
"itemKey": "id",
|
|
54
|
+
"group": "menu-design",
|
|
55
|
+
"handle": ".draggable-icon",
|
|
56
|
+
"list": menuItems,
|
|
57
|
+
"class": ns.e("draggable"),
|
|
58
|
+
"onEnd": emitChange
|
|
59
|
+
}, {
|
|
60
|
+
item: ({
|
|
61
|
+
element,
|
|
62
|
+
index
|
|
63
|
+
}) => {
|
|
64
|
+
return createVNode("div", {
|
|
65
|
+
"class": ns.em("draggable", "item")
|
|
66
|
+
}, [createVNode("ion-icon", {
|
|
67
|
+
"name": type === "nav" ? "remove-circle" : "add-circle",
|
|
68
|
+
"class": [ns.em("draggable", "icon"), ns.em("draggable", type === "nav" ? "remove-icon" : "add-icon"), ns.em("draggable", "prefix-icon")],
|
|
69
|
+
"onClick": () => handleRemoveOrAdd(type, index)
|
|
70
|
+
}, null), createVNode("div", {
|
|
71
|
+
"class": ns.em("draggable", "item-content")
|
|
72
|
+
}, [createVNode("div", {
|
|
73
|
+
"class": ns.em("draggable", "item-caption")
|
|
74
|
+
}, [createVNode(resolveComponent("iBizIcon"), {
|
|
75
|
+
"icon": element.sysImage,
|
|
76
|
+
"class": ns.em("draggable", "item-icon")
|
|
77
|
+
}, null), createVNode("div", null, [element.caption])]), createVNode("ion-icon", {
|
|
78
|
+
"name": "menu-outline",
|
|
79
|
+
"class": ["draggable-icon", ns.em("draggable", "icon"), ns.em("draggable", "suffix-icon")]
|
|
80
|
+
}, null)])]);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
const renderMenuList = (type) => {
|
|
85
|
+
return createVNode("div", {
|
|
86
|
+
"class": ns.e("group")
|
|
87
|
+
}, [createVNode("div", {
|
|
88
|
+
"class": ns.em("group", "caption")
|
|
89
|
+
}, [type === "nav" ? ibiz.i18n.t("control.appmenu.bottomNav") : ibiz.i18n.t("control.appmenu.more")]), renderDraggable(type, type === "nav" ? curMenuItems.value : moreMenuItems.value)]);
|
|
90
|
+
};
|
|
91
|
+
return {
|
|
92
|
+
ns,
|
|
93
|
+
renderMenuList
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
render() {
|
|
97
|
+
return createVNode("div", {
|
|
98
|
+
"class": this.ns.b()
|
|
99
|
+
}, [createVNode("div", {
|
|
100
|
+
"class": this.ns.e("wrapper")
|
|
101
|
+
}, [[this.renderMenuList("nav"), this.renderMenuList("more")]])]);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export { MenuDesignList };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-menu-design-tree{--ibiz-menu-design-tree-color-item-bg:var(--ibiz-color-bg-0);--ibiz-menu-design-tree-height-item:var(--ibiz-height-control-large);--ibiz-menu-design-tree-spacing-item-padding:0 var(--ibiz-spacing-base);--ibiz-menu-design-tree-spacing-item-margin:var(--ibiz-spacing-tight) 0;--ibiz-menu-design-tree-spacing-item-caption-margin:0 0 0 var(--ibiz-spacing-tight);--ibiz-menu-design-tree-spacing-item-checkbox-margin:0 0 0 var(--ibiz-spacing-extra-tight);--ibiz-menu-design-tree-spacing-node-item-margin-left:1.25rem;--ibiz-menu-design-tree-radius-item-circle:var(--ibiz-border-radius-medium);--ibiz-menu-design-tree-font-item-font-size:var(--ibiz-font-size-header-6);--ibiz-menu-design-tree-icon-item-size:var(--ibiz-font-size-header-6)}.ibiz-menu-design-tree__item{display:flex;align-items:center;height:var(--ibiz-menu-design-tree-height-item);padding:var(--ibiz-menu-design-tree-spacing-item-padding);margin:var(--ibiz-menu-design-tree-spacing-item-margin);font-size:var(--ibiz-menu-design-tree-font-item-font-size);line-height:var(--ibiz-menu-design-tree-height-item);background-color:var(--ibiz-menu-design-tree-color-item-bg);border-radius:var(--ibiz-menu-design-tree-radius-item-circle)}.ibiz-menu-design-tree__item--icon{display:flex;align-items:center;width:var(--ibiz-menu-design-tree-icon-item-size)}.ibiz-menu-design-tree__item--icon+.ibiz-menu-design-tree__item--caption{margin:var(--ibiz-menu-design-tree-spacing-item-caption-margin)}.ibiz-menu-design-tree__item--caption{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-menu-design-tree__item--checkbox{padding:var(--ibiz-menu-design-tree-spacing-item-checkbox-margin);margin-left:auto}.ibiz-menu-design-tree .ibiz-menu-design-tree__item{position:relative}.ibiz-menu-design-tree .ibiz-menu-design-tree__item::after{position:absolute;top:0;left:0;display:block;width:100%;height:100%;content:""}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { defineComponent, createVNode, ref, onUnmounted, resolveComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { recursiveIterate } from '@ibiz-template/core';
|
|
4
|
+
import { getDefaultIconVal } from '../../menu-render-util.mjs';
|
|
5
|
+
import './menu-design-tree.css';
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
const MenuDesignTree = /* @__PURE__ */ defineComponent({
|
|
9
|
+
name: "IBizMenuDesignTree",
|
|
10
|
+
props: {
|
|
11
|
+
curVisibleMenuItems: {
|
|
12
|
+
type: Array,
|
|
13
|
+
required: true
|
|
14
|
+
},
|
|
15
|
+
allVisibleMenuItems: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
appMenuStyle: {
|
|
20
|
+
type: String
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
emits: {
|
|
24
|
+
curVisibleMenuChange: (_menuItems) => true
|
|
25
|
+
},
|
|
26
|
+
setup(props, {
|
|
27
|
+
emit
|
|
28
|
+
}) {
|
|
29
|
+
const ns = useNamespace("menu-design-tree");
|
|
30
|
+
const menuMap = ref(/* @__PURE__ */ new Map());
|
|
31
|
+
const allMenuMap = /* @__PURE__ */ new Map();
|
|
32
|
+
const initData = () => {
|
|
33
|
+
recursiveIterate({
|
|
34
|
+
appMenuItems: props.curVisibleMenuItems
|
|
35
|
+
}, (item) => {
|
|
36
|
+
if (item.id) {
|
|
37
|
+
menuMap.value.set(item.id, item);
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
childrenFields: ["appMenuItems"]
|
|
41
|
+
});
|
|
42
|
+
recursiveIterate({
|
|
43
|
+
appMenuItems: props.allVisibleMenuItems
|
|
44
|
+
}, (item) => {
|
|
45
|
+
if (item.id) {
|
|
46
|
+
allMenuMap.set(item.id, item);
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
childrenFields: ["appMenuItems"]
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
initData();
|
|
53
|
+
onUnmounted(() => {
|
|
54
|
+
menuMap.value.clear();
|
|
55
|
+
allMenuMap.clear();
|
|
56
|
+
});
|
|
57
|
+
const getItemIcon = (item, isGroup) => {
|
|
58
|
+
if (item.sysImage)
|
|
59
|
+
return item.sysImage;
|
|
60
|
+
switch (props.appMenuStyle) {
|
|
61
|
+
case "ICONVIEW":
|
|
62
|
+
return !isGroup ? getDefaultIconVal() : void 0;
|
|
63
|
+
case "LISTVIEW":
|
|
64
|
+
return;
|
|
65
|
+
default:
|
|
66
|
+
return getDefaultIconVal();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const handleItemClick = (item, checked) => {
|
|
70
|
+
if (!item.id)
|
|
71
|
+
return;
|
|
72
|
+
if (checked) {
|
|
73
|
+
menuMap.value.delete(item.id);
|
|
74
|
+
} else {
|
|
75
|
+
menuMap.value.set(item.id, item);
|
|
76
|
+
}
|
|
77
|
+
emit("curVisibleMenuChange", Array.from(menuMap.value.values()).map((_menu) => {
|
|
78
|
+
return allMenuMap.get(_menu.id);
|
|
79
|
+
}).filter((_menu) => !!_menu));
|
|
80
|
+
};
|
|
81
|
+
const renderNodeItem = (_item, _level, isGroup) => {
|
|
82
|
+
const marginLeft = "calc(".concat(_level, " * var(").concat(ns.cssVarBlockName("spacing-node-item-margin-left"), "))");
|
|
83
|
+
let checked = menuMap.value.has(_item.id || "");
|
|
84
|
+
return createVNode("div", {
|
|
85
|
+
"class": [ns.e("item"), ns.is("group-item", !!isGroup)],
|
|
86
|
+
"style": {
|
|
87
|
+
marginLeft
|
|
88
|
+
},
|
|
89
|
+
"onClick": () => handleItemClick(_item, checked)
|
|
90
|
+
}, [createVNode(resolveComponent("iBizIcon"), {
|
|
91
|
+
"class": ns.em("item", "icon"),
|
|
92
|
+
"icon": getItemIcon(_item, isGroup)
|
|
93
|
+
}, null), createVNode("div", {
|
|
94
|
+
"class": ns.em("item", "caption")
|
|
95
|
+
}, [_item.caption]), createVNode(resolveComponent("van-checkbox"), {
|
|
96
|
+
"modelValue": checked,
|
|
97
|
+
"onUpdate:modelValue": ($event) => checked = $event,
|
|
98
|
+
"class": ns.em("item", "checkbox")
|
|
99
|
+
}, null)]);
|
|
100
|
+
};
|
|
101
|
+
const renderNode = (_item, _level) => {
|
|
102
|
+
var _a;
|
|
103
|
+
if (_item.appMenuItems && _item.appMenuItems.length > 0) {
|
|
104
|
+
return [renderNodeItem(_item, _level, true), ...(_a = _item.appMenuItems) == null ? void 0 : _a.map((item) => {
|
|
105
|
+
return renderNode(item, _level + 1);
|
|
106
|
+
})];
|
|
107
|
+
}
|
|
108
|
+
return renderNodeItem(_item, _level);
|
|
109
|
+
};
|
|
110
|
+
return {
|
|
111
|
+
ns,
|
|
112
|
+
renderNode
|
|
113
|
+
};
|
|
114
|
+
},
|
|
115
|
+
render() {
|
|
116
|
+
return createVNode("div", {
|
|
117
|
+
"class": this.ns.b()
|
|
118
|
+
}, [createVNode("div", {
|
|
119
|
+
"class": this.ns.e("wrapper")
|
|
120
|
+
}, [this.allVisibleMenuItems.map((item) => this.renderNode(item, 0))])]);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
export { MenuDesignTree };
|
|
@@ -8,11 +8,14 @@ function getDefaultIconVal() {
|
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
10
|
function useMenuRender(c) {
|
|
11
|
+
const isDefaultMenu = !c.model.appMenuStyle;
|
|
12
|
+
const showMode = isDefaultMenu ? "LIST" : "TREE";
|
|
11
13
|
const onCustomizedClick = async () => {
|
|
12
14
|
await ibiz.overlay.drawer((modal) => {
|
|
13
15
|
return h(MenuDesign, {
|
|
14
16
|
modal,
|
|
15
|
-
controller: c
|
|
17
|
+
controller: c,
|
|
18
|
+
showMode
|
|
16
19
|
});
|
|
17
20
|
}, {}, {
|
|
18
21
|
width: 100,
|
|
@@ -55,12 +55,12 @@ const FormButton = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
}, {
|
|
56
56
|
default: () => [createVNode("div", {
|
|
57
57
|
"class": this.ns.b("content")
|
|
58
|
-
}, [createVNode(resolveComponent("iBizIcon"), {
|
|
58
|
+
}, [this.modelData.sysImage ? createVNode(resolveComponent("iBizIcon"), {
|
|
59
59
|
"class": this.ns.bm("content", "icon"),
|
|
60
60
|
"icon": this.modelData.sysImage
|
|
61
|
-
}, null), createVNode("span", {
|
|
61
|
+
}, null) : null, this.modelData.showCaption ? createVNode("span", {
|
|
62
62
|
"class": this.ns.bm("content", "caption")
|
|
63
|
-
}, [this.
|
|
63
|
+
}, [this.captionText]) : null])]
|
|
64
64
|
})]);
|
|
65
65
|
}
|
|
66
66
|
});
|
|
@@ -18,6 +18,10 @@ const FloatToolbar = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
type: Object,
|
|
19
19
|
required: true
|
|
20
20
|
},
|
|
21
|
+
groupShowMode: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
21
25
|
counterData: {
|
|
22
26
|
type: Object
|
|
23
27
|
},
|
|
@@ -47,7 +51,8 @@ const FloatToolbar = /* @__PURE__ */ defineComponent({
|
|
|
47
51
|
} = useToolbarGroupModalHandler({
|
|
48
52
|
modal: props.modal,
|
|
49
53
|
counterData: props.counterData,
|
|
50
|
-
buttonsState: props.buttonsState
|
|
54
|
+
buttonsState: props.buttonsState,
|
|
55
|
+
groupShowMode: props.groupShowMode
|
|
51
56
|
});
|
|
52
57
|
const handleFloatToolbarClose = () => {
|
|
53
58
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-toolbar-group-list{--ibiz-toolbar-group-list-color-item-disabled-text:var(--ibiz-control-toolbar-color-disabled-text);--ibiz-toolbar-group-list-height-max-height:calc(100vh - var(--ibiz-height-control-large));--ibiz-toolbar-group-list-height-item-
|
|
1
|
+
.ibiz-toolbar-group-list{--ibiz-toolbar-group-list-color-item-disabled-text:var(--ibiz-control-toolbar-color-disabled-text);--ibiz-toolbar-group-list-height-max-height:calc(100vh - var(--ibiz-height-control-large));--ibiz-toolbar-group-list-height-item:3rem;--ibiz-toolbar-group-list-height-modal:100vh;--ibiz-toolbar-group-list-width-modal:100vw;--ibiz-toolbar-group-list-width-item-arrow:calc(var(--ibiz-spacing-base) + var(--ibiz-toolbar-group-list-font-item-arrow-font-size));--ibiz-toolbar-group-list-spacing-padding:var(--ibiz-spacing-tight) 0;--ibiz-toolbar-group-list-spacing-default-padding:0;--ibiz-toolbar-group-list-spacing-group-item-wrapper-padding:0 1.2em 0 0;--ibiz-toolbar-group-list-spacing-item-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base);--ibiz-toolbar-group-list-spacing-item-label-margin:0 0 0 var(--ibiz-spacing-tight);--ibiz-toolbar-group-list-spacing-default-item-label-margin:0 0 0 var(--ibiz-spacing-extra-tight);--ibiz-toolbar-group-list-font-item-font-size:var(--ibiz-spacing-base);--ibiz-toolbar-group-list-font-item-arrow-font-size:1.1em;display:flex;flex-direction:column;max-height:var(--ibiz-toolbar-group-list-height-max-height);padding:var(--ibiz-toolbar-group-list-spacing-padding)}.ibiz-toolbar-group-list__wrapper{height:100%;width:100%;overflow:hidden auto}.ibiz-toolbar-group-list__item{display:flex;align-items:center;justify-content:start;position:relative;height:var(--ibiz-toolbar-group-list-height-item);padding:var(--ibiz-toolbar-group-list-spacing-item-padding);font-size:var(--ibiz-toolbar-group-list-font-item-font-size);width:100%}.ibiz-toolbar-group-list__item--wrapper{display:flex;align-items:center;width:100%}.ibiz-toolbar-group-list__item--wrapper .ibiz-toolbar-group-list-item{width:100%;--ibiz-info-item-spacing-label-margin:var(--ibiz-toolbar-group-list-spacing-item-label-margin)}.ibiz-toolbar-group-list__item--wrapper .ibiz-toolbar-group-list-item:not(:has(.ibiz-icon))::before{display:inline-block;width:var(--ibiz-info-item-icon-size);height:var(--ibiz-info-item-icon-size);margin:var(--ibiz-info-item-spacing-label-margin);content:"";flex-shrink:0}.ibiz-toolbar-group-list__item--wrapper .ibiz-toolbar-group-list-item .ibiz-info-item__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ibiz-toolbar-group-list__item.is-disabled{color:var(--ibiz-toolbar-group-list-color-item-disabled-text);pointer-events:none}.ibiz-toolbar-group-list__item.is-group-item--wrapper{padding:var(--ibiz-toolbar-group-list-spacing-group-item-wrapper-padding)}.ibiz-toolbar-group-list__item-arrow{display:flex;align-items:center;justify-content:start;position:absolute;right:0;top:0;font-size:var(--ibiz-toolbar-group-list-font-item-arrow-font-size);height:100%;width:var(--ibiz-toolbar-group-list-width-item-arrow)}.ibiz-toolbar-group-list__modal{position:fixed;top:0;left:0;z-index:1;width:var(--ibiz-toolbar-group-list-width-modal);height:var(--ibiz-toolbar-group-list-height-modal)}.ibiz-toolbar-group-list.is-default{--ibiz-toolbar-group-list-spacing-padding:var(--ibiz-toolbar-group-list-spacing-default-padding);--ibiz-toolbar-group-list-spacing-item-label-margin:var(--ibiz-toolbar-group-list-spacing-default-item-label-margin)}.ibiz-toolbar-group-list.is-default .ibiz-toolbar-group-list__wrapper{position:relative;z-index:2}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, createVNode } from 'vue';
|
|
1
|
+
import { defineComponent, createVNode, resolveComponent } from 'vue';
|
|
2
2
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
3
|
import { useToolBarItemRender, useToolbarGroupModalHandler } from '../toolbar-render-util.mjs';
|
|
4
4
|
import './toolbar-group-list.css';
|
|
@@ -18,6 +18,10 @@ const ToolbarGroupList = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
type: Object,
|
|
19
19
|
required: true
|
|
20
20
|
},
|
|
21
|
+
groupShowMode: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true
|
|
24
|
+
},
|
|
21
25
|
counterData: {
|
|
22
26
|
type: Object
|
|
23
27
|
},
|
|
@@ -29,47 +33,57 @@ const ToolbarGroupList = /* @__PURE__ */ defineComponent({
|
|
|
29
33
|
setup(props) {
|
|
30
34
|
const ns = useNamespace("toolbar-group-list");
|
|
31
35
|
const {
|
|
32
|
-
btnType,
|
|
33
36
|
renderToolbarItemContent
|
|
34
37
|
} = useToolBarItemRender(ns, {
|
|
35
38
|
counterData: props.counterData
|
|
36
39
|
});
|
|
37
40
|
const {
|
|
38
|
-
handleItemClick
|
|
41
|
+
handleItemClick,
|
|
42
|
+
handleModalClose
|
|
39
43
|
} = useToolbarGroupModalHandler({
|
|
40
44
|
modal: props.modal,
|
|
41
45
|
counterData: props.counterData,
|
|
42
|
-
buttonsState: props.buttonsState
|
|
46
|
+
buttonsState: props.buttonsState,
|
|
47
|
+
groupShowMode: props.groupShowMode,
|
|
48
|
+
direction: "horizontal"
|
|
43
49
|
});
|
|
44
50
|
return {
|
|
45
51
|
ns,
|
|
46
52
|
handleItemClick,
|
|
47
|
-
|
|
53
|
+
handleModalClose,
|
|
48
54
|
renderToolbarItemContent
|
|
49
55
|
};
|
|
50
56
|
},
|
|
51
57
|
render() {
|
|
52
|
-
var _a;
|
|
58
|
+
var _a, _b;
|
|
53
59
|
return createVNode("div", {
|
|
54
|
-
"class": [this.ns.b()]
|
|
55
|
-
}, [createVNode("div", {
|
|
60
|
+
"class": [this.ns.b(), this.ns.is((_a = this.groupShowMode) == null ? void 0 : _a.toLocaleLowerCase(), true)]
|
|
61
|
+
}, [this.groupShowMode === "DEFAULT" ? createVNode("div", {
|
|
62
|
+
"class": this.ns.e("modal"),
|
|
63
|
+
"onClick": this.handleModalClose
|
|
64
|
+
}, null) : null, createVNode("div", {
|
|
56
65
|
"class": this.ns.e("wrapper")
|
|
57
|
-
}, [(
|
|
66
|
+
}, [(_b = this.groupItems) == null ? void 0 : _b.map((_item) => {
|
|
58
67
|
var _a2;
|
|
59
68
|
const itemId = _item.id;
|
|
60
69
|
const visible = (_a2 = this.buttonsState[itemId]) == null ? void 0 : _a2.visible;
|
|
61
70
|
let disabled = this.buttonsState[itemId].disabled;
|
|
62
71
|
const toolbarItem = _item;
|
|
63
|
-
|
|
72
|
+
const isGroup = toolbarItem.itemType === "ITEMS";
|
|
73
|
+
if (isGroup)
|
|
64
74
|
disabled = false;
|
|
65
75
|
if (!visible)
|
|
66
76
|
return;
|
|
67
77
|
return createVNode("div", {
|
|
68
|
-
"class": [this.ns.e("item"), this.ns.is("disabled", disabled)],
|
|
78
|
+
"class": [this.ns.e("item"), this.ns.is("disabled", disabled), this.ns.is("group-item", isGroup)],
|
|
69
79
|
"onClick": (_e) => !disabled && this.handleItemClick(_item, _e, this.isGroupExtractMode)
|
|
70
80
|
}, [createVNode("div", {
|
|
71
81
|
"class": this.ns.em("item", "wrapper")
|
|
72
|
-
}, [this.renderToolbarItemContent(_item)
|
|
82
|
+
}, [this.renderToolbarItemContent(_item), isGroup ? createVNode("div", {
|
|
83
|
+
"class": this.ns.e("item-arrow")
|
|
84
|
+
}, [createVNode(resolveComponent("van-icon"), {
|
|
85
|
+
"name": "arrow"
|
|
86
|
+
}, null)]) : null])]);
|
|
73
87
|
})])]);
|
|
74
88
|
}
|
|
75
89
|
});
|