|
@@ -1,22 +1,26 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
<u-popup :zoom="zoom" mode="center" :popup="false" :z-index="uZIndex" v-model="value" :length="width"
|
|
<u-popup :zoom="zoom" mode="center" :popup="false" :z-index="uZIndex" v-model="value" :length="width"
|
|
- :mask-close-able="maskCloseAble" :border-radius="borderRadius" @close="popupClose" :negative-top="negativeTop">
|
|
|
|
|
|
+ :mask-close-able="maskCloseAble" :border-radius="borderRadius" @close="popupClose"
|
|
|
|
+ :negative-top="negativeTop">
|
|
<view class="u-model">
|
|
<view class="u-model">
|
|
<view v-if="showTitle" class="u-model__title u-line-1" :style="[titleStyle]">{{ title }}</view>
|
|
<view v-if="showTitle" class="u-model__title u-line-1" :style="[titleStyle]">{{ title }}</view>
|
|
<view class="u-model__content">
|
|
<view class="u-model__content">
|
|
<view :style="[contentStyle]" v-if="$slots.default || $slots.$default">
|
|
<view :style="[contentStyle]" v-if="$slots.default || $slots.$default">
|
|
- <slot />
|
|
|
|
|
|
+ <scroll-view scroll-y="true" :style="scrollHeight">
|
|
|
|
+ <slot />
|
|
|
|
+ </scroll-view>
|
|
</view>
|
|
</view>
|
|
<view v-else class="u-model__content__message" :style="[contentStyle]">{{ content }}</view>
|
|
<view v-else class="u-model__content__message" :style="[contentStyle]">{{ content }}</view>
|
|
</view>
|
|
</view>
|
|
<view class="u-model__footer u-border-top" v-if="showCancelButton || showConfirmButton">
|
|
<view class="u-model__footer u-border-top" v-if="showCancelButton || showConfirmButton">
|
|
- <view v-if="showCancelButton" :hover-stay-time="100" hover-class="u-model__btn--hover" class="u-model__footer__button"
|
|
|
|
- :style="[cancelBtnStyle]" @tap="cancel">
|
|
|
|
|
|
+ <view v-if="showCancelButton" :hover-stay-time="100" hover-class="u-model__btn--hover"
|
|
|
|
+ class="u-model__footer__button" :style="[cancelBtnStyle]" @tap="cancel">
|
|
{{cancelText}}
|
|
{{cancelText}}
|
|
</view>
|
|
</view>
|
|
- <view v-if="showConfirmButton || $slots['confirm-button']" :hover-stay-time="100" :hover-class="asyncClose ? 'none' : 'u-model__btn--hover'"
|
|
|
|
- class="u-model__footer__button hairline-left" :style="[confirmBtnStyle]" @tap="confirm">
|
|
|
|
|
|
+ <view v-if="showConfirmButton || $slots['confirm-button']" :hover-stay-time="100"
|
|
|
|
+ :hover-class="asyncClose ? 'none' : 'u-model__btn--hover'"
|
|
|
|
+ class="u-model__footer__button hairline-left" :style="[confirmBtnStyle]" @tap="confirm">
|
|
<slot v-if="$slots['confirm-button']" name="confirm-button"></slot>
|
|
<slot v-if="$slots['confirm-button']" name="confirm-button"></slot>
|
|
<block v-else>
|
|
<block v-else>
|
|
<u-loading mode="circle" :color="confirmColor" v-if="loading"></u-loading>
|
|
<u-loading mode="circle" :color="confirmColor" v-if="loading"></u-loading>
|
|
@@ -74,6 +78,7 @@
|
|
type: [Number, String],
|
|
type: [Number, String],
|
|
default: ''
|
|
default: ''
|
|
},
|
|
},
|
|
|
|
+
|
|
// 标题
|
|
// 标题
|
|
title: {
|
|
title: {
|
|
type: [String],
|
|
type: [String],
|
|
@@ -129,6 +134,12 @@
|
|
type: [Number, String],
|
|
type: [Number, String],
|
|
default: 16
|
|
default: 16
|
|
},
|
|
},
|
|
|
|
+ scrollHeight: {
|
|
|
|
+ type: Object,
|
|
|
|
+ default () {
|
|
|
|
+ return {}
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 标题的样式
|
|
// 标题的样式
|
|
titleStyle: {
|
|
titleStyle: {
|
|
type: Object,
|
|
type: Object,
|
|
@@ -280,4 +291,4 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|