@vue-start/pro 0.5.43 → 0.5.44

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/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 0.5.44
7
+
8
+ - feat:Page 新增 sub 属性, 返回按钮展示状态添加 sub 判断
9
+ - feat:useProRouter 中 router 的 back 方法在 tabs 模式下,会关闭当前 tab 并且返回
10
+
6
11
  # 0.5.42
7
12
 
8
13
  - fix:Layout tabs 子页面 query 判断 bug
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import * as vue from 'vue';
3
3
  import { VNode, ExtractPropTypes, PropType, DefineComponent, App, UnwrapNestedRefs as UnwrapNestedRefs$1, Ref as Ref$1 } from 'vue';
4
4
  import * as _vue_reactivity from '@vue/reactivity';
5
- import { UnwrapNestedRefs, Ref, ComputedRef } from '@vue/reactivity';
5
+ import { UnwrapNestedRefs, Ref, UnwrapRef, ComputedRef } from '@vue/reactivity';
6
6
  import { Subject } from 'rxjs';
7
7
  import { IRequestActor } from '@vue-start/request';
8
8
  import * as _vue_start_store from '@vue-start/store';
@@ -1615,6 +1615,9 @@ declare const proPageProps: () => {
1615
1615
  layoutTabsBackMode: {
1616
1616
  type: BooleanConstructor;
1617
1617
  };
1618
+ sub: {
1619
+ type: BooleanConstructor;
1620
+ };
1618
1621
  };
1619
1622
  declare type ProPageProps = Partial<ExtractPropTypes<ReturnType<typeof proPageProps>>> & PageHeaderProps;
1620
1623
  declare const ProPage: vue.DefineComponent<ProPageProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<ProPageProps>, {}>;
@@ -2215,7 +2218,47 @@ declare const ProShowDate: vue.DefineComponent<{
2215
2218
  isUnix: boolean;
2216
2219
  }>;
2217
2220
 
