@done-coding/forge-core 0.101.1-alpha.0 → 0.102.1-alpha.0

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/README.md CHANGED
@@ -53,6 +53,17 @@ MIT,Copyright (c) JustSoSu。完整许可见本包 LICENSE。
53
53
 
54
54
  ## 登录守卫与外部登录
55
55
 
56
- `createGuard` 检测到未登录时固定跳 `loginPath` 并带 `from` query;接口 401 经 `bridge.goToLogin` 走同一登录页。外部 IdP(如 OIDC `signinRedirect`、iframe 登录)由登录页自行发起,回调参数与 `from` 回跳也在登录页(或其回调路由)收拢;登录页与回调路由需列入免登录校验路由。forge 不提供守卫级外跳钩子,以免守卫与 `goToLogin` 两个入口行为分叉。
56
+ `createGuard` 在路由解析后写页签标题:取 `meta.title`,没写时回落 `APP_BASE_INFO.name`(传入完整 bridge 即可),两者都没有则不改(不会写成 `"undefined"`)。`createGuard` 检测到未登录时固定跳 `loginPath` 并带 `from` query;接口 401 经 `bridge.goToLogin` 走同一登录页。外部 IdP(如 OIDC `signinRedirect`、iframe 登录)由登录页自行发起,回调参数与 `from` 回跳也在登录页(或其回调路由)收拢;登录页与回调路由需列入免登录校验路由。forge 不提供守卫级外跳钩子,以免守卫与 `goToLogin` 两个入口行为分叉。
57
+
58
+ ### 退出登录与外部登录服务
59
+
60
+ 分工:forge 管时序,应用管实现。`userStore.logout()` 的时序固定为「等 `bridge.logoutApi()` 结束 → 清空登录态 → 守卫转去登录页」;先等后清是因为多数退出接口要带着令牌调用。`logoutApi` 是应用注册的适配器,怎么退出(调接口、外部登录服务、iframe)都在它内部完成,forge 不感知、也不提供按实现区分的开关。
61
+
62
+ 接外部登录服务(SSO)时,适配器内两种做法:
63
+
64
+ - **推荐:不离开页面**。在 `logoutApi` 里用隐藏 iframe 打开外部退出地址,收到对方 `postMessage` 回执(或超时)后返回;时序不变,forge 照常清空登录态。
65
+ - **必须整页跳走**:`logoutApi` 里先在 sessionStorage 记「正在退出」再 `location.assign` 到外部退出地址,此后 `logoutApi` 不会返回。外部服务跳回应用时,应用启动处见到标记即调 `userStore.noApiLogout()` 并清标记;登录页见到标记不要自动发起登录。
66
+
67
+ 多标签页不做同步:一个标签页退出后,其他标签页下次请求被后端判为未登录,经 `bridge.goToLogin` 自行去登录页。后端退出时应使令牌失效,否则其他标签页会用到令牌过期为止。
57
68
 
58
69
  导出列协议 ExportColumn 的 label 来自 Element Plus 根入口 TableColumnCtx,不从组件构造器反推 props;列渲染与导出行为不变。
