This repository has been archived by the owner on Jan 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add formkit custom input of repeater (#692)
#### What type of PR is this? /kind feature /milestone 2.0 #### What this PR does / why we need it: 为 FormKit 添加 Repeater 输入类型,用于让用户动态操作一个对象数组。 使用方式可以查阅:https://github.com/ruibaby/halo-console/tree/feat/formkit-repeater/docs/custom-formkit-input#repeater #### Which issue(s) this PR fixes: Fixes halo-dev/halo#2529 #### Screenshots: <img width="635" alt="image" src="https://user-images.githubusercontent.com/21301288/201640327-5eb0489a-2193-445d-9dfe-7405ae75a297.png"> #### Special notes for your reviewer: /cc @halo-dev/sig-halo-console 测试方式: 1. 按照 https://github.com/ruibaby/halo-console/tree/feat/formkit-repeater/docs/custom-formkit-input#repeater 文档,在主题或者插件中使用 FormKit Schema 的形式定义设置表单,然后对表单进行保存等设置,检查是否符合预期。 2. 或者使用 https://github.com/halo-sigs/theme-earth/tree/refactor/setting-spec 主题进行测试,这个分支已经对社交媒体和侧边栏进行了适配。可以在主题设置中测试社交媒体和侧边栏配置,检查在主题端的效果。 #### Does this PR introduce a user-facing change? ```release-note 为 FormKit 添加 Repeater 输入类型。 ```
- Loading branch information
Showing
18 changed files
with
328 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
packages/components/src/components/button/__tests__/__snapshots__/Button.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,61 @@ | ||
// Vitest Snapshot v1 | ||
|
||
exports[`Button > should render 1`] = ` | ||
"<button class=\\"btn-md btn-default btn\\"> | ||
"<button class=\\"btn-md btn-default btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with block prop 1`] = ` | ||
"<button class=\\"btn-md btn-default btn-block btn\\"> | ||
"<button class=\\"btn-md btn-default btn-block btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with circle prop 1`] = ` | ||
"<button class=\\"btn-md btn-default btn-circle btn\\"> | ||
"<button class=\\"btn-md btn-default btn-circle btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with disabled prop 1`] = ` | ||
"<button class=\\"btn-md btn-default btn\\" disabled=\\"\\"> | ||
"<button class=\\"btn-md btn-default btn\\" type=\\"button\\" disabled=\\"\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with size prop 1`] = ` | ||
"<button class=\\"btn-lg btn-default btn\\"> | ||
"<button class=\\"btn-lg btn-default btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with size prop 2`] = ` | ||
"<button class=\\"btn-sm btn-default btn\\"> | ||
"<button class=\\"btn-sm btn-default btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with size prop 3`] = ` | ||
"<button class=\\"btn-xs btn-default btn\\"> | ||
"<button class=\\"btn-xs btn-default btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with type prop 1`] = ` | ||
"<button class=\\"btn-md btn-primary btn\\"> | ||
"<button class=\\"btn-md btn-primary btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with type prop 2`] = ` | ||
"<button class=\\"btn-md btn-secondary btn\\"> | ||
"<button class=\\"btn-md btn-secondary btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; | ||
exports[`Button > should work with type prop 3`] = ` | ||
"<button class=\\"btn-md btn-danger btn\\"> | ||
"<button class=\\"btn-md btn-danger btn\\" type=\\"button\\"> | ||
<!--v-if--><span class=\\"btn-content\\"></span> | ||
</button>" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
8386e14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui – ./
ui-halo-dev.vercel.app
ui-git-main-halo-dev.vercel.app
halo-admin-ui.vercel.app