fix(modal): fix modal not showing footer

This commit is contained in:
vben
2020-10-29 23:59:54 +08:00
parent 2f1fbf8e48
commit fb0c7763ed
12 changed files with 131 additions and 116 deletions

View File

@@ -7,11 +7,10 @@
import type { PropType } from 'vue';
import { defineComponent, computed } from 'vue';
import { RightOutlined } from '@ant-design/icons-vue';
export default defineComponent({
name: 'BaseArrow',
name: 'BasicArrow',
components: { RightOutlined },
props: {
// Expand contract, expand by default
@@ -24,7 +23,6 @@
const getClass = computed(() => {
const preCls = 'base-arrow';
const cls = [preCls];
props.expand && cls.push(`${preCls}__active`);
return cls;
});

View File

@@ -1,16 +1,15 @@
<script lang="ts">
import type { PropType } from 'vue';
import { defineComponent, computed, unref, h } from 'vue';
import { Tooltip } from 'ant-design-vue';
import { InfoCircleOutlined } from '@ant-design/icons-vue';
import { defineComponent, computed, unref, h } from 'vue';
import { getPopupContainer } from '/@/utils';
import { isString, isArray } from '/@/utils/is';
import { getSlot } from '/@/utils/helper/tsxHelper';
export default defineComponent({
name: 'BaseHelp',
name: 'BasicHelp',
components: { Tooltip },
props: {
// max-width
@@ -56,12 +55,14 @@
maxWidth: props.maxWidth,
};
});
const getWrapStyleRef = computed(() => {
return {
color: props.color,
fontSize: props.fontSize,
};
});
const getMainStyleRef = computed(() => {
return props.absolute ? props.position : {};
});
@@ -81,6 +82,7 @@
}
return null;
};
return () => {
return h(
Tooltip,

View File

@@ -1,7 +1,7 @@
<template>
<span class="base-title" :class="{ 'show-span': showSpan && $slots.default }">
<slot />
<BaseHelp class="base-title__help" v-if="helpMessage" :text="helpMessage" />
<BasicHelp class="base-title__help" v-if="helpMessage" :text="helpMessage" />
</span>
</template>
<script lang="ts">
@@ -9,8 +9,11 @@
import { defineComponent } from 'vue';
import BasicHelp from './BasicHelp.vue';
export default defineComponent({
name: 'BaseTitle',
name: 'BasicTitle',
components: { BasicHelp },
props: {
helpMessage: {
type: [String, Array] as PropType<string | string[]>,