@@ -10,6 +10,7 @@ function createBridgeConfigHook(init) {
10
10
  const reactiveViewport = reactive(init.APP_LAYOUT_VIEWPORT_CONFIG);
11
11
  const reactiveGap = reactive(init.APP_LAYOUT_GAP_CONFIG);
12
12
  const reactiveForm = reactive(init.APP_FORM_CONFIG);
13
+ const reactivePage = reactive(init.APP_PAGE_CONFIG);
13
14
  const reactiveTheme = reactive(init.APP_THEME_CONFIG);
14
15
  const reactiveMap = {
15
16
  APP_BASE_INFO: reactiveBaseInfo,
@@ -22,6 +23,7 @@ function createBridgeConfigHook(init) {
22
23
  APP_LAYOUT_VIEWPORT_CONFIG: reactiveViewport,
23
24
  APP_LAYOUT_GAP_CONFIG: reactiveGap,
24
25
  APP_FORM_CONFIG: reactiveForm,
26
+ APP_PAGE_CONFIG: reactivePage,
25
27
  APP_THEME_CONFIG: reactiveTheme
26
28
  };
27
29
  const layoutAggregate = reactive({
@@ -49,6 +51,7 @@ function createBridgeConfigHook(init) {
49
51
  roViewport: readonly(reactiveViewport),
50
52
  roGap: readonly(reactiveGap),
51
53
  roForm: readonly(reactiveForm),
54
+ roPage: readonly(reactivePage),
52
55
  roTheme: readonly(reactiveTheme),
53
56
  roLayout: readonly(layoutAggregate)
54
57
  };
@@ -46,9 +46,15 @@ function createCoreBridge(options) {
46
46
  layoutByContainer: true,
47
47
  ...options.APP_FORM_CONFIG
48
48
  };
49
+ const pageConfig = {
50
+ contentCentered: "auto",
51
+ contentMaxWidth: 1200,
52
+ ...options.APP_PAGE_CONFIG
53
+ };
49
54
  const configHook = createBridgeConfigHook({
50
55
  APP_BASE_INFO: options.APP_BASE_INFO,
51
56
  APP_FORM_CONFIG: formConfig,
57
+ APP_PAGE_CONFIG: pageConfig,
52
58
  APP_THEME_CONFIG: options.APP_THEME_CONFIG,
53
59
  APP_LAYOUT_HEADER_CONFIG: options.APP_LAYOUT_HEADER_CONFIG,
54
60
  APP_LAYOUT_FOOTER_CONFIG: options.APP_LAYOUT_FOOTER_CONFIG,
@@ -236,6 +242,7 @@ function createCoreBridge(options) {
236
242
  */
237
243
  APP_LAYOUT_GAP_CONFIG: configHook.roGap,
238
244
  APP_FORM_CONFIG: configHook.roForm,
245
+ APP_PAGE_CONFIG: configHook.roPage,
239
246
  /**
240
247
  * 应用布局聚合配置(**响应式只读视图**,插件系统一期改)。
241
248
  *
@@ -1,202 +1,7 @@
1
- import { defineComponent, toRefs, getCurrentInstance, ref, computed, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from "vue";
2
- import { useActionBtnReport } from "./use-action-btn-report.mjs";
3
- import { ElButton } from "element-plus";
4
- import ActionConfirm from "../../feedback/action-confirm/ActionConfirm.vue.mjs";
5
- import BadgeMark from "../../data/badge-mark/BadgeMark.vue.mjs";
6
- const _sfc_main = /* @__PURE__ */ defineComponent({
7
- ...{ inheritAttrs: false },
8
- __name: "ActionBtn",
9
- props: {
10
- size: {},
11
- disabled: { type: Boolean },
12
- type: { default: "default" },
13
- icon: {},
14
- nativeType: {},
15
- loadingIcon: {},
16
- plain: { type: Boolean },
17
- text: { type: Boolean },
18
- link: { type: Boolean },
19
- bg: { type: Boolean },
20
- autofocus: { type: Boolean },
21
- round: { type: Boolean },
22
- circle: { type: Boolean },
23
- dashed: { type: Boolean },
24
- color: {},
25
- dark: { type: Boolean },
26
- autoInsertSpace: { type: Boolean },
27
- tag: {},
28
- groupMeta: {},
29
- trackKey: {},
30
- confirmMode: {},
31
- confirmConfig: {},
32
- beforeOpen: {},
33
- badgeKey: {}
34
- },
35
- emits: ["click"],
36
- setup(__props) {
37
- const props = __props;
38
- const { confirmConfig, confirmMode, beforeOpen } = toRefs(props);
39
- const instance = getCurrentInstance();
40
- const innerLoading = ref(false);
41
- const confirmVisible = ref(false);
42
- const resolvedConfig = ref();
43
- const {
44
- reportActionClick,
45
- reportConfirmOpen,
46
- reportConfirmClose,
47
- runConfirmSubmit
48
- } = useActionBtnReport(() => ({
49
- type: props.type,
50
- groupMeta: props.groupMeta,
51
- trackKey: props.trackKey,
52
- config: resolvedConfig.value
53
- }));
54
- let lastEvt;
55
- const shouldRenderConfirm = computed(
56
- () => Boolean(confirmConfig.value) || Boolean(beforeOpen.value)
57
- );
58
- const passthrough = computed(() => {
59
- const p = props;
60
- const picked = {};
61
- const keys = [
62
- "type",
63
- "size",
64
- "plain",
65
- "text",
66
- "bg",
67
- "link",
68
- "round",
69
- "circle",
70
- "color",
71
- "dark",
72
- "disabled",
73
- "autofocus",
74
- "nativeType",
75
- "autoInsertSpace",
76
- "tag",
77
- "icon",
78
- "loadingIcon"
79
- ];
80
- for (const k of keys) if (p[k] !== void 0) picked[k] = p[k];
81
- return { ...instance == null ? void 0 : instance.attrs, ...picked };
82
- });
83
- const isPromise = (v) => !!v && typeof v.then === "function";
84
- const getListeners = () => {
85
- var _a;
86
- const raw = (_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick;
87
- if (!raw) return [];
88
- return Array.isArray(raw) ? raw : [raw];
89
- };
90
- const invokeListeners = () => {
91
- const listeners = getListeners();
92
- if (!listeners.length) return;
93
- const evt = lastEvt;
94
- let rets;
95
- try {
96
- rets = listeners.map((fn) => fn(evt));
97
- } catch (e) {
98
- innerLoading.value = false;
99
- throw e;
100
- }
101
- const proms = rets.filter(isPromise);
102
- if (!proms.length) return;
103
- innerLoading.value = true;
104
- return Promise.all(proms).finally(() => {
105
- innerLoading.value = false;
106
- });
107
- };
108
- const submitFnAdapter = () => runConfirmSubmit(() => invokeListeners());
109
- const onInnerClick = async (evt) => {
110
- if (innerLoading.value || confirmVisible.value) return;
111
- reportActionClick();
112
- lastEvt = evt;
113
- let data;
114
- if (beforeOpen.value) {
115
- innerLoading.value = true;
116
- try {
117
- data = await beforeOpen.value();
118
- } catch {
119
- innerLoading.value = false;
120
- return;
121
- }
122
- innerLoading.value = false;
123
- } else {
124
- data = void 0;
125
- }
126
- if (confirmConfig.value) {
127
- resolvedConfig.value = typeof confirmConfig.value === "function" ? confirmConfig.value(data) : confirmConfig.value;
128
- confirmVisible.value = true;
129
- reportConfirmOpen();
130
- } else {
131
- invokeListeners();
132
- }
133
- };
134
- const onConfirmClose = (confirmed) => {
135
- reportConfirmClose(confirmed);
136
- resolvedConfig.value = void 0;
137
- };
138
- return (_ctx, _cache) => {
139
- var _a, _b, _c, _d, _e;
140
- return shouldRenderConfirm.value ? (openBlock(), createBlock(unref(ActionConfirm), {
141
- key: 0,
142
- show: confirmVisible.value,
143
- "onUpdate:show": _cache[0] || (_cache[0] = ($event) => confirmVisible.value = $event),
144
- mode: unref(confirmMode) || "popconfirm",
145
- title: (_a = resolvedConfig.value) == null ? void 0 : _a.title,
146
- content: (_b = resolvedConfig.value) == null ? void 0 : _b.content,
147
- "confirm-text": (_c = resolvedConfig.value) == null ? void 0 : _c.confirmText,
148
- "cancel-text": (_d = resolvedConfig.value) == null ? void 0 : _d.cancelText,
149
- type: ((_e = resolvedConfig.value) == null ? void 0 : _e.type) ?? __props.type,
150
- "submit-fn": submitFnAdapter,
151
- onClose: onConfirmClose
152
- }, {
153
- default: withCtx(() => [
154
- createVNode(unref(ElButton), mergeProps({
155
- class: "dc-action-btn",
156
- "data-dc-badge-host": ""
157
- }, passthrough.value, {
158
- loading: innerLoading.value,
159
- onClick: onInnerClick
160
- }), {
161
- default: withCtx(() => [
162
- createVNode(unref(BadgeMark), {
163
- align: "corner",
164
- badgeKey: __props.badgeKey
165
- }, {
166
- default: withCtx(() => [
167
- renderSlot(_ctx.$slots, "default")
168
- ]),
169
- _: 3
170
- }, 8, ["badgeKey"])
171
- ]),
172
- _: 3
173
- }, 16, ["loading"])
174
- ]),
175
- _: 3
176
- }, 8, ["show", "mode", "title", "content", "confirm-text", "cancel-text", "type"])) : (openBlock(), createBlock(unref(ElButton), mergeProps({
177
- key: 1,
178
- class: "dc-action-btn",
179
- "data-dc-badge-host": ""
180
- }, passthrough.value, {
181
- loading: innerLoading.value,
182
- onClick: onInnerClick
183
- }), {
184
- default: withCtx(() => [
185
- createVNode(unref(BadgeMark), {
186
- align: "corner",
187
- badgeKey: __props.badgeKey
188
- }, {
189
- default: withCtx(() => [
190
- renderSlot(_ctx.$slots, "default")
191
- ]),
192
- _: 3
193
- }, 8, ["badgeKey"])
194
- ]),
195
- _: 3
196
- }, 16, ["loading"]));
197
- };
198
- }
199
- });
1
+ import _sfc_main from "./ActionBtn.vue2.mjs";
2
+ /* empty css */
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const ActionBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-75127118"]]);
200
5
  export {
201
- _sfc_main as default
6
+ ActionBtn as default
202
7
  };
@@ -1,4 +1,211 @@
1
- import _sfc_main from "./ActionBtn.vue.mjs";
1
+ import { defineComponent, toRefs, getCurrentInstance, ref, computed, openBlock, createBlock, unref, withCtx, createVNode, mergeProps, renderSlot } from "vue";
2
+ import { useActionBtnReport } from "./use-action-btn-report.mjs";
3
+ import { ElButton } from "element-plus";
4
+ import ActionConfirm from "../../feedback/action-confirm/ActionConfirm.vue.mjs";
5
+ import BadgeMark from "../../data/badge-mark/BadgeMark.vue.mjs";
6
+ const _sfc_main = /* @__PURE__ */ defineComponent({
7
+ ...{ inheritAttrs: false },
8
+ __name: "ActionBtn",
9
+ props: {
10
+ size: {},
11
+ disabled: { type: Boolean },
12
+ type: { default: "default" },
13
+ icon: {},
14
+ nativeType: {},
15
+ loadingIcon: {},
16
+ plain: { type: Boolean },
17
+ text: { type: Boolean },
18
+ link: { type: Boolean },
19
+ bg: { type: Boolean },
20
+ autofocus: { type: Boolean },
21
+ round: { type: Boolean },
22
+ circle: { type: Boolean },
23
+ dashed: { type: Boolean },
24
+ color: {},
25
+ dark: { type: Boolean },
26
+ autoInsertSpace: { type: Boolean },
27
+ tag: {},
28
+ groupMeta: {},
29
+ trackKey: {},
30
+ confirmMode: {},
31
+ confirmConfig: {},
32
+ beforeOpen: {},
33
+ badgeKey: {}
34
+ },
35
+ emits: ["click"],
36
+ setup(__props) {
37
+ const props = __props;
38
+ const { confirmConfig, confirmMode, beforeOpen } = toRefs(props);
39
+ const instance = getCurrentInstance();
40
+ const innerLoading = ref(false);
41
+ const confirmVisible = ref(false);
42
+ const resolvedConfig = ref();
43
+ const {
44
+ reportActionClick,
45
+ reportConfirmOpen,
46
+ reportConfirmClose,
47
+ runConfirmSubmit
48
+ } = useActionBtnReport(() => ({
49
+ type: props.type,
50
+ groupMeta: props.groupMeta,
51
+ trackKey: props.trackKey,
52
+ config: resolvedConfig.value
53
+ }));
54
+ let lastEvt;
55
+ const shouldRenderConfirm = computed(
56
+ () => Boolean(confirmConfig.value) || Boolean(beforeOpen.value)
57
+ );
58
+ const isPromise = (v) => !!v && typeof v.then === "function";
59
+ const getListeners = () => {
60
+ var _a;
61
+ const raw = (_a = instance == null ? void 0 : instance.vnode.props) == null ? void 0 : _a.onClick;
62
+ if (!raw) return [];
63
+ return Array.isArray(raw) ? raw : [raw];
64
+ };
65
+ const invokeListeners = () => {
66
+ const listeners = getListeners();
67
+ if (!listeners.length) return;
68
+ const evt = lastEvt;
69
+ let rets;
70
+ try {
71
+ rets = listeners.map((fn) => fn(evt));
72
+ } catch (e) {
73
+ innerLoading.value = false;
74
+ throw e;
75
+ }
76
+ const proms = rets.filter(isPromise);
77
+ if (!proms.length) return;
78
+ innerLoading.value = true;
79
+ return Promise.all(proms).finally(() => {
80
+ innerLoading.value = false;
81
+ });
82
+ };
83
+ const submitFnAdapter = () => runConfirmSubmit(() => invokeListeners());
84
+ const onInnerClick = async (evt) => {
85
+ if (innerLoading.value || confirmVisible.value) return;
86
+ reportActionClick();
87
+ lastEvt = evt;
88
+ let data;
89
+ if (beforeOpen.value) {
90
+ innerLoading.value = true;
91
+ try {
92
+ data = await beforeOpen.value();
93
+ } catch {
94
+ innerLoading.value = false;
95
+ return;
96
+ }
97
+ innerLoading.value = false;
98
+ } else {
99
+ data = void 0;
100
+ }
101
+ if (confirmConfig.value) {
102
+ resolvedConfig.value = typeof confirmConfig.value === "function" ? confirmConfig.value(data) : confirmConfig.value;
103
+ confirmVisible.value = true;
104
+ reportConfirmOpen();
105
+ } else {
106
+ invokeListeners();
107
+ }
108
+ };
109
+ const onConfirmClose = (confirmed) => {
110
+ reportConfirmClose(confirmed);
111
+ resolvedConfig.value = void 0;
112
+ };
113
+ return (_ctx, _cache) => {
114
+ var _a, _b, _c, _d, _e;
115
+ return shouldRenderConfirm.value ? (openBlock(), createBlock(unref(ActionConfirm), {
116
+ key: 0,
117
+ show: confirmVisible.value,
118
+ "onUpdate:show": _cache[0] || (_cache[0] = ($event) => confirmVisible.value = $event),
119
+ mode: unref(confirmMode) || "popconfirm",
120
+ title: (_a = resolvedConfig.value) == null ? void 0 : _a.title,
121
+ content: (_b = resolvedConfig.value) == null ? void 0 : _b.content,
122
+ "confirm-text": (_c = resolvedConfig.value) == null ? void 0 : _c.confirmText,
123
+ "cancel-text": (_d = resolvedConfig.value) == null ? void 0 : _d.cancelText,
124
+ type: ((_e = resolvedConfig.value) == null ? void 0 : _e.type) ?? __props.type,
125
+ "submit-fn": submitFnAdapter,
126
+ onClose: onConfirmClose
127
+ }, {
128
+ default: withCtx(() => [
129
+ createVNode(unref(ElButton), mergeProps({
130
+ class: ["dc-action-btn", { "dc-action-btn_icon-only": !_ctx.$slots.default }],
131
+ "data-dc-badge-host": ""
132
+ }, _ctx.$attrs, {
133
+ type: __props.type,
134
+ size: __props.size,
135
+ plain: __props.plain,
136
+ text: __props.text,
137
+ bg: __props.bg,
138
+ link: __props.link,
139
+ round: __props.round,
140
+ circle: __props.circle,
141
+ color: __props.color,
142
+ dark: __props.dark,
143
+ disabled: __props.disabled,
144
+ autofocus: __props.autofocus,
145
+ nativeType: __props.nativeType,
146
+ autoInsertSpace: __props.autoInsertSpace,
147
+ tag: __props.tag,
148
+ icon: __props.icon,
149
+ loadingIcon: __props.loadingIcon,
150
+ loading: innerLoading.value,
151
+ onClick: onInnerClick
152
+ }), {
153
+ default: withCtx(() => [
154
+ createVNode(unref(BadgeMark), {
155
+ align: "corner",
156
+ badgeKey: __props.badgeKey
157
+ }, {
158
+ default: withCtx(() => [
159
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
160
+ ]),
161
+ _: 3
162
+ }, 8, ["badgeKey"])
163
+ ]),
164
+ _: 3
165
+ }, 16, ["class", "type", "size", "plain", "text", "bg", "link", "round", "circle", "color", "dark", "disabled", "autofocus", "nativeType", "autoInsertSpace", "tag", "icon", "loadingIcon", "loading"])
166
+ ]),
167
+ _: 3
168
+ }, 8, ["show", "mode", "title", "content", "confirm-text", "cancel-text", "type"])) : (openBlock(), createBlock(unref(ElButton), mergeProps({
169
+ key: 1,
170
+ class: ["dc-action-btn", { "dc-action-btn_icon-only": !_ctx.$slots.default }],
171
+ "data-dc-badge-host": ""
172
+ }, _ctx.$attrs, {
173
+ type: __props.type,
174
+ size: __props.size,
175
+ plain: __props.plain,
176
+ text: __props.text,
177
+ bg: __props.bg,
178
+ link: __props.link,
179
+ round: __props.round,
180
+ circle: __props.circle,
181
+ color: __props.color,
182
+ dark: __props.dark,
183
+ disabled: __props.disabled,
184
+ autofocus: __props.autofocus,
185
+ nativeType: __props.nativeType,
186
+ autoInsertSpace: __props.autoInsertSpace,
187
+ tag: __props.tag,
188
+ icon: __props.icon,
189
+ loadingIcon: __props.loadingIcon,
190
+ loading: innerLoading.value,
191
+ onClick: onInnerClick
192
+ }), {
193
+ default: withCtx(() => [
194
+ createVNode(unref(BadgeMark), {
195
+ align: "corner",
196
+ badgeKey: __props.badgeKey
197
+ }, {
198
+ default: withCtx(() => [
199
+ renderSlot(_ctx.$slots, "default", {}, void 0, true)
200
+ ]),
201
+ _: 3
202
+ }, 8, ["badgeKey"])
203
+ ]),
204
+ _: 3
205
+ }, 16, ["class", "type", "size", "plain", "text", "bg", "link", "round", "circle", "color", "dark", "disabled", "autofocus", "nativeType", "autoInsertSpace", "tag", "icon", "loadingIcon", "loading"]));
206
+ };
207
+ }
208
+ });
2
209
  export {
3
210
  _sfc_main as default
4
211
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, toRefs, computed, openBlock, createElementBlock, Fragment, renderList, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, createTextVNode, toDisplayString } from "vue";
2
2
  import { useActionBtnGroupReport } from "./use-action-btn-group-report.mjs";
3
3
  import { ElButton } from "element-plus";
4
- import _sfc_main$1 from "../action-btn/ActionBtn.vue.mjs";
4
+ import ActionBtn from "../action-btn/ActionBtn.vue.mjs";
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
6
6
  __name: "ActionBtnGroup",
7
7
  props: {
@@ -13,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
13
13
  const props = __props;
14
14
  const { configs, ctx, defaultSize } = toRefs(props);
15
15
  const { withGroupMeta, withNativeProps } = useActionBtnGroupReport();
16
- const AnyActionBtn = _sfc_main$1;
16
+ const AnyActionBtn = ActionBtn;
17
17
  const visibleConfigs = computed(
18
18
  () => (configs.value ?? []).filter(
19
19
  (c) => {
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./AutoRefreshGroup.vue2.mjs";
2
2
  /* empty css */
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const AutoRefreshGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5a86b4f5"]]);
4
+ const AutoRefreshGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7378746f"]]);
5
5
  export {
6
6
  AutoRefreshGroup as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent, useModel, openBlock, createBlock, unref, withCtx, createCommentVNode, createVNode, normalizeClass, mergeModels } from "vue";
1
+ import { defineComponent, useModel, openBlock, createBlock, unref, withCtx, createCommentVNode, normalizeClass, mergeModels } from "vue";
2
2
  import { useAutoRefreshGroupReport } from "./use-auto-refresh-group-report.mjs";
3
3
  import AutoRefresh from "../auto-refresh/AutoRefresh.vue.mjs";
4
- import { ElButton, ElIcon } from "element-plus";
5
4
  import { Refresh } from "@element-plus/icons-vue";
5
+ import ActionBtn from "../../basic/action-btn/ActionBtn.vue.mjs";
6
6
  import _sfc_main$1 from "../../basic/slot-layout-template/SlotLayoutTemplate.vue.mjs";
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
8
8
  __name: "AutoRefreshGroup",
@@ -22,6 +22,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
22
22
  setup(__props) {
23
23
  const props = __props;
24
24
  const { refreshManually } = useAutoRefreshGroupReport(() => props.refreshFn);
25
+ const onRefreshClick = () => {
26
+ if (props.loading) return;
27
+ return refreshManually();
28
+ };
25
29
  const isAutoRefresh = useModel(__props, "isAutoRefresh");
26
30
  const refreshInterval = useModel(__props, "interval");
27
31
  return (_ctx, _cache) => {
@@ -39,25 +43,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
43
  refreshFn: __props.refreshFn,
40
44
  disabled: __props.loading
41
45
  }, null, 8, ["modelValue", "interval", "refreshFn", "disabled"])) : createCommentVNode("", true),
42
- __props.showRefresh ? (openBlock(), createBlock(unref(ElButton), {
46
+ __props.showRefresh ? (openBlock(), createBlock(unref(ActionBtn), {
43
47
  key: 1,
44
48
  "aria-label": "刷新",
45
49
  size: "small",
46
50
  circle: "",
47
- onClick: _cache[2] || (_cache[2] = ($event) => unref(refreshManually)())
48
- }, {
49
- default: withCtx(() => [
50
- createVNode(unref(ElIcon), {
51
- class: normalizeClass({ "auto-refresh-group-icon--rotating": __props.loading })
52
- }, {
53
- default: withCtx(() => [
54
- createVNode(unref(Refresh))
55
- ]),
56
- _: 1
57
- }, 8, ["class"])
58
- ]),
59
- _: 1
60
- })) : createCommentVNode("", true)
51
+ trackKey: "auto-refresh-group",
52
+ icon: unref(Refresh),
53
+ loadingIcon: unref(Refresh),
54
+ class: normalizeClass({ "auto-refresh-group-btn--busy": __props.loading }),
55
+ onClick: onRefreshClick
56
+ }, null, 8, ["icon", "loadingIcon", "class"])) : createCommentVNode("", true)
61
57
  ]),
62
58
  _: 1
63
59
  }, 8, ["disabled"]);
@@ -1,9 +1,10 @@
1
1
  import { FORM_CONFIG_SELECT_ALL_VALUE, getConfirmPasswordRule, passwordRule } from "./form.mjs";
2
- import { countAll, createListApi, fetchListAll } from "./list-helper.mjs";
2
+ import { countAll, createListApi, createListOnceApi, fetchListAll } from "./list-helper.mjs";
3
3
  export {
4
4
  FORM_CONFIG_SELECT_ALL_VALUE,
5
5
  countAll,
6
6
  createListApi,
7
+ createListOnceApi,
7
8
  fetchListAll,
8
9
  getConfirmPasswordRule,
9
10
  passwordRule
@@ -64,6 +64,16 @@ function createListApi(source) {
64
64
  };
65
65
  };
66
66
  }
67
+ function createListOnceApi(api) {
68
+ return async (params) => {
69
+ const { items } = await api(params);
70
+ const result = {
71
+ items,
72
+ page: { totalRecord: items.length }
73
+ };
74
+ return result;
75
+ };
76
+ }
67
77
  function countAll(api, baseParams) {
68
78
  return api({
69
79
  ...baseParams,
@@ -73,5 +83,6 @@ function countAll(api, baseParams) {
73
83
  export {
74
84
  countAll,
75
85
  createListApi,
86
+ createListOnceApi,
76
87
  fetchListAll
77
88
  };
package/es/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { ROUTE_MODULE_LEVEL, TabsMainReplaceQueryKey } from "./config/route.mjs"
5
5
  import { APP_PAGE_SIDE_SLOTS, DC_SLOT_ATTR, SlotRegion, parseSlotRegion, resolveAppPageSlotName } from "./config/slot-region.mjs";
6
6
  import { APP_GLOBAL_IMAGE_PREVIEW_KEY, APP_GLOBAL_VIDEO_PREVIEW_KEY } from "./config/modal-keys.mjs";
7
7
  import { FORM_CONFIG_SELECT_ALL_VALUE, getConfirmPasswordRule, passwordRule } from "./helpers/form.mjs";
8
- import { countAll, createListApi, fetchListAll } from "./helpers/list-helper.mjs";
8
+ import { countAll, createListApi, createListOnceApi, fetchListAll } from "./helpers/list-helper.mjs";
9
9
  import { useBreakpoint } from "./hooks/use-breakpoint.mjs";
10
10
  import { resolveBreakpointByWidth, resolveRootEl, useCustomBreakpoint } from "./hooks/use-custom-breakpoint.mjs";
11
11
  import { useActivated, useActivatedEvent, useActivatedExec } from "./hooks/activated.mjs";
@@ -130,6 +130,7 @@ export {
130
130
  createGenerateRouteMetaRawTree,
131
131
  createGuard,
132
132
  createListApi,
133
+ createListOnceApi,
133
134
  createRoutePermissionStore,
134
135
  createStorageWithNamespace,
135
136
  createUseState,
@@ -25,8 +25,10 @@ const createGuard = (router, options) => {
25
25
  next();
26
26
  });
27
27
  router.beforeResolve((to) => {
28
+ var _a;
28
29
  const meta = to.meta;
29
- document.title = meta.title;
30
+ const title = meta.title || ((_a = bridge.APP_BASE_INFO) == null ? void 0 : _a.name);
31
+ if (title) document.title = title;
30
32
  });
31
33
  };
32
34
  export {
package/es/style.css CHANGED
@@ -85,6 +85,9 @@
85
85
  overflow: hidden;
86
86
  pointer-events: none;
87
87
  }
88
+ .dc-action-btn_icon-only[data-v-75127118] [class*="el-icon"] + span {
89
+ margin-left: 0;
90
+ }
88
91
  .drag-float[data-v-77c2e755] {
89
92
  position: absolute;
90
93
  z-index: 3;
@@ -321,15 +324,15 @@
321
324
  margin-bottom: 8px;
322
325
  }
323
326
  /* 有根节点时(needRootNode)按钮组横向排列 + 间距(参照 TableToolbar 按钮组内 gap:10px) */
324
- .auto-refresh-group-root[data-v-5a86b4f5] {
327
+ .auto-refresh-group-root[data-v-7378746f] {
325
328
  display: flex;
326
329
  align-items: center;
327
330
  gap: 10px;
328
331
  }
329
- .auto-refresh-group-icon--rotating[data-v-5a86b4f5] {
330
- animation: auto-refresh-rotating-5a86b4f5 1s linear infinite;
332
+ .auto-refresh-group-btn--busy[data-v-7378746f] .el-icon {
333
+ animation: auto-refresh-rotating-7378746f 1s linear infinite;
331
334
  }
332
- @keyframes auto-refresh-rotating-5a86b4f5 {
335
+ @keyframes auto-refresh-rotating-7378746f {
333
336
  from {
334
337
  transform: rotate(0deg);
335
338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@done-coding/forge-core",
3
- "version": "0.101.1-alpha.0",
3
+ "version": "0.102.1-alpha.0",
4
4
  "description": "Forge 配置化底座:桥接、共享契约、路由与状态工具及基础组件",
5
5
  "private": false,
6
6
  "main": "es/index.mjs",
@@ -228,5 +228,5 @@
228
228
  "engines": {
229
229
  "node": ">=18.0.0"
230
230
  },
231
- "gitHead": "fa0e35f3a055d6e5895f05f5cc97dc96e7e723c6"
231
+ "gitHead": "2ef6be4abe702cc98918e0fc8d91a1b154f74094"
232
232
  }
@@ -7,7 +7,7 @@ import { createUseState } from '../state';
7
7
  import { BridgeThemeLayoutState, CoreThemeDensity, CoreThemeMode, CoreThemeModule, CoreThemeMotion } from '../theme';
8
8
  import { App, Component, DeepReadonly, Ref, ShallowRef } from 'vue';
9
9
  import { RouteRecordRaw } from 'vue-router';
10
- import { AppBaseInfo, AppCacheConfig, AppEnvInfo, AppFormConfig, AppLayoutAsideConfig, AppLayoutBodyConfig, AppLayoutBreadcrumbConfig, AppLayoutConfig, AppLayoutFooterConfig, AppLayoutGapConfig, AppLayoutHeaderConfig, AppLayoutSidebarConfig, AppLayoutViewportConfig, AppRouterConfig, AppRouterMetaDefaultConfig, AppRouterPathsConfig, AppThemeColor, AppThemeConfig, StorageLike, UpdatableConfigKey, UpdatableConfigMap, UserInfoAccess } from './config';
10
+ import { AppBaseInfo, AppCacheConfig, AppEnvInfo, AppFormConfig, AppPageConfig, AppLayoutAsideConfig, AppLayoutBodyConfig, AppLayoutBreadcrumbConfig, AppLayoutConfig, AppLayoutFooterConfig, AppLayoutGapConfig, AppLayoutHeaderConfig, AppLayoutSidebarConfig, AppLayoutViewportConfig, AppRouterConfig, AppRouterMetaDefaultConfig, AppRouterPathsConfig, AppThemeColor, AppThemeConfig, StorageLike, UpdatableConfigKey, UpdatableConfigMap, UserInfoAccess } from './config';
11
11
  /**
12
12
  * 认证桥接无状态纯工厂。
13
13
  *
@@ -106,6 +106,8 @@ export interface CoreBridgeInitOptions<UserInfo = unknown> {
106
106
  APP_LAYOUT_GAP_CONFIG?: Partial<AppLayoutGapConfig>;
107
107
  /** 应用表单配置(可选;核内默认 `{ layoutByContainer: true }`,见 {@link AppConfig.APP_FORM_CONFIG}) */
108
108
  APP_FORM_CONFIG?: Partial<AppFormConfig>;
109
+ /** 页面配置(可选;核内默认 `{ contentCentered: "auto", contentMaxWidth: 1200 }`,见 {@link AppConfig.APP_PAGE_CONFIG}) */
110
+ APP_PAGE_CONFIG?: Partial<AppPageConfig>;
109
111
  /** 应用路由元信息默认配置(bridge 内部 generateRouteMetaRawTree 派生) */
110
112
  APP_ROUTER_META_DEFAULT_CONFIG: AppRouterMetaDefaultConfig;
111
113
  /** 应用路由配置(#2.5 期新增字段) */
@@ -208,6 +210,8 @@ export interface CoreBridge<UserInfo = unknown, LoginParams = unknown> extends B
208
210
  /** 应用布局-模块间距配置(内缝 gap;响应式只读视图,经 bridge.update 跟随) */
209
211
  readonly APP_LAYOUT_GAP_CONFIG: DeepReadonly<AppLayoutGapConfig>;
210
212
  readonly APP_FORM_CONFIG: DeepReadonly<AppFormConfig>;
213
+ /** 页面配置(AppPage 组件级缺省值;响应式只读视图,经 bridge.update 跟随) */
214
+ readonly APP_PAGE_CONFIG: DeepReadonly<AppPageConfig>;
211
215
  /** 应用布局聚合配置(per #2.5 期 ADR-3 bridge 内部聚合派生) */
212
216
  readonly APP_LAYOUT_CONFIG: DeepReadonly<AppLayoutConfig>;
213
217
  /** 应用路由元信息默认配置(per #2.5 期 REQ-1) */
@@ -223,6 +223,20 @@ export interface AppConfig {
223
223
  /** 模块间距(px);缺省 8 = 开缝,0 = 贴合 */
224
224
  size: number;
225
225
  };
226
+ /**
227
+ * 应用页面配置:`AppPage` 的组件级缺省值。
228
+ *
229
+ * 取值顺序 **显式 prop > 本配置 > 核内默认**(与 `APP_FORM_CONFIG` 同构)。核内默认
230
+ * `{ contentCentered: "auto", contentMaxWidth: 1200 }`:应用外壳的侧栏与右侧补充区都不占宽时
231
+ * (顶部导航类布局)默认插槽内容限宽居中,有任一个时铺满;只看外壳,不看 AppPage 自己的侧槽。
232
+ * 整个应用默认铺满:`createCoreBridge({ APP_PAGE_CONFIG: { contentCentered: false } })`。
233
+ */
234
+ APP_PAGE_CONFIG: {
235
+ /** 默认插槽内容限宽居中;缺省 `"auto"`(外壳无侧栏 / 右侧补充区时开启),显式 prop 恒优先 */
236
+ contentCentered: boolean | "auto";
237
+ /** 限宽值(px),仅 `contentCentered` 生效时有效;缺省 1200,显式 prop 恒优先 */
238
+ contentMaxWidth: number;
239
+ };
226
240
  /**
227
241
  * 应用布局-视口边框配置(整个 app-shell 相对浏览器视口四边内缩,套"边框"留白观感)。
228
242
  *
@@ -377,6 +391,8 @@ export type AppLayoutViewportConfig = AppConfig["APP_LAYOUT_VIEWPORT_CONFIG"];
377
391
  export type AppLayoutGapConfig = AppConfig["APP_LAYOUT_GAP_CONFIG"];
378
392
  /** 表单配置(见 {@link AppConfig.APP_FORM_CONFIG}) */
379
393
  export type AppFormConfig = AppConfig["APP_FORM_CONFIG"];
394
+ /** 页面配置(见 {@link AppConfig.APP_PAGE_CONFIG}) */
395
+ export type AppPageConfig = AppConfig["APP_PAGE_CONFIG"];
380
396
  /** 应用主题配置 type 别名 */
381
397
  export type AppThemeConfig = AppConfig["APP_THEME_CONFIG"];
382
398
  /** 应用路由元信息默认配置 type 别名 */
@@ -434,7 +450,7 @@ export interface UserInfoAccess<UserInfo = unknown> {
434
450
  * `APP_LAYOUT_VIEWPORT_CONFIG`(同属布局子,纳入本联合 + layoutAggregate)。
435
451
  * 其余 init 字段(env / cache / router 族 / userInfoAccess)非响应式范围,[MUST NOT] 纳入本联合。
436
452
  */
437
- export type UpdatableConfigKey = "APP_BASE_INFO" | "APP_LAYOUT_HEADER_CONFIG" | "APP_LAYOUT_FOOTER_CONFIG" | "APP_LAYOUT_SIDEBAR_CONFIG" | "APP_LAYOUT_ASIDE_CONFIG" | "APP_LAYOUT_BREADCRUMB_CONFIG" | "APP_LAYOUT_BODY_CONFIG" | "APP_LAYOUT_VIEWPORT_CONFIG" | "APP_LAYOUT_GAP_CONFIG" | "APP_FORM_CONFIG" | "APP_THEME_CONFIG";
453
+ export type UpdatableConfigKey = "APP_BASE_INFO" | "APP_LAYOUT_HEADER_CONFIG" | "APP_LAYOUT_FOOTER_CONFIG" | "APP_LAYOUT_SIDEBAR_CONFIG" | "APP_LAYOUT_ASIDE_CONFIG" | "APP_LAYOUT_BREADCRUMB_CONFIG" | "APP_LAYOUT_BODY_CONFIG" | "APP_LAYOUT_VIEWPORT_CONFIG" | "APP_LAYOUT_GAP_CONFIG" | "APP_FORM_CONFIG" | "APP_PAGE_CONFIG" | "APP_THEME_CONFIG";
438
454
  /**
439
455
  * 7 个可 update 字段 key → 值类型映射。
440
456
  *
@@ -461,6 +477,8 @@ export interface UpdatableConfigMap {
461
477
  /** 应用布局-模块间距配置(内缝 gap) */
462
478
  APP_LAYOUT_GAP_CONFIG: AppLayoutGapConfig;
463
479
  APP_FORM_CONFIG: AppFormConfig;
480
+ /** 页面配置(AppPage 组件级缺省值) */
481
+ APP_PAGE_CONFIG: AppPageConfig;
464
482
  /** 应用主题配置 */
465
483
  APP_THEME_CONFIG: AppThemeConfig;
466
484
  }
@@ -506,6 +524,8 @@ export interface BridgeConfigHook {
506
524
  roGap: DeepReadonly<AppLayoutGapConfig>;
507
525
  /** 表单配置只读视图(`bridge.update("APP_FORM_CONFIG", …)` 后响应式生效) */
508
526
  roForm: DeepReadonly<AppFormConfig>;
527
+ /** 页面配置只读视图(`bridge.update("APP_PAGE_CONFIG", …)` 后响应式生效) */
528
+ roPage: DeepReadonly<AppPageConfig>;
509
529
  /** 应用主题配置对外只读视图 */
510
530
  roTheme: DeepReadonly<AppThemeConfig>;
511
531
  /**
@@ -1,5 +1,5 @@
1
1
  import { CoreBridge, CoreBridgeInitOptions } from './contracts';
2
- export type { AppBaseInfo, AppCacheConfig, AppConfig, AppEnvInfo, AppFormConfig, AppLayoutAsideConfig, AppLayoutBodyConfig, AppLayoutBreadcrumbConfig, AppLayoutConfig, AppLayoutFooterConfig, AppLayoutGapConfig, AppLayoutHeaderConfig, AppLayoutModuleStyle, AppLayoutSidebarConfig, AppLayoutViewportConfig, AppRouterConfig, AppRouterMetaDefaultConfig, AppRouterPathsConfig, AppThemeColor, AppThemeConfig, CoreBridge, CoreBridgeInitOptions, CoreBridgeRegisterOptions, StorageLike, UserInfoAccess, UserInfoFieldAccessor, UserInfoPermissionAccessor, } from './contracts';
2
+ export type { AppBaseInfo, AppCacheConfig, AppConfig, AppEnvInfo, AppFormConfig, AppPageConfig, AppLayoutAsideConfig, AppLayoutBodyConfig, AppLayoutBreadcrumbConfig, AppLayoutConfig, AppLayoutFooterConfig, AppLayoutGapConfig, AppLayoutHeaderConfig, AppLayoutModuleStyle, AppLayoutSidebarConfig, AppLayoutViewportConfig, AppRouterConfig, AppRouterMetaDefaultConfig, AppRouterPathsConfig, AppThemeColor, AppThemeConfig, CoreBridge, CoreBridgeInitOptions, CoreBridgeRegisterOptions, StorageLike, UserInfoAccess, UserInfoFieldAccessor, UserInfoPermissionAccessor, } from './contracts';
3
3
  export { createGenerateRouteMetaRawTree, type RouteMetaDefaultConfig, } from './route';
4
4
  export { createUseState, type UseStateOptions } from './state';
5
5
  export { createStorageWithNamespace } from './storage';
@@ -39,6 +39,35 @@ export declare const APP_API_LIST_MODEL_KEY_CONFIG: Readonly<{
39
39
  }>;
40
40
  /** 应用接口列表模型 */
41
41
  export type AppApiListModel<T = any> = BuildListModel<typeof APP_API_LIST_MODEL_KEY_CONFIG, T>;
42
+ /**
43
+ * 一次性返回的列表模型:`{ items }`,无页信息。
44
+ * ---
45
+ * 判据:条数有一个由定义决定、不随业务数据增长的上限,且前端全量展示;否则用标准分页
46
+ * {@link AppApiListModel}。这是后端接口形状、不是组件契约:要进列表组件时在应用 `@/api` 里经
47
+ * `createListOnceApi` 包成标准分页(见 ListLayout 文档「取数三约定」)。
48
+ */
49
+ export type AppApiListOnceModel<T = any> = DotToObject<typeof APP_API_LIST_MODEL_KEY_CONFIG.LIST_KEY, T[]>;
50
+ /**
51
+ * 反向游标的列表模型:按时间正序的 `items` + 是否还有更早的 + 接着取的位置。
52
+ * ---
53
+ * 用于消息流「先显示最近一批、往上滚再取更早」(`InfiniteListView` `direction="backward"`)。
54
+ * `cursor` 缺省时由应用 `@/api` 自行以当前最早一条的标识续取。
55
+ */
56
+ export interface AppApiListCursorModel<T = any, C = string | number> {
57
+ /** 本批数据(时间正序,最早在前) */
58
+ items: T[];
59
+ /** 是否还有更早的 */
60
+ hasMore: boolean;
61
+ /** 下次取更早一批时带回的位置 */
62
+ cursor?: C;
63
+ }
64
+ /** 反向游标的请求参数:从 `cursor` 往前取 `limit` 条(首批不带 `cursor`,取最近一批)。 */
65
+ export interface AppApiListCursorParams<C = string | number> {
66
+ /** 上一批返回的 `cursor`;首批缺省 */
67
+ cursor?: C;
68
+ /** 本批条数 */
69
+ limit: number;
70
+ }
42
71
  /** 应用接口列表分页参数 key */
43
72
  export type AppApiListPageParamsKey = typeof APP_API_LIST_MODEL_KEY_CONFIG.PAGE_SIZE_KEY | typeof APP_API_LIST_MODEL_KEY_CONFIG.CURRENT_PAGE_KEY;
44
73
  /** 应用接口列表 排除分页参数的 key */
@@ -1,3 +1,4 @@
1
+ import { AppApiListOnceModel } from '../config';
1
2
  import { TableApiParams, TableApiResult } from '../types';
2
3
  export interface FetchListAllOptions {
3
4
  /** 单页大小,默认 100,范围 [1, 1000] */
@@ -27,6 +28,14 @@ export type ListApiSource<T> = T[] | (() => T[]) | (() => Promise<T[]>);
27
28
  * 内部识别 source 类型 + 分页切片;无缓存,每次调用 source 重新求值
28
29
  */
29
30
  export declare function createListApi<T extends Record<string, any>>(source: ListApiSource<T>): (params: TableApiParams<{}>) => Promise<TableApiResult<T>>;
31
+ /**
32
+ * 把一次性返回 `{ items }` 的接口包成标准分页(TableMain / ListLayout :api 签名)
33
+ * ---
34
+ * 在应用 `@/api`(接口定义处)使用,与 `fetchListAll` 方向相反、互为对称:列表组件只认标准分页,
35
+ * 差异在接口定义处适配一次,页面不感知。全量不切片,`totalRecord = items.length`;组件传入的页码
36
+ * 参数原样转给 `api`,`api` 可忽略。页面配 `showPager: false`(见 ListLayout 文档「取数三约定」)。
37
+ */
38
+ export declare function createListOnceApi<T extends Record<string, any>, P extends Record<string, any> = {}>(api: (params: TableApiParams<P>) => Promise<AppApiListOnceModel<T>>): (params: TableApiParams<P>) => Promise<TableApiResult<T>>;
30
39
  /**
31
40
  * countAll: 仅探测列表总记录数,不拉数据。
32
41
  * 1 次 api 调用 page=1/pageSize=1,返回 totalRecord。
@@ -7,7 +7,8 @@ import { CreateGuardOptions } from './types';
7
7
  *
8
8
  * 1:1 镜像原 app `router/guard/index.ts` 行为:
9
9
  * - beforeEach: checkLogin → 跳 loginPath;checkPermission → 跳 noPermissionPath
10
- * - beforeResolve: document.title = to.meta.title
10
+ * - beforeResolve: document.title = to.meta.title;路由没写 title 时回落应用名
11
+ * `APP_BASE_INFO.name`,两者都没有则不改(ndt3f4:此前会写成字符串 "undefined")
11
12
  *
12
13
  * @example
13
14
  * createGuard(router, {
@@ -1,7 +1,9 @@
1
1
  import { RouteLocationNormalized } from 'vue-router';
2
2
  import { CoreBridge } from '../../bridge';
3
3
  /** guard 仅依赖 bridge 的路径配置切片(Pick 表达 → 必 type alias,无法 interface) */
4
- export type GuardBridgeSlice = Pick<CoreBridge, "APP_ROUTER_PATHS_CONFIG">;
4
+ export type GuardBridgeSlice = Pick<CoreBridge, "APP_ROUTER_PATHS_CONFIG"> &
5
+ /** 可选:路由没写 `meta.title` 时页签标题回落应用名(ndt3f4);传完整 bridge 即带上 */
6
+ Partial<Pick<CoreBridge, "APP_BASE_INFO">>;
5
7
  /** guard 仅依赖 route-permission store 的 2 个 check 方法 */
6
8
  export interface GuardRoutePermissionStore {
7
9
  checkNeedGoToLoginPage: (route: RouteLocationNormalized) => boolean;