#### What type of PR is this?
/kind improvement
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
插件安装后根据配置的 settingName 读取默认值创建 ConfigMap
如果配置了 settingName 而没有配置 configMapName 则会自动填充为 uuid 并创建一个 ConfigMap
#### Which issue(s) this PR fixes:
Fixes#3160
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
插件安装后自动初始化 Setting 的默认值
```
#### What type of PR is this?
/kind bug
/area core
#### What this PR does / why we need it:
Currently, if there is no `error.html` error template in theme, but there is a `404.html` error template, this will not work correctly.
We always get rendering result from global error template `error.html`.
This PR mainly provides a `ThemeTemplateAvailabilityProvider` to check if the template is available in theme instead of in globally predefined templates.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3062
#### Special notes for your reviewer:
1. Download and install any theme
2. Check the theme folder
3. Check folder `templates/error`
4. Try to remove `templates/error/error.html` template file
5. Create `templates/error/404.html`
6. Request a page which does not exist
7. See the result
#### Does this PR introduce a user-facing change?
```release-note
解决主题自定义错误模板不生效的问题。
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind bug
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind optimization
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
修复后台删除评论后会导致下方头像错误的bug
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3170
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
#### Screenshots:


<!--
如果此 PR 有 UI 的改动,最好截图说明这个 PR 的改动。
If there are UI changes to this PR, it is best to take a screenshot to illustrate the changes to this PR.
eg.
Before:

After:

-->
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
修复后台删除评论后会导致下方头像错误的bug
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind improvement
/area core
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
Display archives in reverse chronological order.
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes https://github.com/halo-dev/halo/issues/3157
#### Special notes for your reviewer:
改进前:

改进后:

#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
归档以年份降序排序
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
优化 Console 端加载插件资源的逻辑。
1. 查询接口改为自定义接口,传入 enabled 参数进行筛选。
2. 修改符合 Console 插件的筛选判断。
3. 隐藏加载异常的提示。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3156
#### Special notes for your reviewer:
测试方式:
1. 安装若干带有 Console 端拓展的插件,比如:https://github.com/halo-sigs/plugin-stackedit
2. 检查是否有加载成功。
3. 创建一个没有插件访问权限的角色。
4. 登录之后检查是否有无权限提示。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端加载插件资源的逻辑。
```
#### What type of PR is this?
/kind bug
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
This PR mainly customizes AnonymousAuthenticationWebFilter and SpringSecurityDialect to make authentication visible in exception web handler. So that we can get SecurityContext while rendering error page.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3133
#### Test steps
1. Start Halo
2. Request a page which is not found
3. See upper right corner icon

#### Does this PR introduce a user-facing change?
```release-note
修复错误模板渲染无法获取登录信息的问题
```
#### What type of PR is this?
/kind feature
/kind improvement
#### What this PR does / why we need it:
Update comments default sorter for console
#### Which issue(s) this PR fixes:
Fixes#3138
#### Special notes for your reviewer:
#### Does this PR introduce a user-facing change?
```release-note
修改评论列表默认排序规则:依据最后回复时间及评论创建时间进行排序
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
/kind improvement
/area core
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
#### What this PR does / why we need it:
Provide administrators with the ability to adjust the order of articles by modifying the publish time.
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes https://github.com/halo-dev/halo/issues/3143
#### Special notes for your reviewer:
修改前:

修改后:

