@ibiz-template/vue3-components 0.1.12-dev.0 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +3 -3
- package/dist/index.system.min.js.map +1 -1
- package/dist/wang-editor-0c05cd5f.js +2 -0
- package/dist/wang-editor-0c05cd5f.js.map +1 -0
- package/es/common/action-toolbar/action-toolbar.mjs +1 -1
- package/es/common/no-data/no-data.mjs +1 -1
- package/es/common/rawitem/rawitem.css +1 -1
- package/es/common/split/split.css +1 -1
- package/es/control/app-menu/app-menu.css +1 -1
- package/es/control/app-menu/app-menu.mjs +1 -1
- package/es/control/app-menu-icon-view/app-menu-icon-view.mjs +1 -1
- package/es/control/calendar/calendar.mjs +1 -1
- package/es/control/dashboard/portlet/container-portlet/container-portlet.css +1 -0
- package/es/control/dashboard/portlet/container-portlet/container-portlet.d.ts +1 -0
- package/es/control/dashboard/portlet/container-portlet/container-portlet.mjs +1 -0
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/es/control/dashboard/portlet/portlet-layout/portlet-layout.mjs +1 -1
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/drbar/drbar.controller.mjs +2 -8
- package/es/control/drtab/drtab.controller.mjs +2 -8
- package/es/control/exp-bar/data-view-exp-bar/data-view-exp-bar.css +1 -1
- package/es/control/exp-bar/grid-exp-bar/grid-exp-bar.css +1 -1
- package/es/control/exp-bar/list-exp-bar/list-exp-bar.css +1 -1
- package/es/control/exp-bar/render-util.mjs +2 -2
- package/es/control/exp-bar/tree-exp-bar/tree-exp-bar.css +1 -1
- package/es/control/form/form/form.mjs +1 -1
- package/es/control/form/form-detail/form-button/form-button.css +1 -1
- package/es/control/form/form-detail/form-button/form-button.mjs +6 -5
- package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +1 -1
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.d.ts +72 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.mjs +157 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.d.ts +1 -3
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.mjs +17 -100
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.d.ts +1 -3
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.mjs +19 -85
- package/es/control/form/form-detail/form-mdctrl/index.mjs +2 -0
- package/es/control/form/form-detail/form-page/form-page.css +1 -1
- package/es/control/form/search-form/search-form.css +1 -1
- package/es/control/form/search-form/search-form.mjs +10 -3
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +2 -0
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +7 -4
- package/es/control/grid/grid-column/grid-field-column/index.d.ts +2 -0
- package/es/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.mjs +2 -1
- package/es/control/panel/view-layout-panel/index.d.ts +10 -0
- package/es/control/panel/view-layout-panel/view-layout-panel.d.ts +11 -3
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +48 -42
- package/es/control/toolbar/toolbar.mjs +1 -1
- package/es/control/tree/tree.css +1 -1
- package/es/devtool/devtool-action.css +1 -0
- package/es/devtool/devtool-action.d.ts +26 -0
- package/es/devtool/devtool-action.mjs +218 -0
- package/es/devtool/index.d.ts +50 -0
- package/es/devtool/index.mjs +80 -0
- package/es/devtool/interface/devtool-event.d.ts +12 -0
- package/es/devtool/interface/devtool-event.mjs +1 -0
- package/es/devtool/interface/devtool-view.d.ts +15 -0
- package/es/devtool/interface/devtool-view.mjs +1 -0
- package/es/editor/check-box/ibiz-checkbox/ibiz-checkbox.mjs +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +5 -0
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/es/editor/text-box/input/input.d.ts +2 -2
- package/es/editor/text-box/input/input.mjs +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +3 -0
- package/es/node_modules/.pnpm/element-plus@2.3.9_vue@3.3.4/node_modules/element-plus/dist/locale/zh-cn.mjs +131 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/es/panel-component/auth-userinfo/auth-userinfo.d.ts +3 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.mjs +29 -6
- package/es/panel-component/auth-userinfo/index.d.ts +3 -0
- package/es/panel-component/index.d.ts +1 -0
- package/es/panel-component/index.mjs +4 -1
- package/es/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/es/panel-component/panel-app-header/panel-app-header.css +1 -1
- package/es/panel-component/panel-app-title/panel-app-title.css +1 -1
- package/es/panel-component/panel-button/panel-button.css +1 -1
- package/es/panel-component/panel-button/panel-button.mjs +5 -4
- package/es/panel-component/panel-exp-header/panel-exp-header.css +1 -1
- package/es/panel-component/panel-index-view-search/index.d.ts +28 -0
- package/es/panel-component/panel-index-view-search/index.mjs +17 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.css +1 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.d.ts +30 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.mjs +82 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.provider.d.ts +13 -0
- package/es/panel-component/panel-index-view-search/panel-index-view-search.provider.mjs +20 -0
- package/es/panel-component/single-data-container/index.d.ts +10 -0
- package/es/panel-component/single-data-container/single-data-container.controller.d.ts +37 -2
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +75 -1
- package/es/panel-component/single-data-container/single-data-container.d.ts +11 -2
- package/es/panel-component/single-data-container/single-data-container.mjs +34 -21
- package/es/util/app-drawer/app-drawer-component.css +1 -1
- package/es/view/common/index.d.ts +1 -0
- package/es/view/common/view.css +1 -1
- package/es/view/common/view.d.ts +1 -0
- package/es/view/common/view.mjs +13 -1
- package/es/view-engine/tab-exp-view.engine.d.ts +1 -0
- package/es/view-engine/tab-exp-view.engine.mjs +8 -1
- package/lib/common/action-toolbar/action-toolbar.cjs +1 -1
- package/lib/common/no-data/no-data.cjs +1 -1
- package/lib/common/rawitem/rawitem.css +1 -1
- package/lib/common/split/split.css +1 -1
- package/lib/control/app-menu/app-menu.cjs +1 -1
- package/lib/control/app-menu/app-menu.css +1 -1
- package/lib/control/app-menu-icon-view/app-menu-icon-view.cjs +1 -1
- package/lib/control/calendar/calendar.cjs +1 -1
- package/lib/control/dashboard/portlet/container-portlet/container-portlet.cjs +1 -0
- package/lib/control/dashboard/portlet/container-portlet/container-portlet.css +1 -0
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.cjs +1 -1
- package/lib/control/dashboard/portlet/portlet-layout/portlet-layout.css +1 -1
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drbar/drbar.controller.cjs +2 -8
- package/lib/control/drtab/drtab.controller.cjs +2 -8
- package/lib/control/exp-bar/data-view-exp-bar/data-view-exp-bar.css +1 -1
- package/lib/control/exp-bar/grid-exp-bar/grid-exp-bar.css +1 -1
- package/lib/control/exp-bar/list-exp-bar/list-exp-bar.css +1 -1
- package/lib/control/exp-bar/render-util.cjs +2 -2
- package/lib/control/exp-bar/tree-exp-bar/tree-exp-bar.css +1 -1
- package/lib/control/form/form/form.cjs +1 -1
- package/lib/control/form/form-detail/form-button/form-button.cjs +6 -5
- package/lib/control/form/form-detail/form-button/form-button.css +1 -1
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +1 -1
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form-shell.cjs +159 -0
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form/form-mdctrl-repeater-form.cjs +16 -99
- package/lib/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/form-mdctrl-repeater-form-one/form-mdctrl-repeater-form-one.cjs +18 -84
- package/lib/control/form/form-detail/form-mdctrl/index.cjs +2 -0
- package/lib/control/form/form-detail/form-page/form-page.css +1 -1
- package/lib/control/form/search-form/search-form.cjs +10 -3
- package/lib/control/form/search-form/search-form.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +7 -4
- package/lib/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.cjs +2 -1
- package/lib/control/panel/view-layout-panel/view-layout-panel.cjs +47 -41
- package/lib/control/toolbar/toolbar.cjs +1 -1
- package/lib/control/tree/tree.css +1 -1
- package/lib/devtool/devtool-action.cjs +220 -0
- package/lib/devtool/devtool-action.css +1 -0
- package/lib/devtool/index.cjs +83 -0
- package/lib/devtool/interface/devtool-event.cjs +2 -0
- package/lib/devtool/interface/devtool-view.cjs +2 -0
- package/lib/editor/check-box/ibiz-checkbox/ibiz-checkbox.cjs +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +5 -0
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/lib/editor/text-box/input/input.cjs +1 -1
- package/lib/index.cjs +165 -159
- package/lib/node_modules/.pnpm/element-plus@2.3.9_vue@3.3.4/node_modules/element-plus/dist/locale/zh-cn.cjs +135 -0
- package/lib/panel-component/auth-userinfo/auth-userinfo.cjs +28 -5
- package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/lib/panel-component/index.cjs +19 -14
- package/lib/panel-component/nav-tabs/nav-tabs.css +1 -1
- package/lib/panel-component/panel-app-header/panel-app-header.css +1 -1
- package/lib/panel-component/panel-app-title/panel-app-title.css +1 -1
- package/lib/panel-component/panel-button/panel-button.cjs +5 -4
- package/lib/panel-component/panel-button/panel-button.css +1 -1
- package/lib/panel-component/panel-exp-header/panel-exp-header.css +1 -1
- package/lib/panel-component/panel-index-view-search/index.cjs +23 -0
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.cjs +84 -0
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.css +1 -0
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.provider.cjs +22 -0
- package/lib/panel-component/single-data-container/single-data-container.cjs +33 -20
- package/lib/panel-component/single-data-container/single-data-container.controller.cjs +74 -0
- package/lib/util/app-drawer/app-drawer-component.css +1 -1
- package/lib/util/confirm-util/confirm-util.cjs +5 -5
- package/lib/util/loading-util/loading-util.cjs +2 -2
- package/lib/util/message-util/message-util.cjs +5 -5
- package/lib/util/modal-util/modal-util.cjs +6 -6
- package/lib/util/notification-util/notification-util.cjs +5 -5
- package/lib/view/common/view.cjs +12 -0
- package/lib/view/common/view.css +1 -1
- package/lib/view-engine/tab-exp-view.engine.cjs +7 -0
- package/package.json +6 -6
- package/dist/wang-editor-675011c6.js +0 -2
- package/dist/wang-editor-675011c6.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, createVNode, resolveComponent, createTextVNode } from 'vue';
|
|
1
|
+
import { defineComponent, ref, inject, computed, createVNode, resolveComponent, createTextVNode } from 'vue';
|
|
2
2
|
import { useRouter } from 'vue-router';
|
|
3
3
|
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
4
4
|
import './auth-userinfo.css';
|
|
@@ -18,11 +18,13 @@ const AuthUserinfo = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
required: true
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
setup() {
|
|
21
|
+
setup(prop) {
|
|
22
22
|
var _a;
|
|
23
23
|
const ns = useNamespace("user-info");
|
|
24
|
+
const c = prop.controller;
|
|
24
25
|
const {
|
|
25
|
-
srfusername = "\u6E38\u5BA2"
|
|
26
|
+
srfusername = "\u6E38\u5BA2",
|
|
27
|
+
srfpersonname
|
|
26
28
|
} = ((_a = ibiz.appData) == null ? void 0 : _a.context) || {};
|
|
27
29
|
const router = useRouter();
|
|
28
30
|
const isDarkTheme = ref(false);
|
|
@@ -46,11 +48,21 @@ const AuthUserinfo = /* @__PURE__ */ defineComponent({
|
|
|
46
48
|
htmlDom.classList.add(addClass);
|
|
47
49
|
}
|
|
48
50
|
};
|
|
51
|
+
const ctx = inject("ctx", void 0);
|
|
52
|
+
const menuAlign = computed(() => {
|
|
53
|
+
if (ctx == null ? void 0 : ctx.view) {
|
|
54
|
+
return ctx.view.model.mainMenuAlign || "LEFT";
|
|
55
|
+
}
|
|
56
|
+
return "LEFT";
|
|
57
|
+
});
|
|
49
58
|
return {
|
|
50
59
|
ns,
|
|
60
|
+
c,
|
|
51
61
|
srfusername,
|
|
62
|
+
srfpersonname,
|
|
52
63
|
router,
|
|
53
64
|
isDarkTheme,
|
|
65
|
+
menuAlign,
|
|
54
66
|
handleSwitchChange
|
|
55
67
|
};
|
|
56
68
|
},
|
|
@@ -64,14 +76,25 @@ const AuthUserinfo = /* @__PURE__ */ defineComponent({
|
|
|
64
76
|
},
|
|
65
77
|
render() {
|
|
66
78
|
return createVNode("div", {
|
|
67
|
-
"class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass]
|
|
79
|
+
"class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass, this.ns.is("left", this.menuAlign === "LEFT"), this.ns.is("top", this.menuAlign === "TOP")]
|
|
68
80
|
}, [createVNode(resolveComponent("el-dropdown"), null, {
|
|
69
|
-
default: () => createVNode("
|
|
81
|
+
default: () => createVNode("div", {
|
|
82
|
+
"class": this.ns.b("info")
|
|
83
|
+
}, [createVNode("div", {
|
|
70
84
|
"class": this.ns.b("label")
|
|
71
85
|
}, [createVNode(resolveComponent("el-avatar"), {
|
|
72
86
|
"class": this.ns.b("avatar"),
|
|
73
87
|
"src": "./assets/images/user-avatar.png"
|
|
74
|
-
}, null),
|
|
88
|
+
}, null), createVNode("div", {
|
|
89
|
+
"class": this.ns.b("name")
|
|
90
|
+
}, [createVNode("div", {
|
|
91
|
+
"class": this.ns.be("name", "user-name")
|
|
92
|
+
}, [this.srfusername]), this.menuAlign === "LEFT" && createVNode("div", {
|
|
93
|
+
"class": this.ns.be("name", "person-name")
|
|
94
|
+
}, [this.srfpersonname])])]), createVNode("ion-icon", {
|
|
95
|
+
"class": this.ns.e("down"),
|
|
96
|
+
"name": "chevron-down-outline"
|
|
97
|
+
}, null)]),
|
|
75
98
|
dropdown: () => createVNode(resolveComponent("el-dropdown-menu"), null, {
|
|
76
99
|
default: () => [createVNode(resolveComponent("el-dropdown-item"), null, {
|
|
77
100
|
default: () => [createVNode("ion-icon", {
|
|
@@ -11,9 +11,12 @@ export declare const IBizAuthUserinfo: import("@ibiz-template/vue3-util").TypeWi
|
|
|
11
11
|
};
|
|
12
12
|
}, {
|
|
13
13
|
ns: import("@ibiz-template/core").Namespace;
|
|
14
|
+
c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
14
15
|
srfusername: any;
|
|
16
|
+
srfpersonname: any;
|
|
15
17
|
router: import("vue-router").Router;
|
|
16
18
|
isDarkTheme: import("vue").Ref<boolean>;
|
|
19
|
+
menuAlign: import("vue").ComputedRef<string>;
|
|
17
20
|
handleSwitchChange: (newVal: boolean) => void;
|
|
18
21
|
}, unknown, {}, {
|
|
19
22
|
onClick(): Promise<void>;
|
|
@@ -13,6 +13,7 @@ export * from './panel-rawitem';
|
|
|
13
13
|
export * from './panel-tab-panel';
|
|
14
14
|
export * from './panel-tab-page';
|
|
15
15
|
export * from './split-container';
|
|
16
|
+
export * from './panel-index-view-search';
|
|
16
17
|
export declare const IBizPanelComponents: {
|
|
17
18
|
install: (v: App) => void;
|
|
18
19
|
};
|
|
@@ -18,6 +18,7 @@ import { IBizPanelViewContent } from './panel-view-content/index.mjs';
|
|
|
18
18
|
import { IBizPanelTabPanel } from './panel-tab-panel/index.mjs';
|
|
19
19
|
import { IBizPanelTabPage } from './panel-tab-page/index.mjs';
|
|
20
20
|
import { IBizSplitContainer } from './split-container/index.mjs';
|
|
21
|
+
import { IBizPanelIndexViewSearch } from './panel-index-view-search/index.mjs';
|
|
21
22
|
export { PanelContainerProvider } from './panel-container/panel-container.provider.mjs';
|
|
22
23
|
export { PanelContainerState } from './panel-container/panel-container.state.mjs';
|
|
23
24
|
export { PanelContainerController } from './panel-container/panel-container.controller.mjs';
|
|
@@ -48,6 +49,7 @@ export { PanelTabPanelProvider } from './panel-tab-panel/panel-tab-panel.provide
|
|
|
48
49
|
export { PanelTabPageProvider } from './panel-tab-page/panel-tab-page.provider.mjs';
|
|
49
50
|
export { SplitContainerProvider } from './split-container/split-container.provider.mjs';
|
|
50
51
|
export { SplitContainerController } from './split-container/split-container.controller.mjs';
|
|
52
|
+
export { PanelIndexViewSearchProvider } from './panel-index-view-search/panel-index-view-search.provider.mjs';
|
|
51
53
|
|
|
52
54
|
const IBizPanelComponents = {
|
|
53
55
|
install: (v) => {
|
|
@@ -71,7 +73,8 @@ const IBizPanelComponents = {
|
|
|
71
73
|
v.use(IBizPanelTabPanel);
|
|
72
74
|
v.use(IBizPanelTabPage);
|
|
73
75
|
v.use(IBizSplitContainer);
|
|
76
|
+
v.use(IBizPanelIndexViewSearch);
|
|
74
77
|
}
|
|
75
78
|
};
|
|
76
79
|
|
|
77
|
-
export { IBizAuthUserinfo, IBizNavPos, IBizNavPosIndex, IBizPanelAppTitle, IBizPanelButton, IBizPanelComponents, IBizPanelContainer, IBizPanelCtrlPos, IBizPanelField, IBizPanelRawItem, IBizPanelTabPage, IBizPanelTabPanel, IBizScrollContainer, IBizSplitContainer, IBizPanelComponents as default };
|
|
80
|
+
export { IBizAuthUserinfo, IBizNavPos, IBizNavPosIndex, IBizPanelAppTitle, IBizPanelButton, IBizPanelComponents, IBizPanelContainer, IBizPanelCtrlPos, IBizPanelField, IBizPanelIndexViewSearch, IBizPanelRawItem, IBizPanelTabPage, IBizPanelTabPanel, IBizScrollContainer, IBizSplitContainer, IBizPanelComponents as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-nav-tabs{--ibiz-nav-tabs-padding:var(--ibiz-spacing-base-tight);--ibiz-nav-tabs-left-width:100
|
|
1
|
+
.ibiz-nav-tabs{--ibiz-nav-tabs-padding:var(--ibiz-spacing-base-tight);--ibiz-nav-tabs-left-width:calc(100% - 60px);--ibiz-nav-tabs-right-width:60px;--ibiz-nav-tabs-right-height:30px;--ibiz-nav-tabs-item-height:40px;--ibiz-nav-tabs-item-padding:0 var(--ibiz-spacing-base-loose);--ibiz-nav-tabs-item-margin:0 var(--ibiz-spacing-base) 0 0;--ibiz-nav-tabs-item-font-size:var(--ibiz-font-size-regular);--ibiz-nav-tabs-item-font-weight:var(--ibiz-font-weight-regular);--ibiz-nav-tabs-item-border-radius:var(--ibiz-border-radius-medium);--ibiz-nav-tabs-item-bg-color:transparent;--ibiz-nav-tabs-item-color:var(--ibiz-color-text-0);--ibiz-nav-tabs-item-hover-color:var(--ibiz-color-primary-hover);--ibiz-nav-tabs-item-active-color:var(--ibiz-color-primary);display:flex;align-items:center;justify-content:flex-start;position:relative;padding:var(--ibiz-nav-tabs-padding)}.ibiz-nav-tabs__left{display:flex;align-items:center;width:var(--ibiz-nav-tabs-left-width)}.ibiz-nav-tabs__left .el-tabs{width:100%;--el-tabs-header-height:40px}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav{border:none}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav .el-tabs__item{display:flex;align-items:center;height:var(--ibiz-nav-tabs-item-height);padding:var(--ibiz-nav-tabs-item-padding);margin:var(--ibiz-nav-tabs-item-margin);overflow:hidden;font-size:var(--ibiz-nav-tabs-item-font-size);font-weight:var(--ibiz-nav-tabs-item-font-weight);color:var(--ibiz-nav-tabs-item-color);vertical-align:middle;background-color:var(--ibiz-nav-tabs-item-bg-color);border:1px solid var(--ibiz-color-border);border-radius:var(--ibiz-nav-tabs-item-border-radius);box-shadow:0 1px 2px 0 var(--ibiz-color-border);opacity:1}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav .el-tabs__item:hover{padding:var(--ibiz-nav-tabs-item-padding);color:var(--ibiz-nav-tabs-item-hover-color)}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav .el-tabs__item:hover .is-icon-close{color:var(--ibiz-nav-tabs-item-hover-color)}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav .el-tabs__item.is-active{padding:var(--ibiz-nav-tabs-item-padding);color:var(--ibiz-color-white);background-color:var(--ibiz-nav-tabs-item-active-color);box-shadow:none}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav .el-tabs__item.is-active .is-icon-close{color:var(--ibiz-color-white)}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav .el-tabs__item.is-closable{padding:var(--ibiz-nav-tabs-item-padding)}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav .el-tabs__item.is-closable.hover{padding:var(--ibiz-nav-tabs-item-padding)}.ibiz-nav-tabs__left .el-tabs .el-tabs__nav .el-tabs__item .is-icon-close{position:relative;top:1px}.ibiz-nav-tabs__left .el-tabs .el-tabs__header{margin-bottom:0;border-bottom:none}.ibiz-nav-tabs__right{width:var(--ibiz-nav-tabs-right-width)}.ibiz-nav-tabs__right .el-dropdown button{height:var(--ibiz-nav-tabs-right-height)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-panel-app-header{--ibiz-panel-app-header-color:var(--ibiz-color-text-0);--ibiz-panel-app-header-bg-color:var(--ibiz-color-primary);--ibiz-panel-app-header-border-color:var(--ibiz-color-border);width:100%;height:100%;color:var(--ibiz-panel-app-header-color);background-color:var(--ibiz-panel-app-header-bg-color)
|
|
1
|
+
.ibiz-panel-app-header{--ibiz-panel-app-header-color:var(--ibiz-color-text-0);--ibiz-panel-app-header-bg-color:var(--ibiz-color-primary);--ibiz-panel-app-header-border-color:var(--ibiz-color-border);width:100%;height:100%;color:var(--ibiz-panel-app-header-color);background-color:var(--ibiz-panel-app-header-bg-color)}.ibiz-panel-app-header>.ibiz-row{height:100%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-panel-app-title{--ibiz-panel-app-title-color:var(--ibiz-color-text-0);--ibiz-panel-app-title-font-size:var(--ibiz-font-size-header-
|
|
1
|
+
.ibiz-panel-app-title{--ibiz-panel-app-title-color:var(--ibiz-color-text-0);--ibiz-panel-app-title-font-size:var(--ibiz-font-size-header-3);--ibiz-panel-app-title-font-wight:var(--ibiz-font-weight-bold);--ibiz-panel-app-title-padding:0 var(--ibiz-spacing-loose);display:flex;align-items:center;justify-content:center;height:100%;padding:var(--ibiz-panel-app-title-padding)}.ibiz-panel-app-title__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-panel-app-title-font-size);font-weight:700;color:var(--ibiz-panel-app-title-color)}.ibiz-panel-app-title__logo{padding:0 var(--ibiz-spacing-base);font-size:40px;display:flex;align-items:center;justify-content:center}.ibiz-panel-app-title__logo img{display:inline-block;width:20px;height:20px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-panel-button{--ibiz-panel-button-icon-margin:0 var(--ibiz-spacing-extra-tight) 0 0;--ibiz-panel-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-panel-button-icon-max-height:var(--ibiz-width-icon-medium);
|
|
1
|
+
.ibiz-panel-button{--ibiz-panel-button-icon-margin:0 var(--ibiz-spacing-extra-tight) 0 0;--ibiz-panel-button-icon-max-width:var(--ibiz-width-icon-medium);--ibiz-panel-button-icon-max-height:var(--ibiz-width-icon-medium);padding:var(--ibiz-spacing-tight);overflow:hidden}.ibiz-panel-button .el-button{width:100%}.ibiz-panel-button .el-button i,.ibiz-panel-button .el-button img{display:inline-block;max-width:var(--ibiz-panel-button-icon-max-width);max-height:var(--ibiz-panel-button-icon-max-height);margin:var(--ibiz-panel-button-icon-margin)}
|
|
@@ -85,13 +85,14 @@ const PanelButton = /* @__PURE__ */ defineComponent({
|
|
|
85
85
|
},
|
|
86
86
|
render() {
|
|
87
87
|
if (this.state.visible && this.buttonState.visible) {
|
|
88
|
-
return createVNode(
|
|
88
|
+
return createVNode("div", {
|
|
89
|
+
"class": [this.ns.b(), this.ns.m(this.codeName), ...this.controller.containerClass]
|
|
90
|
+
}, [createVNode(resolveComponent("el-button"), {
|
|
89
91
|
"type": this.buttonType,
|
|
90
92
|
"text": this.isText,
|
|
91
93
|
"disabled": this.state.disabled && this.buttonState.disabled,
|
|
92
94
|
"loading": this.state.loading,
|
|
93
|
-
"onClick": this.handleButtonClick
|
|
94
|
-
"class": [this.ns.b(), this.ns.m(this.codeName), ...this.controller.containerClass]
|
|
95
|
+
"onClick": this.handleButtonClick
|
|
95
96
|
}, {
|
|
96
97
|
default: () => [createVNode("div", {
|
|
97
98
|
"class": this.ns.b("content")
|
|
@@ -101,7 +102,7 @@ const PanelButton = /* @__PURE__ */ defineComponent({
|
|
|
101
102
|
}, null), createVNode("span", {
|
|
102
103
|
"class": this.ns.bm("content", "caption")
|
|
103
104
|
}, [this.showCaption ? this.captionText : null])])]
|
|
104
|
-
});
|
|
105
|
+
})]);
|
|
105
106
|
}
|
|
106
107
|
return null;
|
|
107
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-panel-exp-header{width:auto;height:64px;border-bottom:1px solid var(--ibiz-color-border)}.ibiz-panel-exp-header .ibiz-row{height:100%}.ibiz-panel-exp-header .ibiz-panel-container--view_header_right{padding:0 var(--ibiz-spacing-base)}
|
|
1
|
+
.ibiz-panel-exp-header{width:auto;height:64px;padding:0 var(--ibiz-spacing-base);border-bottom:1px solid var(--ibiz-color-border)}.ibiz-panel-exp-header .ibiz-row{height:100%}.ibiz-panel-exp-header .ibiz-panel-container--view_header_right{padding:0 var(--ibiz-spacing-base)}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from './panel-index-view-search.provider';
|
|
2
|
+
export declare const IBizPanelIndexViewSearch: import("@ibiz-template/vue3-util").TypeWithInstall<import("vue").DefineComponent<{
|
|
3
|
+
modelData: {
|
|
4
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
5
|
+
required: true;
|
|
6
|
+
};
|
|
7
|
+
controller: {
|
|
8
|
+
type: typeof import("@ibiz-template/runtime").PanelItemController;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}, {
|
|
12
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
13
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
14
|
+
onInput: (value: string) => void;
|
|
15
|
+
c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
16
|
+
query: import("vue").Ref<string>;
|
|
17
|
+
menuAlign: import("vue").ComputedRef<string>;
|
|
18
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
modelData: {
|
|
20
|
+
type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
controller: {
|
|
24
|
+
type: typeof import("@ibiz-template/runtime").PanelItemController;
|
|
25
|
+
required: true;
|
|
26
|
+
};
|
|
27
|
+
}>>, {}, {}>>;
|
|
28
|
+
export default IBizPanelIndexViewSearch;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { registerPanelItemProvider } from '@ibiz-template/runtime';
|
|
2
|
+
import { withInstall } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { PanelIndexViewSearch } from './panel-index-view-search.mjs';
|
|
4
|
+
import { PanelIndexViewSearchProvider } from './panel-index-view-search.provider.mjs';
|
|
5
|
+
|
|
6
|
+
const IBizPanelIndexViewSearch = withInstall(
|
|
7
|
+
PanelIndexViewSearch,
|
|
8
|
+
function(v) {
|
|
9
|
+
v.component(PanelIndexViewSearch.name, PanelIndexViewSearch);
|
|
10
|
+
registerPanelItemProvider(
|
|
11
|
+
"RAWITEM_INDEX_VIEW_SEARCH",
|
|
12
|
+
() => new PanelIndexViewSearchProvider()
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export { IBizPanelIndexViewSearch, PanelIndexViewSearchProvider, IBizPanelIndexViewSearch as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-panel-index-view-search{--ibiz-panel-index-view-search-text-color:var(--ibiz-color-text-0);--ibiz-panel-index-view-search-placeholder-text-color:var(--ibiz-color-text-2);--ibiz-panel-index-view-search-bg-color:var(--ibiz-color-fill-0);width:100%;height:100%}.ibiz-panel-index-view-search .el-input__wrapper{background-color:var(--ibiz-panel-index-view-search-bg-color)}.ibiz-panel-index-view-search .el-input__wrapper .el-input__prefix{color:var(--ibiz-panel-index-view-search-text-color)}.ibiz-panel-index-view-search .el-input__wrapper .el-input__inner{color:var(--ibiz-panel-index-view-search-text-color)}.ibiz-panel-index-view-search .el-input__wrapper .el-input__inner::-moz-placeholder{color:var(--ibiz-panel-index-view-search-placeholder-text-color)}.ibiz-panel-index-view-search .el-input__wrapper .el-input__inner::placeholder{color:var(--ibiz-panel-index-view-search-placeholder-text-color)}.ibiz-panel-index-view-search-btn{font-size:var(--ibiz-font-size-header-4)}.ibiz-panel-index-view-search-btn:hover{background-color:transparent}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IPanelRawItem } from '@ibiz/model-core';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
|
+
import './panel-index-view-search.scss';
|
|
5
|
+
export declare const PanelIndexViewSearch: import("vue").DefineComponent<{
|
|
6
|
+
modelData: {
|
|
7
|
+
type: PropType<IPanelRawItem>;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
controller: {
|
|
11
|
+
type: typeof PanelItemController;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
ns: import("@ibiz-template/core").Namespace;
|
|
16
|
+
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
17
|
+
onInput: (value: string) => void;
|
|
18
|
+
c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
|
|
19
|
+
query: import("vue").Ref<string>;
|
|
20
|
+
menuAlign: import("vue").ComputedRef<string>;
|
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
modelData: {
|
|
23
|
+
type: PropType<IPanelRawItem>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
controller: {
|
|
27
|
+
type: typeof PanelItemController;
|
|
28
|
+
required: true;
|
|
29
|
+
};
|
|
30
|
+
}>>, {}, {}>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, inject, createVNode, resolveComponent } from 'vue';
|
|
2
|
+
import { useNamespace } from '@ibiz-template/vue3-util';
|
|
3
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
4
|
+
import { debounce } from 'lodash-es';
|
|
5
|
+
import './panel-index-view-search.css';
|
|
6
|
+
|
|
7
|
+
const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
|
|
8
|
+
name: "IBizPanelIndexViewSearch",
|
|
9
|
+
props: {
|
|
10
|
+
modelData: {
|
|
11
|
+
type: Object,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
controller: {
|
|
15
|
+
type: PanelItemController,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const ns = useNamespace("panel-index-view-search");
|
|
21
|
+
const c = props.controller;
|
|
22
|
+
const classArr = computed(() => {
|
|
23
|
+
const {
|
|
24
|
+
id
|
|
25
|
+
} = props.modelData;
|
|
26
|
+
const result = [ns.b(), ns.m(id)];
|
|
27
|
+
result.push(...props.controller.containerClass);
|
|
28
|
+
return result;
|
|
29
|
+
});
|
|
30
|
+
const query = ref("");
|
|
31
|
+
const debounceSearch = debounce(() => {
|
|
32
|
+
}, 500);
|
|
33
|
+
const onInput = (value) => {
|
|
34
|
+
query.value = value;
|
|
35
|
+
debounceSearch();
|
|
36
|
+
};
|
|
37
|
+
const ctx = inject("ctx", void 0);
|
|
38
|
+
const menuAlign = computed(() => {
|
|
39
|
+
if (ctx == null ? void 0 : ctx.view) {
|
|
40
|
+
return ctx.view.model.mainMenuAlign || "LEFT";
|
|
41
|
+
}
|
|
42
|
+
return "LEFT";
|
|
43
|
+
});
|
|
44
|
+
return {
|
|
45
|
+
ns,
|
|
46
|
+
classArr,
|
|
47
|
+
onInput,
|
|
48
|
+
c,
|
|
49
|
+
query,
|
|
50
|
+
menuAlign
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
render() {
|
|
54
|
+
if (!this.controller.state.visible) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
return createVNode("div", {
|
|
58
|
+
"class": this.classArr
|
|
59
|
+
}, [this.menuAlign === "LEFT" ? createVNode(resolveComponent("el-input"), {
|
|
60
|
+
"model-value": this.query,
|
|
61
|
+
"class": this.ns.b("search"),
|
|
62
|
+
"placeholder": "\u641C\u7D22\u5185\u5BB9",
|
|
63
|
+
"onInput": this.onInput
|
|
64
|
+
}, {
|
|
65
|
+
prefix: () => {
|
|
66
|
+
return createVNode("ion-icon", {
|
|
67
|
+
"class": this.ns.e("search-icon"),
|
|
68
|
+
"name": "search"
|
|
69
|
+
}, null);
|
|
70
|
+
}
|
|
71
|
+
}) : createVNode(resolveComponent("el-button"), {
|
|
72
|
+
"class": this.ns.b("btn")
|
|
73
|
+
}, {
|
|
74
|
+
default: () => [createVNode("ion-icon", {
|
|
75
|
+
"class": this.ns.e("search-icon"),
|
|
76
|
+
"name": "search"
|
|
77
|
+
}, null)]
|
|
78
|
+
})]);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export { PanelIndexViewSearch };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IPanelItemProvider, PanelController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
/**
|
|
4
|
+
* 面板首页搜索适配器
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @class PanelIndexViewSearchProvider
|
|
8
|
+
* @implements {IPanelItemProvider}
|
|
9
|
+
*/
|
|
10
|
+
export declare class PanelIndexViewSearchProvider implements IPanelItemProvider {
|
|
11
|
+
component: string;
|
|
12
|
+
createController(panelItem: IPanelItem, panel: PanelController, parent: PanelItemController | undefined): Promise<PanelItemController>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
+
var __publicField = (obj, key, value) => {
|
|
6
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
class PanelIndexViewSearchProvider {
|
|
10
|
+
constructor() {
|
|
11
|
+
__publicField(this, "component", "IBizPanelIndexViewSearch");
|
|
12
|
+
}
|
|
13
|
+
async createController(panelItem, panel, parent) {
|
|
14
|
+
const c = new PanelItemController(panelItem, panel, parent);
|
|
15
|
+
await c.init();
|
|
16
|
+
return c;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { PanelIndexViewSearchProvider };
|
|
@@ -14,6 +14,16 @@ export declare const IBizSingleDataContainer: import("@ibiz-template/vue3-util")
|
|
|
14
14
|
}, {
|
|
15
15
|
ns: import("@ibiz-template/core").Namespace;
|
|
16
16
|
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
17
|
+
renderPanelItem: (panelItem: import("@ibiz/model-core").IPanelItem, options?: {
|
|
18
|
+
providers: {
|
|
19
|
+
[key: string]: import("@ibiz-template/runtime").IPanelItemProvider;
|
|
20
|
+
};
|
|
21
|
+
panelItems: {
|
|
22
|
+
[key: string]: import("@ibiz-template/runtime").IPanelItemController;
|
|
23
|
+
};
|
|
24
|
+
} | undefined) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}> | null;
|
|
17
27
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
28
|
modelData: {
|
|
19
29
|
type: import("vue").PropType<import("@ibiz/model-core").IPanelContainer>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IPanelDataContainerController, IViewController, PanelItemController } from '@ibiz-template/runtime';
|
|
2
|
-
import { IPanelContainer } from '@ibiz/model-core';
|
|
1
|
+
import { IPanelDataContainerController, IPanelItemContainerController, IPanelItemController, IPanelItemProvider, IViewController, PanelController, PanelItemController, PanelNotifyState } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer, IPanelItem } from '@ibiz/model-core';
|
|
3
3
|
import { SingleDataContainerState } from './single-data-container.state';
|
|
4
4
|
/**
|
|
5
5
|
* 单项数据容器控制器
|
|
@@ -11,6 +11,26 @@ import { SingleDataContainerState } from './single-data-container.state';
|
|
|
11
11
|
export declare class SingleDataContainerController extends PanelItemController<IPanelContainer> implements IPanelDataContainerController {
|
|
12
12
|
state: SingleDataContainerState;
|
|
13
13
|
readonly isDataContainer = true;
|
|
14
|
+
/**
|
|
15
|
+
* 所有面板成员的控制器
|
|
16
|
+
*
|
|
17
|
+
* @author lxm
|
|
18
|
+
* @date 2022-08-24 20:08:07
|
|
19
|
+
* @type {{ [key: string]: IPanelItemController }}
|
|
20
|
+
*/
|
|
21
|
+
panelItems: {
|
|
22
|
+
[key: string]: IPanelItemController;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 所有面板成员的适配器
|
|
26
|
+
*
|
|
27
|
+
* @author lxm
|
|
28
|
+
* @date 2022-08-24 20:08:07
|
|
29
|
+
* @type {{ [key: string]: IPanelItemProvider }}
|
|
30
|
+
*/
|
|
31
|
+
providers: {
|
|
32
|
+
[key: string]: IPanelItemProvider;
|
|
33
|
+
};
|
|
14
34
|
/**
|
|
15
35
|
* 单项数据容器,根据数据模式
|
|
16
36
|
* @author lxm
|
|
@@ -21,6 +41,14 @@ export declare class SingleDataContainerController extends PanelItemController<I
|
|
|
21
41
|
get data(): IData;
|
|
22
42
|
protected createState(): SingleDataContainerState;
|
|
23
43
|
protected onInit(): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* 初始化面板成员控制器
|
|
46
|
+
*
|
|
47
|
+
* @author lxm
|
|
48
|
+
* @date 2022-08-24 21:08:48
|
|
49
|
+
* @protected
|
|
50
|
+
*/
|
|
51
|
+
protected initPanelItemControllers(panelItems?: IPanelItem[] | undefined, panel?: PanelController, parent?: IPanelItemContainerController | undefined): Promise<void>;
|
|
24
52
|
/**
|
|
25
53
|
* 根据来源类型初始化容器数据
|
|
26
54
|
* @author lxm
|
|
@@ -28,6 +56,13 @@ export declare class SingleDataContainerController extends PanelItemController<I
|
|
|
28
56
|
* @protected
|
|
29
57
|
*/
|
|
30
58
|
protected initContainerData(): void;
|
|
59
|
+
/**
|
|
60
|
+
* 面板状态变更通知
|
|
61
|
+
*
|
|
62
|
+
* @author lxm
|
|
63
|
+
* @date 2022-09-20 18:09:07
|
|
64
|
+
*/
|
|
65
|
+
childrenStateNotify(state: PanelNotifyState): void;
|
|
31
66
|
/**
|
|
32
67
|
* 通过实体设置视图逻辑
|
|
33
68
|
* @author lxm
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModelError, RuntimeModelError, RuntimeError } from '@ibiz-template/core';
|
|
2
|
-
import { PanelItemController, execDELogicById } from '@ibiz-template/runtime';
|
|
2
|
+
import { PanelItemController, getPanelItemProvider, execDELogicById, PanelNotifyState } from '@ibiz-template/runtime';
|
|
3
3
|
import { SingleDataContainerState } from './single-data-container.state.mjs';
|
|
4
4
|
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -12,6 +12,22 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super(...arguments);
|
|
14
14
|
__publicField(this, "isDataContainer", true);
|
|
15
|
+
/**
|
|
16
|
+
* 所有面板成员的控制器
|
|
17
|
+
*
|
|
18
|
+
* @author lxm
|
|
19
|
+
* @date 2022-08-24 20:08:07
|
|
20
|
+
* @type {{ [key: string]: IPanelItemController }}
|
|
21
|
+
*/
|
|
22
|
+
__publicField(this, "panelItems", {});
|
|
23
|
+
/**
|
|
24
|
+
* 所有面板成员的适配器
|
|
25
|
+
*
|
|
26
|
+
* @author lxm
|
|
27
|
+
* @date 2022-08-24 20:08:07
|
|
28
|
+
* @type {{ [key: string]: IPanelItemProvider }}
|
|
29
|
+
*/
|
|
30
|
+
__publicField(this, "providers", {});
|
|
15
31
|
}
|
|
16
32
|
/**
|
|
17
33
|
* 单项数据容器,根据数据模式
|
|
@@ -29,8 +45,51 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
29
45
|
}
|
|
30
46
|
async onInit() {
|
|
31
47
|
await super.onInit();
|
|
48
|
+
await this.initPanelItemControllers();
|
|
32
49
|
this.initContainerData();
|
|
33
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* 初始化面板成员控制器
|
|
53
|
+
*
|
|
54
|
+
* @author lxm
|
|
55
|
+
* @date 2022-08-24 21:08:48
|
|
56
|
+
* @protected
|
|
57
|
+
*/
|
|
58
|
+
async initPanelItemControllers(panelItems = this.model.panelItems, panel = this.panel, parent = this) {
|
|
59
|
+
if (!panelItems) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
await Promise.all(
|
|
63
|
+
panelItems.map(async (panelItem) => {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
const panelItemProvider = await getPanelItemProvider(panelItem);
|
|
66
|
+
if (!panelItemProvider) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.providers[panelItem.id] = panelItemProvider;
|
|
70
|
+
const panelItemController = await panelItemProvider.createController(
|
|
71
|
+
panelItem,
|
|
72
|
+
panel,
|
|
73
|
+
parent
|
|
74
|
+
);
|
|
75
|
+
this.panelItems[panelItem.id] = panelItemController;
|
|
76
|
+
if (((_a = panelItem.panelItems) == null ? void 0 : _a.length) && !panelItemController.isDataContainer) {
|
|
77
|
+
await this.initPanelItemControllers(
|
|
78
|
+
panelItem.panelItems,
|
|
79
|
+
panel,
|
|
80
|
+
panelItemController
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
if ((_b = panelItem.panelTabPages) == null ? void 0 : _b.length) {
|
|
84
|
+
await this.initPanelItemControllers(
|
|
85
|
+
panelItem.panelTabPages,
|
|
86
|
+
panel,
|
|
87
|
+
panelItemController
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
);
|
|
92
|
+
}
|
|
34
93
|
/**
|
|
35
94
|
* 根据来源类型初始化容器数据
|
|
36
95
|
* @author lxm
|
|
@@ -68,6 +127,17 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
68
127
|
throw new ModelError(this.model, `\u6570\u636E\u6E90\u7C7B\u578B${dataSourceType}\u6682\u672A\u652F\u6301`);
|
|
69
128
|
}
|
|
70
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* 面板状态变更通知
|
|
132
|
+
*
|
|
133
|
+
* @author lxm
|
|
134
|
+
* @date 2022-09-20 18:09:07
|
|
135
|
+
*/
|
|
136
|
+
childrenStateNotify(state) {
|
|
137
|
+
Object.values(this.panelItems).forEach((panelItem) => {
|
|
138
|
+
panelItem.panelStateNotify(state);
|
|
139
|
+
});
|
|
140
|
+
}
|
|
71
141
|
/**
|
|
72
142
|
* 通过实体设置视图逻辑
|
|
73
143
|
* @author lxm
|
|
@@ -94,6 +164,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
94
164
|
throw new RuntimeError(`\u5B9E\u4F53\u903B\u8F91${appDELogicId}\u6CA1\u6709\u8FD4\u56DE\u503C`);
|
|
95
165
|
}
|
|
96
166
|
this.state.data = data;
|
|
167
|
+
this.childrenStateNotify(PanelNotifyState.LOAD);
|
|
97
168
|
}
|
|
98
169
|
/**
|
|
99
170
|
* 设置全局变量为当前容器数据
|
|
@@ -106,6 +177,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
106
177
|
const originData = dataName ? ibiz.appData[dataName] : ibiz.appData;
|
|
107
178
|
if (originData) {
|
|
108
179
|
this.state.data = originData;
|
|
180
|
+
this.childrenStateNotify(PanelNotifyState.LOAD);
|
|
109
181
|
} else {
|
|
110
182
|
ibiz.log.error(`\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709${dataName}\u5C5E\u6027`);
|
|
111
183
|
}
|
|
@@ -135,6 +207,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
135
207
|
);
|
|
136
208
|
if (res.ok && res.data) {
|
|
137
209
|
this.state.data = res.data;
|
|
210
|
+
this.childrenStateNotify(PanelNotifyState.LOAD);
|
|
138
211
|
}
|
|
139
212
|
}
|
|
140
213
|
/**
|
|
@@ -152,6 +225,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
152
225
|
}
|
|
153
226
|
const updateData = () => {
|
|
154
227
|
this.state.data = view.state[dataName];
|
|
228
|
+
this.childrenStateNotify(PanelNotifyState.LOAD);
|
|
155
229
|
};
|
|
156
230
|
updateData();
|
|
157
231
|
view.evt.on("onDataChange", () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { IPanelItemProvider, IPanelItemController } from '@ibiz-template/runtime';
|
|
2
|
+
import { IPanelContainer, IPanelItem } from '@ibiz/model-core';
|
|
3
|
+
import { PropType, VNode } from 'vue';
|
|
3
4
|
import { SingleDataContainerController } from './single-data-container.controller';
|
|
4
5
|
import './single-data-container.scss';
|
|
5
6
|
export declare const SingleDataContainer: import("vue").DefineComponent<{
|
|
@@ -14,6 +15,14 @@ export declare const SingleDataContainer: import("vue").DefineComponent<{
|
|
|
14
15
|
}, {
|
|
15
16
|
ns: import("@ibiz-template/core").Namespace;
|
|
16
17
|
classArr: import("vue").ComputedRef<(string | false)[]>;
|
|
18
|
+
renderPanelItem: (panelItem: IPanelItem, options?: {
|
|
19
|
+
providers: {
|
|
20
|
+
[key: string]: IPanelItemProvider;
|
|
21
|
+
};
|
|
22
|
+
panelItems: {
|
|
23
|
+
[key: string]: IPanelItemController;
|
|
24
|
+
};
|
|
25
|
+
} | undefined) => VNode | null;
|
|
17
26
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
27
|
modelData: {
|
|
19
28
|
type: PropType<IPanelContainer>;
|