@ibiz-template/vue3-components 0.0.1-alpha.1
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/es/common/app-icon/app-icon.d.ts +19 -0
- package/es/common/app-icon/app-icon.js +71 -0
- package/es/common/app-keep-alive/app-keep-alive.d.ts +47 -0
- package/es/common/app-keep-alive/app-keep-alive.js +297 -0
- package/es/common/app-keep-alive/scheduler.d.ts +39 -0
- package/es/common/app-keep-alive/scheduler.js +171 -0
- package/es/common/app-router-view/app-router-view.d.ts +30 -0
- package/es/common/app-router-view/app-router-view.js +73 -0
- package/es/common/app-user/app-user.d.ts +8 -0
- package/es/common/app-user/app-user.js +60 -0
- package/es/common/grid-pagination/grid-pagination.d.ts +41 -0
- package/es/common/grid-pagination/grid-pagination.js +84 -0
- package/es/common/grid-pagination/index.d.ts +40 -0
- package/es/common/grid-pagination/index.js +9 -0
- package/es/common/index.d.ts +8 -0
- package/es/common/index.js +8 -0
- package/es/common/quick-search/quick-search.d.ts +30 -0
- package/es/common/quick-search/quick-search.js +63 -0
- package/es/common/tab-page-exp/tab-page-exp.d.ts +69 -0
- package/es/common/tab-page-exp/tab-page-exp.js +117 -0
- package/es/control/app-menu/app-menu-provider.d.ts +13 -0
- package/es/control/app-menu/app-menu-provider.js +14 -0
- package/es/control/app-menu/app-menu.d.ts +54 -0
- package/es/control/app-menu/app-menu.js +178 -0
- package/es/control/app-menu/index.d.ts +53 -0
- package/es/control/app-menu/index.js +12 -0
- package/es/control/grid-control/grid-control.d.ts +158 -0
- package/es/control/grid-control/grid-control.util.d.ts +38 -0
- package/es/control/grid-control/grid-control.util.js +84 -0
- package/es/control/grid-control/grid-field-column/grid-field-column.d.ts +26 -0
- package/es/control/grid-control/grid-field-column-provider.d.ts +15 -0
- package/es/control/grid-control/grid-field-column-provider.js +20 -0
- package/es/control/grid-control/grid-provider.d.ts +13 -0
- package/es/control/grid-control/grid-provider.js +14 -0
- package/es/control/grid-control/index.d.ts +114 -0
- package/es/control/grid-control/index.js +23 -0
- package/es/control/index.d.ts +3 -0
- package/es/control/index.js +3 -0
- package/es/control/toolbar-control/index.d.ts +43 -0
- package/es/control/toolbar-control/index.js +12 -0
- package/es/control/toolbar-control/toolbar-control.d.ts +44 -0
- package/es/control/toolbar-control/toolbar-provider.d.ts +13 -0
- package/es/control/toolbar-control/toolbar-provider.js +14 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +4 -0
- package/es/layout/app-layout/app-layout.d.ts +32 -0
- package/es/layout/control-base/control-base.d.ts +17 -0
- package/es/layout/control-base/control-base.js +42 -0
- package/es/layout/control-layout/control-layout.d.ts +19 -0
- package/es/layout/control-shell/control-shell.d.ts +18 -0
- package/es/layout/index.d.ts +10 -0
- package/es/layout/index.js +20 -0
- package/es/layout/md-view-base/md-view-base.d.ts +12 -0
- package/es/layout/md-view-base/md-view-base.js +35 -0
- package/es/layout/router-shell/router-shell.d.ts +27 -0
- package/es/layout/router-shell/router-shell.js +96 -0
- package/es/layout/view-base/view-base.d.ts +18 -0
- package/es/layout/view-layout/view-layout.d.ts +44 -0
- package/es/layout/view-shell/view-shell.d.ts +42 -0
- package/es/shims-vue.d.ts +5 -0
- package/es/util/install.d.ts +3 -0
- package/es/util/install.js +9 -0
- package/es/views/edit-view/index.d.ts +3 -0
- package/es/views/edit-view/index.js +9 -0
- package/es/views/edit-view/src/edit-view.css +6 -0
- package/es/views/edit-view/src/edit-view.d.ts +3 -0
- package/es/views/edit-view/src/edit-view.js +15 -0
- package/es/views/grid-view/grid-view-engine.d.ts +8 -0
- package/es/views/grid-view/grid-view-engine.js +21 -0
- package/es/views/grid-view/grid-view-provider.d.ts +13 -0
- package/es/views/grid-view/grid-view-provider.js +14 -0
- package/es/views/grid-view/grid-view.d.ts +32 -0
- package/es/views/grid-view/grid-view.js +64 -0
- package/es/views/grid-view/index.d.ts +32 -0
- package/es/views/grid-view/index.js +14 -0
- package/es/views/index-view/index-view-default.d.ts +22 -0
- package/es/views/index-view/index-view-default.js +117 -0
- package/es/views/index-view/index-view-engine.d.ts +6 -0
- package/es/views/index-view/index-view-engine.js +9 -0
- package/es/views/index-view/index-view-exp.d.ts +29 -0
- package/es/views/index-view/index-view-exp.js +177 -0
- package/es/views/index-view/index-view-provider.d.ts +13 -0
- package/es/views/index-view/index-view-provider.js +14 -0
- package/es/views/index-view/index-view.d.ts +44 -0
- package/es/views/index-view/index-view.js +155 -0
- package/es/views/index-view/index.d.ts +44 -0
- package/es/views/index-view/index.js +14 -0
- package/es/views/index.d.ts +4 -0
- package/es/views/index.js +6 -0
- package/lib/common/app-icon/app-icon.d.ts +19 -0
- package/lib/common/app-icon/app-icon.js +71 -0
- package/lib/common/app-keep-alive/app-keep-alive.d.ts +47 -0
- package/lib/common/app-keep-alive/app-keep-alive.js +297 -0
- package/lib/common/app-keep-alive/scheduler.d.ts +39 -0
- package/lib/common/app-keep-alive/scheduler.js +171 -0
- package/lib/common/app-router-view/app-router-view.d.ts +30 -0
- package/lib/common/app-router-view/app-router-view.js +73 -0
- package/lib/common/app-user/app-user.d.ts +8 -0
- package/lib/common/app-user/app-user.js +60 -0
- package/lib/common/grid-pagination/grid-pagination.d.ts +41 -0
- package/lib/common/grid-pagination/grid-pagination.js +84 -0
- package/lib/common/grid-pagination/index.d.ts +40 -0
- package/lib/common/grid-pagination/index.js +9 -0
- package/lib/common/index.d.ts +8 -0
- package/lib/common/index.js +66 -0
- package/lib/common/quick-search/quick-search.d.ts +30 -0
- package/lib/common/quick-search/quick-search.js +63 -0
- package/lib/common/tab-page-exp/tab-page-exp.d.ts +69 -0
- package/lib/common/tab-page-exp/tab-page-exp.js +117 -0
- package/lib/control/app-menu/app-menu-provider.d.ts +13 -0
- package/lib/control/app-menu/app-menu-provider.js +14 -0
- package/lib/control/app-menu/app-menu.d.ts +54 -0
- package/lib/control/app-menu/app-menu.js +178 -0
- package/lib/control/app-menu/index.d.ts +53 -0
- package/lib/control/app-menu/index.js +12 -0
- package/lib/control/grid-control/grid-control.d.ts +158 -0
- package/lib/control/grid-control/grid-control.util.d.ts +38 -0
- package/lib/control/grid-control/grid-control.util.js +84 -0
- package/lib/control/grid-control/grid-field-column/grid-field-column.d.ts +26 -0
- package/lib/control/grid-control/grid-field-column-provider.d.ts +15 -0
- package/lib/control/grid-control/grid-field-column-provider.js +20 -0
- package/lib/control/grid-control/grid-provider.d.ts +13 -0
- package/lib/control/grid-control/grid-provider.js +14 -0
- package/lib/control/grid-control/index.d.ts +114 -0
- package/lib/control/grid-control/index.js +24 -0
- package/lib/control/index.d.ts +3 -0
- package/lib/control/index.js +26 -0
- package/lib/control/toolbar-control/index.d.ts +43 -0
- package/lib/control/toolbar-control/index.js +12 -0
- package/lib/control/toolbar-control/toolbar-control.d.ts +44 -0
- package/lib/control/toolbar-control/toolbar-provider.d.ts +13 -0
- package/lib/control/toolbar-control/toolbar-provider.js +14 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +34 -0
- package/lib/layout/app-layout/app-layout.d.ts +32 -0
- package/lib/layout/control-base/control-base.d.ts +17 -0
- package/lib/layout/control-base/control-base.js +42 -0
- package/lib/layout/control-layout/control-layout.d.ts +19 -0
- package/lib/layout/control-shell/control-shell.d.ts +18 -0
- package/lib/layout/index.d.ts +10 -0
- package/lib/layout/index.js +44 -0
- package/lib/layout/md-view-base/md-view-base.d.ts +12 -0
- package/lib/layout/md-view-base/md-view-base.js +35 -0
- package/lib/layout/router-shell/router-shell.d.ts +27 -0
- package/lib/layout/router-shell/router-shell.js +96 -0
- package/lib/layout/view-base/view-base.d.ts +18 -0
- package/lib/layout/view-layout/view-layout.d.ts +44 -0
- package/lib/layout/view-shell/view-shell.d.ts +42 -0
- package/lib/shims-vue.d.ts +5 -0
- package/lib/util/install.d.ts +3 -0
- package/lib/util/install.js +9 -0
- package/lib/views/edit-view/index.d.ts +3 -0
- package/lib/views/edit-view/index.js +8 -0
- package/lib/views/edit-view/src/edit-view.css +6 -0
- package/lib/views/edit-view/src/edit-view.d.ts +3 -0
- package/lib/views/edit-view/src/edit-view.js +14 -0
- package/lib/views/grid-view/grid-view-engine.d.ts +8 -0
- package/lib/views/grid-view/grid-view-engine.js +21 -0
- package/lib/views/grid-view/grid-view-provider.d.ts +13 -0
- package/lib/views/grid-view/grid-view-provider.js +14 -0
- package/lib/views/grid-view/grid-view.d.ts +32 -0
- package/lib/views/grid-view/grid-view.js +64 -0
- package/lib/views/grid-view/index.d.ts +32 -0
- package/lib/views/grid-view/index.js +14 -0
- package/lib/views/index-view/index-view-default.d.ts +22 -0
- package/lib/views/index-view/index-view-default.js +117 -0
- package/lib/views/index-view/index-view-engine.d.ts +6 -0
- package/lib/views/index-view/index-view-engine.js +9 -0
- package/lib/views/index-view/index-view-exp.d.ts +29 -0
- package/lib/views/index-view/index-view-exp.js +177 -0
- package/lib/views/index-view/index-view-provider.d.ts +13 -0
- package/lib/views/index-view/index-view-provider.js +14 -0
- package/lib/views/index-view/index-view.d.ts +44 -0
- package/lib/views/index-view/index-view.js +155 -0
- package/lib/views/index-view/index.d.ts +44 -0
- package/lib/views/index-view/index.js +14 -0
- package/lib/views/index.d.ts +4 -0
- package/lib/views/index.js +20 -0
- package/package.json +71 -0
- package/src/common/app-col/app-col.tsx +90 -0
- package/src/common/app-icon/app-icon.tsx +58 -0
- package/src/common/app-keep-alive/app-keep-alive.ts +441 -0
- package/src/common/app-keep-alive/scheduler.ts +281 -0
- package/src/common/app-router-view/app-router-view.tsx +73 -0
- package/src/common/app-row/app-row.tsx +31 -0
- package/src/common/app-user/app-user.scss +32 -0
- package/src/common/app-user/app-user.tsx +61 -0
- package/src/common/index.ts +9 -0
- package/src/common/quick-search/quick-search.scss +15 -0
- package/src/common/quick-search/quick-search.tsx +59 -0
- package/src/common/tab-page-exp/tab-page-exp.scss +43 -0
- package/src/common/tab-page-exp/tab-page-exp.tsx +125 -0
- package/src/control/app-menu/app-menu-provider.ts +14 -0
- package/src/control/app-menu/app-menu-state.ts +20 -0
- package/src/control/app-menu/app-menu.controller.ts +97 -0
- package/src/control/app-menu/app-menu.scss +163 -0
- package/src/control/app-menu/app-menu.tsx +305 -0
- package/src/control/app-menu/index.ts +12 -0
- package/src/control/form/form/form-control.tsx +98 -0
- package/src/control/form/form/form-state.ts +39 -0
- package/src/control/form/form/form.controller.ts +260 -0
- package/src/control/form/form/form.scss +10 -0
- package/src/control/form/form/index.ts +30 -0
- package/src/control/form/form-detail/form-detail/form-detail-state.ts +92 -0
- package/src/control/form/form-detail/form-detail/form-detail.ts +214 -0
- package/src/control/form/form-detail/form-detail/index.ts +2 -0
- package/src/control/form/form-detail/form-group-panel/form-group-panel-provider.ts +27 -0
- package/src/control/form/form-detail/form-group-panel/form-group-panel-state.ts +29 -0
- package/src/control/form/form-detail/form-group-panel/form-group-panel.controller.ts +103 -0
- package/src/control/form/form-detail/form-group-panel/index.ts +3 -0
- package/src/control/form/form-detail/form-item/form-item-container/form-item-container.scss +90 -0
- package/src/control/form/form-detail/form-item/form-item-container/form-item-container.tsx +68 -0
- package/src/control/form/form-detail/form-item/form-item-provider.ts +28 -0
- package/src/control/form/form-detail/form-item/form-item-state.ts +48 -0
- package/src/control/form/form-detail/form-item/form-item.controller.ts +341 -0
- package/src/control/form/form-detail/form-item/form-item.scss +4 -0
- package/src/control/form/form-detail/form-item/form-item.tsx +69 -0
- package/src/control/form/form-detail/form-item/index.ts +3 -0
- package/src/control/form/form-detail/form-page/form-page-item.tsx +59 -0
- package/src/control/form/form-detail/form-page/form-page-provider.ts +27 -0
- package/src/control/form/form-detail/form-page/form-page-state.ts +12 -0
- package/src/control/form/form-detail/form-page/form-page.controller.ts +20 -0
- package/src/control/form/form-detail/form-page/form-page.scss +42 -0
- package/src/control/form/form-detail/form-page/form-page.tsx +56 -0
- package/src/control/form/form-detail/index.ts +3 -0
- package/src/control/form/index.ts +12 -0
- package/src/control/form/search-form/index.ts +15 -0
- package/src/control/form/search-form/search-form-provider.ts +14 -0
- package/src/control/form/search-form/search-form-state.ts +12 -0
- package/src/control/form/search-form/search-form.controller.ts +135 -0
- package/src/control/form/search-form/search-form.scss +48 -0
- package/src/control/form/search-form/search-form.tsx +70 -0
- package/src/control/grid/grid/grid-column.controller.ts +98 -0
- package/src/control/grid/grid/grid-control.tsx +174 -0
- package/src/control/grid/grid/grid-control.util.ts +135 -0
- package/src/control/grid/grid/grid-provider.ts +13 -0
- package/src/control/grid/grid/grid-row.controller.ts +114 -0
- package/src/control/grid/grid/grid-state.ts +20 -0
- package/src/control/grid/grid/grid.controller.ts +531 -0
- package/src/control/grid/grid/grid.scss +79 -0
- package/src/control/grid/grid-field-column/grid-field-column-provider.ts +26 -0
- package/src/control/grid/grid-field-column/grid-field-column.controller.ts +189 -0
- package/src/control/grid/grid-field-column/grid-field-column.scss +19 -0
- package/src/control/grid/grid-field-column/grid-field-column.tsx +87 -0
- package/src/control/grid/grid-pagination/grid-pagination.scss +7 -0
- package/src/control/grid/grid-pagination/grid-pagination.tsx +88 -0
- package/src/control/grid/index.ts +23 -0
- package/src/control/index.ts +4 -0
- package/src/control/panel/index.ts +23 -0
- package/src/control/panel/panel/panel-item-state.ts +73 -0
- package/src/control/panel/panel/panel-item.controller.ts +161 -0
- package/src/control/panel/panel/panel-state.ts +22 -0
- package/src/control/panel/panel/panel.controller.ts +256 -0
- package/src/control/panel/panel-container/index.ts +23 -0
- package/src/control/panel/panel-container/panel-container-provider.ts +28 -0
- package/src/control/panel/panel-container/panel-container-state.ts +12 -0
- package/src/control/panel/panel-container/panel-container.controller.ts +18 -0
- package/src/control/panel/panel-container/panel-container.scss +66 -0
- package/src/control/panel/panel-container/panel-container.tsx +93 -0
- package/src/control/panel/panel-ctrl-pos/index.ts +13 -0
- package/src/control/panel/panel-ctrl-pos/panel-ctrl-pos-provider.ts +28 -0
- package/src/control/panel/panel-ctrl-pos/panel-ctrl-pos.controller.ts +23 -0
- package/src/control/panel/panel-ctrl-pos/panel-ctrl-pos.tsx +39 -0
- package/src/control/panel/view-layout-panel/view-layout-panel-provider.ts +14 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.controller.ts +62 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.scss +3 -0
- package/src/control/panel/view-layout-panel/view-layout-panel.tsx +127 -0
- package/src/control/panel/view-layout-panel.json +141 -0
- package/src/control/toolbar/index.ts +12 -0
- package/src/control/toolbar/toolbar-control.scss +46 -0
- package/src/control/toolbar/toolbar-control.tsx +127 -0
- package/src/control/toolbar/toolbar-provider.ts +14 -0
- package/src/control/toolbar/toolbar-state.ts +31 -0
- package/src/control/toolbar/toolbar.controllerr.ts +112 -0
- package/src/editor/index.ts +14 -0
- package/src/editor/text-box/ibiz-input/ibiz-input.scss +48 -0
- package/src/editor/text-box/ibiz-input/ibiz-input.tsx +176 -0
- package/src/editor/text-box/index.ts +1 -0
- package/src/editor/text-box/text-box-provider.ts +39 -0
- package/src/editor/text-box/text-box.controller.ts +21 -0
- package/src/index.ts +57 -0
- package/src/layout/app-layout/app-layout.scss +133 -0
- package/src/layout/app-layout/app-layout.tsx +149 -0
- package/src/layout/control-base/control-base.tsx +37 -0
- package/src/layout/control-layout/control-layout.scss +4 -0
- package/src/layout/control-layout/control-layout.tsx +29 -0
- package/src/layout/index.ts +15 -0
- package/src/layout/md-view-base/md-view-base.tsx +69 -0
- package/src/layout/view-base/view-base.scss +11 -0
- package/src/layout/view-base/view-base.tsx +147 -0
- package/src/layout/view-layout/view-layout.scss +198 -0
- package/src/layout/view-layout/view-layout.tsx +115 -0
- package/src/shims-vue.d.ts +5 -0
- package/src/util/install.ts +11 -0
- package/src/views/grid-view/grid-view-engine.ts +68 -0
- package/src/views/grid-view/index.ts +12 -0
- package/src/views/index-view/index-view-default.ts +168 -0
- package/src/views/index-view/index-view-engine.ts +10 -0
- package/src/views/index-view/index-view-exp.ts +261 -0
- package/src/views/index-view/index-view-provider.ts +14 -0
- package/src/views/index-view/index-view.tsx +249 -0
- package/src/views/index-view/index.ts +14 -0
- package/src/views/index.ts +3 -0
- package/src/views/view/ibiz-view.tsx +49 -0
- package/src/views/view/index.ts +12 -0
- package/src/views/view/view-provider.ts +14 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { ref, watch } from "vue";
|
|
2
|
+
import { useRouter, useRoute } from "vue-router";
|
|
3
|
+
const getView2Value = (route) => {
|
|
4
|
+
const { view2, params2, params1 } = route.params;
|
|
5
|
+
if (!view2) {
|
|
6
|
+
return "";
|
|
7
|
+
}
|
|
8
|
+
let _params2 = params2.replace(
|
|
9
|
+
new RegExp(";srfnav=[^;=]*$|(?<=;)srfnav=[^;=]*;|^srfnav=[^;=]*;|^srfnav=[^;=]*$", "g"),
|
|
10
|
+
""
|
|
11
|
+
);
|
|
12
|
+
_params2 = _params2 || ibiz.env.routePlaceholder;
|
|
13
|
+
return `/${params1}/${view2}/${_params2}`;
|
|
14
|
+
};
|
|
15
|
+
const getView1Value = (route) => {
|
|
16
|
+
const { view1, appContext } = route.params;
|
|
17
|
+
return `/${appContext}/${view1}/${ibiz.env.routePlaceholder}`;
|
|
18
|
+
};
|
|
19
|
+
function useIndexExpRouteManage(controller) {
|
|
20
|
+
const router = useRouter();
|
|
21
|
+
const route = useRoute();
|
|
22
|
+
const currentKey = ref("");
|
|
23
|
+
const indexPath = ref("");
|
|
24
|
+
const keyHistory = ref([]);
|
|
25
|
+
const routeMsgs = ref([]);
|
|
26
|
+
const deleteRouteCache = (keys) => {
|
|
27
|
+
keys.forEach((key) => {
|
|
28
|
+
const index = keyHistory.value.indexOf(key);
|
|
29
|
+
if (index !== -1) {
|
|
30
|
+
keyHistory.value.splice(index, 1);
|
|
31
|
+
}
|
|
32
|
+
const msgIndex = routeMsgs.value.findIndex((item) => item.key === key);
|
|
33
|
+
if (msgIndex !== -1) {
|
|
34
|
+
routeMsgs.value.splice(msgIndex, 1);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
watch(
|
|
39
|
+
() => route.path,
|
|
40
|
+
(newVal, oldVal) => {
|
|
41
|
+
if (newVal !== oldVal) {
|
|
42
|
+
currentKey.value = getView2Value(route);
|
|
43
|
+
indexPath.value = getView1Value(route);
|
|
44
|
+
const find = routeMsgs.value.find(
|
|
45
|
+
(item) => item.key === currentKey.value
|
|
46
|
+
);
|
|
47
|
+
if (find) {
|
|
48
|
+
find.fullPath = route.fullPath;
|
|
49
|
+
} else {
|
|
50
|
+
if (newVal === indexPath.value) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
routeMsgs.value.push({
|
|
54
|
+
key: currentKey.value,
|
|
55
|
+
fullPath: route.fullPath,
|
|
56
|
+
modelPath: "",
|
|
57
|
+
caption: ""
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{ deep: true, immediate: true }
|
|
63
|
+
);
|
|
64
|
+
watch(
|
|
65
|
+
currentKey,
|
|
66
|
+
(newVal, oldVal) => {
|
|
67
|
+
if (newVal !== oldVal && newVal) {
|
|
68
|
+
const index = keyHistory.value.indexOf(newVal);
|
|
69
|
+
if (index === -1) {
|
|
70
|
+
keyHistory.value.unshift(newVal);
|
|
71
|
+
} else {
|
|
72
|
+
keyHistory.value.splice(index, 1);
|
|
73
|
+
keyHistory.value.unshift(newVal);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{ immediate: true }
|
|
78
|
+
);
|
|
79
|
+
const updateRouteMsg = async (key, opts) => {
|
|
80
|
+
const find = routeMsgs.value.find((item) => item.key === currentKey.value);
|
|
81
|
+
if (find) {
|
|
82
|
+
if (opts.caption)
|
|
83
|
+
find.caption = opts.caption;
|
|
84
|
+
if (opts.modelPath) {
|
|
85
|
+
find.modelPath = opts.modelPath;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const closeView = (key = currentKey.value) => {
|
|
90
|
+
deleteRouteCache([key]);
|
|
91
|
+
const toKey = keyHistory.value[0];
|
|
92
|
+
if (!toKey) {
|
|
93
|
+
if (controller.model.blankMode) {
|
|
94
|
+
window.close();
|
|
95
|
+
} else {
|
|
96
|
+
currentKey.value = "";
|
|
97
|
+
router.push(indexPath.value);
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
const find = routeMsgs.value.find((item) => item.key === toKey);
|
|
101
|
+
router.push(find.fullPath);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const handleTabClick = (index) => {
|
|
105
|
+
const routeMsg = routeMsgs.value[index];
|
|
106
|
+
if (routeMsg) {
|
|
107
|
+
router.push(routeMsg.fullPath);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const redirectToIndex = () => {
|
|
111
|
+
const fullPath = route.fullPath;
|
|
112
|
+
let index = fullPath.indexOf("/");
|
|
113
|
+
for (let i = 0; i < 2; i++) {
|
|
114
|
+
index = fullPath.indexOf("/", index + 1);
|
|
115
|
+
}
|
|
116
|
+
const path = `${fullPath.substring(0, index)}/-`;
|
|
117
|
+
router.push(path);
|
|
118
|
+
};
|
|
119
|
+
const goToPage = () => {
|
|
120
|
+
if (keyHistory.value.length > 0) {
|
|
121
|
+
const currentMsg = routeMsgs.value.find(
|
|
122
|
+
(item) => item.key === keyHistory.value[0]
|
|
123
|
+
);
|
|
124
|
+
if (currentMsg) {
|
|
125
|
+
router.push(currentMsg.fullPath);
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
redirectToIndex();
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
const handleTabDelete = (name) => {
|
|
132
|
+
const routeMsg = routeMsgs.value[name];
|
|
133
|
+
if (routeMsg) {
|
|
134
|
+
deleteRouteCache([routeMsg.key]);
|
|
135
|
+
goToPage();
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const handleCloseAll = () => {
|
|
139
|
+
if (routeMsgs.value.length > 0) {
|
|
140
|
+
const allKeyArr = [];
|
|
141
|
+
routeMsgs.value.forEach((msg) => {
|
|
142
|
+
allKeyArr.push(msg.key);
|
|
143
|
+
});
|
|
144
|
+
deleteRouteCache(allKeyArr);
|
|
145
|
+
goToPage();
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const handleCloseOther = () => {
|
|
149
|
+
if (routeMsgs.value.length > 0) {
|
|
150
|
+
const allKeyArr = [];
|
|
151
|
+
routeMsgs.value.forEach((msg) => {
|
|
152
|
+
if (msg.key !== currentKey.value) {
|
|
153
|
+
allKeyArr.push(msg.key);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
deleteRouteCache(allKeyArr);
|
|
157
|
+
goToPage();
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
return {
|
|
161
|
+
currentKey,
|
|
162
|
+
keyHistory,
|
|
163
|
+
routeMsgs,
|
|
164
|
+
updateRouteMsg,
|
|
165
|
+
closeView,
|
|
166
|
+
deleteRouteCache,
|
|
167
|
+
handleTabClick,
|
|
168
|
+
handleTabDelete,
|
|
169
|
+
handleCloseAll,
|
|
170
|
+
handleCloseOther
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
export {
|
|
174
|
+
getView1Value,
|
|
175
|
+
getView2Value,
|
|
176
|
+
useIndexExpRouteManage
|
|
177
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IViewProvider } from '@ibiz-template/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* 首页视图适配器
|
|
4
|
+
*
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2022-10-25 18:10:57
|
|
7
|
+
* @export
|
|
8
|
+
* @class IndexViewProvider
|
|
9
|
+
* @implements {IViewProvider}
|
|
10
|
+
*/
|
|
11
|
+
export declare class IndexViewProvider implements IViewProvider {
|
|
12
|
+
component: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => {
|
|
4
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
+
return value;
|
|
6
|
+
};
|
|
7
|
+
class IndexViewProvider {
|
|
8
|
+
constructor() {
|
|
9
|
+
__publicField(this, "component", "IndexView");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
IndexViewProvider
|
|
14
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComputedRef, PropType, Ref } from 'vue';
|
|
2
|
+
export declare const IndexView: import("vue").DefineComponent<{
|
|
3
|
+
context: PropType<IContext>;
|
|
4
|
+
params: {
|
|
5
|
+
type: PropType<IParams>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
modelData: {
|
|
9
|
+
type: PropType<IAppIndexView>;
|
|
10
|
+
required: true;
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
c: any;
|
|
14
|
+
onViewFound: (_opts: IData) => void;
|
|
15
|
+
onMenuRouteChange: (() => void) | null;
|
|
16
|
+
deleteRouteCache: (_keys: string[]) => void;
|
|
17
|
+
handleTabClick: ((_index: number) => void) | null;
|
|
18
|
+
handleTabDelete: ((_name: number) => void) | null;
|
|
19
|
+
handleCloseAll: (() => void) | null;
|
|
20
|
+
handleCloseOther: (() => void) | null;
|
|
21
|
+
currentPath: ComputedRef<string>;
|
|
22
|
+
currentKey: Ref<string>;
|
|
23
|
+
keyHistory: Ref<string[]>;
|
|
24
|
+
routeMsgs: Ref<{
|
|
25
|
+
key: string;
|
|
26
|
+
fullPath: string;
|
|
27
|
+
modelPath?: string | undefined;
|
|
28
|
+
caption?: string | undefined;
|
|
29
|
+
}[]>;
|
|
30
|
+
isShowTabPageExp: boolean;
|
|
31
|
+
isCollapse: (collapse: boolean) => boolean;
|
|
32
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
context: PropType<IContext>;
|
|
34
|
+
params: {
|
|
35
|
+
type: PropType<IParams>;
|
|
36
|
+
default: () => {};
|
|
37
|
+
};
|
|
38
|
+
modelData: {
|
|
39
|
+
type: PropType<IAppIndexView>;
|
|
40
|
+
required: true;
|
|
41
|
+
};
|
|
42
|
+
}>>, {
|
|
43
|
+
params: IParams;
|
|
44
|
+
}>;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { defineComponent, computed, onMounted, createVNode, resolveComponent, createTextVNode } from "vue";
|
|
2
|
+
import { useViewController } from "@ibiz-template/vue3-util";
|
|
3
|
+
import "./index-view-default";
|
|
4
|
+
import { useIndexExpRouteManage } from "./index-view-exp";
|
|
5
|
+
import { ViewController } from "@ibiz-template/runtime";
|
|
6
|
+
const IndexView = /* @__PURE__ */ defineComponent({
|
|
7
|
+
name: "IndexView",
|
|
8
|
+
props: {
|
|
9
|
+
context: Object,
|
|
10
|
+
params: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
},
|
|
14
|
+
modelData: {
|
|
15
|
+
type: Object,
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const c = useViewController((...args) => new ViewController(...args));
|
|
21
|
+
const isShowTabPageExp = true;
|
|
22
|
+
let onViewFound = null;
|
|
23
|
+
let onMenuRouteChange = null;
|
|
24
|
+
let deleteRouteCache = null;
|
|
25
|
+
let handleTabClick = null;
|
|
26
|
+
let handleTabDelete = null;
|
|
27
|
+
let handleCloseAll = null;
|
|
28
|
+
let handleCloseOther = null;
|
|
29
|
+
let currentPath = null;
|
|
30
|
+
let currentKey;
|
|
31
|
+
let keyHistory;
|
|
32
|
+
let routeMsgs;
|
|
33
|
+
{
|
|
34
|
+
const {
|
|
35
|
+
currentKey: _currentKey,
|
|
36
|
+
keyHistory: _keyHistory,
|
|
37
|
+
routeMsgs: _routeMsgs,
|
|
38
|
+
updateRouteMsg,
|
|
39
|
+
closeView,
|
|
40
|
+
deleteRouteCache: _deleteRouteCache,
|
|
41
|
+
handleTabClick: _handleTabClick,
|
|
42
|
+
handleTabDelete: _handleTabDelete,
|
|
43
|
+
handleCloseAll: _handleCloseAll,
|
|
44
|
+
handleCloseOther: _handleCloseOther
|
|
45
|
+
} = useIndexExpRouteManage(c);
|
|
46
|
+
currentKey = _currentKey;
|
|
47
|
+
keyHistory = _keyHistory;
|
|
48
|
+
routeMsgs = _routeMsgs;
|
|
49
|
+
deleteRouteCache = _deleteRouteCache;
|
|
50
|
+
handleTabClick = _handleTabClick;
|
|
51
|
+
handleTabDelete = _handleTabDelete;
|
|
52
|
+
handleCloseAll = _handleCloseAll;
|
|
53
|
+
handleCloseOther = _handleCloseOther;
|
|
54
|
+
onViewFound = (opts) => {
|
|
55
|
+
updateRouteMsg(currentKey.value, opts);
|
|
56
|
+
};
|
|
57
|
+
window.onpopstate = () => {
|
|
58
|
+
deleteRouteCache([keyHistory.value[1]]);
|
|
59
|
+
};
|
|
60
|
+
currentPath = computed(() => {
|
|
61
|
+
const routeMsg = routeMsgs.value.find((item) => item.key === currentKey.value);
|
|
62
|
+
return (routeMsg == null ? void 0 : routeMsg.modelPath) || "";
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
onMounted(() => {
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
const el = document.querySelector(".app-loading-x");
|
|
68
|
+
if (el) {
|
|
69
|
+
el.style.display = "none";
|
|
70
|
+
}
|
|
71
|
+
}, 300);
|
|
72
|
+
});
|
|
73
|
+
const isCollapse = (collapse) => {
|
|
74
|
+
return false;
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
c,
|
|
78
|
+
// onCreated,
|
|
79
|
+
onViewFound,
|
|
80
|
+
onMenuRouteChange,
|
|
81
|
+
deleteRouteCache,
|
|
82
|
+
handleTabClick,
|
|
83
|
+
handleTabDelete,
|
|
84
|
+
handleCloseAll,
|
|
85
|
+
handleCloseOther,
|
|
86
|
+
currentPath,
|
|
87
|
+
currentKey,
|
|
88
|
+
keyHistory,
|
|
89
|
+
routeMsgs,
|
|
90
|
+
isShowTabPageExp,
|
|
91
|
+
isCollapse
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
render() {
|
|
95
|
+
return createVNode(resolveComponent("app-layout"), {
|
|
96
|
+
"is-complete": true,
|
|
97
|
+
"modelData": this.c.model,
|
|
98
|
+
"onCollapseChange": this.isCollapse
|
|
99
|
+
}, {
|
|
100
|
+
menu: () => {
|
|
101
|
+
var _a;
|
|
102
|
+
{
|
|
103
|
+
if (this.$slots.appmenu) {
|
|
104
|
+
return this.$slots.appmenu();
|
|
105
|
+
}
|
|
106
|
+
const menu = (_a = this.modelData.controls) == null ? void 0 : _a.find((item) => item.name === "appmenu");
|
|
107
|
+
if (menu) {
|
|
108
|
+
return createVNode(resolveComponent("control-shell"), {
|
|
109
|
+
"current-path": this.currentPath,
|
|
110
|
+
"modelData": menu,
|
|
111
|
+
"context": this.c.context,
|
|
112
|
+
"mode": this.c.model.mainMenuAlign,
|
|
113
|
+
"onMenuRouteChange": this.onMenuRouteChange
|
|
114
|
+
}, null);
|
|
115
|
+
}
|
|
116
|
+
return createVNode("div", null, [createTextVNode("菜单")]);
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
tabPageExp: () => {
|
|
120
|
+
if (this.isShowTabPageExp) {
|
|
121
|
+
return createVNode(resolveComponent("tab-page-exp"), {
|
|
122
|
+
"route-msgs": this.routeMsgs,
|
|
123
|
+
"current-key": this.currentKey,
|
|
124
|
+
"onTabClick": this.handleTabClick,
|
|
125
|
+
"onTabDelete": this.handleTabDelete,
|
|
126
|
+
"onCloseAll": this.handleCloseAll,
|
|
127
|
+
"onCloseOther": this.handleCloseOther
|
|
128
|
+
}, null);
|
|
129
|
+
}
|
|
130
|
+
return null;
|
|
131
|
+
},
|
|
132
|
+
default: () => {
|
|
133
|
+
if (this.currentKey) {
|
|
134
|
+
return createVNode(resolveComponent("app-router-view"), {
|
|
135
|
+
"manualKey": this.currentKey,
|
|
136
|
+
"onViewFound": this.onViewFound
|
|
137
|
+
}, {
|
|
138
|
+
default: ({
|
|
139
|
+
Component
|
|
140
|
+
}) => {
|
|
141
|
+
return Component && createVNode(resolveComponent("appKeepAlive"), {
|
|
142
|
+
"keyList": this.keyHistory
|
|
143
|
+
}, {
|
|
144
|
+
default: () => [createVNode(Component, null, null)]
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
export {
|
|
154
|
+
IndexView
|
|
155
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const IbizIndexView: import("../../util/install").TypeWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
context: import("vue").PropType<IContext>;
|
|
3
|
+
params: {
|
|
4
|
+
type: import("vue").PropType<IParams>;
|
|
5
|
+
default: () => {};
|
|
6
|
+
};
|
|
7
|
+
modelData: {
|
|
8
|
+
type: import("vue").PropType<IAppIndexView>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}, {
|
|
12
|
+
c: any;
|
|
13
|
+
onViewFound: (_opts: IData) => void;
|
|
14
|
+
onMenuRouteChange: (() => void) | null;
|
|
15
|
+
deleteRouteCache: (_keys: string[]) => void;
|
|
16
|
+
handleTabClick: ((_index: number) => void) | null;
|
|
17
|
+
handleTabDelete: ((_name: number) => void) | null;
|
|
18
|
+
handleCloseAll: (() => void) | null;
|
|
19
|
+
handleCloseOther: (() => void) | null;
|
|
20
|
+
currentPath: import("vue").ComputedRef<string>;
|
|
21
|
+
currentKey: import("vue").Ref<string>;
|
|
22
|
+
keyHistory: import("vue").Ref<string[]>;
|
|
23
|
+
routeMsgs: import("vue").Ref<{
|
|
24
|
+
key: string;
|
|
25
|
+
fullPath: string;
|
|
26
|
+
modelPath?: string | undefined;
|
|
27
|
+
caption?: string | undefined;
|
|
28
|
+
}[]>;
|
|
29
|
+
isShowTabPageExp: boolean;
|
|
30
|
+
isCollapse: (collapse: boolean) => boolean;
|
|
31
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
context: import("vue").PropType<IContext>;
|
|
33
|
+
params: {
|
|
34
|
+
type: import("vue").PropType<IParams>;
|
|
35
|
+
default: () => {};
|
|
36
|
+
};
|
|
37
|
+
modelData: {
|
|
38
|
+
type: import("vue").PropType<IAppIndexView>;
|
|
39
|
+
required: true;
|
|
40
|
+
};
|
|
41
|
+
}>>, {
|
|
42
|
+
params: IParams;
|
|
43
|
+
}>>;
|
|
44
|
+
export default IbizIndexView;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ViewType } from "@ibiz-template/runtime";
|
|
2
|
+
import { IndexView } from "./index-view";
|
|
3
|
+
import { IndexViewProvider } from "./index-view-provider";
|
|
4
|
+
import { withInstall } from "../../util/install";
|
|
5
|
+
import { IndexViewEngine } from "./index-view-engine";
|
|
6
|
+
const IbizIndexView = withInstall(IndexView, function(v) {
|
|
7
|
+
v.component(IndexView.name, IndexView);
|
|
8
|
+
ibiz.register.view.register(ViewType.APP_INDEX_VIEW, new IndexViewProvider());
|
|
9
|
+
ibiz.engine.registerPreset(ViewType.APP_INDEX_VIEW, IndexViewEngine);
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
IbizIndexView,
|
|
13
|
+
IbizIndexView as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PropType, VNode } from 'vue';
|
|
2
|
+
export declare const AppIcon: import("vue").DefineComponent<{
|
|
3
|
+
icon: {
|
|
4
|
+
type: PropType<ISysImage>;
|
|
5
|
+
};
|
|
6
|
+
size: {
|
|
7
|
+
type: PropType<"small" | "medium" | "large">;
|
|
8
|
+
};
|
|
9
|
+
}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}> | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
icon: {
|
|
13
|
+
type: PropType<ISysImage>;
|
|
14
|
+
};
|
|
15
|
+
size: {
|
|
16
|
+
type: PropType<"small" | "medium" | "large">;
|
|
17
|
+
};
|
|
18
|
+
}>>, {}>;
|
|
19
|
+
export default AppIcon;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const vue3Util = require("@ibiz-template/vue3-util");
|
|
5
|
+
const AppIcon = /* @__PURE__ */ vue.defineComponent({
|
|
6
|
+
name: "AppIcon",
|
|
7
|
+
props: {
|
|
8
|
+
icon: {
|
|
9
|
+
type: Object
|
|
10
|
+
},
|
|
11
|
+
size: {
|
|
12
|
+
type: String
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(props) {
|
|
16
|
+
const ns = vue3Util.useNamespace("icon");
|
|
17
|
+
const BaseUrl = `${ibiz.env.assetsUrl}/img/`;
|
|
18
|
+
function getContent(icon) {
|
|
19
|
+
if (icon) {
|
|
20
|
+
if (icon.cssClass) {
|
|
21
|
+
if (icon.cssClass.indexOf("fa-") !== -1) {
|
|
22
|
+
return vue.createVNode("i", {
|
|
23
|
+
"class": [ns.b(), icon.cssClass]
|
|
24
|
+
}, null);
|
|
25
|
+
}
|
|
26
|
+
return vue.createVNode(vue.resolveComponent("ion-icon"), {
|
|
27
|
+
"class": ns.b(),
|
|
28
|
+
"name": icon.cssClass
|
|
29
|
+
}, null);
|
|
30
|
+
}
|
|
31
|
+
if (icon.imagePath) {
|
|
32
|
+
if (icon.imagePath.endsWith("svg")) {
|
|
33
|
+
if (icon.imagePath.startsWith("http")) {
|
|
34
|
+
return vue.createVNode(vue.resolveComponent("ion-icon"), {
|
|
35
|
+
"class": ns.b(),
|
|
36
|
+
"src": icon.imagePath
|
|
37
|
+
}, null);
|
|
38
|
+
}
|
|
39
|
+
return vue.createVNode(vue.resolveComponent("ion-icon"), {
|
|
40
|
+
"src": BaseUrl + icon.imagePath,
|
|
41
|
+
"class": ns.b()
|
|
42
|
+
}, null);
|
|
43
|
+
}
|
|
44
|
+
if (icon.imagePath.startsWith("http")) {
|
|
45
|
+
return vue.createVNode("img", {
|
|
46
|
+
"class": ns.b(),
|
|
47
|
+
"src": icon.imagePath
|
|
48
|
+
}, null);
|
|
49
|
+
}
|
|
50
|
+
return vue.createVNode("img", {
|
|
51
|
+
"class": ns.b(),
|
|
52
|
+
"src": BaseUrl + icon.imagePath
|
|
53
|
+
}, null);
|
|
54
|
+
}
|
|
55
|
+
if (icon.rawContent) {
|
|
56
|
+
return vue.createVNode("img", {
|
|
57
|
+
"class": ns.b(),
|
|
58
|
+
"src": icon.rawContent
|
|
59
|
+
}, null);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
const content = vue.computed(() => {
|
|
65
|
+
return getContent(props.icon);
|
|
66
|
+
});
|
|
67
|
+
return () => content.value;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
exports.AppIcon = AppIcon;
|
|
71
|
+
exports.default = AppIcon;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ComponentInternalInstance, ConcreteComponent, TransitionHooks, VNode, VNodeProps } from 'vue';
|
|
2
|
+
import { queuePostFlushCb } from './scheduler';
|
|
3
|
+
export declare const enum ShapeFlags {
|
|
4
|
+
ELEMENT = 1,
|
|
5
|
+
FUNCTIONAL_COMPONENT = 2,
|
|
6
|
+
STATEFUL_COMPONENT = 4,
|
|
7
|
+
TEXT_CHILDREN = 8,
|
|
8
|
+
ARRAY_CHILDREN = 16,
|
|
9
|
+
SLOTS_CHILDREN = 32,
|
|
10
|
+
TELEPORT = 64,
|
|
11
|
+
SUSPENSE = 128,
|
|
12
|
+
COMPONENT_SHOULD_KEEP_ALIVE = 256,
|
|
13
|
+
COMPONENT_KEPT_ALIVE = 512,
|
|
14
|
+
COMPONENT = 6
|
|
15
|
+
}
|
|
16
|
+
export declare const enum MoveType {
|
|
17
|
+
ENTER = 0,
|
|
18
|
+
LEAVE = 1,
|
|
19
|
+
REORDER = 2
|
|
20
|
+
}
|
|
21
|
+
export interface ComponentRenderContext {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
_: ComponentInternalInstance;
|
|
24
|
+
}
|
|
25
|
+
type MatchPattern = string | RegExp | (string | RegExp)[];
|
|
26
|
+
export interface KeepAliveProps {
|
|
27
|
+
keyList: string[];
|
|
28
|
+
include?: MatchPattern;
|
|
29
|
+
exclude?: MatchPattern;
|
|
30
|
+
max?: number | string;
|
|
31
|
+
}
|
|
32
|
+
export declare const isKeepAlive: (vnode: VNode) => boolean;
|
|
33
|
+
export declare const AppKeepAlive: {
|
|
34
|
+
new (): {
|
|
35
|
+
$props: VNodeProps & KeepAliveProps;
|
|
36
|
+
};
|
|
37
|
+
__isKeepAlive: true;
|
|
38
|
+
};
|
|
39
|
+
export declare const getComponentName: (Component: ConcreteComponent, includeInferred?: boolean) => string | false | undefined;
|
|
40
|
+
export declare const isFunction: (val: unknown) => val is Function;
|
|
41
|
+
export declare const isAsyncWrapper: (i: ComponentInternalInstance | VNode) => boolean;
|
|
42
|
+
export declare function setTransitionHooks(vnode: VNode, hooks: TransitionHooks): void;
|
|
43
|
+
export declare const invokeArrayFns: (fns: Function[], arg?: any) => void;
|
|
44
|
+
export declare const queuePostRenderEffect: typeof queuePostFlushCb;
|
|
45
|
+
export declare function invokeVNodeHook(hook: any, instance: ComponentInternalInstance | null, vnode: VNode, prevVNode?: VNode | null): void;
|
|
46
|
+
export declare const devtoolsComponentAdded: (component: ComponentInternalInstance) => void;
|
|
47
|
+
export {};
|