add max height and disabled button
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<t-popup v-model="visible" placement="bottom" :z-index="props.zIndex" :overlay-props="props.overlayProps">
|
||||
<div class="bottom-popup" :style="{ height: props.height }">
|
||||
<div class="bottom-popup" :style="{ height: props.height, maxHeight: props.maxHeight }">
|
||||
<div v-if="hasHeader" class="header">
|
||||
<div class="button left">
|
||||
<slot name="leftButton" :on-click="emitLeftButtonClick">
|
||||
<t-button v-if="leftButtonText" variant="text" size="small" @click="emitLeftButtonClick">
|
||||
<t-button v-if="leftButtonText" variant="text" size="small" :disabled="props.leftButtonDisabled" @click="emitLeftButtonClick">
|
||||
<span v-text="leftButtonText" />
|
||||
</t-button>
|
||||
</slot>
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<div class="button right">
|
||||
<slot name="rightButton" :on-click="emitRightButtonClick">
|
||||
<t-button v-if="rightButtonText" theme="primary" variant="text" size="small" @click="emitRightButtonClick">
|
||||
<t-button v-if="rightButtonText" theme="primary" variant="text" size="small" :disabled="props.rightButtonDisabled" @click="emitRightButtonClick">
|
||||
<span v-text="rightButtonText" />
|
||||
</t-button>
|
||||
</slot>
|
||||
@@ -38,7 +38,13 @@ export interface BottomPopupProps {
|
||||
modelValue?: boolean;
|
||||
leftButtonText?: string;
|
||||
rightButtonText?: string;
|
||||
/** 禁用左侧默认按钮。 */
|
||||
leftButtonDisabled?: boolean;
|
||||
/** 禁用右侧默认按钮。 */
|
||||
rightButtonDisabled?: boolean;
|
||||
height?: string | number;
|
||||
/** 弹层最大高度,数字以 px 为单位。 */
|
||||
maxHeight?: string | number;
|
||||
title?: string;
|
||||
zIndex?: number;
|
||||
overlayProps?: Record<string, unknown>;
|
||||
|
||||
Reference in New Issue
Block a user