#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
主题侧文章以发布时间排序
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
When we [implemented theme mechanism](https://github.com/halo-dev/halo/pull/2280), some problems of thymeleaf came up in front of us, especially TemplateEngine. So we copied full code of SpringTemplateEngine and SpringWebFluxTemplateEngine and made minor changes to adapt our requirements.
Fortunately, issue https://github.com/thymeleaf/thymeleaf/issues/901 I fired has been fixed, and we have a chance to optimize this part of the code.
See https://github.com/halo-dev/halo/issues/3070 for more.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3070
#### Special notes for your reviewer:
Hope reviewers test various endpoints.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
This PR adapt web properties to control cache of static resources.
Users who want to disable cache can configure like this:
```yaml
spring:
web:
resources:
cache:
cachecontrol:
no-cache: true
use-last-modified: false
```
By default, we have disabled cache in development environment.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3127
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
主题端显示当前用户创建的未审核通过的评论/回复
在开启了评论审核功能的前提下:
- 如果非匿名用户在主题端创建的评论或回复必须审核通过才能显示。
- 如果用户登录后评论或回复会被立即展示在列表,但仅限创建者可见,审核通过后对所有人可见。
#### Which issue(s) this PR fixes:
Fixes#2731
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
主题端支持显示当前用户创建的未审核的评论
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.2.x
#### What this PR does / why we need it:
修复引入外部依赖的插件以开发模式启动时会出现 NoClassDefFoundError 的问题
see #3107 for more detail.
#### Which issue(s) this PR fixes:
Fixes#3107
#### Special notes for your reviewer:
how to test it?
以插件 development 模式启动以下两个插件观察是否正常启动:
- https://github.com/halo-sigs/plugin-s3
- https://github.com/halo-sigs/plugin-alioss
期望没有 `Caused by: java. lang. NoClassDefFoundEenon` 错误,且插件正确启动。
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
修复引入外部依赖的插件以开发模式启动时会出现 NoClassDefFoundError 的问题
```
<!-- Thanks for sending a pull request! Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->
#### What type of PR is this?
<!--
添加其中一个类别:
Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind optimization
适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->
/kind improvement
#### What this PR does / why we need it:
Remove the timeout error prompt caused by the upload server processing for more than 30 seconds
#### Which issue(s) this PR fixes:
<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.
用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes https://github.com/halo-dev/halo/issues/3041
#### Screenshots:
<!--
如果此 PR 有 UI 的改动,最好截图说明这个 PR 的改动。
If there are UI changes to this PR, it is best to take a screenshot to illustrate the changes to this PR.
eg.
Before:

After:

-->


#### Special notes for your reviewer:
测试:
上传大文件让后端处理过程超过30秒,观察是否报错
或使用[修改后的插件](https://github.com/longjuan/halo-plugin-s3os/actions/runs/3852075387)上传到对象存储,观察61秒后是否上传成功
#### Does this PR introduce a user-facing change?
<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
去除上传文件处理时间超过30秒后的报错
```
#### What type of PR is this?
/kind improvement
/milestone 2.2.x
#### What this PR does / why we need it:
文章和自定义页面支持展示最后修改时间
- 文章发布后会同步 post.spec.releasedSnapshot 记录的最后修改时间到 post.status.lastModifyTime,自定义页面亦如是。
- 主题端可以通过 `${item.status.lastModifyTime}` 获取(item表示文章或自定义页面 Vo)。
#### Which issue(s) this PR fixes:
Fixes#3090
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
文章和自定义页面支持展示最后修改时间
```
#### What type of PR is this?
/kind documentation
#### What this PR does / why we need it:
- Use arguments instead of environments.
- Change Docker image halo:2.0 into halo:2.1
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind optimization
#### What this PR does / why we need it:
remove login form icon, fix icon lose dev tool console warning
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3071
#### Does this PR introduce a user-facing change?
```release-note
NONE
```
#### What type of PR is this?
/kind cleanup
/area core
#### What this PR does / why we need it:
Bump version to 2.2.0-SNAPSHOT for next iteration.
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
将 theme-earth 默认主题升级到 1.1.1
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
发布 Console 2.1.0
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3077
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复编辑旧文章时,没有为文章设置 `content.halo.run/preferred-editor` 的元数据的问题。
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3080
#### Special notes for your reviewer:
测试方式:
1. 在有旧数据的情况下切换到此 PR。
2. 编辑一篇旧的文章后保存。
3. 打开文章设置,检查元数据中是否包含了 `content.halo.run/preferred-editor`
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/area core
/milestone 2.1.x
#### What this PR does / why we need it:
新增操作 annotations 的表达式对象
在 thymeleaf 模板中使用示例:
```html
<p th:text="${#annotations.get(user, 'background')}"></p>
<p th:text="${#annotations.getOrDefault(user, 'background', 'default-value')}"></p>
<p th:text="${#annotations.contains(user, 'background')}"></p>
```
#### Which issue(s) this PR fixes:
Fixes#3073
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
新增 Annotations 表达式对象用于在 thymeleaf 中操作自定义模型的 annotations
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复在 Safari 浏览器登录之后无反应的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3002
#### Special notes for your reviewer:
测试方式:
1. 在 Safari 浏览器上测试登录之后是否有跳转到仪表盘即可。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端在 Safari 浏览器登录之后无反应的问题
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复保存文章设置导致发布时间丢失的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3080
#### Special notes for your reviewer:
测试方式:
1. 创建若干文章。
2. 返回到文章管理列表。
3. 打开任意文章的设置。
4. 检查发布时间是否回显,然后保存。
5. 保存之后检查发布时间是否还存在。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端保存文章设置导致发布时间丢失的问题。
```
#### What type of PR is this?
/kind bug
#### What this PR does / why we need it:
修复已登录用户无法访问个人资料页面的问题。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3027
#### Special notes for your reviewer:
/hold
等待 https://github.com/halo-dev/halo/issues/3035 解决。
#### Does this PR introduce a user-facing change?
```release-note
修复 Console 端已登录用户无法访问个人资料页面的问题。
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.1.x
#### What this PR does / why we need it:
Add cache control and last modified headers for responses of static resources.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2966
#### Special notes for your reviewer:
We can check the response header of statis resources to know if the cache control is working correctly.
#### Does this PR introduce a user-facing change?
```release-note
完善静态资源的缓存策略
```
#### What type of PR is this?
/kind improvement
/area core
#### What this PR does / why we need it:
主题卸载时等待删除关联资源后再清除 Finalizer
see #2967 for more detail.
https://github.com/halo-dev/halo/issues/2967#issuecomment-1354384978
#### Which issue(s) this PR fixes:
how to test it?
- 在主题中多添加一个 AnnotationSetting 资源 yaml,测试主题删除是否正常。
- 对包 `org.springframework.retry` 开启 debug 日志后能在删除主题时看到类似如下日志:
```
16:33:02.822 [Test worker] DEBUG org.springframework.retry.support.RetryTemplate - Retry: count=0
16:33:03.128 [Test worker] DEBUG org.springframework.retry.support.RetryTemplate - Checking for rethrow: count=1
```
Fixes#2967
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
主题卸载时等待删除关联资源后再清除 Finalizer
```
#### What type of PR is this?
/kind feature
#### What this PR does / why we need it:
为 MenuItem 模型添加 a 标签的 target 属性设置。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3063
#### Special notes for your reviewer:
测试方式请看:https://github.com/halo-dev/console/pull/805
#### Does this PR introduce a user-facing change?
```release-note
菜单项支持设置打开方式
```
#### What type of PR is this?
/kind improvement
/area core
/milestone 2.1.x
#### What this PR does / why we need it:
迁移后文章过多,当文章的 Reconciler 还没有执行完时访问 Console 端文章列表会因为 post.status 为 Null 出现 NPE 问题
使用文章的 status 时需要对其进行判空
/cherry-pick release-2.0
#### Which issue(s) this PR fixes:
Fixes#3066
#### Special notes for your reviewer:
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
发布 Console 2.1.0-rc.1
#### Which issue(s) this PR fixes:
Ref https://github.com/halo-dev/halo/issues/3050
#### Does this PR introduce a user-facing change?
```release-note
None
```
#### What type of PR is this?
/kind feature
/kind api-change
/area core
/milestone 2.1.x
#### What this PR does / why we need it:
- Configuring message source location and name enables i18n message resolution.
- Simple global error handler.
- Refactor some exceptions with `ResponseStatusException` to control what HTTP status and problem detail need to be returned.
**TODO**
- [x] Add more UTs.
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3020
#### Special notes for your reviewer:
Steps to test:
1. Try to refine `src/main/resources/config/i18n/messages_zh.properties` and switch Browser language with Chinese.
2. Delibrately make a mistake as you wish and see the error tips in console.
3. Try to access one page which doesn't exist and see the rendered result.
#### Does this PR introduce a user-facing change?
```release-note
完成系统异常的国际化
```
#### What type of PR is this?
/kind feature
/milestone 2.1.x
/area core
#### What this PR does / why we need it:
新增 AnnotationSetting 自定义模型以扩展自定义元数据设置表单
主题安装/更新/重载时都会重新加载与 theme.yaml 同层级的其他 yaml,但只会保存 kind 为 Setting 和 AnnotationSetting的,主题卸载时会删除这些 yaml 资源
#### Which issue(s) this PR fixes:
Fixes#3005
#### Special notes for your reviewer:
how to test it?
- 修改影响到了主题安装、更新、重载和删除,需要检查这些功能是否正确加载了 Setting 和 AnnotationSetting
- 插件启动时初始化的 AnnotationSetting 在插件停止时会被删除
- 主题添加了 annotation setting 资源,使用非超级管理员也可以获取
/cc @halo-dev/sig-halo
#### Does this PR introduce a user-facing change?
```release-note
新增 AnnotationSetting 以扩展自定义元数据设置表单
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
移除使用 yaml 编辑用户信息的功能。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/3046
#### Special notes for your reviewer:
None
#### Does this PR introduce a user-facing change?
```release-note
移除 Console 端使用 yaml 编辑用户信息的功能
```
#### What type of PR is this?
/kind improvement
#### What this PR does / why we need it:
优化上传附件的组件和附件库选择组件。
1. 附件上传支持缓存选择的分组和策略。
2. 附件上传支持选择分组。
3. 移除附件选择组件的上传 tab,改为和附件库管理中一样的上传组件。
#### Which issue(s) this PR fixes:
Fixes https://github.com/halo-dev/halo/issues/2828
#### Screenshots:
<img width="722" alt="image" src="https://user-images.githubusercontent.com/21301288/208612167-c7082be4-0fb8-4caa-b246-d15bac525e86.png">
#### Special notes for your reviewer:
测试方式:
1. 测试在附件管理中上传附件的功能是否正常。
2. 测试在附件选择组件中上传附件的功能是否正常。
#### Does this PR introduce a user-facing change?
```release-note
优化 Console 端上传附件的功能,支持缓存选择的分组和策略。
```