feat(form): label 标签的title属性配置

This commit is contained in:
roymondchen 2024-03-05 15:30:29 +08:00
parent 8e18336fa3
commit e272370fea
2 changed files with 5 additions and 3 deletions

View File

@ -42,7 +42,7 @@
:label-width="itemLabelWidth"
:rules="rule"
>
<template #label><span v-html="type === 'checkbox' ? '' : text"></span></template>
<template #label><span v-html="type === 'checkbox' ? '' : text" :title="config.labelTitle"></span></template>
<TMagicTooltip v-if="tooltip">
<component
:key="key(config)"
@ -99,7 +99,7 @@
:rules="rule"
style="background: #f7dadd"
>
<template #label><span v-html="type === 'checkbox' ? '' : text"></span></template>
<template #label><span v-html="type === 'checkbox' ? '' : text" :title="config.labelTitle"></span></template>
<TMagicTooltip v-if="tooltip">
<component
:key="key(config)"
@ -148,7 +148,7 @@
:rules="rule"
style="background: #def7da"
>
<template #label><span v-html="type === 'checkbox' ? '' : text"></span></template>
<template #label><span v-html="type === 'checkbox' ? '' : text" :title="config.labelTitle"></span></template>
<TMagicTooltip v-if="tooltip">
<component
:key="key(config)"

View File

@ -66,6 +66,8 @@ export interface FormItem {
__key?: string | number;
/** 表单域标签的的宽度,例如 '50px'。支持 auto。 */
labelWidth?: string;
/** label 标签的title属性 */
labelTitle?: string;
className?: string;
/** 表单组件类型 */
type?: string | TypeFunction;