scForm 增加 tips 选项

This commit is contained in:
sc 2021-10-08 09:55:18 +08:00
parent 3e0e47003a
commit 49a19aef5e
2 changed files with 8 additions and 2 deletions

View File

@ -15,7 +15,13 @@
<template v-for="(item, index) in config.formItems" :key="index">
<el-col :span="item.span || 24" v-if="!hideHandle(item)">
<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 -->
<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>

View File

@ -195,7 +195,7 @@
name: "checkbox",
component: "checkbox",
span: 24,
message: "多选框配置加上 name 表示拥有嵌套关系。否则将值“平铺”在form对象",
tips: "多选框配置加上 name 表示拥有嵌套关系。否则将值“平铺”在form对象",
options: {
items:[
{