Skip to content

Commit

Permalink
fix(form,design): 支持行内表单
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Jun 24, 2024
1 parent 654961b commit 77f13fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/design/src/Form.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<template>
<component class="tmagic-design-form" ref="form" :is="uiComponent" v-bind="uiProps">
<component
class="tmagic-design-form"
:class="{ 'tmagic-design-form-inline': inline }"
ref="form"
:is="uiComponent"
v-bind="uiProps"
>
<slot></slot>
</component>
</template>
Expand Down
5 changes: 5 additions & 0 deletions packages/form/src/theme/container.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.tmagic-design-form-inline {
.m-form-container {
display: inline-flex;
}
}
1 change: 1 addition & 0 deletions packages/form/src/theme/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "./container.scss";
@use "./form-dialog.scss";
@use "./form-drawer.scss";
@use "./form.scss";
Expand Down

0 comments on commit 77f13fa

Please sign in to comment.