Skip to content

Commit

Permalink
revert: 发布新版本 0.33.1 (2023-04-27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyh2001 committed Apr 27, 2023
1 parent a39c407 commit cb2bf74
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 34 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"jizhuangxiang",
"juln",
"kehupandian",
"labelposition",
"landtransportation",
"layoutdirection",
"leftalignment",
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
English | [Chinese](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.md)

## 0.33.1 (2023-04-27)

- Add `label-position` configuration item to the `f-form` component
- Optimize `f-form` style details

## 0.33.0 (2023-04-25)

- Abolish the `f-table` component `optional` configuration item
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md)

## 0.33.1 (2023-04-27)

- `f-form` 组件新增 `label-position` 配置项
- 优化 `f-form` 样式细节

## 0.33.0 (2023-04-25)

- 废除 `f-table` 组件 `optional` 配置项
Expand Down
18 changes: 13 additions & 5 deletions docs/components/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,12 @@

## Form Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| ------------- | ------------------------ | ------------------------------------ | ------ | ------ |
| `label-width` | label 的宽度 | string / number | —— | —— |
| `model` | 表单数据对象 | Object | —— | —— |
| `on-submit` | 点击提交按钮后触发的回调 | <a href="#formsubmit">FormSubmit</a> | —— | —— |
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| ---------------- | ------------------------ | ------------------------------------------ | ------------- | ------ |
| `label-width` | label 的宽度 | string / number | —— | —— |
| `label-position` | label 位置 | <a href="#labelposition">LabelPosition</a> | `top` `right` | top |
| `model` | 表单数据对象 | Object | —— | —— |
| `on-submit` | 点击提交按钮后触发的回调 | <a href="#formsubmit">FormSubmit</a> | —— | —— |

## FormItem Attributes

Expand Down Expand Up @@ -187,6 +188,7 @@ import type {
FormProps,
FormParam,
FormSubmit,
LabelPosition,
FormItemInstance,
FormItemProps,
FormItemRulesItem,
Expand Down Expand Up @@ -228,6 +230,12 @@ interface FormItemRulesItem {
type FormItemRules = FormItemRulesItem[]
```
### LabelPosition
```ts
type LabelPosition = 'left' | 'top'
```
## Contributors
<a href="https://github.com/Tyh2001" target="_blank">
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md)

## 0.33.1 (2023-04-27)

- `f-form` 组件新增 `label-position` 配置项
- 优化 `f-form` 样式细节

## 0.33.0 (2023-04-25)

- 废除 `f-table` 组件 `optional` 配置项
Expand Down
2 changes: 1 addition & 1 deletion packages/fighting-design/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fighting-design",
"version": "0.33.0",
"version": "0.33.1",
"description": "Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.",
"keywords": [
"fighting",
Expand Down
31 changes: 3 additions & 28 deletions start/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
<script lang="ts" setup>
import { reactive } from 'vue'
import { FMessage } from 'fighting-design'
<script lang="ts" setup></script>

const ruleForm = reactive({
account: '',
password: ''
})
<template></template>

const handelSubmit = (): void => {
FMessage.primary('开始提交表单')
}
</script>

<template>
{{ ruleForm }}
<f-form label-width="90px" label-position="left" :on-submit="handelSubmit">
<f-form-item label="账号">
<f-input v-model="ruleForm.account" :max-length="6" type="text" placeholder="请输入账号" />
</f-form-item>

<f-form-item label="密码">
<f-input v-model="ruleForm.password" type="password" placeholder="请输入密码" />
</f-form-item>

<f-form-item>
<f-button type="primary" native-type="submit">提交表单</f-button>
</f-form-item>
</f-form>
</template>
<style lang="scss" scoped></style>

0 comments on commit cb2bf74

Please sign in to comment.