mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(form): tooltip丢失
This commit is contained in:
parent
57e815940b
commit
2e12812aac
@ -1,5 +1,10 @@
|
||||
<template>
|
||||
<div v-if="config" :style="config.tip ? 'display: flex' : ''" :class="config.className" class="m-form-container">
|
||||
<div
|
||||
v-if="config"
|
||||
:style="config.tip ? 'display: flex;align-items: baseline;' : ''"
|
||||
:class="config.className"
|
||||
class="m-form-container"
|
||||
>
|
||||
<m-fields-hidden
|
||||
v-if="type === 'hidden'"
|
||||
:model="model"
|
||||
@ -65,8 +70,8 @@
|
||||
<div v-if="extra" v-html="extra" class="m-form-tip"></div>
|
||||
</el-form-item>
|
||||
|
||||
<el-tooltip v-if="config.tip" placement="top" style="line-height: 40px; margin-left: 5px">
|
||||
<i class="el-icon-warning"></i>
|
||||
<el-tooltip v-if="config.tip" placement="top">
|
||||
<el-icon style="line-height: 40px; margin-left: 5px"><warning-filled /></el-icon>
|
||||
<template #content>
|
||||
<div v-html="config.tip"></div>
|
||||
</template>
|
||||
@ -98,6 +103,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent, inject, PropType, ref, resolveComponent, watchEffect } from 'vue';
|
||||
import { WarningFilled } from '@element-plus/icons';
|
||||
|
||||
import { ChildConfig, ContainerCommonConfig, FormState, FormValue } from '../schema';
|
||||
import { display as displayFunction, filterFunction, getRules } from '../utils/form';
|
||||
@ -105,6 +111,8 @@ import { display as displayFunction, filterFunction, getRules } from '../utils/f
|
||||
export default defineComponent({
|
||||
name: 'm-form-container',
|
||||
|
||||
components: { WarningFilled },
|
||||
|
||||
props: {
|
||||
labelWidth: String,
|
||||
expandMore: Boolean,
|
||||
|
@ -14,7 +14,7 @@
|
||||
<el-button
|
||||
v-if="typeof config.append === 'object' && config.append.type === 'button'"
|
||||
style="color: #409eff"
|
||||
@click="buttonClickHandler"
|
||||
@click.prevent="buttonClickHandler"
|
||||
>
|
||||
{{ config.append.text }}
|
||||
</el-button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user