2218
- declare const ProLayout: vue.DefineComponent<{
2221
+ declare const ProLayoutKey: unique symbol;
2222
+ declare type TLayoutMenu = {
2223
+ value: string;
2224
+ label: string;
2225
+ hide: boolean;
2226
+ [k: string]: any;
2227
+ };
2228
+ declare type TLayoutTabMenu = TLayoutMenu & {
2229
+ query?: Record<string, any>;
2230
+ };
2231
+ declare type TLayoutType = "vertical" | "horizontal" | "horizontal-v" | "compose";
2232
+ interface IProLayoutProvide {
2233
+ convertName: (route: RouteLocationNormalizedLoaded) => string;
2234
+ convertValue: (menu: TLayoutTabMenu) => string;
2235
+ menus: Ref<TLayoutMenu[]>;
2236
+ menuMap: Ref<Record<string, TLayoutMenu>>;
2237
+ tabs: Ref<TLayoutTabMenu[]>;
2238
+ showTabs: Ref<boolean>;
2239
+ closeTab: (value: string) => void;
2240
+ refreshRef: Ref<UnwrapRef<boolean>>;
2241
+ refresh: (item?: TLayoutMenu) => void;
2242
+ }
2243
+ declare const useProLayout: () => IProLayoutProvide;
2244
+
2245
+ declare const routerViewProps: () => {
2246
+ includes: {
2247
+ type: PropType<string[]>;
2248
+ };
2249
+ };
2250
+ declare type ProRouterViewProps = Partial<ExtractPropTypes<ReturnType<typeof routerViewProps>>>;
2251
+ declare const ProRouterView: vue.DefineComponent<Partial<ExtractPropTypes<{
2252
+ includes: {
2253
+ type: PropType<string[]>;
2254
+ };
2255
+ }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
2256
+ includes: {
2257
+ type: PropType<string[]>;
2258
+ };
2259
+ }>>>, {}>;
2260
+
2261
+ declare const layoutProps: () => {
2219
2262
  /**
2220
2263
  * class名称
2221
2264
  */
@@ -2229,7 +2272,7 @@ declare const ProLayout: vue.DefineComponent<{
2229
2272
  * compose: 菜单第一级在header中,子级在左侧菜单
2230
2273
  */
2231
2274
  layout: {
2232
- type: PropType<"vertical" | "horizontal" | "horizontal-v" | "compose">;
2275
+ type: PropType<TLayoutType>;
2233
2276
  default: string;
2234
2277
  };
2235
2278
  findCurrentTopName: {
@@ -2238,20 +2281,63 @@ declare const ProLayout: vue.DefineComponent<{
2238
2281
  findActiveKey: {
2239
2282
  type: FunctionConstructor;
2240
2283
  };
2284
+ convertName: {
2285
+ type: FunctionConstructor;
2286
+ };
2287
+ convertValue: {
2288
+ type: FunctionConstructor;
2289
+ };
2290
+ tabs: {
2291
+ type: PropType<Partial<ExtractPropTypes<{
2292
+ isHideClose: {
2293
+ type: PropType<(item: TLayoutMenu) => boolean>;
2294
+ };
2295
+ covertMenuItem: {
2296
+ type: FunctionConstructor;
2297
+ };
2298
+ itemLabel: {
2299
+ type: FunctionConstructor;
2300
+ };
2301
+ onDragRegister: {
2302
+ type: PropType<(params: {
2303
+ dom: HTMLDivElement;
2304
+ dataIdAttr: string;
2305
+ onDragEnd: (tabIds: string[]) => void;
2306
+ }) => void>;
2307
+ };
2308
+ }>> & {
2309
+ sessionKey?: string | undefined;
2310
+ clearWhileUnmount?: boolean | undefined;
2311
+ }>;
2312
+ default: undefined;
2313
+ };
2314
+ collapse: {
2315
+ type: BooleanConstructor;
2316
+ };
2317
+ routeOpts: {
2318
+ type: PropType<Partial<ExtractPropTypes<{
2319
+ includes: {
2320
+ type: PropType<string[]>;
2321
+ };
2322
+ }>>>;
2323
+ default: undefined;
2324
+ };
2241
2325
  /**************************** menu相关 *******************************/
2242
2326
  menus: {
2243
- type: PropType<Record<string, any>[]>;
2327
+ type: PropType<TLayoutMenu[]>;
2244
2328
  };
2245
2329
  fieldNames: {
2246
2330
  type: PropType<{
2247
2331
  children: string;
2248
2332
  value: string;
2249
2333
  label: string;
2334
+ hide?: string | undefined;
2250
2335
  }>;
2251
2336
  default: {
2252
2337
  children: string;
2253
2338
  value: string;
2254
2339
  label: string;
2340
+ hide: string;
2255
2341
  };
2256
2342
  };
2257
2343
  convertSubMenuProps: {
@@ -2266,7 +2352,9 @@ declare const ProLayout: vue.DefineComponent<{
2266
2352
  menuProps: {
2267
2353
  type: ObjectConstructor;
2268
2354
  };
2269
- }, () => JSX.Element | null, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
2355
+ };
2356
+ declare type ProLayoutProps = Partial<ExtractPropTypes<ReturnType<typeof layoutProps>>>;
2357
+ declare const ProLayout: vue.DefineComponent<Partial<ExtractPropTypes<{
2270
2358
  /**
2271
2359
  * class名称
2272
2360
  */
@@ -2280,7 +2368,7 @@ declare const ProLayout: vue.DefineComponent<{
2280
2368
  * compose: 菜单第一级在header中,子级在左侧菜单
2281
2369
  */
2282
2370
  layout: {
2283
- type: PropType<"vertical" | "horizontal" | "horizontal-v" | "compose">;
2371
+ type: PropType<TLayoutType>;
2284
2372
  default: string;
2285
2373
  };
2286
2374
  findCurrentTopName: {
@@ -2289,20 +2377,63 @@ declare const ProLayout: vue.DefineComponent<{
2289
2377
  findActiveKey: {
2290
2378
  type: FunctionConstructor;
2291
2379
  };
2380
+ convertName: {
2381
+ type: FunctionConstructor;
2382
+ };
2383
+ convertValue: {
2384
+ type: FunctionConstructor;
2385
+ };
2386
+ tabs: {
2387
+ type: PropType<Partial<ExtractPropTypes<{
2388
+ isHideClose: {
2389
+ type: PropType<(item: TLayoutMenu) => boolean>;
2390
+ };
2391
+ covertMenuItem: {
2392
+ type: FunctionConstructor;
2393
+ };
2394
+ itemLabel: {
2395
+ type: FunctionConstructor;
2396
+ };
2397
+ onDragRegister: {
2398
+ type: PropType<(params: {
2399
+ dom: HTMLDivElement;
2400
+ dataIdAttr: string;
2401
+ onDragEnd: (tabIds: string[]) => void;
2402
+ }) => void>;
2403
+ };
2404
+ }>> & {
2405
+ sessionKey?: string | undefined;
2406
+ clearWhileUnmount?: boolean | undefined;
2407
+ }>;
2408
+ default: undefined;
2409
+ };
2410
+ collapse: {
2411
+ type: BooleanConstructor;
2412
+ };
2413
+ routeOpts: {
2414
+ type: PropType<Partial<ExtractPropTypes<{
2415
+ includes: {
2416
+ type: PropType<string[]>;
2417
+ };
2418
+ }>>>;
2419
+ default: undefined;
2420
+ };
2292
2421
  /**************************** menu相关 *******************************/
2293
2422
  menus: {
2294
- type: PropType<Record<string, any>[]>;
2423
+ type: PropType<TLayoutMenu[]>;
2295
2424
  };
2296
2425
  fieldNames: {
2297
2426
  type: PropType<{
2298
2427
  children: string;
2299
2428
  value: string;
2300
2429
  label: string;
2430
+ hide?: string | undefined;
2301
2431
  }>;
2302
2432
  default: {
2303
2433
  children: string;
2304
2434
  value: string;
2305
2435
  label: string;
2436
+ hide: string;
2306
2437
  };
2307
2438
  };
2308
2439
  convertSubMenuProps: {
@@ -2317,15 +2448,101 @@ declare const ProLayout: vue.DefineComponent<{
2317
2448
  menuProps: {
2318
2449
  type: ObjectConstructor;
2319
2450
  };
2320
- }>>, {
2321
- clsName: string;
2451
+ }>>, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<Partial<ExtractPropTypes<{
2452
+ /**
2453
+ * class名称
2454
+ */
2455
+ clsName: {
2456
+ type: StringConstructor;
2457
+ default: string;
2458
+ };
2459
+ /**
2460
+ * vertical: 上下
2461
+ * horizontal: 左右
2462
+ * compose: 菜单第一级在header中,子级在左侧菜单
2463
+ */
2464
+ layout: {
2465
+ type: PropType<TLayoutType>;
2466
+ default: string;
2467
+ };
2468
+ findCurrentTopName: {
2469
+ type: FunctionConstructor;
2470
+ };
2471
+ findActiveKey: {
2472
+ type: FunctionConstructor;
2473
+ };
2474
+ convertName: {
2475
+ type: FunctionConstructor;
2476
+ };
2477
+ convertValue: {
2478
+ type: FunctionConstructor;
2479
+ };
2480
+ tabs: {
2481
+ type: PropType<Partial<ExtractPropTypes<{
2482
+ isHideClose: {
2483
+ type: PropType<(item: TLayoutMenu) => boolean>;
2484
+ };
2485
+ covertMenuItem: {
2486
+ type: FunctionConstructor;
2487
+ };
2488
+ itemLabel: {
2489
+ type: FunctionConstructor;
2490
+ };
2491
+ onDragRegister: {
2492
+ type: PropType<(params: {
2493
+ dom: HTMLDivElement;
2494
+ dataIdAttr: string;
2495
+ onDragEnd: (tabIds: string[]) => void;
2496
+ }) => void>;
2497
+ };
2498
+ }>> & {
2499
+ sessionKey?: string | undefined;
2500
+ clearWhileUnmount?: boolean | undefined;
2501
+ }>;
2502
+ default: undefined;
2503
+ };
2504
+ collapse: {
2505
+ type: BooleanConstructor;
2506
+ };
2507
+ routeOpts: {
2508
+ type: PropType<Partial<ExtractPropTypes<{
2509
+ includes: {
2510
+ type: PropType<string[]>;
2511
+ };
2512
+ }>>>;
2513
+ default: undefined;
2514
+ };
2515
+ /**************************** menu相关 *******************************/
2516
+ menus: {
2517
+ type: PropType<TLayoutMenu[]>;
2518
+ };
2322
2519
  fieldNames: {
2323
- children: string;
2324
- value: string;
2325
- label: string;
2520
+ type: PropType<{
2521
+ children: string;
2522
+ value: string;
2523
+ label: string;
2524
+ hide?: string | undefined;
2525
+ }>;
2526
+ default: {
2527
+ children: string;
2528
+ value: string;
2529
+ label: string;
2530
+ hide: string;
2531
+ };
2326
2532
  };
2327
- layout: "vertical" | "horizontal" | "horizontal-v" | "compose";
2328
- }>;
2533
+ convertSubMenuProps: {
2534
+ type: FunctionConstructor;
2535
+ };
2536
+ convertMenuItemProps: {
2537
+ type: FunctionConstructor;
2538
+ };
2539
+ onMenuItemClick: {
2540
+ type: FunctionConstructor;
2541
+ };
2542
+ menuProps: {
2543
+ type: ObjectConstructor;
2544
+ };
2545
+ }>>>, {}>;
2329
2546
 
2330
2547
  declare type TFile = {
2331
2548
  id: string;
@@ -2797,9 +3014,9 @@ declare const ProTheme: vue.DefineComponent<{
2797
3014
  createCssVar: {
2798
3015
  type: PropType<(t: ITheme) => Record<string, string | number>>;
2799
3016
  };
2800
- }, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
3017
+ }, () => JSX.Element | vue.VNode<vue.RendererNode, vue.RendererElement, {
2801
3018
  [key: string]: any;
2802
- }>[] | JSX.Element | undefined, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
3019
+ }>[] | undefined, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
2803
3020
  theme: {
2804
3021
  type: ObjectConstructor;
2805
3022
  };
@@ -2826,4 +3043,4 @@ declare const ProTheme: vue.DefineComponent<{
2826
3043
  global: boolean;
2827
3044
  }>;
2828
3045
 
2829
- export { AddButton, BooleanObjType, BooleanRulesObjType, ColumnSetting, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, ElementKeys, FieldNames, FormAction, FormItemProps, FormRulePrefixMap, IAccess, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOpeItem, IOperateItem, IPer, IProConfigProvide, IProCurdProvide, IProFormProvideExtra, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, ITheme, IThemeToken, IUser, InternalNamePath, LogonUser, LogonUserKey, ModalCurdOpe, MustLogon, NamePath, PageHeader, PageHeaderProps, PaginationSlotProps, PerSuffix, Permission, PermissionProps, ProBaseProps, ProColumnSettingProps, ProConfig, ProConfigProps, ProCurd, ProCurdDesc, ProCurdDescConnect, ProCurdDescProps, ProCurdForm, ProCurdFormConnect, ProCurdFormProps, ProCurdList, ProCurdListConnect, ProCurdListProps, ProCurdModal, ProCurdModalForm, ProCurdModalFormConnect, ProCurdModalProps, ProCurdProps, ProDesc, ProDescProps, ProDispatchRequestType, ProForm, ProFormItemProps, ProFormList, ProFormListProps, ProFormProps, ProGrid, ProGridProps, ProLayout, ProList, ProListProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProOperate, ProOperateProps, ProPage, ProPageCurd, ProPageCurdProps, ProPageProps, ProSearchForm, ProSearchFormProps, ProShowDate, ProShowDigit, ProShowOptions, ProShowText, ProShowTree, ProTable, ProTableProps, ProTheme, ProTip, ProTipProps, ProTypography, ProTypographyProps, ProUploadList, ProUploaderText, ProValue, RequestAction, RouterMethods, SearchMode, SearchSlotProps, TAccess, TActionEvent, TActionState, TColor, TColumn, TColumns, TConfigData, TCurdActionEvent, TDark, TDefaultValueType, TElementMap, TExecuteFunName, TExecuteItem, TExecuteName, TFile, TFormExtraMap, TInitialState, TLight, TLogonUserProvide, TMeta, TOpenMenu, TOption, TOptions, TPageState, TProFormOperate, TRegisterStore, TRegisterStoreMap, TRender, TRouter, TSubType, TTableColumn, TTableColumns, TValueType, ThemeKey, ThemeToken, TreeOption, TreeOptions, Wrapper, convertPathToList, convertResData, createExpose, createExposeObj, createFormItemCompFn, createModule, createProConfig, createTheme, defaultPage, filterSlotsByPrefix, getColumnFormItemName, getColumnValueType, getFirstPropName, getRealRender, getSignValue, getValidValues, isValidConfig, isValidNode, mergeState, mergeStateToList, proBaseProps, provideProCurd, provideProFormList, provideProModule, renderColumn, renderElement, renderElements, renderInputColumn, showValue, useAccess, useAccessMgr, useComposeRequestActor, useDispatchMeta, useDispatchStore, useDoneRequestActor, useFailedRequestActor, useFormSubmit, useGetCompByKey, useHasPer, useHasPer2, useLogonUser, useMetaRegister, useModuleEvent, useProConfig, useProCurd, useProForm, useProFormList, useProModal, useProModule, useProMsg, useProNotify, useProRouter, useProTable, useReadStore, useTheme };
3046
+ export { AddButton, BooleanObjType, BooleanRulesObjType, ColumnSetting, CurdAction, CurdAddAction, CurdCurrentMode, CurdMethods, CurdSubAction, ElementKeys, FieldNames, FormAction, FormItemProps, FormRulePrefixMap, IAccess, ICurdAction, ICurdAddAction, ICurdCurrentMode, ICurdOperateOpts, ICurdState, ICurdSubAction, IElementConfig, IHighConfig, IListData, IOpeItem, IOperateItem, IPer, IProConfigProvide, IProCurdProvide, IProFormProvideExtra, IProLayoutProvide, IProModuleProvide, IProTableProvide, IProTableProvideExtra, IRequestOpts, ISearchMode, ITableOperate, ITheme, IThemeToken, IUser, InternalNamePath, LogonUser, LogonUserKey, ModalCurdOpe, MustLogon, NamePath, PageHeader, PageHeaderProps, PaginationSlotProps, PerSuffix, Permission, PermissionProps, ProBaseProps, ProColumnSettingProps, ProConfig, ProConfigProps, ProCurd, ProCurdDesc, ProCurdDescConnect, ProCurdDescProps, ProCurdForm, ProCurdFormConnect, ProCurdFormProps, ProCurdList, ProCurdListConnect, ProCurdListProps, ProCurdModal, ProCurdModalForm, ProCurdModalFormConnect, ProCurdModalProps, ProCurdProps, ProDesc, ProDescProps, ProDispatchRequestType, ProForm, ProFormItemProps, ProFormList, ProFormListProps, ProFormProps, ProGrid, ProGridProps, ProLayout, ProLayoutKey, ProLayoutProps, ProList, ProListProps, ProModalCurd, ProModalCurdProps, ProModule, ProModuleProps, ProOperate, ProOperateProps, ProPage, ProPageCurd, ProPageCurdProps, ProPageProps, ProRouterView, ProRouterViewProps, ProSearchForm, ProSearchFormProps, ProShowDate, ProShowDigit, ProShowOptions, ProShowText, ProShowTree, ProTable, ProTableProps, ProTheme, ProTip, ProTipProps, ProTypography, ProTypographyProps, ProUploadList, ProUploaderText, ProValue, RequestAction, RouterMethods, SearchMode, SearchSlotProps, TAccess, TActionEvent, TActionState, TColor, TColumn, TColumns, TConfigData, TCurdActionEvent, TDark, TDefaultValueType, TElementMap, TExecuteFunName, TExecuteItem, TExecuteName, TFile, TFormExtraMap, TInitialState, TLayoutMenu, TLayoutTabMenu, TLayoutType, TLight, TLogonUserProvide, TMeta, TOpenMenu, TOption, TOptions, TPageState, TProFormOperate, TRegisterStore, TRegisterStoreMap, TRender, TRouter, TSubType, TTableColumn, TTableColumns, TValueType, ThemeKey, ThemeToken, TreeOption, TreeOptions, Wrapper, convertPathToList, convertResData, createExpose, createExposeObj, createFormItemCompFn, createModule, createProConfig, createTheme, defaultPage, filterSlotsByPrefix, getColumnFormItemName, getColumnValueType, getFirstPropName, getRealRender, getSignValue, getValidValues, isValidConfig, isValidNode, mergeState, mergeStateToList, proBaseProps, provideProCurd, provideProFormList, provideProModule, renderColumn, renderElement, renderElements, renderInputColumn, showValue, useAccess, useAccessMgr, useComposeRequestActor, useDispatchMeta, useDispatchStore, useDoneRequestActor, useFailedRequestActor, useFormSubmit, useGetCompByKey, useHasPer, useHasPer2, useLogonUser, useMetaRegister, useModuleEvent, useProConfig, useProCurd, useProForm, useProFormList, useProLayout, useProModal, useProModule, useProMsg, useProNotify, useProRouter, useProTable, useReadStore, useTheme };