scForm 增加 tips 选项
This commit is contained in:
parent
3e0e47003a
commit
49a19aef5e
|
@ -15,7 +15,13 @@
|
||||||
<template v-for="(item, index) in config.formItems" :key="index">
|
<template v-for="(item, index) in config.formItems" :key="index">
|
||||||
<el-col :span="item.span || 24" v-if="!hideHandle(item)">
|
<el-col :span="item.span || 24" v-if="!hideHandle(item)">
|
||||||
<sc-title v-if="item.component=='title'" :title="item.label"></sc-title>
|
<sc-title v-if="item.component=='title'" :title="item.label"></sc-title>
|
||||||
<el-form-item v-else :label="item.label" :prop="item.name" :rules="rulesHandle(item)">
|
<el-form-item v-else :prop="item.name" :rules="rulesHandle(item)">
|
||||||
|
<template #label>
|
||||||
|
{{item.label}}
|
||||||
|
<el-tooltip v-if="item.tips" :content="item.tips">
|
||||||
|
<i class="el-icon-question"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<!-- input -->
|
<!-- input -->
|
||||||
<template v-if="item.component=='input'" >
|
<template v-if="item.component=='input'" >
|
||||||
<el-input v-model="form[item.name]" :placeholder="item.options.placeholder" clearable :maxlength="item.options.maxlength" show-word-limit></el-input>
|
<el-input v-model="form[item.name]" :placeholder="item.options.placeholder" clearable :maxlength="item.options.maxlength" show-word-limit></el-input>
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
name: "checkbox",
|
name: "checkbox",
|
||||||
component: "checkbox",
|
component: "checkbox",
|
||||||
span: 24,
|
span: 24,
|
||||||
message: "多选框配置加上 name 表示拥有嵌套关系。否则将值“平铺”在form对象",
|
tips: "多选框配置加上 name 表示拥有嵌套关系。否则将值“平铺”在form对象",
|
||||||
options: {
|
options: {
|
||||||
items:[
|
items:[
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue