Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加控制台对于文章操作的扩展点 #4177

Open
wan92hen opened this issue Jul 4, 2023 · 3 comments
Open

增加控制台对于文章操作的扩展点 #4177

wan92hen opened this issue Jul 4, 2023 · 3 comments
Assignees
Labels
area/console Issues or PRs related to the Halo Console area/plugin Issues or PRs related to the Plugin Provider kind/feature Categorizes issue or PR as related to a new feature.

Comments

@wan92hen
Copy link
Collaborator

wan92hen commented Jul 4, 2023

你当前使用的版本

v2.7.0

描述一下此特性

在控制台的文章管理相关页面增加针对文章操作的扩展点,可以通过插件扩展对文章的处理能力,包括:

  • 文章列表更多操作中的操作选项
  • 文章列表右上角的操作按钮
  • 多选文章后出现的操作按钮
  • 文章编辑页面右上角的操作按钮

image

附加信息

No response

@ruibaby
Copy link
Member

ruibaby commented Jul 5, 2023

/area console
/area plugin
/kind feature

@f2c-ci-robot f2c-ci-robot bot added area/console Issues or PRs related to the Halo Console area/plugin Issues or PRs related to the Plugin Provider kind/feature Categorizes issue or PR as related to a new feature. labels Jul 5, 2023
@ruibaby
Copy link
Member

ruibaby commented Aug 20, 2023

我会先实现一下列表操作项的扩展,这个扩展应该是比较通用的,我计划定义操作项的类型如下:

export interface EntityDropdownItem {
  priority?: number;
  component: Raw<Component>;
  props: Record<string, unknown>;
  label?: string;
  visible?: boolean;
  permissions?: string[];
  action?: () => void;
  children?: EntityDropdownItem[];
}

然后再由其他需要的地方去实现。

@ruibaby
Copy link
Member

ruibaby commented Aug 20, 2023

/assign

f2c-ci-robot bot pushed a commit that referenced this issue Aug 25, 2023
#### What type of PR is this?

/area console
/kind feature
/milestone 2.9.x

#### What this PR does / why we need it:

添加扩展数据列表中操作按钮列表的基础能力,并为文章和插件管理列表的操作按钮列表添加扩展点以测试此扩展能力。

todo:

- [x] 场景测试
- [x] 文档 

#### Which issue(s) this PR fixes:

Ref #4177

#### Special notes for your reviewer:

可以使用以下插件进行测试:

- 源码:[plugin-export-md.zip](https://github.com/halo-dev/halo/files/12436956/plugin-export-md.zip)
- 可安装的 JAR 包:[plugin-export-md-1.0.0-SNAPSHOT.jar.zip](https://github.com/halo-dev/halo/files/12436950/plugin-export-md-1.0.0-SNAPSHOT.jar.zip)

安装之后可以在文章列表的操作按钮列表中新增一个 `导出为 Markdown 文档` 的按钮,点击之后会导出一个 Markdown 文档。

<img width="374" alt="image" src="https://github.com/halo-dev/halo/assets/21301288/eb0b7c61-f5c8-4af3-bf13-579681d36097">


#### Does this PR introduce a user-facing change?

```release-note
Console 端的文章和插件列表的操作按钮列表支持扩展。
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/console Issues or PRs related to the Halo Console area/plugin Issues or PRs related to the Plugin Provider kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants