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

为 Console 端的扩展点获取添加异步支持 #6008

Closed
ruibaby opened this issue May 29, 2024 · 0 comments · Fixed by #6018
Closed

为 Console 端的扩展点获取添加异步支持 #6008

ruibaby opened this issue May 29, 2024 · 0 comments · Fixed by #6018
Assignees
Labels
area/ui Issues or PRs related to the Halo UI kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@ruibaby
Copy link
Member

ruibaby commented May 29, 2024

你当前使用的版本

2.16.0-SNAPSHOT

描述一下此特性

根据插件开发文档所示,目前 UI 部分的扩展点在定义时是允许返回一个 Promise 的,但在内部没有对其做支持,期望能够支持此特性。

/kind feature
/area ui
/milestone 2.16.x

附加信息

No response

@f2c-ci-robot f2c-ci-robot bot added the kind/feature Categorizes issue or PR as related to a new feature. label May 29, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.16.x milestone May 29, 2024
@f2c-ci-robot f2c-ci-robot bot added the area/ui Issues or PRs related to the Halo UI label May 29, 2024
@ruibaby ruibaby self-assigned this May 29, 2024
f2c-ci-robot bot pushed a commit that referenced this issue May 30, 2024
#### What type of PR is this?

/area ui
/kind feature
/milestone 2.16.x

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

优化 UI 部分的扩展点获取实现,让部分扩展点支持异步获取,之前的实现与文档不符。

比如:

```ts
import { definePlugin } from "@halo-dev/console-shared";
import axios from "axios";

export default definePlugin({
  components: {},
  routes: [],
  extensionPoints: {
    "attachment:selector:create": async () => {
      const { data } = await axios.get(
        "/apis/v1alpha1/fake.halo.run/attachments/selectors"
      );

      return data;
    },
  },
});
```

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

Fixes #6008

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

```release-note
优化 UI 部分的扩展点获取实现,让部分扩展点支持异步获取。
```
@ruibaby ruibaby modified the milestones: 2.16.x, 2.16.0 May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Issues or PRs related to the Halo UI kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant