feat(form): 新增labelPosition配置

This commit is contained in:
roymondchen 2024-12-17 20:36:29 +08:00
parent e421a58f4e
commit 7a8da68edb
2 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,7 @@
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }" :class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
:prop="itemProp" :prop="itemProp"
:label-width="itemLabelWidth" :label-width="itemLabelWidth"
:label-position="config.labelPosition"
:rules="rule" :rules="rule"
> >
<template #label><span v-html="type === 'checkbox' ? '' : text" :title="config.labelTitle"></span></template> <template #label><span v-html="type === 'checkbox' ? '' : text" :title="config.labelTitle"></span></template>
@ -96,6 +97,7 @@
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }" :class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
:prop="itemProp" :prop="itemProp"
:label-width="itemLabelWidth" :label-width="itemLabelWidth"
:label-position="config.labelPosition"
:rules="rule" :rules="rule"
style="background: #f7dadd" style="background: #f7dadd"
> >
@ -145,6 +147,7 @@
:class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }" :class="{ 'tmagic-form-hidden': `${itemLabelWidth}` === '0' || !text }"
:prop="itemProp" :prop="itemProp"
:label-width="itemLabelWidth" :label-width="itemLabelWidth"
:label-position="config.labelPosition"
:rules="rule" :rules="rule"
style="background: #def7da" style="background: #def7da"
> >

View File

@ -116,6 +116,7 @@ export default {
app.component('m-form-table', Table); app.component('m-form-table', Table);
app.component('m-form-tab', Tabs); app.component('m-form-tab', Tabs);
app.component('m-fields-text', Text); app.component('m-fields-text', Text);
app.component('m-fields-img-upload', Text);
app.component('m-fields-number', Number); app.component('m-fields-number', Number);
app.component('m-fields-number-range', NumberRange); app.component('m-fields-number-range', NumberRange);
app.component('m-fields-textarea', Textarea); app.component('m-fields-textarea', Textarea);