question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat(abc: reuse-tab): new reuse-tab component plans!

See original GitHub issue

复用标签在中台系统非常常见,本质是不同路由页可切换且这一过程中数据不会丢失。(例如:#97 也是这个想法)

基于此理论,可能涉及以下若干方面的变更:

Menu

  • 增加 reuse: true 属性表示该菜单可被复用

LayoutComponent

  • 增加 <reuse-tab></reuse-tab> 组件

功能

  • 复用策略
  • 菜单复用策略
  • URL复用策略
  • 复用组件
    • 当前页
    • 历史页
    • 操作区
    • ~支持右键操作~

API

reuse-tab

参数 说明 类型 默认值
max 允许最多复用多少个页面,限 2-100 number 10
excludes 排除规则,限 mode=URL RegExp[] -
change 切换时回调 EventEmitter -
close 关闭回调 EventEmitter -

欢迎大家提供更友好的想法 😄。

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dusdongcommented, Dec 13, 2017

这个基于ext.js的前端体验很不错: http://core.fineui.com/#/Button/ButtonIconFont

1、tab页右键菜单 2、右侧有最大化按钮 tim 20171213202242

0reactions
cipchkcommented, Dec 14, 2017

@blueisboy 在路由复用这一策略上,针对不同路由路径会产生难于复用的这个问题我倒没想过。 但对于 RouteReuseStrategy 而言的判断标准其实是可以利用路由地址,本质上应该很容易区分。

若是 content 选项卡化,这有点回到 iframe 的世界了。

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reuse Route Tab IMPORT MODULE - Ng Alain
Inject the ReuseTabService class anywhere in the project (recommended: startup.service.ts ) and set the mode property, or pass <reuse-tab [mode]="0"> Reset ...
Read more >
ng-alain 复用标签相关设置- Lulus - 博客园
import { ReuseTabMatchMode, ReuseTabService } from '@delon/abc'; export class ... feat(abc: reuse-tab): new reuse-tab component plans!
Read more >
ng-alain 复用标签相关设置 - 51CTO博客
import { ReuseTabMatchMode, ReuseTabService } from '@delon/abc'; export class ... feat(abc: reuse-tab): new reuse-tab component plans!
Read more >
ng-alain 复用标签相关设置| itocm.com
import { ReuseTabMatchMode, ReuseTabService } from '@delon/abc';; export class StartupService ... feat(abc: reuse-tab): new reuse-tab component plans!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found