diff --git a/package/component/package.json b/package/component/package.json index 23e73792..c2438187 100644 --- a/package/component/package.json +++ b/package/component/package.json @@ -1,6 +1,6 @@ { "name": "@layui/layui-vue", - "version": "1.1.5-alpha.4", + "version": "1.1.5-alpha.5", "author": "就眠儀式", "license": "MIT", "description": "a component library for Vue 3 base on layui-vue", diff --git a/package/component/src/component/form/index.less b/package/component/src/component/form/index.less index b3d5dc75..b4a8463c 100644 --- a/package/component/src/component/form/index.less +++ b/package/component/src/component/form/index.less @@ -4,6 +4,23 @@ *zoom: 1; } +.layui-form-item-right .layui-form-label { + text-align: right; +} + +.layui-form-item-left .layui-form-label { + text-align: left; +} + +.layui-form-item-top .layui-form-label { + text-align: left; + float: none; +} + +.layui-form-item-top > div { + margin-left: 0; +} + .layui-form-item:after { content: "\20"; clear: both; diff --git a/package/component/src/component/formItem/index.vue b/package/component/src/component/formItem/index.vue index 3e2d5ee2..97b4b509 100644 --- a/package/component/src/component/formItem/index.vue +++ b/package/component/src/component/formItem/index.vue @@ -32,6 +32,7 @@ export interface LayFormItemProps { prop?: string; mode?: string; label?: string; + labelPosition?: string; errorMessage?: string; rules?: Rule; required?: boolean; @@ -39,6 +40,7 @@ export interface LayFormItemProps { const props = withDefaults(defineProps(), { mode: "block", + labelPosition: 'right' }); const layForm = inject("LayForm", {} as LayFormContext); @@ -163,7 +165,7 @@ onMounted(() => { + + + +::: + ::: title 表单基本校验功能 ::: diff --git a/package/document/src/document/zh-CN/guide/changelog.md b/package/document/src/document/zh-CN/guide/changelog.md index a73ce16e..7265ca1a 100644 --- a/package/document/src/document/zh-CN/guide/changelog.md +++ b/package/document/src/document/zh-CN/guide/changelog.md @@ -16,11 +16,11 @@
  • 1.1.5 2022-06-04